Volver');
this.$back = this.$menu.find( 'li.dl-back' );
},
_initEvents : function() {
var self = this;
this.$trigger.on( 'click.dlmenu', function() {
if( self.open ) {
self._closeMenu();
}
else {
self._openMenu();
}
return false;
} );
this.$menuitems.on( 'click.dlmenu', function( event ) {
event.stopPropagation();
var $item = $(this),
$submenu = $item.children( 'ul.dl-submenu' );
if( $submenu.length > 0 ) {
var $flyin = $submenu.clone().css( 'opacity', 0 ).insertAfter( self.$menu ),
onAnimationEndFn = function() {
self.$menu.off( self.animEndEventName ).removeClass( self.options.animationClasses.classout ).addClass( 'dl-subview' );
$item.addClass( 'dl-subviewopen' ).parents( '.dl-subviewopen:first' ).removeClass( 'dl-subviewopen' ).addClass( 'dl-subview' );
$flyin.remove();
};
setTimeout( function() {
$flyin.addClass( self.options.animationClasses.classin );
self.$menu.addClass( self.options.animationClasses.classout );
if( self.supportAnimations ) {
self.$menu.on( self.animEndEventName, onAnimationEndFn );
}
else {
onAnimationEndFn.call();
}
self.options.onLevelClick( $item, $item.children( 'a:first' ).text() );
} );
return false;
}
else {
self.options.onLinkClick( $item, event );
}
} );
this.$back.on( 'click.dlmenu', function( event ) {
var $this = $( this ),
$submenu = $this.parents( 'ul.dl-submenu:first' ),
$item = $submenu.parent(),
$flyin = $submenu.clone().insertAfter( self.$menu );
var onAnimationEndFn = function() {
self.$menu.off( self.animEndEventName ).removeClass( self.options.animationClasses.classin );
$flyin.remove();
};
setTimeout( function() {
$flyin.addClass( self.options.animationClasses.classout );
self.$menu.addClass( self.options.animationClasses.classin );
if( self.supportAnimations ) {
self.$menu.on( self.animEndEventName, onAnimationEndFn );
}
else {
onAnimationEndFn.call();
}
$item.removeClass( 'dl-subviewopen' );
var $subview = $this.parents( '.dl-subview:first' );
if( $subview.is( 'li' ) ) {
$subview.addClass( 'dl-subviewopen' );
}
$subview.removeClass( 'dl-subview' );
} );
return false;
} );
},
closeMenu : function() {
if( this.open ) {
this._closeMenu();
}
},
_closeMenu : function() {
var self = this,
onTransitionEndFn = function() {
self.$menu.off( self.transEndEventName );
self._resetMenu();
};
this.$menu.removeClass( 'dl-menuopen' );
this.$menu.addClass( 'dl-menu-toggle' );
this.$trigger.removeClass( 'dl-active' );
if( this.supportTransitions ) {
this.$menu.on( this.transEndEventName, onTransitionEndFn );
}
else {
onTransitionEndFn.call();
}
this.open = false;
},
openMenu : function() {
if( !this.open ) {
this._openMenu();
}
},
_openMenu : function() {
var self = this;
// clicking somewhere else makes the menu close
$body.off( 'click' ).on( 'click.dlmenu', function() {
self._closeMenu() ;
} );
this.$menu.addClass( 'dl-menuopen dl-menu-toggle' ).on( this.transEndEventName, function() {
$( this ).removeClass( 'dl-menu-toggle' );
} );
this.$trigger.addClass( 'dl-active' );
this.open = true;
},
// resets the menu to its original state (first level of options)
_resetMenu : function() {
this.$menu.removeClass( 'dl-subview' );
this.$menuitems.removeClass( 'dl-subview dl-subviewopen' );
}
};
var logError = function( message ) {
if ( window.console ) {
window.console.error( message );
}
};
$.fn.dlmenu = function( options ) {
if ( typeof options === 'string' ) {
var args = Array.prototype.slice.call( arguments, 1 );
this.each(function() {
var instance = $.data( this, 'dlmenu' );
if ( !instance ) {
logError( "cannot call methods on dlmenu prior to initialization; " +
"attempted to call method '" + options + "'" );
return;
}
if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) {
logError( "no such method '" + options + "' for dlmenu instance" );
return;
}
instance[ options ].apply( instance, args );
});
}
else {
this.each(function() {
var instance = $.data( this, 'dlmenu' );
if ( instance ) {
instance._init();
}
else {
instance = $.data( this, 'dlmenu', new $.DLMenu( options, this ) );
}
});
}
return this;
};
} )( jQuery, window );function scrollToAnchor(aid)
{
var aTag = $("a[name='"+ aid +"']");
$('html,body').animate({scrollTop: aTag.offset().top},'slow');
}
var agregue_clase_scroll=false;
$(window).scroll(function()
{
if ($(this).scrollTop() > 666)
{
$('.subir').fadeIn("slow");
}else{
$('.subir').fadeOut("slow");
}
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");}
if ($(this).scrollTop() < 480){$('div.gencont2').removeClass("gencont2_on");}
if ($(this).scrollTop() > 480 && $("body").height() >= $(window).height()){$('div.gencont2').addClass("gencont2_on");}
if ($(this).scrollTop() == 0){$('div.gencont2').removeClass("gencont2_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;
function desplegar_super_banner_resize( SBIMG, winW, winH )
{
var id = '#bs_dialog';
var id2 = '#banner_super_mask';
var id3 = '#banner_super_cont';
var winH = $(window).height();
var winW = $(window).width();
var ancho_imagen = SBIMG.naturalWidth;
var alto_imagen = SBIMG.naturalHeight - ALTO_BANNER_SUSCRIPCION;
var img_fix = encajar_img( winW, winH, ancho_imagen, alto_imagen );
ancho_imagen = img_fix[0];
alto_imagen = img_fix[1];
if (alto_imagen >= ancho_imagen)
{
SBIMG.style.height = alto_imagen + "px";
if ( ancho_imagen != winW )
SBIMG.style.width = "auto";
else
SBIMG.style.width = ancho_imagen + "px";
} else {
SBIMG.style.width = ancho_imagen + "px";
if ( alto_imagen != winH )
SBIMG.style.height = "auto";
else
SBIMG.style.height = alto_imagen + "px";
}
$(id).css('bottom', (winH/2)-(alto_imagen/2 ) - ALTO_BANNER_SUSCRIPCION );
$(id).css('right', (winW/2)-(ancho_imagen/2));
$(id).fadeTo("slow",1);
$(id2).fadeTo("slow",0.5);
var cerre_popup = false;
$('.bs_window .bs_close').click(function(e){
e.preventDefault();
$(id3).hide();
cerre_popup = true;
});
$('#banner_super_mask').click(function(e){
e.preventDefault();
$(id3).hide();
cerre_popup = true;
});
setTimeout(function()
{
if (!cerre_popup)
{
cerre_popup = true;
}
}, 2000);
}
function desplegar_super_banner()
{
var tid;
var last_src = null;
var last_winW = -1;
var last_winH = -1;
tid = setInterval(
function()
{
var SB = getObj("banner_super");
if ( ! SB )
return;
var SBIMG = SB.getElementsByTagName("IMG")[0];
if ( ! SBIMG )
return;
if ( ! SBIMG.complete ||
SBIMG.naturalWidth === 0 ||
SBIMG.naturalHeight === 0 )
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 )
{
desplegar_super_banner_resize( SBIMG, cur_winW, cur_winH );
last_src = cur_src;
last_winW = cur_winW;
last_winH = cur_winH;
}
},
500
);
}
$(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()
{
$('div.cargando_pagina').addClass("cargando_pagina_on");
$("#go_top").click(function(){
$("html, body").animate({scrollTop:0}, 300);
return false;
});
});
(function ($){
$.fn.countTo = function (options){
options = options || {};
return $(this).each(function (){
var settings = $.extend({}, $.fn.countTo.defaults,{
from: $(this).data('from'),
to: $(this).data('to'),
speed: $(this).data('speed'),
refreshInterval:$(this).data('refresh-interval'),
decimals: $(this).data('decimals')
}, options);
var loops = Math.ceil(settings.speed / settings.refreshInterval),
increment = (settings.to - settings.from) / loops;
var self = this,
$self = $(this),
loopCount = 0,
value = settings.from,
data = $self.data('countTo') || {};
$self.data('countTo', data);
if (data.interval){clearInterval(data.interval);}
data.interval = setInterval(updateTimer, settings.refreshInterval);
render(value);
function updateTimer(){
value += increment;
loopCount++;
render(value);
if (typeof(settings.onUpdate) == 'function'){settings.onUpdate.call(self, value);}
if (loopCount >= loops){
$self.removeData('countTo');
clearInterval(data.interval);
value = settings.to;
if (typeof(settings.onComplete) == 'function'){settings.onComplete.call(self, value);}
}
}
function render(value){
var formattedValue = settings.formatter.call(self, value, settings);
$self.html(formattedValue);
}
});
};
$.fn.countTo.defaults={
from:0,
to:0,
speed:1000,
refreshInterval:100,
decimals:0,
formatter:formatter,
onUpdate:null,
onComplete:null
};
function formatter(value, settings){return value.toFixed(settings.decimals);}
}(jQuery));
jQuery(function ($){
$('.count-number').data('countToOptions',{
formatter:function (value, options){
return value.toFixed(options.decimals).replace(/\B(?=(?:\d{3})+(?!\d))/g, ',');
}
});
$('.timer').each(count);
function count(options){
var $this = $(this);
options = $.extend({}, options || {}, $this.data('countToOptions') || {});
$this.countTo(options);
}
});
/*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