String.prototype.trim = function() {return this.replace(/^\s+|\s+$/g,'');} var MSIE7=false; if (navigator.userAgent && navigator.userAgent.indexOf("MSIE 7")!=-1) MSIE7=true; var main_url = "https://www.chicco.com.uy"; var main_url_https = "https://www.chicco.com.uy"; var arr_no_autocomplete_off="frm_login";var imgs_lang="/artworks/es"; var lang="/artworks/es"; var DIR=""; var DIR_MONSTER_EDITOR=""; var STYLESID="chicco2018comuy"; var imgs="/artworks"; var url_tobookmark="Chicco Uruguay"; var id_idioma="1"; var lbl_cargando="
Cargando...
"; var lbl_cargando_ico=""; var lbl_buscando="Buscar..."; var lbl_sin_resultados="No se encontraron resultados."; var LBL_JS_BUSCADOR='Buscar...'; var class_plus="fa fa-angle-down"; var class_minus="fa fa-angle-up"; function ocultar_continuar() { o=getObj("cart3_continuar_compra_but_continuar"); if (o!=null) o.style.display="none"; } function mostrar_continuar() { o=getObj("cart3_continuar_compra_but_continuar"); if (o!=null) o.style.display=""; } function delCart3Session(key) { if (typeof(Storage) !== "undefined") { localStorage.removeItem(key); } else { document.cookie = key + "=; expires==Thu, 01 Jan 1970 00:00:00 UTC; path=/"; } } function getCart3Session(key) { if (typeof(Storage) !== "undefined") { return localStorage.getItem(key); } else { return getCookie(key); } } function setCart3Session(key, value) { if (typeof(Storage) !== "undefined") { localStorage.setItem(key, value); } else { document.cookie = key + "=" + value +"; expires=Sun, 19 Sep 2027 00:00:00 -0300; path=/"; } } function getCookie(cname) { var name = cname + "="; var ca = document.cookie.split(';'); for(var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') { c = c.substring(1); } if (c.indexOf(name) == 0) { return c.substring(name.length, c.length); } } return ""; } function locate_country(o,id_producto) { var url="/productos/ordenes3/scripts/locate_country.php?id_pais="+o.value+"&id_producto="+id_producto; mostrarcargando(); crear_script_tag(url,"locate_country"); } function getUrlPrint(url) { var aux=url.split("?"); var dir=aux[0];if (aux.length==1) return "?dmp=1"; if (aux.length>1) { aux=aux[1].split("&"); n=""; for (var i=0;i < aux.length;i++) { v=aux[i].split("="); if (v[0]!="opentype") { if (n!="") {n+="&";} if (v.length==1) { n+=v[0]; } else { n+=v[0]+"="+v[1]; } } } if (n!="") {dir+="?"+n;} } return dir; } function abrirVentana(url, width, height, name) { if (name==null) {name='nueva_ventana';} var str = "height=" + height + ",innerHeight=" + height; str += ",width=" + width + ",innerWidth=" + width; if (window.screen) { var ah = screen.availHeight - 30; var aw = screen.availWidth - 10; var xc = (aw - width) / 2; var yc = (ah - height) / 2; str += ",left=" + xc + ",screenX=" + xc; str += ",top=" + yc + ",screenY=" + yc; } str += ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no"; objwin=window.open(url, name, str); if (objwin) objwin.focus(); return false; } function getObj(id) {if (document.getElementById) {return document.getElementById(id)} else if (document.all) {return document.all[id]} else {return document.all[id]}} function setget_attr(obj, prop, val) { if (!val) return obj.getAttribute(prop); else { if (prop=="onmouseover" || prop=="onmouseout" || prop=="onclick" || typeof val=="function") { if (obj.addEventListener) { if (navegador_detect=="ie") val = Function(val); }else{ obj.attachEvent(prop, new Function('"+val+"'), false); } } obj.setAttribute(prop,val); } } function rnd(max) { var x = Math.random() * max; x = x + 1; return parseInt(x); } var obj_focus=null; function validar_form(form,obligatorios_otros,nroform) { if (typeof obligatorios_otros != "undefined") { campos_chequeo=obligatorios_otros; } else { campos_chequeo=obligatorios; } if (typeof nroform == "undefined") { nroform=''; } var campo,mensaje,valor; for (var i=0;i < campos_chequeo.length;i=i+2) { campo=campos_chequeo[i]; mensaje=campos_chequeo[i+1]; if (campo=="acepto_politicas") { o=getObj("acepto_politicas"); if (o!=null && o.checked==false) { DHTMLALERT(mensaje); obj_focus=o; foco_anterior=o; return false; } } else if (campo=="id_zona_usuario") { o=getObj("id_zona_usuario"); if (o.value=="0") { DHTMLALERT(mensaje); obj_focus=o; foco_anterior=o; return false; } } else { try { valor=eval("form."+campo+".value"); eval_error=false; } catch(err) { valor=""; eval_error=true; } if (eval_error) { try { valor=eval("form."+campo+"_dia.value"); check_date=true; } catch(err) { check_date=false; } if (check_date) { dia=eval("form."+campo+"_dia.value"); mes=eval("form."+campo+"_mes.value"); try {anio=eval("form."+campo+"_anio.value");} catch(err) {anio=2000;} if (dia.substr(0,1)=="0") dia=dia.substr(1,dia.length-1); if (mes.substr(0,1)=="0") mes=mes.substr(1,mes.length-1); dia=parseInt(dia); mes=parseInt(mes)-1; anio=parseInt(anio); source_date = new Date(anio,mes,dia); if ((anio != source_date.getFullYear()) || (mes != source_date.getMonth()) || (dia != source_date.getDate())) { DHTMLALERT(mensaje); o=eval("form."+campo+"_dia"); obj_focus=o; foco_anterior=o; return false; } } else { DHTMLALERT(mensaje); o=eval("form."+campo+"_mes"); obj_focus=o; foco_anterior=o; return false; } } else { if (campo=="clave") { var clave_confirm=getObj("confirm_clave").value; var aux=mensaje.split("|"); mensaje=aux[0]; mensaje_extra=aux[1]; if (valor.length < 6) { DHTMLALERT(mensaje); obj_focus=eval("form."+campo); foco_anterior=obj_focus; return false; } if (valor!=clave_confirm) { DHTMLALERT(mensaje_extra); obj_focus=eval("form."+campo); foco_anterior=obj_focus; return false; } } else if (campo=="email") { var aux=mensaje.split("|"); mensaje=aux[0]; mensaje_extra=aux[1]; if (valor.indexOf('@') < 0 || valor.indexOf('.') < 0 || valor.indexOf(',') > 0) { DHTMLALERT(mensaje); obj_focus=form.email; foco_anterior=obj_focus; return false; } } else { if (valor=="") { DHTMLALERT(mensaje); obj_focus=eval("form."+campo); foco_anterior=obj_focus; return false; } } } } } var o=getObj("btn_submit"+nroform); if (o!=null) {o.disabled=true;} return true; } var buscador_tocado=false; function validar_buscador(form) { if (!buscador_tocado) { DHTMLALERT("Ingrese un texto a buscar"); return false; } var o=form.buscar.value; if (o.length < 2) { DHTMLALERT("Ingrese un texto a buscar"); return false; } return true; } function enfocar_buscador() { getObj('frm_buscador').buscar.focus(); aplicar_quitar_clase('buscador','buscar_on'); } function limpiar_buscador(obj,comp,recuperar) { if (typeof comp == "undefined") comp="Buscar"; if (recuperar && obj.value=="" && obj.oldval!=undefined) obj.value=obj.oldval; else if (obj.value==comp) { obj.oldval=obj.value; obj.value=""; } buscador_tocado=true; } function clear_input(o,l) { if (o.value==l) {o.value='';} } function check_form_registro(form) { var nform=0; for (i=1;i<=10;i++) { if (form["tiny_email"+i]!=null) { nform=i; break; } } if (nform==0) return false; var tiny_nombre=form["tiny_nombre"+nform]; var tiny_email=form["tiny_email"+nform]; if (tiny_nombre!=null) { if (tiny_nombre.value.trim()=="") { DHTMLALERT("Indica tu nombre."); tiny_nombre.focus(); return false; } } var aux="Dirección de email incorrecta o no válida.|Los emails no coinciden.".split("|"); if (tiny_email.value.indexOf('@') < 0 || tiny_email.value.indexOf('.') < 0 || tiny_email.value.indexOf(',') > 0) { DHTMLALERT(aux[0]); tiny_email.focus();return false;} return true; } function validar_olvidemiclave(form) { var aux="Dirección de email incorrecta o no válida.|Los emails no coinciden.".split("|"); if (form.olvideemail.value.indexOf('@') < 0 || form.olvideemail.value.indexOf('.') < 0 || form.email.value.indexOf(',') > 0) { DHTMLALERT(aux[0]); form.olvideemail.focus(); return false; } return true; } function mostrarcargando() { var o = getObj("cargando_dinamico"); if (o==null) return; o.className='cargando_dinamico cargando_dinamico_on'; } function cerrarcargando() { var o = getObj("cargando_dinamico"); if (o==null) return; o.className='cargando_dinamico'; } function crear_script_tag(file,tagname) { var head_html = document.getElementsByTagName('head'); if (head_html==null) head_html=document; else head_html=head_html[0]; if (tagname==undefined) tagname="jscript_gen"; scriptTag = getObj(tagname); if(scriptTag!=null) { head_html.removeChild(scriptTag); delete(scriptTag); scriptTag=null; } var script = document.createElement('script'); var vch="?"; if (file.indexOf("?")!=-1) vch="&"; script.src = file+vch+Math.random()*1000000; script.type = "text/javascript"; script.id = tagname; head_html.appendChild(script); //console.log("crear_script_tag:"+file); } function validar_login(formulario,msg) { if (formulario.usuario.value == '' || formulario.clave.value == '') { DHTMLALERT(msg); formulario.usuario.focus(); return false; } var o=getObj("btn_login_submit"); if (o!=null) o.disabled="disabled"; var o=getObj("login_loader"); if (o!=null) o.style.display=""; return true; } function lista_de_precios() { abrirVentana("/productos/listadeprecios.php", 800, 600, "listap") } function validar_recomendar(form) { if (form.miemail==null) { if (form.tuemail.value.indexOf('@') < 0 || form.tuemail.value.indexOf('.') < 0 || form.tuemail.value.indexOf(',') > 0) {alert('Indica el email del destinatario.');form.tuemail.focus();return false;} } else { if (form.tuemail.value.indexOf('@') < 0 || form.tuemail.value.indexOf('.') < 0 || form.tuemail.value.indexOf(',') > 0) {alert('Indica el email del destinatario.');form.tuemail.focus();return false;} } return true; } var last_video=0; function video(id,t,yt) { var url="/videos/get_video.php?id="+id+"&t="+t; if (typeof yt!="undefined") { url+="&yt="+escape(yt); } if (last_video>0) close_player(last_video); last_video=id; crear_script_tag(url); } function set_player(flv,id,ancho,alto) { t=getPageSize(); anchoventana=t[2]; altoventana=t[3]; if (anchoventana < ancho || altoventana < alto) { anchoventana=anchoventana; ratio=ancho/alto; if (anchoventana < ancho) { nuevancho=anchoventana; nuevoalto=parseInt((anchoventana/ratio)); } else { nuevancho=parseInt((altoventana*ratio)); nuevoalto=altoventana; } flv=str_replace(flv,"\""+ancho+"\"","\""+nuevancho+"\""); flv=str_replace(flv,"\""+alto+"\"","\""+nuevoalto+"\""); flv=str_replace(flv,"'"+ancho+"'","'"+nuevancho+"'"); flv=str_replace(flv,"'"+alto+"'","'"+nuevoalto+"'"); o=getObj("ly_player_container"+id); if (o!=null) { o.style.width=nuevancho+"px"; o.style.height=nuevoalto+"px"; } o=getObj("ly_player_container"+id); o=getObj("ly_player"+id); if (o!=null) { o.style.width=nuevancho; o.style.height=nuevoalto; } } var o=getObj("ly_player"+id); if (o==null) {return;} o.innerHTML=flv; showAndCenter("ly_player_container"+id); o=getObj("productos_presentacion6cont"); if (o!=null) { var owl = $("#productos_presentacion6cont"); owl.trigger('owl.stop'); } activar_layer_transparente("ly_transparente",close_player_alt); } function close_player_alt(id) { if (last_video>0) close_player(last_video); } function close_player(id) { var o=getObj("ly_player"+id); if (o!=null) o.innerHTML=""; if (getObj("ly_player_container"+id)!=null) getObj("ly_player_container"+id).style.display="none"; var ly_transparente = getObj("ly_transparente"); if (ly_transparente != null) { ly_transparente.style.display="none"; } } function startvideos(){} var ahora = 24446; function updateClock() { ahora++; if (ahora>(24*60*60)) ahora=0; var horas=parseInt(ahora/(60*60)); var resto=ahora-(horas*(60*60)); var minutos=parseInt(resto/(60)); var segundos=resto-(minutos*60); minutos = ( minutos < 10 ? "0" : "" ) + minutos; segundos = ( segundos < 10 ? "0" : "" ) + segundos; horas = ( horas < 10 ? "0" : "" ) + horas; getObj("hora").innerHTML = horas + ":" + minutos + ":" + segundos + " hs."; } function send_to_fav(id_objeto,tipo_objeto_favorito) { var url="/usuarios/scripts/agregar_a_favoritos.php?id_objeto="+id_objeto+"&tipo_objeto="+tipo_objeto_favorito; crear_script_tag(url,"fav"); } function remove_from_fav(id_fav) { if (window.confirm("żQuitar de favoritos?")) { var url="/usuarios/scripts/remove_favoritos.php?id_fav="+id_fav; crear_script_tag(url,"fav"); } } function $$asp( objId ) { var o = document.getElementById( objId ); if ( o == null ) return; var n_obj = document.createElement("INPUT"); n_obj.name = o.name + "_hidden_asp"; n_obj.id = o.name + "_hidden_asp"; n_obj.type = "hidden"; o.form.appendChild( n_obj ); o.onblur = function ( e ) { n_obj.value = o.value; }; o.onkeyup = function ( e ) { n_obj.value = o.value; }; o.onchange = function () { n_obj.value = o.value; }; o.onmousedown = function () { n_obj.value = o.value; }; } function cambiar_src(id,img) { var o=getObj("prodzoom"+id); if ( o!=null && o.src.indexOf("")!=-1 ) o.src=img; } function disable_autocomplete() { if (typeof intAutocomplete != "undefined") { clearInterval(intAutocomplete); intAutocomplete = -1; } if (typeof arr_no_autocomplete_off != "undefined") { var vec_no_autocomplete_off = arr_no_autocomplete_off.split(","); for (var j=0;j < vec_no_autocomplete_off.length;j++) { vec_no_autocomplete_off[vec_no_autocomplete_off[j]]=vec_no_autocomplete_off[j]; } } else { vec_no_autocomplete_off=new Array(); } var forms = document.getElementsByTagName("form"); for (var i=0;i < forms.length;i++) { if (forms[i].id!="frmorden" && (!vec_no_autocomplete_off[forms[i].id] || vec_no_autocomplete_off[forms[i].id]==undefined)) { forms[i].setAttribute("autocomplete","off"); var elementos=forms[i].getElementsByTagName("INPUT"); for (e=0;e < elementos.length; e++) { if (elementos[e]!=null && elementos[e].type=="text") { elementos[e].autocomplete = 'off'; } } } } } function debe_registrarse() { DHTMLALERT("

Para usar esta función ingresa como usuario.

"); } var timer_refresh_timer=-1; function keep_alive() { clearInterval(timer_refresh_timer); timer_refresh_timer = -1; crear_script_tag("/includes/keep_alive.php"); } function change_def_cur(c) { var url="/includes/change_cur.php?cur="+c; crear_script_tag(url,"cur"); } var foto_change_in=false; /* se conserva por compatibilidad: hay codigo viejo que la lee */ /* --------------------------------------------------------------------------- Cambio de foto al pasar el mouse por un producto. La version anterior asignaba src/srcset de golpe. Eso da dos problemas: 1. la primera vez el navegador todavia no tiene la 2da foto, asi que el hueco queda en blanco mientras descarga (muy visible en conexion lenta) 2. el cambio es un corte seco, sin transicion Ademas la guarda era UNA variable global para todo el listado: si el mouseout no llegaba (mouse rapido, scroll, o un clic que navega), quedaba en true y ningun otro producto volvia a cambiar de foto en toda la pagina. Ahora la marca va en el propio elemento. El fundido se hace a mano con requestAnimationFrame y opacity inline, NO con transition de CSS: varios skins tienen "transition:all,1s" (con coma), que el navegador parte en dos y deja atascada, y el elemento quedaria invisible. --------------------------------------------------------------------------- */ var FOTO_SWAP_MS = 700; /* duracion del fundido cruzado */ var foto_swap_cache = {}; /* urls ya precargadas, para no pedirlas de nuevo */ function foto_swap_precargar(url) { if (foto_swap_cache[url]) return foto_swap_cache[url]; var im = new Image(); foto_swap_cache[url] = im; im.src = url; return im; } /* Fundido cruzado: se superpone una copia con la foto nueva encima de la actual y se sube su opacidad de 0 a 1. Al terminar, la imagen de abajo se queda con la foto nueva y la copia se descarta. La animacion va con transition de CSS puesta INLINE en la copia (no con requestAnimationFrame): asi la corre el navegador por su cuenta, funciona aunque la pestana no este en primer plano, y al ser inline no la pisa la regla "transition:all,1s" (con coma) que traen algunos skins. */ /* Loader chiquito para el cambio de foto. Solo se muestra si la descarga tarda: con la foto ya en cache el cambio es instantaneo y un loader seria un parpadeo. Anillo girando en CSS puro, sin imagenes ni librerias. */ var FOTO_SWAP_LOADER_MS = 180; /* espera antes de mostrarlo */ function foto_swap_estilos() { if (document.getElementById("foto_swap_css")) return; try { var st = document.createElement("style"); st.id = "foto_swap_css"; st.appendChild(document.createTextNode( "@keyframes foto_swap_giro{to{transform:rotate(360deg)}}" + ".foto_swap_load{position:absolute;width:12px;height:12px;border-radius:50%;" + "border:2px solid rgba(0,0,0,.15);border-top-color:rgba(0,0,0,.5);" + "animation:foto_swap_giro .6s linear infinite;pointer-events:none;z-index:3;" + "opacity:0;transition:opacity .15s ease}" + ".foto_swap_load.on{opacity:1}" )); document.getElementsByTagName("head")[0].appendChild(st); } catch (e) {} } function foto_swap_loader_mostrar(obj) { try { foto_swap_estilos(); var padre = obj.parentNode; if (!padre) return null; var pos = ""; try { pos = window.getComputedStyle(padre).position; } catch (e) {} if (pos === "static" || pos === "") { padre.style.position = "relative"; } /* El div entra al DOM ya encendido. Si se lo inserta apagado y despues se le cambia la clase, la transicion de opacidad queda colgada y el loader nunca se ve: existe, gira y esta bien puesto, pero con opacidad 0 para siempre. Probado: forzar el reflow antes o despues del cambio de clase no arregla nada; lo unico que funciona es que nazca con la clase puesta. */ var l = document.createElement("div"); l.className = "foto_swap_load on"; padre.appendChild(l); /* La posicion se calcula con rectangulos absolutos y no con offsetLeft/Top: esos se miden contra el offsetParent, que aca NO es el padre directo (el cuelga de un static y el offsetParent queda mas arriba), y por eso el loader caia fuera de la foto. */ try { var ri = obj.getBoundingClientRect(); var rp = padre.getBoundingClientRect(); l.style.left = Math.round((ri.left + ri.width / 2) - rp.left - 8) + "px"; l.style.top = Math.round(ri.bottom - rp.top - 24) + "px"; } catch (e) { l.style.left = "50%"; l.style.bottom = "6px"; } return l; } catch (e) { return null; } } function foto_swap_loader_quitar(l) { try { if (l && l.parentNode) l.parentNode.removeChild(l); } catch (e) {} } //------------------------------------------------------------------------------------------- /* El srcset NO es la misma URL que el src: apunta a la version de alta densidad (32 en unos sitios, 34 en otros) y trae su descriptor ("3x"). Si se lo pisa con la url del src, esa ficha pierde la variante hasta recargar -- y si encima queda con la 2da foto, al volver del cache la ficha se ve cambiada. Se recuerda el original una sola vez y de ahi se deriva el de cada foto, reemplazando SOLO el numero y respetando version, extension y descriptor. */ function foto_swap_srcset(obj, url) { try { if (typeof obj.__ss0 === "undefined") obj.__ss0 = obj.getAttribute("srcset") || ""; if (!obj.__ss0) return ""; /* no tenia: no se inventa */ var m = url.match(/productos\d+_(\d+)\./); /* numero de foto destino */ if (!m) return obj.__ss0; return obj.__ss0.replace(/productos(\d+)_(\d+)\./g, "productos$1_" + m[1] + "."); } catch (e) { return ""; } } function foto_swap_poner(obj, url) { obj.src = url; var ss = foto_swap_srcset(obj, url); if (ss) obj.srcset = ss; else obj.removeAttribute("srcset"); } function foto_swap_aplicar(obj, url) { try { if (!obj || !url) return; if (obj.getAttribute("src") === url) return; /* ya esta puesta */ /* Si ya hay un fundido en curso sobre esta imagen, se descarta: manda el ultimo. */ if (obj.__capa && obj.__capa.parentNode) { obj.__capa.parentNode.removeChild(obj.__capa); } obj.__capa = null; if (obj.__fs) { clearTimeout(obj.__fs); obj.__fs = null; } var pre = foto_swap_precargar(url); function cruzar() { try { var padre = obj.parentNode; /* Sin padre donde apoyar la capa, o sin soporte, se cambia directo. */ if (!padre) { foto_swap_poner(obj, url); return; } /* La capa se posiciona sobre la imagen actual, del mismo tamano. */ var capa = document.createElement("img"); capa.src = url; capa.setAttribute("aria-hidden", "true"); capa.style.position = "absolute"; capa.style.left = obj.offsetLeft + "px"; capa.style.top = obj.offsetTop + "px"; capa.style.width = obj.offsetWidth + "px"; capa.style.height = obj.offsetHeight + "px"; capa.style.opacity = "0"; capa.style.pointerEvents = "none"; capa.style.zIndex = "2"; capa.style.transition = "opacity " + FOTO_SWAP_MS + "ms ease-in-out"; /* El padre tiene que poder contener algo absoluto. */ var pos = ""; try { pos = window.getComputedStyle(padre).position; } catch (e) {} if (pos === "static" || pos === "") { padre.style.position = "relative"; } padre.appendChild(capa); obj.__capa = capa; /* Para que la transicion arranque, el navegador tiene que haber registrado la opacidad inicial (0). Se fuerza leyendo una medida del elemento -eso obliga a recalcular el layout- y recien ahi se sube a 1. Es lo mismo que hacia el setTimeout, pero sin depender de temporizadores, que el navegador estrangula cuando la pestana no esta en primer plano (ahi la capa quedaba en 0 y no habia fundido). */ /* jshint ignore:start */ capa.offsetWidth; /* lectura intencional: fuerza el reflow */ /* jshint ignore:end */ capa.style.opacity = "1"; /* Al terminar: la de abajo toma la foto nueva y la capa se va. */ obj.__fs = setTimeout(function () { try { foto_swap_poner(obj, url); if (capa.parentNode) capa.parentNode.removeChild(capa); } catch (e) {} obj.__capa = null; obj.__fs = null; }, FOTO_SWAP_MS + 60); } catch (e) { try { foto_swap_poner(obj, url); } catch (e2) {} } } /* Recien se cruza cuando la foto nueva esta descargada: asi nunca se ve el hueco en blanco que daba la version vieja. */ if (pre.complete && pre.naturalHeight > 0) cruzar(); else { /* Hay que esperar la descarga. El loader se muestra recien si la espera se hace notar: si la foto llega antes, no se llega a ver. */ var loader = null; var tl = setTimeout(function () { if (obj.__fotoIn || obj.__esperando) loader = foto_swap_loader_mostrar(obj); }, FOTO_SWAP_LOADER_MS); obj.__esperando = true; function listo() { obj.__esperando = false; clearTimeout(tl); foto_swap_loader_quitar(loader); } pre.onload = function () { listo(); cruzar(); }; pre.onerror = function () { listo(); /* si la 2da foto no existe, no se toca nada */ }; } } catch (x) { try { foto_swap_poner(obj, url); } catch (y) {} } } /* En tactil NO hay hover: al tocar la ficha el navegador dispara mouseover y acto seguido navega. El usuario ve un destello de la 2da foto que no pidio, y encima se descarga una imagen de mas en cada toque. Se comprueba una vez y se recuerda. */ var foto_swap_puntero_fino = null; function foto_swap_hay_hover() { if (foto_swap_puntero_fino !== null) return foto_swap_puntero_fino; try { if (window.matchMedia) { /* Lo que declara el propio navegador: puntero fino y con hover real. */ foto_swap_puntero_fino = window.matchMedia("(hover: hover) and (pointer: fine)").matches; } else { /* Navegador viejo: se descarta si expone API de touch. */ foto_swap_puntero_fino = !("ontouchstart" in window) && !(navigator.maxTouchPoints > 0); } } catch (e) { foto_swap_puntero_fino = true; } /* ante la duda, se deja andar */ return foto_swap_puntero_fino; } function change_foto_prod_in(obj,version,foto1,filename1,foto2,filename2) { if (!foto_swap_hay_hover()) return; /* en tactil no se cambia la foto */ /* La marca va en el elemento, no en una global: dos productos distintos no se bloquean entre si. */ if (obj.__fotoIn) return; obj.__fotoIn = true; foto_swap_aplicar(obj, "/imgs/productos/productos"+version+"_"+foto2+"."+filename2); } function change_foto_prod_out(obj,version,foto1,filename1,foto2,filename2) { if (!foto_swap_hay_hover()) return; /* en tactil nunca se cambio: nada que revertir */ obj.__fotoIn = false; foto_swap_aplicar(obj, "/imgs/productos/productos"+version+"_"+foto1+"."+filename1); } /* Al volver con 1) { aux=aux[1].split("&"); n=""; for (var i=0;i < aux.length;i++) { v=aux[i].split("="); if (v[0]!="popup") { if (n!="") {n+="&";} if (v.length==1) { n+=v[0]; } else { n+=v[0]+"="+v[1]; } } } if (n=="") {dir+="?"+n;} else {dir+="?"+n+"&";} } return dir; } function calcular_ancho_alto_zoom(w, h, ancho_ventana, alto_ventana, ratio) { if (ratio > 1) { if ( w > ancho_ventana ) w = ancho_ventana; h = parseInt (w / ratio); if ( h > alto_ventana) { h = alto_ventana; w = parseInt (h * ratio); } } else { if ( h > alto_ventana ) h = alto_ventana; w = parseInt (h * ratio); if ( w > ancho_ventana) { w = ancho_ventana; h = parseInt (w / ratio); } } return new Array(w,h); } function img_zoom(img, w, h) { activar_layer_transparente("ly_transparente",close_img_plantilla_zoom); var obj = getObj("div_plantilla_zoom"); if (!obj) { var otemp=document.createElement("div"); otemp.id = "div_plantilla_zoom"; otemp.style.position="absolute"; var otemp_cerrar_contenedor=document.createElement("div"); var otemp_cerrar=document.createElement("div"); otemp_cerrar.id = "div_plantilla_zoom_but_cerrar"; otemp_cerrar.className="cerrar"; otemp_cerrar.style.position="absolute"; otemp_cerrar.style.top="0px"; otemp_cerrar.style.right="0px"; var addfunction = close_img_plantilla_zoom; if (otemp.addEventListener) { otemp.addEventListener("click", addfunction, false); otemp_cerrar.addEventListener("click", addfunction, false); } else if (otemp.attachEvent) { otemp.attachEvent("onclick", addfunction); otemp_cerrar.attachEvent("onclick", addfunction); } else { otemp["onclick"] = addfunction; otemp_cerrar["onclick"] = addfunction; } var otemp_href=document.createElement("a"); otemp_href.href="javascript:void(0);"; document.body.appendChild(otemp); otemp_cerrar.appendChild(otemp_href); otemp_cerrar_contenedor.appendChild(otemp_cerrar); otemp.appendChild(otemp_cerrar_contenedor); var obj = getObj("div_plantilla_zoom"); } obj.style.zIndex=99999999; obj.style.display=""; var img_plantilla_zoom = getObj("img_plantilla_zoom"); if (img_plantilla_zoom==null) { var oimg=document.createElement("img"); oimg.id = "img_plantilla_zoom"; oimg.src=img; obj.appendChild(oimg); img_plantilla_zoom = getObj("img_plantilla_zoom"); } else { img_plantilla_zoom.src = img; img_plantilla_zoom.style.zIndex=999999999; } img_plantilla_zoom.style.display=""; var ratio = w/h; var win=getPageSize(); var pageWidth = win[0]; var pageHeight = win[1]; var windowWidth = win[2]; var windowHeight = win[3]; var array_wh = new Array(); array_wh = calcular_ancho_alto_zoom(w, h, windowWidth, windowHeight, ratio); w = array_wh[0]; h = array_wh[1]; img_plantilla_zoom.width=w; img_plantilla_zoom.height=h; if (document.body && document.body.scrollTop) { var altobody=document.body.scrollTop; } else if (document.documentElement && !document.documentElement.scrollTop) { var altobody=document.documentElement.scrollTop; } else if (document.documentElement && document.documentElement.scrollTop) { var altobody=document.documentElement.scrollTop; } var X = ((windowWidth-w)/2); var Y = ((windowHeight-h)/2); var top=parseInt((altobody + (Y))); var left = parseInt((document.body.scrollLeft+(X))); if (top < 0) top=0; if (left < 0) left=0; obj.style.left=left+"px"; obj.style.top = top + "px"; obj.style.display=""; } function close_img_plantilla_zoom() { if (getObj("ly_transparente")) getObj("ly_transparente").style.display="none"; if (getObj("ly_transparente")) { getObj("img_plantilla_zoom").src = "/artworks/blank.gif"; getObj("img_plantilla_zoom").style.display="none"; } } function nav_new_page(u) { DHTMLALERT("Buscando..."); var newForm = document.createElement("form"); newForm.action = u; newForm.method = "get"; newForm.target = "form"+Math.ceil(1000*Math.random()); try { location.href=u; } catch (error) { location.href=u; } } function activar_free_shipping() { } function ver_telefono_proyecto(contenedor,tel) { aplicar_quitar_clase('telcont'+'_'+contenedor,'telcont_on'); force_undisplay('tellog'+'_'+contenedor); crear_script_tag('/includes/reg_ga_tel_click.php?tel='+tel,'ga_click'); } function sa(id) { if (document.getElementById(id)!=null) { document.getElementById(id).focus(); document.getElementById(id).select(); } } function end_contacto() { o=getObj("iframecontacto"); if (o!=null) o.src=""; location.href="/msgs/contacto_ok.php"; } var mini_form_focus=null; var timer_form_minifocus=-1; function mostrar_mini_contacto(nro_contacto) { if (nro_contacto=="") return; if (nro_contacto==1 || nro_contacto==10) nro_contacto_val=""; else nro_contacto_val=nro_contacto; aplicar_quitar_clase('contacto_mini'+nro_contacto,'contacto'+nro_contacto_val+'_mini_activo'); aplicar_quitar_clase('minicontacto'+nro_contacto_val+'_but'+nro_contacto,'minicontacto'+nro_contacto_val+'_but_on'); o=getObj("contacto_mini_nombres"+nro_contacto); if (o!=null) { mini_form_focus=o; timer_form_minifocus = setInterval(set_focus_miniform, 1000); } } function set_focus_miniform() { clearInterval(timer_form_minifocus); timer_form_minifocus = -1; mini_form_focus.focus(); } function llamar_panel_opciones() { display_undisplay('bienvenida_overlay'); display_undisplay('panel_opciones',2); } function go_paso1_compra() { var url="/productos/includes/check_minimo_compra.php"; crear_script_tag(url,"check_minimo_compra"); } function cargar_url_externa(url,nombre,link) { if (url==undefined || url=="") return; var div_cont_iframe = getObj("ly_iframe_container"); if (div_cont_iframe==null) return; var iframe = getObj("iframe_contenido_externo"); if (iframe.src!=undefined) { mostrarcargando(); div_cont_iframe.style.display=""; activar_layer_transparente("ly_transparente",CERRAR_IFRAME_PROD_URL_EXTERNA); iframe.src = url; cerrarcargando(); return; } if (div_cont_iframe.style.display=="") { div_cont_iframe.style.display="none"; if (getObj("ly_transparente").style.display!="none") { activar_layer_transparente("ly_transparente",CERRAR_IFRAME_PROD_URL_EXTERNA); alert('cerrarcargando'); cerrarcargando(); } } else { div_cont_iframe.style.display=""; activar_layer_transparente("ly_transparente",CERRAR_IFRAME_PROD_URL_EXTERNA); alert('mostrarcargando'); mostrarcargando(); } var o=getObj("item_url_externa_nombre"); var b=getObj("item_url_externa_link"); if (typeof nombre != "string") nombre=""; if (typeof link != "string") link=""; if (o!=null) o.innerHTML=nombre; if (b!=null) b.href=link; if (iframe.src!=undefined) iframe.src = url; return; } function CERRAR_IFRAME_PROD_URL_EXTERNA() { var div_cont_iframe = getObj("ly_iframe_container"); if (div_cont_iframe==null) return; div_cont_iframe.style.display="none"; activar_layer_transparente("ly_transparente",CERRAR_IFRAME_PROD_URL_EXTERNA); } function isFullScreen() { return (document.fullScreenElement && document.fullScreenElement !== null) || document.mozFullScreen || document.webkitIsFullScreen; } function requestFullScreen(element) { if (element.requestFullscreen) element.requestFullscreen(); else if (element.msRequestFullscreen) element.msRequestFullscreen(); else if (element.mozRequestFullScreen) element.mozRequestFullScreen(); else if (element.webkitRequestFullscreen) element.webkitRequestFullscreen(); } function exitFullScreen() { if (document.exitFullscreen) document.exitFullscreen(); else if (document.msExitFullscreen) document.msExitFullscreen(); else if (document.mozCancelFullScreen) document.mozCancelFullScreen(); else if (document.webkitExitFullscreen) document.webkitExitFullscreen(); } function toggleFullScreen(element) { if (isFullScreen()) exitFullScreen(); else requestFullScreen(element || document.documentElement); } function guardar_busqueda() { var url="/propiedades/includes/guardar_busqueda.php"; crear_script_tag(url,"guardar_busqueda"); } function writeflash(o,m,w,h,wm,p,oid) { //alert(wm); var p=unescape(p); var obj = document.getElementById(o); if (obj==null){ alert(o+' MISSING'); return; } if (oid!=null && oid!=undefined) {tag_name="NAME='"+oid+"'";} else {tag_name="";} if (oid!=null && oid!=undefined) {oid="id='"+oid+"'";} else {oid="";} f=""; f+=""; f+=""; if (p!="") {f+="";} f+=""; f+=""; f+="0) if (slow==1) $("#"+objetos[i]).hide('slow'); else $("#"+objetos[i]).slideUp(); else obj.style.display="none"; } else { if (slow>0) if (slow==1) $("#"+objetos[i]).show('slow'); else $("#"+objetos[i]).slideDown(); else obj.style.display=""; } } } function aplicar_quitar_clase(obj,clase,forzar_quitar) { if (typeof(obj) != "object") objeto=getObj(obj); else objeto = obj; if (objeto!=null && objeto.className!=undefined) { if ( objeto.className.indexOf(clase)!=-1 || forzar_quitar!=undefined ) { objeto.className = objeto.className.split(clase).join(""); } else { if ( objeto.className != "" ) objeto.className += " "; objeto.className += clase; } } } function aplicar_clase_tipo_vista(modo) { var elemento1=getObj("vista_producto1"); var elemento2=getObj("vista_producto2"); if (elemento1==null || elemento2==null) return; if (modo==1) { elemento1.className="orden_asc"; elemento2.className="orden_off"; } else { elemento1.className="orden_off"; elemento2.className="orden_asc"; } } function aplicar_clase_objeto(obj,clase) { if (typeof(obj) != "object") objeto=getObj(obj); else objeto = obj; if (objeto!=null && objeto.className!=undefined) { if ( objeto.className != "" ) { objeto.className += " "; } objeto.className += clase; } } function quitar_clase_objeto(obj,clase) { if (typeof(obj) != "object") objeto=getObj(obj); else objeto = obj; if (objeto!=null && objeto.className!=undefined) { str=objeto.className; str=str_replace(str,clase,""); str=str_replace(str," ",""); objeto.className=str; } } function str_replace(str,s,t) { return str.split(s).join(t); } function resize_obj(id_obj, h_px, w_px) { obj=getObj(id_obj); if (h_px!=undefined && h_px!="") { if (isNaN(h_px)) h_px=parseInt(str_replace(h_px.toString(),"px","")); obj.style.height=h_px+"px"; } if (w_px!=undefined && w_px!="") { if (isNaN(w_px)) w_px=parseInt(str_replace(w_px.toString(),"px","")); obj.style.width=w_px+"px"; } } function showAndCenter(id, img) { var obj = id; if (typeof obj != "object") obj=getObj(id); if (obj==null) return; obj.style.display=""; obj.style.visibility="visible"; ancho_layer=obj.style.width; ancho_layer=ancho_layer.replace("px",""); alto_layer=obj.style.height; alto_layer=alto_layer.replace("px",""); if (document.body && document.body.scrollTop) { var altobody=document.body.scrollTop; } else if (document.documentElement && !document.documentElement.scrollTop) { var altobody=document.documentElement.scrollTop; } else if (document.documentElement && document.documentElement.scrollTop) { var altobody=document.documentElement.scrollTop; } var X = ((document.body.scrollWidth-ancho_layer)/2); var Y = ((screen.availHeight-alto_layer)/2); obj.style.zIndex=99999999; obj.style.left=parseInt((document.body.scrollLeft+(X)))+"px"; obj.style.top =parseInt((altobody +(Y) - 100))+"px"; } var focused=null; var foco_anterior=null; function DHTMLALERT(msg) { var dalert_msg = getObj("dhtml_alert_MSG"); if (msg==undefined) msg=""; if (!dalert_msg) return; var dalert = getObj("dhtml_alert"); if (msg!="") { dalert_msg.innerHTML = msg; aplicar_quitar_clase('dhtml_alert','dhtml_alert_on'); activar_layer_transparente("ly_transparente",cerrar_dhtmlalert); var o=getObj("btn_cerrar_dhmlalert"); if (o!=null) o.focus(); } else { var dalert = getObj("dhtml_alert"); dalert_msg.innerHTML = ""; if (getObj("ly_transparente").style.display!="none") { aplicar_quitar_clase('dhtml_alert','dhtml_alert_on'); activar_layer_transparente("ly_transparente",cerrar_dhtmlalert); } if (foco_anterior!=null) { foco_anterior.focus(); foco_anterior=null; } } } function cerrar_dhtmlalert() { DHTMLALERT(); } function activar_layer_transparente(id_obj,addfunction) { var obj=getObj(id_obj); if (obj==null) return; if (obj.className!="u") { obj.className="u"; if (typeof addfunction == "function") { if (obj.removeEventListener) { obj.removeEventListener("click", addfunction, false); } if (obj.detachEvent) { obj.detachEvent("onclick", addfunction); } else { obj["click"] = null; } } } else { if (typeof addfunction == "function") { if (obj.addEventListener) { obj.addEventListener("click", addfunction, false); } else if (obj.attachEvent) { obj.attachEvent("onclick", addfunction); } else { obj["onclick"] = addfunction; } } obj.className="block"; } } function getPageSize() { var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = document.body.scrollWidth; yScroll = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight){ xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } if(yScroll < windowHeight){ pageHeight = windowHeight; } else { pageHeight = yScroll; } if(xScroll < windowWidth){ pageWidth = windowWidth; } else { pageWidth = xScroll; } arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) return arrayPageSize; } function recomendar_web() { var ly_transparente=getObj("ly_transparente"); var obj=getObj("recomendar"); activar_layer_transparente("ly_transparente",recomendar_web); aplicar_quitar_clase('recomendar','dhtml_alert_on'); o=getObj("form_recomendar").tuemail; if (o!=null) { o.focus(); } else { o=getObj("form_recomendar").tuemail; if (o!=null) o.focus(); } }function set_tab_new(obj) { var obj_id = obj.id; var prefijo="container_"; var obj_class = obj.className; var vec_tab_names = obj_id.split("_"); if (vec_tab_names.length<=1) { alert("Nombre TAG inválido falta prefijo _#"); return; } vec_tab_names.pop(); var tab_name = vec_tab_names.join("_"); obj_class = obj_class.split("_off").join(""); obj_class = obj_class.split("_on").join(""); for (var i=1;i<20;i++) { tab_actual=getObj(tab_name+"_"+i); container_actual=getObj(prefijo+tab_name+"_"+i); if (tab_actual!=null && container_actual!=null) { tab_actual.className="off"; container_actual.style.display="none"; } } tab_actual=getObj(obj_id); container_actual=getObj(prefijo+obj_id); tab_actual.className="active"; container_actual.style.display=""; }var autoexpandiendo=false; var tipo_categorias=""; var contenidos_categorias_mostrar_items=""; var forzar_navegar_siempre=false; function init_cats() { var pdiv,phref; for (var i=0;i < paths.length;i++) { aux=paths[i].split("."); pdiv=getObj("a"+paths[i]); return_false=false; if (pdiv==null) { return_false=true; pdiv=getObj("p"+paths[i]); } phref=getObj("l"+paths[i]); phrefimg=getObj("limg"+paths[i]); if ("0"=="1" && aux.length<=2) { } else { if (pdiv!=null) { if (pdiv.addEventListener) { if (return_false) { if (phref!=null) phref.setAttribute("onclick","return false"); } if (pdiv!=null) pdiv.setAttribute("onclick","expand_contract_cats('"+paths[i]+"')"); if (phrefimg!=null) phrefimg.setAttribute("onclick","expand_contract_cats('"+paths[i]+"')"); } else { if (return_false) { if (phref!=null) phref.attachEvent("onclick", function(){return false}, false); } if (pdiv!=null) pdiv.attachEvent("onclick", new Function("expand_contract_cats('"+paths[i]+"')"), false); if (phrefimg!=null) phrefimg.attachEvent("onclick", new Function("expand_contract_cats('"+paths[i]+"')"), false); } } } } } var last_url_expand=""; var last_padre_expandido=""; function expand_contract_cats(path) { var plus=getObj("plus"+path); if (plus!=null) { //vascula la clase if (plus.className==class_plus) { plus.className=class_minus; } else { plus.className=class_plus; } } var aux=path.split("."); o=getObj("l"+path); if (o!=null) last_url_expand=o.href; else last_url_expand=""; var clase_padre="level1"; if (expandidos[path] == undefined || expandidos[path]==0) { expandir_hijos(path); clase_padre="level1 treeactive"; } else { if (forzar_navegar_siempre || (aux.length==2 && !autoexpandiendo)) { if (cat_url.charAt(cat_url.length-1)=="&" || cat_url.charAt(cat_url.length-1)=="?") { var nav_url=cat_url+"path="+path; } else if (cat_url=="") { var nav_url=o.href; } else { var nav_url=cat_url+"&path="+path; } if (!forzar_navegar_siempre) { contraer_hijos(path); } else { location.href=nav_url; return; } } else { contraer_hijos(path); clase_padre="level1"; } } var aux=path.split("."); if (aux.length==2) { if (last_padre_expandido!="") { var li_padre=getObj("p"+last_padre_expandido); if (li_padre!=null) li_padre.className="level1"; } var li_padre=getObj("p"+path); if (li_padre!=null) li_padre.className=clase_padre; last_padre_expandido=path; } } function expandir_hijos(path) { var ids_actual,prof_actual,path_actual,objhijo; var ids=path.split("."); var prof=ids.length-1; var hubo_expansion=false; for (var i=0;i < paths.length;i++) { path_actual=paths[i]; ids_actual=path_actual.split("."); prof_actual=ids_actual.length-1; if ((prof+1)==prof_actual) { if ((path_actual.substring(0,(path.length+1))) == (path+".")) { objhijo=getObj("p"+path_actual); if (objhijo!=null) { objhijo.style.display=""; hubo_expansion=true; } } } } if (tipo_categorias=="contenidos" && contenidos_categorias_mostrar_items=="") hubo_expansion=false; if (!hubo_expansion) { if (cat_url.charAt(cat_url.length-1)=="&" || cat_url.charAt(cat_url.length-1)=="?") { var nav_url=cat_url+"path="+path; } else { var nav_url=cat_url+"&path="+path; } if (!autoexpandiendo) { if (cat_url!="") { var h=getObj("l"+path); if (h==null || h.href=="") location.href=nav_url; else location.href=h.href; } else { if (last_url_expand!="") location.href=last_url_expand; } } } else { expandidos[path]=1; } } function contraer_hijos(path) { var path_actual,objhijo; var ids=path.split("."); var prof=ids.length-1; for (var i=0;i < paths.length;i++) { path_actual=paths[i]; if ((path_actual.substring(0,(path.length+1))) == (path+".")) { objhijo=getObj("p"+path_actual); plus=getObj("plus"+path_actual); if (plus!=null) plus.className=class_plus; expandidos[path_actual]=0; if (objhijo!=null) objhijo.style.display="none"; } } expandidos[path]=0; } function autoexpand(path) { if (path=="") return; autoexpandiendo=true; var ids=path.split("."); var path_nav="0"; for (var i=1;i<(ids.length);i++) { path_nav+="."+ids[i]; expandir_hijos(path_nav); plus=getObj("plus"+path_nav); if (plus!=null) plus.className=class_minus; } autoexpandiendo=false; }/* * easy-autocomplete * jQuery plugin for autocompletion * * @author Ċukasz PaweĊ‚czak (http://github.com/pawelczak) * @version 1.3.5 * Copyright License: */ var EasyAutocomplete=function(a){return a.Configuration=function(a){function b(){if("xml"===a.dataType&&(a.getValue||(a.getValue=function(a){return $(a).text()}),a.list||(a.list={}),a.list.sort||(a.list.sort={}),a.list.sort.method=function(b,c){return b=a.getValue(b),c=a.getValue(c),c>b?-1:b>c?1:0},a.list.match||(a.list.match={}),a.list.match.method=function(a,b){return a.search(b)>-1}),void 0!==a.categories&&a.categories instanceof Array){for(var b=[],c=0,d=a.categories.length;d>c;c+=1){var e=a.categories[c];for(var f in h.categories[0])void 0===e[f]&&(e[f]=h.categories[0][f]);b.push(e)}a.categories=b}}function c(){function b(a,c){var d=a||{};for(var e in a)void 0!==c[e]&&null!==c[e]&&("object"!=typeof c[e]||c[e]instanceof Array?d[e]=c[e]:b(a[e],c[e]));return void 0!==c.data&&null!==c.data&&"object"==typeof c.data&&(d.data=c.data),d}h=b(h,a)}function d(){if("list-required"!==h.url&&"function"!=typeof h.url){var b=h.url;h.url=function(){return b}}if(void 0!==h.ajaxSettings.url&&"function"!=typeof h.ajaxSettings.url){var b=h.ajaxSettings.url;h.ajaxSettings.url=function(){return b}}if("string"==typeof h.listLocation){var c=h.listLocation;"XML"===h.dataType.toUpperCase()?h.listLocation=function(a){return $(a).find(c)}:h.listLocation=function(a){return a[c]}}if("string"==typeof h.getValue){var d=h.getValue;h.getValue=function(a){return a[d]}}void 0!==a.categories&&(h.categoriesAssigned=!0)}function e(){void 0!==a.ajaxSettings&&"object"==typeof a.ajaxSettings?h.ajaxSettings=a.ajaxSettings:h.ajaxSettings={}}function f(a){return void 0!==h[a]&&null!==h[a]}function g(a,b){function c(b,d){for(var e in d)void 0===b[e]&&a.log("Property '"+e+"' does not exist in EasyAutocomplete options API."),"object"==typeof b[e]&&-1===$.inArray(e,i)&&c(b[e],d[e])}c(h,b)}var h={data:"list-required",url:"list-required",dataType:"json",listLocation:function(a){return a},xmlElementName:"",getValue:function(a){return a},autocompleteOff:!0,placeholder:!1,ajaxCallback:function(){},matchResponseProperty:!1,list:{sort:{enabled:!1,method:function(a,b){return a=h.getValue(a),b=h.getValue(b),b>a?-1:a>b?1:0}},maxNumberOfElements:6,hideOnEmptyPhrase:!0,match:{enabled:!1,caseSensitive:!1,method:function(a,b){return a.search(b)>-1}},showAnimation:{type:"normal",time:400,callback:function(){}},hideAnimation:{type:"normal",time:400,callback:function(){}},onClickEvent:function(){},onSelectItemEvent:function(){},onLoadEvent:function(){},onChooseEvent:function(){},onKeyEnterEvent:function(){},onMouseOverEvent:function(){},onMouseOutEvent:function(){},onShowListEvent:function(){},onHideListEvent:function(){}},highlightPhrase:!0,theme:"",cssClasses:"",minCharNumber:0,requestDelay:0,adjustWidth:!0,ajaxSettings:{},preparePostData:function(a,b){return a},loggerEnabled:!0,template:"",categoriesAssigned:!1,categories:[{maxNumberOfElements:4}]},i=["ajaxSettings","template"];this.get=function(a){return h[a]},this.equals=function(a,b){return!(!f(a)||h[a]!==b)},this.checkDataUrlProperties=function(){return"list-required"!==h.url||"list-required"!==h.data},this.checkRequiredProperties=function(){for(var a in h)if("required"===h[a])return logger.error("Option "+a+" must be defined"),!1;return!0},this.printPropertiesThatDoesntExist=function(a,b){g(a,b)},b(),c(),h.loggerEnabled===!0&&g(console,a),e(),d()},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.Logger=function(){this.error=function(a){console.log("ERROR: "+a)},this.warning=function(a){console.log("WARNING: "+a)}},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.Constans=function(){var a={CONTAINER_CLASS:"easy-autocomplete-container",CONTAINER_ID:"eac-container-",WRAPPER_CSS_CLASS:"easy-autocomplete"};this.getValue=function(b){return a[b]}},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.ListBuilderService=function(a,b){function c(b,c){function d(){var d,e={};return void 0!==b.xmlElementName&&(e.xmlElementName=b.xmlElementName),void 0!==b.listLocation?d=b.listLocation:void 0!==a.get("listLocation")&&(d=a.get("listLocation")),void 0!==d?"string"==typeof d?e.data=$(c).find(d):"function"==typeof d&&(e.data=d(c)):e.data=c,e}function e(){var a={};return void 0!==b.listLocation?"string"==typeof b.listLocation?a.data=c[b.listLocation]:"function"==typeof b.listLocation&&(a.data=b.listLocation(c)):a.data=c,a}var f={};if(f="XML"===a.get("dataType").toUpperCase()?d():e(),void 0!==b.header&&(f.header=b.header),void 0!==b.maxNumberOfElements&&(f.maxNumberOfElements=b.maxNumberOfElements),void 0!==a.get("list").maxNumberOfElements&&(f.maxListSize=a.get("list").maxNumberOfElements),void 0!==b.getValue)if("string"==typeof b.getValue){var g=b.getValue;f.getValue=function(a){return a[g]}}else"function"==typeof b.getValue&&(f.getValue=b.getValue);else f.getValue=a.get("getValue");return f}function d(b){var c=[];return void 0===b.xmlElementName&&(b.xmlElementName=a.get("xmlElementName")),$(b.data).find(b.xmlElementName).each(function(){c.push(this)}),c}this.init=function(b){var c=[],d={};return d.data=a.get("listLocation")(b),d.getValue=a.get("getValue"),d.maxListSize=a.get("list").maxNumberOfElements,c.push(d),c},this.updateCategories=function(b,d){if(a.get("categoriesAssigned")){b=[];for(var e=0;ee;e+=1)c[e].data=b(a,c[e],d);return c},this.checkIfDataExists=function(a){for(var b=0,c=a.length;c>b;b+=1)if(void 0!==a[b].data&&a[b].data instanceof Array&&a[b].data.length>0)return!0;return!1}},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.proccess=function(b,c,d){function e(a,c){var d=[],e="";if(b.get("list").match.enabled)for(var g=0,h=a.length;h>g;g+=1)e=b.get("getValue")(a[g]),f(e,c)&&d.push(a[g]);else d=a;return d}function f(a,c){return b.get("list").match.caseSensitive||("string"==typeof a&&(a=a.toLowerCase()),c=c.toLowerCase()),!!b.get("list").match.method(a,c)}function g(a){return void 0!==c.maxNumberOfElements&&a.length>c.maxNumberOfElements&&(a=a.slice(0,c.maxNumberOfElements)),a}function h(a){return b.get("list").sort.enabled&&a.sort(b.get("list").sort.method),a}a.proccess.match=f;var i=c.data,j=d;return i=e(i,j),i=g(i),i=h(i)},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.Template=function(a){var b={basic:{type:"basic",method:function(a){return a},cssClass:""},description:{type:"description",fields:{description:"description"},method:function(a){return a+" - description"},cssClass:"eac-description"},iconLeft:{type:"iconLeft",fields:{icon:""},method:function(a){return a},cssClass:"eac-icon-left"},iconRight:{type:"iconRight",fields:{iconSrc:""},method:function(a){return a},cssClass:"eac-icon-right"},links:{type:"links",fields:{link:""},method:function(a){return a},cssClass:""},custom:{type:"custom",method:function(){},cssClass:""}},c=function(a){var c,d=a.fields;return"description"===a.type?(c=b.description.method,"string"==typeof d.description?c=function(a,b){return a+" - "+b[d.description]+""}:"function"==typeof d.description&&(c=function(a,b){return a+" - "+d.description(b)+""}),c):"iconRight"===a.type?("string"==typeof d.iconSrc?c=function(a,b){return a+""}:"function"==typeof d.iconSrc&&(c=function(a,b){return a+""}),c):"iconLeft"===a.type?("string"==typeof d.iconSrc?c=function(a,b){return""+a}:"function"==typeof d.iconSrc&&(c=function(a,b){return""+a}),c):"links"===a.type?("string"==typeof d.link?c=function(a,b){return""+a+""}:"function"==typeof d.link&&(c=function(a,b){return""+a+""}),c):"custom"===a.type?a.method:b.basic.method},d=function(a){return a&&a.type&&a.type&&b[a.type]?c(a):b.basic.method},e=function(a){var c=function(){return""};return a&&a.type&&a.type&&b[a.type]?function(){var c=b[a.type].cssClass;return function(){return c}}():c};this.getTemplateClass=e(a),this.build=d(a)},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.main=function(b,c){function d(){return 0===t.length?void p.error("Input field doesn't exist."):o.checkDataUrlProperties()?o.checkRequiredProperties()?(e(),void g()):void p.error("Will not work without mentioned properties."):void p.error("One of options variables 'data' or 'url' must be defined.")}function e(){function a(){var a=$("
"),c=n.getValue("WRAPPER_CSS_CLASS");o.get("theme")&&""!==o.get("theme")&&(c+=" eac-"+o.get("theme")),o.get("cssClasses")&&""!==o.get("cssClasses")&&(c+=" "+o.get("cssClasses")),""!==q.getTemplateClass()&&(c+=" "+q.getTemplateClass()),a.addClass(c),t.wrap(a),o.get("adjustWidth")===!0&&b()}function b(){var a=t.outerWidth();t.parent().css("width",a)}function c(){t.unwrap()}function d(){var a=$("
").addClass(n.getValue("CONTAINER_CLASS"));a.attr("id",f()).prepend($("
").addClass("br-tt br-tt-"+this._cpAlign[0]).append('
');var Z=this._$tooltip.find(">.br-tt-content").css({width:this._options.tooltipWidth,height:this._options.tooltipHeight});B("body").prepend(this._$tooltip);if("image"===this._options.tooltip){this._$items.each(B.proxy(function(ae,ac){var ab=B(ac).find(">img.tt-img"),aa=ab.clone();Z.append(aa);var ad=this._$thumbs.eq(ae);ad.hover(B.proxy(function(){this._$tooltip.stop(true,true).find("img").hide().eq(ae).show();this.displayTooltip(ad)},this),B.proxy(this.hideTooltip,this));ab.one("load",B.proxy(function(){this.fillContent(ab,this._options.tooltipWidth,this._options.tooltipHeight);aa.css({visibility:"visible",top:ab.css("top"),left:ab.css("left"),width:ab.width(),height:ab.height()});ab.remove()},this)).attr("src",ab.attr("src"));if(ab[0].complete||"complete"===ab[0].readyState){ab.trigger("load")}},this))}else{this._$items.each(B.proxy(function(ag,ae){var ab,ac=B(ae).find(">.tt-html");if(ac.length&&""!==ac.html()){ab=ac.html()}else{ab=B(ae).data("caption")}if(typeof ab!=="undefined"&&""!==ab){var af=this._$thumbs.eq(ag);if("auto"===this._options.tooltipWidth&&"auto"===this._options.tooltipHeight){Z.html(ab);var ad=Z.width()+1,aa=Z.height()+1;Z.html("");af.bind(d,B.proxy(function(){Z.css({width:ad,height:aa})},this))}af.hover(B.proxy(function(){this._$tooltip.stop(true,true);af.trigger(d);Z.html(ab);this.displayTooltip(af)},this),B.proxy(this.hideTooltip,this))}},this))}if(s){this._$tooltip.mouseleave(B.proxy(function(aa){if(document.elementFromPoint&&!B(document.elementFromPoint(aa.clientX,aa.clientY)).closest(".banner-rotator").is(this._$rotator)){this._$rotator.trigger("mouseleave")}},this))}}},displayTooltip:function(ac){var Z=this._options.cpanelOutside?this._$extPanel:ac,ab,aa;if(this._verticalCPanel){aa=Z.offset().left;if("left"===this._cpAlign[0]){aa+=Z.outerWidth()}else{aa-=this._$tooltip.outerWidth(true)}ab=ac.offset().top-(this._$tooltip.outerHeight(true)-ac.outerHeight())/2}else{ab=Z.offset().top;if("top"===this._cpAlign[0]){ab+=Z.outerHeight()}else{ab-=this._$tooltip.outerHeight(true)}aa=ac.offset().left-(this._$tooltip.outerWidth(true)-ac.outerWidth())/2}this._tooltipId=setTimeout(B.proxy(function(){this._$tooltip.css({opacity:0,top:ab,left:aa}).show().animate({opacity:1},Q)},this),this._options.tooltipDelay)},hideTooltip:function(){clearTimeout(this._tooltipId);this._$tooltip.stop(true).animate({opacity:0},400,function(){B(this).hide()})},selectSlide:function(aa){if(this._options.pauseOnInteraction){this.pause()}if(!this._inProgress){var Z=B(aa.currentTarget).index();if(Z!=this._currIndex){if(this._options.layerOutSync){this.loadDeferred(B.proxy(function(){this.select_slide(Z)},this))}else{this.select_slide(Z)}}}},select_slide:function(Z){this._backward=Z0)?(this._currIndex-1):(this._numItems-1);this.loadSlide()},nextSlide:function(){if(this._options.pauseOnInteraction){this.pause()}if(!this._inProgress){if(this._options.layerOutSync){this.loadDeferred(B.proxy(function(){this.next_slide()},this))}else{this.next_slide()}}},next_slide:function(){this._$rotator.trigger(o);this._options.onNext.call(this);this._backward=false;this._currIndex=(this._currIndex.br-play-button").addClass("br-pause");if(!this._inProgress){this.resumeTimer()}this._$rotator.trigger(P);this._options.onPlay.call(this)}},pause:function(){if(this._rotate){this._rotate=false;this._$cpanel.find(">.br-play-button").removeClass("br-pause");if(!this._inProgress){this.pauseTimer()}this._$rotator.trigger(w);this._options.onPause.call(this)}},displayLayers:function(){this.stopLayers();this._layerIds=[];this._$currItem.data("layers").each(B.proxy(function(aa,Z){this._layerIds.push(setTimeout(B.proxy(function(){this.animateLayer(B(Z))},this),B(Z).data("delay")))},this))},animateLayer:function(Z){Z.stopTransition(true,true);var aa=Z.data(),ad={},ac={};Z.css({opacity:aa.opacity,margin:0,transform:"none"}).show();switch(aa.effect){case"fade":ad={opacity:0};ac={opacity:aa.opacity};break;case"moveDown":var ab=this.getVerticalMoveProp(Z,true);ad=ab.from;ac=ab.to;break;case"moveUp":var ab=this.getVerticalMoveProp(Z,false);ad=ab.from;ac=ab.to;break;case"moveRight":var ab=this.getHorizontalMoveProp(Z,true);ad=ab.from;ac=ab.to;break;case"moveLeft":var ab=this.getHorizontalMoveProp(Z,false);ad=ab.from;ac=ab.to;break;case"zoomIn":ad={transform:"scale(0)",opacity:0};ac={transform:"scale(1)",opacity:aa.opacity};break;case"zoomOut":ad={transform:"scale(2)",opacity:0};ac={transform:"scale(1)",opacity:aa.opacity};break;case"flipDown":ad={transform:"perspective(400px) rotateX(90deg)"};ac={transform:"perspective(400px) rotateX(0deg)"};break;case"flipUp":ad={transform:"perspective(400px) rotateX(-90deg)"};ac={transform:"perspective(400px) rotateX(0deg)"};break;case"flipRight":ad={transform:"perspective(400px) rotateY(-90deg)"};ac={transform:"perspective(400px) rotateY(0deg)"};break;case"flipLeft":ad={transform:"perspective(400px) rotateY(90deg)"};ac={transform:"perspective(400px) rotateY(0deg)"};break;case"slideDown":case"slideUp":case"slideRight":case"slideLeft":this.slideEffect(Z,{effect:aa.effect,duration:aa.duration,easing:aa.easing,effectOut:false});this.deferLayerOut(Z);return;default:this.deferLayerOut(Z);return}Z.css(ad).transition(ac,aa.duration,aa.easing);this.deferLayerOut(Z)},deferLayerOut:function(Z){var aa=Z.data("delayOut");if(typeof aa!=="undefined"&&0
");ab.addClass("br-effect-wrapper").css({position:aa.css("position"),"float":aa.css("float"),width:aa.outerWidth(true),height:aa.outerHeight(true),zIndex:aa.css("zIndex"),top:aa[0].style.top,left:aa[0].style.left,bottom:aa[0].style.bottom,right:aa[0].style.right});aa.wrap(ab).css({display:"block",position:"relative",top:0,left:0,bottom:"auto",right:"auto"}).css(Z)},removeWrapper:function(Z){this.restoreStyle(Z);if(Z.parent().is(".br-effect-wrapper")){Z.unwrap()}},saveStyle:function(aa){var ac={},ab=["display","position","top","left","bottom","right","width","height"];for(var Z=0;Zimg.br-main-img").unbind("load.display");this.resetTimer();while(this._layerIds.length){clearTimeout(this._layerIds.pop())}var Z=this._$layers.filter(":visible");if(Z.length){var aa=[];Z.each(B.proxy(function(ae,ad){var ac=B(ad);if(typeof ac.data("promise")==="undefined"||"pending"!==ac.data("promise").state()){this.animateLayerOut(ac)}aa[ae]=ac.data("promise")},this));this._promise=B.when.apply(null,aa).done(function(){ab.call(this)});Z.removeData("promise")}else{ab.call(this)}}},loadSlide:function(){this._$items.find(">img.br-main-img").unbind("load.display");this._$screen.find(">.br-links>a.br-main-link").hide();this.resetTimer();this.clearLayers(true);B.each(this._effects,function(ac,ad){ad.clear()});if(0===this._currIndex){this._$rotator.trigger(L);this._options.onFirstSlide.call(this)}if((this._numItems-1)===this._currIndex){this._$rotator.trigger(z);this._options.onLastSlide.call(this);if(this._options.playOnce){this.pause()}}this._$rotator.trigger(k);this._options.onSlideChange.call(this);if(false!==this._options.thumbnails){this._$thumbs.removeClass("br-curr").eq(this._currIndex).addClass("br-curr");this._$rotator.trigger(E)}var Z=this._$items.eq(this._currIndex);if(Z.data("ready")){this.displayContent(Z)}else{this._$preloader.show();var aa=Z.find(">img.br-main-img");aa.one("load.display",B.proxy(function(){if(!Z.data("ready")){this.processImage(Z)}this.displayContent(Z)},this));var ab=((typeof aa.attr("src")==="undefined"||""===aa.attr("src"))?Z.data("imgurl"):aa.attr("src"));aa.attr("src",ab);if(aa[0].complete||"complete"===aa[0].readyState){aa.trigger("load")}}},displayContent:function(Z){this._$preloader.hide();this._inProgress=true;this._$prevItem=this._$currItem;this._$currItem=Z;var ad=this._$currItem.data();if(typeof ad.linkEl!=="undefined"){ad.linkEl.show()}if(!this._options.layerSync){this.displayLayers()}if(typeof this._$prevItem==="undefined"||this._$prevItem.index()==this._$currItem.index()){this.displayCurrent();return}var ac=ad.effect;if("random"===ac){ac=this._effectArray[Math.floor(Math.random()*this._effectArray.length)]}if(typeof r[ac]!=="undefined"){var aa=r[ac][0];var ab=r[ac][1];this._effects[aa][ab](this._$currItem.find(">img.br-main-img"),ac,ad.duration,ad.easing)}else{this.displayCurrent()}},displayCurrent:function(){this._$rotator.trigger(U);this._options.onSlideComplete.call(this);if(this._options.layerSync){this.displayLayers()}this._$items.css({visibility:"hidden"});this._$currItem.css({visibility:"visible"});this.startTimer();this._inProgress=false},loadImage:function(aa){var Z=B.Deferred(),ab=aa.find(">img.br-main-img");ab.one("load",B.proxy(function(){if(!aa.data("ready")){this.processImage(aa)}Z.resolve()},this)).error(function(){Z.reject()});var ac=((typeof ab.attr("src")==="undefined"||""===ab.attr("src"))?aa.data("imgurl"):ab.attr("src"));ab.attr("src",ac);if(ab[0].complete||"complete"===ab[0].readyState){ab.trigger("load")}return Z},loadNextImage:function(Z,aa){if(Z.length){B.when(this.loadImage(B(Z.pop()))).always(B.proxy(function(){this.loadNextImage(Z,aa)},this))}else{if(B.isFunction(aa)){aa.call(this)}}},loadAllImages:function(){var Z=0;var aa=setInterval(B.proxy(function(){if(Zimg.br-main-img");ac.one("load",B.proxy(function(){if(!ab.data("ready")){this.processImage(ab)}},this));var ad=((typeof ac.attr("src")==="undefined"||""===ac.attr("src"))?ab.data("imgurl"):ac.attr("src"));ac.attr("src",ad);if(ac[0].complete||"complete"===ac[0].readyState){ac.trigger("load")}}else{clearInterval(aa)}},this),100)},processImage:function(ag){var Z=ag.find(">img.br-main-img"),ac=H(ag.data("imagePosition"),this._options.imagePosition),ad=(ac+"").split(" ");if(2===ad.length){if(!isNaN(parseInt(ad[0],0))){Z.css({left:ad[0]})}if(!isNaN(parseInt(ad[1],0))){Z.css({top:ad[1]})}}else{switch(ac){case"fill":this.fillContent(Z,this._stageWidth,this._stageHeight);break;case"fit":this.fitContent(Z,this._stageWidth,this._stageHeight);break;case"center":this.centerContent(Z,this._stageWidth,this._stageHeight);break;case"stretch":this.stretchContent(Z,this._stageWidth,this._stageHeight);break}}var ae=this._$stage.width()/this._stageWidth,af=parseInt(Z.css("top"),0),ab=parseInt(Z.css("left"),0),aa=Z.width(),ah=Z.height();Z.data({top:af,left:ab,width:aa,height:ah}).css({top:Math.round(ae*af),left:Math.round(ae*ab),width:Math.round(ae*aa),height:Math.round(ae*ah)});ag.data("ready",true)},centerContent:function(Z,aa,ab){Z.css({top:(ab-Z.height())/2,left:(aa-Z.width())/2})},fillContent:function(aa,ac,ae){if("auto"===ac||"auto"===ae){return}var ab=aa.width(),Z=aa.height(),ad=Math.max(ae/Z,ac/ab);aa.css({width:ab*ad,height:Z*ad});this.centerContent(aa,ac,ae)},fitContent:function(aa,ae,af){var ac=aa.width(),Z=aa.height(),ad=ae/af,ab=ac/Z;if(ad>ab){ac*=af/Z;Z=af}else{Z*=ae/ac;ac=ae}aa.css({width:ac,height:Z});this.centerContent(aa,ae,af)},stretchContent:function(Z,aa,ab){Z.css({top:0,left:0,width:aa,height:ab})},startTimer:function(){this._delay=this._$currItem.data("delay");this.resumeTimer()},resumeTimer:function(){if(this._rotate&&0Z+this._$thumbPanel.width()){var ab=(((this._numItems-1)-this._currIndex)*this._$thumbs.outerWidth(true))+this._$thumbPanel.data("range");this._$thumbList.animate({left:ab},{duration:Q,easing:this._scrollEasing,queue:false})}}},updateVerticalThumbs:function(){var aa=this._$thumbs.eq(this._currIndex).offset().top,Z=this._$thumbPanel.offset().top;if(aaZ+this._$thumbPanel.height()){var ab=(((this._numItems-1)-this._currIndex)*this._$thumbs.outerHeight(true))+this._$thumbPanel.data("range");this._$thumbList.animate({top:ab},{duration:Q,easing:this._scrollEasing,queue:false})}}},resizeHorizontalCPanel:function(){this._$thumbPanel.css({width:Math.min(this._$screen.width()-this._$cpanel.data("margin")-this._$cpanel.data("buttonsSize"),this._$thumbList.width())});this._$cpanel.css({width:this._$cpanel.data("buttonsSize")+this._$thumbPanel.width()});this._$cpWrapper.siblings(".br-ext-bg").css({width:this._$screen.width()});this._$thumbList.stop();var Z=this._$thumbPanel.width()-this._$thumbList.width();if(this._$thumbList.position().left.br-ext-cp").css({height:this._$screen.height()});this._$thumbList.stop();var Z=this._$thumbPanel.height()-this._$thumbList.height();if(this._$thumbList.position().toph){if(this._swipeMove>0){this.nextSlide()}else{if(this._swipeMove<0){this.prevSlide()}}}}},mousescroll:function(Z){Z.preventDefault();var aa=(typeof Z.originalEvent.wheelDelta==="undefined")?-Z.originalEvent.detail:Z.originalEvent.wheelDelta;if(aa>0){this.prevSlide()}else{this.nextSlide()}},keyControl:function(Z){switch(Z.keyCode){case 37:this.prevSlide();break;case 39:this.nextSlide();break;case 80:this.togglePlay();break}},resize:function(){if(B(window).width()!==this._winWidth){this._winWidth=B(window).width();this.resetTimer();this.clearLayers(false);var Z=this._$stage.width()/this._stageWidth;this._$stage.css({height:Math.round(Z*this._stageHeight)});this._$screen.css({width:this._$stage.width(),height:this._$stage.height()});B.each(this._effects,function(ab,ac){ac.resize(Z)});this._$items.each(function(){if(B(this).data("ready")){var ab=B(this).find(">img.br-main-img");ab.css({top:Math.round(Z*ab.data("top")),left:Math.round(Z*ab.data("left")),width:Math.round(Z*ab.data("width")),height:Math.round(Z*ab.data("height"))})}});this._$layers.each(function(){var ac=B(this).data(),ab={};if(!isNaN(ac.width)){ab.width=Math.ceil(Z*ac.width)+"px"}if(!isNaN(ac.height)){ab.height=Math.ceil(Z*ac.height)+"px"}B(this).css({paddingTop:Math.round(Z*ac.padTop)+"px",paddingBottom:Math.round(Z*ac.padBottom)+"px",paddingLeft:Math.round(Z*ac.padLeft)+"px",paddingRight:Math.round(Z*ac.padRight)+"px",borderTopWidth:Math.round(Z*ac.borderTop)+"px",borderBottomWidth:Math.round(Z*ac.borderBottom)+"px",borderLeftWidth:Math.round(Z*ac.borderLeft)+"px",borderRightWidth:Math.round(Z*ac.borderRight)+"px",fontSize:Math.floor(Z*ac.fontSize)+"px",lineHeight:Math.floor(Z*ac.lineHeight)+"px"}).css(ab)});this._$rotator.trigger(b);var aa=this._$items.eq(this._currIndex);if(aa.data("ready")){this._$items.css({visibility:"hidden"});aa.css({visibility:"visible"});this.displayLayers();this.startTimer()}}},getEffect:function(Z){if(!this._cssTransform){if(-10)}function m(ag){var ae=["Webkit","Moz","O","ms"],ad=document.body||document.documentElement,ab=ad.style,aa=false;if(typeof ab[ag]!=="undefined"){aa=ag}else{var ac=ag.charAt(0).toUpperCase()+ag.slice(1);for(var Z=0;Z-1){if(typeof Z==="undefined"||parseFloat(ab.slice(aa+8))<=Z){return true}}return false}function J(){var aa=navigator.userAgent;var Z=aa.indexOf("Chrome");return(Z>-1)}function p(Z){var ac=Z.length;while(--ac>0){var aa=Math.floor(Math.random()*(ac+1)),ab=Z[ac];Z[ac]=Z[aa];Z[aa]=ab}}B.fn.copyBorder=function(ac){var ab=["top","bottom","left","right"],aa=["width","style","color"],Z=["borderRadiusTopLeft","borderRadiusTopRight","borderRadiusBottomLeft","borderRadiusBottomRight"];return this.each(function(){for(var af=0;af').wrap('
');this.$elem.find(".owl-wrapper").wrap('
');this.wrapperOuter=this.$elem.find(".owl-wrapper-outer");this.$elem.css("display","block")}, baseClass:function(){var a=this.$elem.hasClass(this.options.baseClass),b=this.$elem.hasClass(this.options.theme);a||this.$elem.addClass(this.options.baseClass);b||this.$elem.addClass(this.options.theme)},updateItems:function(){var a,b;if(!1===this.options.responsive)return!1;if(!0===this.options.singleItem)return this.options.items=this.orignalItems=1,this.options.itemsCustom=!1,this.options.itemsDesktop=!1,this.options.itemsDesktopSmall=!1,this.options.itemsTablet=!1,this.options.itemsTabletSmall= !1,this.options.itemsMobile=!1;a=f(this.options.responsiveBaseWidth).width();a>(this.options.itemsDesktop[0]||this.orignalItems)&&(this.options.items=this.orignalItems);if(!1!==this.options.itemsCustom)for(this.options.itemsCustom.sort(function(a,b){return a[0]-b[0]}),b=0;bthis.itemsAmount&& !0===this.options.itemsScaleUp&&(this.options.items=this.itemsAmount)},response:function(){var a=this,b,e;if(!0!==a.options.responsive)return!1;e=f(g).width();a.resizer=function(){f(g).width()!==e&&(!1!==a.options.autoPlay&&g.clearInterval(a.autoPlayInterval),g.clearTimeout(b),b=g.setTimeout(function(){e=f(g).width();a.updateVars()},a.options.responsiveRefreshRate))};f(g).resize(a.resizer)},updatePosition:function(){this.jumpTo(this.currentItem);!1!==this.options.autoPlay&&this.checkAp()},appendItemsSizes:function(){var a= this,b=0,e=a.itemsAmount-a.options.items;a.$owlItems.each(function(c){var d=f(this);d.css({width:a.itemWidth}).data("owl-item",Number(c));if(0===c%a.options.items||c===e)c>e||(b+=1);d.data("owl-roundPages",b)})},appendWrapperSizes:function(){this.$owlWrapper.css({width:this.$owlItems.length*this.itemWidth*2,left:0});this.appendItemsSizes()},calculateAll:function(){this.calculateWidth();this.appendWrapperSizes();this.loops();this.max()},calculateWidth:function(){this.itemWidth=Math.round(this.$elem.width()/ this.options.items)},max:function(){var a=-1*(this.itemsAmount*this.itemWidth-this.options.items*this.itemWidth);this.options.items>this.itemsAmount?this.maximumPixels=a=this.maximumItem=0:(this.maximumItem=this.itemsAmount-this.options.items,this.maximumPixels=a);return a},min:function(){return 0},loops:function(){var a=0,b=0,e,c;this.positionsInArray=[0];this.pagesInArray=[];for(e=0;e').toggleClass("clickable",!this.browser.isTouch).appendTo(this.$elem);!0===this.options.pagination&&this.buildPagination();!0===this.options.navigation&&this.buildButtons()},buildButtons:function(){var a=this,b=f('
');a.owlControls.append(b);a.buttonPrev= f("
",{"class":"owl-prev",html:a.options.navigationText[0]||""});a.buttonNext=f("
",{"class":"owl-next",html:a.options.navigationText[1]||""});b.append(a.buttonPrev).append(a.buttonNext);b.on("touchstart.owlControls mousedown.owlControls",'div[class^="owl"]',function(a){a.preventDefault()});b.on("touchend.owlControls mouseup.owlControls",'div[class^="owl"]',function(b){b.preventDefault();f(this).hasClass("owl-next")?a.next():a.prev()})},buildPagination:function(){var a=this;a.paginationWrapper= f('
');a.owlControls.append(a.paginationWrapper);a.paginationWrapper.on("touchend.owlControls mouseup.owlControls",".owl-page",function(b){b.preventDefault();Number(f(this).data("owl-page"))!==a.currentItem&&a.goTo(Number(f(this).data("owl-page")),!0)})},updatePagination:function(){var a,b,e,c,d,g;if(!1===this.options.pagination)return!1;this.paginationWrapper.html("");a=0;b=this.itemsAmount-this.itemsAmount%this.options.items;for(c=0;c",{"class":"owl-page"}),g=f("",{text:!0===this.options.paginationNumbers?a:"","class":!0===this.options.paginationNumbers?"owl-numbers":""}),d.append(g),d.data("owl-page",b===c?e:c),d.data("owl-roundPages",a),this.paginationWrapper.append(d));this.checkPagination()},checkPagination:function(){var a=this;if(!1===a.options.pagination)return!1;a.paginationWrapper.find(".owl-page").each(function(){f(this).data("owl-roundPages")=== f(a.$owlItems[a.currentItem]).data("owl-roundPages")&&(a.paginationWrapper.find(".owl-page").removeClass("active"),f(this).addClass("active"))})},checkNavigation:function(){if(!1===this.options.navigation)return!1;!1===this.options.rewindNav&&(0===this.currentItem&&0===this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.addClass("disabled")):0===this.currentItem&&0!==this.maximumItem?(this.buttonPrev.addClass("disabled"),this.buttonNext.removeClass("disabled")):this.currentItem=== this.maximumItem?(this.buttonPrev.removeClass("disabled"),this.buttonNext.addClass("disabled")):0!==this.currentItem&&this.currentItem!==this.maximumItem&&(this.buttonPrev.removeClass("disabled"),this.buttonNext.removeClass("disabled")))},updateControls:function(){this.updatePagination();this.checkNavigation();this.owlControls&&(this.options.items>=this.itemsAmount?this.owlControls.hide():this.owlControls.show())},destroyControls:function(){this.owlControls&&this.owlControls.remove()},next:function(a){if(this.isTransition)return!1; this.currentItem+=!0===this.options.scrollPerPage?this.options.items:1;if(this.currentItem>this.maximumItem+(!0===this.options.scrollPerPage?this.options.items-1:0))if(!0===this.options.rewindNav)this.currentItem=0,a="rewind";else return this.currentItem=this.maximumItem,!1;this.goTo(this.currentItem,a)},prev:function(a){if(this.isTransition)return!1;this.currentItem=!0===this.options.scrollPerPage&&0this.currentItem)if(!0===this.options.rewindNav)this.currentItem=this.maximumItem,a="rewind";else return this.currentItem=0,!1;this.goTo(this.currentItem,a)},goTo:function(a,b,e){var c=this;if(c.isTransition)return!1;"function"===typeof c.options.beforeMove&&c.options.beforeMove.apply(this,[c.$elem]);a>=c.maximumItem?a=c.maximumItem:0>=a&&(a=0);c.currentItem=c.owl.currentItem=a;if(!1!==c.options.transitionStyle&&"drag"!==e&&1===c.options.items&&!0===c.browser.support3d)return c.swapSpeed(0), !0===c.browser.support3d?c.transition3d(c.positionsInArray[a]):c.css2slide(c.positionsInArray[a],1),c.afterGo(),c.singleItemTransition(),!1;a=c.positionsInArray[a];!0===c.browser.support3d?(c.isCss3Finish=!1,!0===b?(c.swapSpeed("paginationSpeed"),g.setTimeout(function(){c.isCss3Finish=!0},c.options.paginationSpeed)):"rewind"===b?(c.swapSpeed(c.options.rewindSpeed),g.setTimeout(function(){c.isCss3Finish=!0},c.options.rewindSpeed)):(c.swapSpeed("slideSpeed"),g.setTimeout(function(){c.isCss3Finish=!0}, c.options.slideSpeed)),c.transition3d(a)):!0===b?c.css2slide(a,c.options.paginationSpeed):"rewind"===b?c.css2slide(a,c.options.rewindSpeed):c.css2slide(a,c.options.slideSpeed);c.afterGo()},jumpTo:function(a){"function"===typeof this.options.beforeMove&&this.options.beforeMove.apply(this,[this.$elem]);a>=this.maximumItem||-1===a?a=this.maximumItem:0>=a&&(a=0);this.swapSpeed(0);!0===this.browser.support3d?this.transition3d(this.positionsInArray[a]):this.css2slide(this.positionsInArray[a],1);this.currentItem= this.owl.currentItem=a;this.afterGo()},afterGo:function(){this.prevArr.push(this.currentItem);this.prevItem=this.owl.prevItem=this.prevArr[this.prevArr.length-2];this.prevArr.shift(0);this.prevItem!==this.currentItem&&(this.checkPagination(),this.checkNavigation(),this.eachMoveUpdate(),!1!==this.options.autoPlay&&this.checkAp());"function"===typeof this.options.afterMove&&this.prevItem!==this.currentItem&&this.options.afterMove.apply(this,[this.$elem])},stop:function(){this.apStatus="stop";g.clearInterval(this.autoPlayInterval)}, checkAp:function(){"stop"!==this.apStatus&&this.play()},play:function(){var a=this;a.apStatus="play";if(!1===a.options.autoPlay)return!1;g.clearInterval(a.autoPlayInterval);a.autoPlayInterval=g.setInterval(function(){a.next(!0)},a.options.autoPlay)},swapSpeed:function(a){"slideSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.slideSpeed)):"paginationSpeed"===a?this.$owlWrapper.css(this.addCssSpeed(this.options.paginationSpeed)):"string"!==typeof a&&this.$owlWrapper.css(this.addCssSpeed(a))}, addCssSpeed:function(a){return{"-webkit-transition":"all "+a+"ms ease","-moz-transition":"all "+a+"ms ease","-o-transition":"all "+a+"ms ease",transition:"all "+a+"ms ease"}},removeTransition:function(){return{"-webkit-transition":"","-moz-transition":"","-o-transition":"",transition:""}},doTranslate:function(a){return{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-o-transform":"translate3d("+a+"px, 0px, 0px)","-ms-transform":"translate3d("+ a+"px, 0px, 0px)",transform:"translate3d("+a+"px, 0px,0px)"}},transition3d:function(a){this.$owlWrapper.css(this.doTranslate(a))},css2move:function(a){this.$owlWrapper.css({left:a})},css2slide:function(a,b){var e=this;e.isCssFinish=!1;e.$owlWrapper.stop(!0,!0).animate({left:a},{duration:b||e.options.slideSpeed,complete:function(){e.isCssFinish=!0}})},checkBrowser:function(){var a=k.createElement("div");a.style.cssText=" -moz-transform:translate3d(0px, 0px, 0px); -ms-transform:translate3d(0px, 0px, 0px); -o-transform:translate3d(0px, 0px, 0px); -webkit-transform:translate3d(0px, 0px, 0px); transform:translate3d(0px, 0px, 0px)"; a=a.style.cssText.match(/translate3d\(0px, 0px, 0px\)/g);this.browser={support3d:null!==a&&1===a.length,isTouch:"ontouchstart"in g||g.navigator.msMaxTouchPoints}},moveEvents:function(){if(!1!==this.options.mouseDrag||!1!==this.options.touchDrag)this.gestures(),this.disabledEvents()},eventTypes:function(){var a=["s","e","x"];this.ev_types={};!0===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl mousedown.owl","touchmove.owl mousemove.owl","touchend.owl touchcancel.owl mouseup.owl"]: !1===this.options.mouseDrag&&!0===this.options.touchDrag?a=["touchstart.owl","touchmove.owl","touchend.owl touchcancel.owl"]:!0===this.options.mouseDrag&&!1===this.options.touchDrag&&(a=["mousedown.owl","mousemove.owl","mouseup.owl"]);this.ev_types.start=a[0];this.ev_types.move=a[1];this.ev_types.end=a[2]},disabledEvents:function(){this.$elem.on("dragstart.owl",function(a){a.preventDefault()});this.$elem.on("mousedown.disableTextSelect",function(a){return f(a.target).is("input, textarea, select, option")})}, gestures:function(){function a(a){if(void 0!==a.touches)return{x:a.touches[0].pageX,y:a.touches[0].pageY};if(void 0===a.touches){if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY};if(void 0===a.pageX)return{x:a.clientX,y:a.clientY}}}function b(a){"on"===a?(f(k).on(d.ev_types.move,e),f(k).on(d.ev_types.end,c)):"off"===a&&(f(k).off(d.ev_types.move),f(k).off(d.ev_types.end))}function e(b){b=b.originalEvent||b||g.event;d.newPosX=a(b).x-h.offsetX;d.newPosY=a(b).y-h.offsetY;d.newRelativeX=d.newPosX-h.relativePos; "function"===typeof d.options.startDragging&&!0!==h.dragging&&0!==d.newRelativeX&&(h.dragging=!0,d.options.startDragging.apply(d,[d.$elem]));(8d.newRelativeX)&&!0===d.browser.isTouch&&(void 0!==b.preventDefault?b.preventDefault():b.returnValue=!1,h.sliding=!0);(10d.newPosY)&&!1===h.sliding&&f(k).off("touchmove.owl");d.newPosX=Math.max(Math.min(d.newPosX,d.newRelativeX/5),d.maximumPixels+d.newRelativeX/5);!0===d.browser.support3d?d.transition3d(d.newPosX):d.css2move(d.newPosX)} function c(a){a=a.originalEvent||a||g.event;var c;a.target=a.target||a.srcElement;h.dragging=!1;!0!==d.browser.isTouch&&d.$owlWrapper.removeClass("grabbing");d.dragDirection=0>d.newRelativeX?d.owl.dragDirection="left":d.owl.dragDirection="right";0!==d.newRelativeX&&(c=d.getNewPosition(),d.goTo(c,!1,"drag"),h.targetElement===a.target&&!0!==d.browser.isTouch&&(f(a.target).on("click.disable",function(a){a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();f(a.target).off("click.disable")}), a=f._data(a.target,"events").click,c=a.pop(),a.splice(0,0,c)));b("off")}var d=this,h={offsetX:0,offsetY:0,baseElWidth:0,relativePos:0,position:null,minSwipe:null,maxSwipe:null,sliding:null,dargging:null,targetElement:null};d.isCssFinish=!0;d.$elem.on(d.ev_types.start,".owl-wrapper",function(c){c=c.originalEvent||c||g.event;var e;if(3===c.which)return!1;if(!(d.itemsAmount<=d.options.items)){if(!1===d.isCssFinish&&!d.options.dragBeforeAnimFinish||!1===d.isCss3Finish&&!d.options.dragBeforeAnimFinish)return!1; !1!==d.options.autoPlay&&g.clearInterval(d.autoPlayInterval);!0===d.browser.isTouch||d.$owlWrapper.hasClass("grabbing")||d.$owlWrapper.addClass("grabbing");d.newPosX=0;d.newRelativeX=0;f(this).css(d.removeTransition());e=f(this).position();h.relativePos=e.left;h.offsetX=a(c).x-e.left;h.offsetY=a(c).y-e.top;b("on");h.sliding=!1;h.targetElement=c.target||c.srcElement}})},getNewPosition:function(){var a=this.closestItem();a>this.maximumItem?a=this.currentItem=this.maximumItem:0<=this.newPosX&&(this.currentItem= a=0);return a},closestItem:function(){var a=this,b=!0===a.options.scrollPerPage?a.pagesInArray:a.positionsInArray,e=a.newPosX,c=null;f.each(b,function(d,g){e-a.itemWidth/20>b[d+1]&&e-a.itemWidth/20(b[d+1]||b[d]-a.itemWidth)&&"right"===a.moveDirection()&&(!0===a.options.scrollPerPage?(c=b[d+1]||b[b.length-1],a.currentItem=f.inArray(c,a.positionsInArray)): (c=b[d+1],a.currentItem=d+1))});return a.currentItem},moveDirection:function(){var a;0>this.newRelativeX?(a="right",this.playDirection="next"):(a="left",this.playDirection="prev");return a},customEvents:function(){var a=this;a.$elem.on("owl.next",function(){a.next()});a.$elem.on("owl.prev",function(){a.prev()});a.$elem.on("owl.play",function(b,e){a.options.autoPlay=e;a.play();a.hoverStatus="play"});a.$elem.on("owl.stop",function(){a.stop();a.hoverStatus="stop"});a.$elem.on("owl.goTo",function(b,e){a.goTo(e)}); a.$elem.on("owl.jumpTo",function(b,e){a.jumpTo(e)})},stopOnHover:function(){var a=this;!0===a.options.stopOnHover&&!0!==a.browser.isTouch&&!1!==a.options.autoPlay&&(a.$elem.on("mouseover",function(){a.stop()}),a.$elem.on("mouseout",function(){"stop"!==a.hoverStatus&&a.play()}))},lazyLoad:function(){var a,b,e,c,d;if(!1===this.options.lazyLoad)return!1;for(a=0;a=this.currentItem:!0)&&e=f?g.setTimeout(c,100):e()}var d=this,f=0,k;"DIV"===b.prop("tagName")?(b.css("background-image","url("+b.data("src")+")"),k=!0):b[0].src=b.data("src");c()},autoHeight:function(){function a(){var a=f(e.$owlItems[e.currentItem]).height();e.wrapperOuter.css("height",a+"px");e.wrapperOuter.hasClass("autoHeight")||g.setTimeout(function(){e.wrapperOuter.addClass("autoHeight")},0)}function b(){d+=1;e.completeImg(c.get(0))?a():100>=d?g.setTimeout(b, 100):e.wrapperOuter.css("height","")}var e=this,c=f(e.$owlItems[e.currentItem]).find("img"),d;void 0!==c.get(0)?(d=0,b()):a()},completeImg:function(a){return!a.complete||"undefined"!==typeof a.naturalWidth&&0===a.naturalWidth?!1:!0},onVisibleItems:function(){var a;!0===this.options.addClassActive&&this.$owlItems.removeClass("active");this.visibleItems=[];for(a=this.currentItem;a=this.$userItems.length||-1===e?this.$userItems.eq(-1).after(a):this.$userItems.eq(e).before(a);this.setVars()},removeItem:function(a){if(0===this.$elem.children().length)return!1;a=void 0===a||-1===a?-1:a;this.unWrap();this.$userItems.eq(a).remove();this.setVars()}};f.fn.owlCarousel=function(a){return this.each(function(){if(!0=== f(this).data("owl-init"))return!1;f(this).data("owl-init",!0);var b=Object.create(l);b.init(a,this);f.data(this,"owlCarousel",b)})};f.fn.owlCarousel.options={items:5,itemsCustom:!1,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,2],itemsTabletSmall:!1,itemsMobile:[479,1],singleItem:!1,itemsScaleUp:!1,slideSpeed:200,paginationSpeed:800,rewindSpeed:1E3,autoPlay:!1,stopOnHover:!1,navigation:!1,navigationText:["prev","next"],rewindNav:!0,scrollPerPage:!1,pagination:!0,paginationNumbers:!1, responsive:!0,responsiveRefreshRate:200,responsiveBaseWidth:g,baseClass:"owl-carousel",theme:"owl-theme",lazyLoad:!1,lazyFollow:!0,lazyEffect:"fade",autoHeight:!1,jsonPath:!1,jsonSuccess:!1,dragBeforeAnimFinish:!0,mouseDrag:!0,touchDrag:!0,addClassActive:!1,transitionStyle:!1,beforeUpdate:!1,afterUpdate:!1,beforeInit:!1,afterInit:!1,beforeMove:!1,afterMove:!1,afterAction:!1,startDragging:!1,afterLazyLoad:!1}})(jQuery,window,document);$(document).ready(function() { $('.mtt').hover(function(){ var title = $(this).attr('title'); $(this).data('tipText', title).removeAttr('title'); $('

') .text(title) .appendTo('body') .fadeIn('slow'); }, function() { $(this).attr('title', $(this).data('tipText')); $('.tooltip1').remove(); }).mousemove(function(e) { var mousex = e.pageX + 26; var mousey = e.pageY + 26; $('.tooltip1') .css({ top: mousey, left: mousex }) }); });function scrollToAnchor(aid) { var aTag = $("a[name='"+ aid +"']"); $('html,body').animate({scrollTop: aTag.offset().top},'slow'); } $(window).scroll(function() { if ($(this).scrollTop() < 1) { $('div.gencont1').removeClass("gencont1_on"); } if ($(this).scrollTop() > 1 && $("body").height() >= $(window).height() ) { $('div.gencont1').addClass("gencont1_on"); } if ($(this).scrollTop() == 0) { $('div.gencont1').removeClass("gencont1_on"); } }); function desplegar_super_banner() { $(document).ready(function() { var id = '#bs_dialog'; var id2 = '#banner_super_mask'; $('#banner_super_mask').fadeIn(0); $('#banner_super_mask').fadeTo("slow",0.5); var winH = $(window).height(); var winW = $(window).width(); $(id).css('bottom', winH/2-$(id).height()/2); $(id).css('right', winW/2-$(id).width()/2); $(id).fadeIn(500); var cerre_popup = false; $('.bs_window .bs_close').click(function(e){ e.preventDefault(); $(id2).fadeOut(400); $('#bs_dialog').fadeOut(400); aplicar_quitar_clase('bs_dialog','bs_window_off'); cerre_popup = true; }); $('#banner_super_mask').click(function(){ $(this).fadeOut(400); $('#bs_dialog').fadeOut(400); aplicar_quitar_clase('bs_dialog','bs_window_off'); cerre_popup = true; }); setTimeout(function() { if (!cerre_popup) { $('#banner_super_mask').fadeTo("slow",0.25); } aplicar_quitar_clase('bs_dialog','bs_window_on'); }, 5000); setTimeout(function() { if (!cerre_popup) { $('#banner_super_mask').hide(); aplicar_quitar_clase('bs_dialog','bs_window_off'); cerre_popup = true; } }, 20000); }); } $(window).resize(function() { var id = '#bs_dialog'; var winH = $(window).height(); var winW = $(window).width(); $(id).css('bottom', winH/2-$(id).height()/2); $(id).css('right', winW/2-$(id).width()/2); }); jQuery(document).ready(function() { $("#go_top").click(function(){ $("html, body").animate({scrollTop:0}, 700); return false; }); });/*jslint browser:true, plusplus:true, vars:true */ /*jshint browser:true, jquery:true */ /*jshint -W040:false */ /* to don't alert on "this" in triggerLoadOrError */ (function ($, window, document, undefined) { 'use strict'; // options var lazyLoadXT = 'lazyLoadXT', dataLazied = 'lazied', load_error = 'load error', classLazyHidden = 'lazy-hidden', docElement = document.documentElement || document.body, // force load all images in Opera Mini and some mobile browsers without scroll event or getBoundingClientRect() forceLoad = (window.onscroll === undefined || !!window.operamini || !docElement.getBoundingClientRect), options = { autoInit: true, // auto initialize in $.ready selector: 'img[data-src]', // selector for lazyloading elements blankImage: 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', throttle: 99, // interval (ms) for changes check forceLoad: forceLoad, // force auto load all images loadEvent: 'pageshow', // check AJAX-loaded content in jQueryMobile updateEvent: 'load orientationchange resize scroll touchmove focus', // page-modified events forceEvent: 'lazyloadall', // force loading of all elements //onstart: null, oninit: {removeClass: 'lazy'}, // init handler onshow: {addClass: classLazyHidden}, // start loading handler onload: {removeClass: classLazyHidden, addClass: 'lazy-loaded'}, // load success handler onerror: {removeClass: classLazyHidden}, // error handler //oncomplete: null, // complete handler //scrollContainer: undefined, checkDuplicates: true }, elementOptions = { srcAttr: 'data-src', edgeX: 0, edgeY: 0, visibleOnly: true }, $window = $(window), $isFunction = $.isFunction, $extend = $.extend, $data = $.data || function (el, name) { return $(el).data(name); }, elements = [], topLazy = 0, /* waitingMode=0 : no setTimeout waitingMode=1 : setTimeout, no deferred events waitingMode=2 : setTimeout, deferred events */ waitingMode = 0; $[lazyLoadXT] = $extend(options, elementOptions, $[lazyLoadXT]); /** * Return options.prop if obj.prop is undefined, otherwise return obj.prop * @param {*} obj * @param {*} prop * @returns * */ function getOrDef(obj, prop) { return obj[prop] === undefined ? options[prop] : obj[prop]; } /** * @returns {number} */ function scrollTop() { var scroll = window.pageYOffset; return (scroll === undefined) ? docElement.scrollTop : scroll; } /** * Add new elements to lazy-load list: * $(elements).lazyLoadXT() or $(window).lazyLoadXT() * * @param {object} [overrides] override global options */ $.fn[lazyLoadXT] = function (overrides) { overrides = overrides || {}; var blankImage = getOrDef(overrides, 'blankImage'), checkDuplicates = getOrDef(overrides, 'checkDuplicates'), scrollContainer = getOrDef(overrides, 'scrollContainer'), forceShow = getOrDef(overrides, 'show'), elementOptionsOverrides = {}, prop; // empty overrides.scrollContainer is supported by both jQuery and Zepto $(scrollContainer).on('scroll', queueCheckLazyElements); for (prop in elementOptions) { elementOptionsOverrides[prop] = getOrDef(overrides, prop); } return this.each(function (index, el) { if (el === window) { $(options.selector).lazyLoadXT(overrides); } else { var duplicate = checkDuplicates && $data(el, dataLazied), $el = $(el).data(dataLazied, forceShow ? -1 : 1); // prevent duplicates if (duplicate) { queueCheckLazyElements(); return; } if (blankImage && el.tagName === 'IMG' && !el.src) { el.src = blankImage; } // clone elementOptionsOverrides object $el[lazyLoadXT] = $extend({}, elementOptionsOverrides); triggerEvent('init', $el); elements.push($el); queueCheckLazyElements(); } }); }; /** * Process function/object event handler * @param {string} event suffix * @param {jQuery} $el */ function triggerEvent(event, $el) { var handler = options['on' + event]; if (handler) { if ($isFunction(handler)) { handler.call($el[0]); } else { if (handler.addClass) { $el.addClass(handler.addClass); } if (handler.removeClass) { $el.removeClass(handler.removeClass); } } } $el.trigger('lazy' + event, [$el]); // queue next check as images may be resized after loading of actual file queueCheckLazyElements(); } /** * Trigger onload/onerror handler * @param {Event} e */ function triggerLoadOrError(e) { triggerEvent(e.type, $(this).off(load_error, triggerLoadOrError)); } /** * Load visible elements * @param {bool} [force] loading of all elements */ function checkLazyElements(force) { if (!elements.length) { return; } force = force || options.forceLoad; topLazy = Infinity; var viewportTop = scrollTop(), viewportHeight = window.innerHeight || docElement.clientHeight, viewportWidth = window.innerWidth || docElement.clientWidth, i, length; for (i = 0, length = elements.length; i < length; i++) { var $el = elements[i], el = $el[0], objData = $el[lazyLoadXT], removeNode = false, visible = force || $data(el, dataLazied) < 0, topEdge; // remove items that are not in DOM if (!$.contains(docElement, el)) { removeNode = true; } else if (force || !objData.visibleOnly || el.offsetWidth || el.offsetHeight) { if (!visible) { var elPos = el.getBoundingClientRect(), edgeX = objData.edgeX, edgeY = objData.edgeY; topEdge = (elPos.top + viewportTop - edgeY) - viewportHeight; visible = (topEdge <= viewportTop && elPos.bottom > -edgeY && elPos.left <= viewportWidth + edgeX && elPos.right > -edgeX); } if (visible) { $el.on(load_error, triggerLoadOrError); triggerEvent('show', $el); var srcAttr = objData.srcAttr, src = $isFunction(srcAttr) ? srcAttr($el) : el.getAttribute(srcAttr); if (src) { el.src = src; } removeNode = true; } else { if (topEdge < topLazy) { topLazy = topEdge; } } } if (removeNode) { $data(el, dataLazied, 0); elements.splice(i--, 1); length--; } } if (!length) { triggerEvent('complete', $(docElement)); } } /** * Run check of lazy elements after timeout */ function timeoutLazyElements() { if (waitingMode > 1) { waitingMode = 1; checkLazyElements(); setTimeout(timeoutLazyElements, options.throttle); } else { waitingMode = 0; } } /** * Queue check of lazy elements because of event e * @param {Event} [e] */ function queueCheckLazyElements(e) { if (!elements.length) { return; } // fast check for scroll event without new visible elements if (e && e.type === 'scroll' && e.currentTarget === window) { if (topLazy >= scrollTop()) { return; } } if (!waitingMode) { setTimeout(timeoutLazyElements, 0); } waitingMode = 2; } /** * Initialize list of hidden elements */ function initLazyElements() { $window.lazyLoadXT(); } /** * Loading of all elements */ function forceLoadAll() { checkLazyElements(true); } /** * Initialization */ $(document).ready(function () { triggerEvent('start', $window); $window .on(options.updateEvent, queueCheckLazyElements) .on(options.forceEvent, forceLoadAll); $(document).on(options.updateEvent, queueCheckLazyElements); if (options.autoInit) { $window.on(options.loadEvent, initLazyElements); initLazyElements(); // standard initialization } }); })(window.jQuery || window.Zepto || window.$, window, document); var responsivelyLazy="undefined"!==typeof responsivelyLazy?responsivelyLazy:function(){var r=!1,t=!1,l=null,p=null,m="undefined"!==typeof IntersectionObserver,q=!1,u=[],v=function(a){if(null===l)return!1;var b=a.getBoundingClientRect();a=b.top;var c=b.left,d=b.width,b=b.height;return ab[1])return 1;if(a[1]===b[1]){if(-1!==b[0].indexOf(".webp",b[0].length-5))return 1;if(-1!==a[0].indexOf(".webp",a[0].length-5))return-1}return 0});c=d}else c=[];else c=[];k=a.offsetWidth*("undefined"!==typeof window.devicePixelRatio?window.devicePixelRatio:1);d=null;h=c.length;for(f=0;f=k){d=e;break}null===d&&(d=[b.getAttribute("src"), 999999]);"undefined"===typeof a.responsivelyLazyLastSetOption&&(a.responsivelyLazyLastSetOption=["",0]);a.responsivelyLazyLastSetOption[1]").prependTo(this.mirrorContainer);var a=this.$element.find(">.parallax-slider"),n=!1;0==a.length?this.$slider=t("").prependTo(this.$mirror):(this.$slider=a.prependTo(this.$mirror),n=!0),this.$mirror.addClass("parallax-mirror").css({visibility:"hidden",zIndex:this.zIndex,position:"fixed",top:0,left:0,overflow:"hidden"}),this.$slider.addClass("parallax-slider").one("load",function(){h.naturalHeight&&h.naturalWidth||(h.naturalHeight=this.naturalHeight||this.height||1,h.naturalWidth=this.naturalWidth||this.width||1),h.aspectRatio=h.naturalWidth/h.naturalHeight,o.isSetup||o.setup(),o.sliders.push(h),o.isFresh=!1,o.requestRender()}),n||(this.$slider[0].src=this.imageSrc),(this.naturalHeight&&this.naturalWidth||this.$slider[0].complete||a.length>0)&&this.$slider.trigger("load")}!function(){for(var t=0,e=["ms","moz","webkit","o"],s=0;s=this.boxWidth?(this.imageWidth=r*this.aspectRatio|0,this.imageHeight=r,this.offsetBaseTop=a,t=this.imageWidth-this.boxWidth,"left"==this.positionX?this.offsetLeft=0:"right"==this.positionX?this.offsetLeft=-t:isNaN(this.positionX)?this.offsetLeft=-t/2|0:this.offsetLeft=Math.max(this.positionX,-t)):(this.imageWidth=this.boxWidth,this.imageHeight=this.boxWidth/this.aspectRatio|0,this.offsetLeft=0,t=this.imageHeight-r,"top"==this.positionY?this.offsetBaseTop=a:"bottom"==this.positionY?this.offsetBaseTop=a-t:isNaN(this.positionY)?this.offsetBaseTop=a-t/2|0:this.offsetBaseTop=a+Math.max(this.positionY,-t))},render:function(){var t=o.scrollTop,i=o.scrollLeft,e=this.overScrollFix?o.overScroll:0,s=t+o.winHeight;this.boxOffsetBottom>t&&this.boxOffsetTop<=s?(this.visibility="visible",this.mirrorTop=this.boxOffsetTop-t,this.mirrorLeft=this.boxOffsetLeft-i,this.offsetTop=this.offsetBaseTop-this.mirrorTop*(1-this.speed)):this.visibility="hidden",this.$mirror.css({transform:"translate3d("+this.mirrorLeft+"px, "+(this.mirrorTop-e)+"px, 0px)",visibility:this.visibility,height:this.boxHeight,width:this.boxWidth}),this.$slider.css({transform:"translate3d("+this.offsetLeft+"px, "+this.offsetTop+"px, 0px)",position:"absolute",height:this.imageHeight,width:this.imageWidth,maxWidth:"none"})}}),t.extend(o,{scrollTop:0,scrollLeft:0,winHeight:0,winWidth:0,docHeight:1<<30,docWidth:1<<30,sliders:[],isReady:!1,isFresh:!1,isBusy:!1,setup:function(){function s(){if(p==i.pageYOffset)return i.requestAnimationFrame(s),!1;p=i.pageYOffset,h.render(),i.requestAnimationFrame(s)}if(!this.isReady){var h=this,r=t(e),a=t(i),n=function(){o.winHeight=a.height(),o.winWidth=a.width(),o.docHeight=r.height(),o.docWidth=r.width()},l=function(){var t=a.scrollTop(),i=o.docHeight-o.winHeight,e=o.docWidth-o.winWidth;o.scrollTop=Math.max(0,Math.min(i,t)),o.scrollLeft=Math.max(0,Math.min(e,a.scrollLeft())),o.overScroll=Math.max(t-i,Math.min(t,0))};a.on("resize.px.parallax load.px.parallax",function(){n(),h.refresh(),o.isFresh=!1,o.requestRender()}).on("scroll.px.parallax load.px.parallax",function(){l(),o.requestRender()}),n(),l(),this.isReady=!0;var p=-1;s()}},configure:function(i){"object"==typeof i&&(delete i.refresh,delete i.render,t.extend(this.prototype,i))},refresh:function(){t.each(this.sliders,function(){this.refresh()}),this.isFresh=!0},render:function(){this.isFresh||this.refresh(),t.each(this.sliders,function(){this.render()})},requestRender:function(){var t=this;t.render(),t.isBusy=!1},destroy:function(e){var s,h=t(e).data("px.parallax");for(h.$mirror.remove(),s=0;s