=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 encajar_img( w_scr, h_scr, w_img, h_img )
{
var r_img = w_img / h_img;
var r_scr = w_scr / h_scr;
var w, h;
if ( w_img <= w_scr && h_img <= h_scr )
{
w = w_img;
h = h_img;
}
else
{
if ( r_scr > r_img )
{
w = w_img * h_scr / h_img;
h = h_scr;
}
else
{
w = w_scr;
h = h_img * w_scr / w_img;
}
}
w = parseInt( w );
h = parseInt( h );
return [ w, h ];
}
var ALTO_BANNER_SUSCRIPCION = 0; //50;
function getScrollbarWidth()
{
const outer = document.createElement('div');
outer.style.visibility = 'hidden';
outer.style.overflow = 'scroll';
outer.style.msOverflowStyle = 'scrollbar';
document.body.appendChild(outer);
const inner = document.createElement('div');
outer.appendChild(inner);
const scrollbarWidth = (outer.offsetWidth - inner.offsetWidth);
outer.parentNode.removeChild(outer);
return scrollbarWidth;
}
function vert_scrollbar_visible()
{
return $(document).height() > $(window).height()
}
function posicionar_super_banner( SBIMG, winW, winH )
{
var $img = $( SBIMG );
var $cont = $img.closest( "#banner_super" );
var $caja = $cont.parent();
var alto_extra = 0;
$caja.children().each(function( i, v ){
v = $(v);
if ( v.is( $cont ) || v.hasClass( "cerrar" ) )
return;
alto_extra += v.outerHeight( true ) || 0;
});
var disp_w = winW * 0.95;
var disp_h = ( winH * 0.95 ) - alto_extra;
if ( vert_scrollbar_visible() )
disp_w -= getScrollbarWidth();
if ( disp_w < 80 ) disp_w = 80;
if ( disp_h < 80 ) disp_h = 80;
var fix = encajar_img( disp_w, disp_h, SBIMG.naturalWidth, SBIMG.naturalHeight );
var ancho_imagen = parseInt( fix[0] );
SBIMG.style.width = ancho_imagen + "px";
SBIMG.style.height = "auto";
$caja.children().each(function( i, v ){
v = $(v);
if ( v.is( $cont ) || v.hasClass( "cerrar" ) )
return;
v.css( "width", ancho_imagen + "px" );
});
}
function desplegar_super_banner_resize( SBIMG, winW, winH )
{
var id = '#bs_dialog';
var id2 = '#banner_super_mask';
var id3 = '#banner_super_cont';
posicionar_super_banner( SBIMG, winW, winH );
$(id ).fadeTo("slow",1 );
$(id2).fadeTo("slow",0.5);
function bs_cerrar()
{
if ( bs_cerrado ) return;
bs_cerrado = true; if ( bs_timer ) { clearInterval( bs_timer ); bs_timer = null; }
$(document).off("keydown.bs");
$(id ).css("transition","none").fadeOut(400,function(){ $(this).css("transition",""); });
$(id2).fadeOut(400);
}
$('.bs_window .bs_close').off("click");
$('.bs_window .bs_close').click(function(e){
e.preventDefault();
bs_cerrar();
});
$(id).off("click.bs");
$(id).on("click.bs", function(e){
if ( e.target === this ) bs_cerrar();
});
$('#banner_super_mask').off("click");
$('#banner_super_mask').click(function(e){
e.preventDefault();
bs_cerrar();
});
$(document).off("keydown.bs");
$(document).on("keydown.bs", function(e){
if ( e.key === "Escape" || e.keyCode === 27 ) bs_cerrar();
});
}
var last_src = null;
var last_winW = -1;
var last_winH = -1;
var bs_cerrado = false; // el usuario ya lo cerro: no volver a mostrarlo
var bs_timer = null; // id del setInterval, para poder cancelarlo
function get_SBIMG()
{
var SB = getObj("banner_super");
if ( ! SB )
return null;
var SBIMG = SB.getElementsByTagName("IMG")[0];
return SBIMG;
}
function img_ok( img )
{
if ( ! img )
return false;
if ( ! img.complete ||
img.naturalWidth === 0 ||
img.naturalHeight === 0 )
return false;
return true;
}
var BS_DELAY = 1500;
function desplegar_super_banner()
{
setTimeout( desplegar_super_banner_ahora, BS_DELAY );
}
function desplegar_super_banner_ahora()
{
if ( bs_cerrado ) return;
if ( bs_timer ) clearInterval( bs_timer );
bs_timer = setInterval(
function()
{
if ( bs_cerrado ) { clearInterval( bs_timer ); bs_timer = null; return; }
var SBIMG = get_SBIMG();
if ( ! img_ok( SBIMG ) )
return;
var cur_src = SBIMG.src;
var cur_winW = $(window).width();
var cur_winH = $(window).height();
if ( cur_src != last_src ||
cur_winW != last_winW ||
cur_winH != last_winH )
{
if ( cur_src != last_src )
desplegar_super_banner_resize( SBIMG, cur_winW, cur_winH );
else
bs_reubicar();
last_src = cur_src;
last_winW = cur_winW;
last_winH = cur_winH;
}
},
500
);
}
var bs_resize_t = null;
function bs_reubicar()
{
if ( bs_cerrado ) return;
var SBIMG = get_SBIMG();
if ( ! img_ok( SBIMG ) )
return;
var winW = $(window).width();
var winH = $(window).height();
var id = $("#bs_dialog");
var tr = id.css("transition");
id.css("transition","none");
posicionar_super_banner( SBIMG, winW, winH );
last_winW = winW;
last_winH = winH;
id[0].offsetHeight;
id.css("transition",tr);
}
$(window).resize(function()
{
if ( bs_cerrado ) return;
if ( bs_resize_t ) clearTimeout( bs_resize_t );
bs_resize_t = setTimeout( bs_reubicar, 120 );
});
jQuery(document).ready(function()
{
$("#go_top").click(function(){
$("html, body").animate({scrollTop:0}, 500);
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]b[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