// source --> https://www.coachingydesarrollo.org/wp-content/plugins/responsive-lightbox/js/front.js?ver=2.1.0 ( function ( $ ) { // parse query string var parse_str = function( name, str ) { var regex = new RegExp( '[?&]' + name.replace( /[\[\]]/g, '\\$&' ) + '(=([^&#]*)|&|#|$)' ), results = regex.exec( '&' + str ); return ( ! results || ! results[2] ? '' : decodeURIComponent( results[2].replace( /\+/g, ' ' ) ) ); } // observe DOM changes var observe_script_dom = ( function () { var MutationObserver = window.MutationObserver || window.WebKitMutationObserver, eventListenerSupported = window.addEventListener; return function ( obj, only_added, callback ) { if ( MutationObserver ) { // define a new observer var obs = new MutationObserver( function ( mutations, observer ) { if ( only_added ) { if ( mutations[0].addedNodes.length ) callback(); } else { if ( mutations[0].addedNodes.length || mutations[0].removedNodes.length ) callback(); } } ); // have the observer observe for changes in children obs.observe( obj, { childList: true, subtree: true } ); } else if ( eventListenerSupported ) { obj.addEventListener( 'DOMNodeInserted', callback, false ); if ( !only_added ) { obj.addEventListener( 'DOMNodeRemoved', callback, false ); } } } } )(); // ready event handler $( document ).on( 'ready' + rlArgs.customEvents, function () { var containers = []; // check for infinite galleries $( '.rl-gallery-container' ).each( function() { var container = $( this ); // is it ifinite scroll gallery? if ( container.hasClass( 'rl-pagination-infinite' ) ) { containers.push( container ); } else { // remove loading class container.removeClass( 'rl-loading' ); } } ); // any infinite galleries? if ( containers.length > 0 ) { for ( var i = 0; i < containers.length; i++ ) { var container = containers[i], gallery = container.find( '.rl-gallery' ), gallery_id = parseInt( container.data( 'gallery_id' ) ), gallery_scroll_type = container.find( '.rl-pagination-bottom' ).data( 'button' ), gallery_button = typeof gallery_scroll_type !== 'undefined' && gallery_scroll_type === 'manually'; // initialize infinite scroll gallery.infiniteScroll( { path: '.rl-gallery-container[data-gallery_id="' + gallery_id + '"] .rl-pagination-bottom .next', append: '.rl-gallery-container[data-gallery_id="' + gallery_id + '"] .rl-gallery-item' + ( gallery.hasClass( 'rl-masonry-gallery' ) || gallery.hasClass( 'rl-basicmasonry-gallery' ) ? '-no-append' : '' ), status: false, hideNav: '.rl-gallery-container[data-gallery_id="' + gallery_id + '"] .rl-pagination-bottom', prefill: ! gallery_button, loadOnScroll: true, scrollThreshold: gallery_button ? false : 0, button: gallery_button ? '.rl-gallery-container[data-gallery_id="' + gallery_id + '"] .rl-load-more' : false, debug: false, history: false, onInit: function() { // infinite with button? if ( container.hasClass( 'rl-pagination-infinite' ) && gallery_button ) { // remove loading class container.removeClass( 'rl-loading' ); } // store gallery ID for append event var _gallery_id = gallery_id; // request event this.on( 'request', function( path ) { // add loading class container.addClass( 'rl-loading' ); } ); // append event this.on( 'append', function ( response, path, items ) { // remove loading class container.removeClass( 'rl-loading' ); $.event.trigger( { type: 'doResponsiveLightbox', script: rlArgs.script, selector: rlArgs.selector, args: rlArgs, pagination_type: 'infinite', gallery_id: _gallery_id, masonry: gallery.hasClass( 'rl-masonry-gallery' ) || gallery.hasClass( 'rl-basicmasonry-gallery' ), infinite: { gallery: gallery, response: response, items: items } } ); } ); } } ); } } // initialize event $.event.trigger( { type: 'doResponsiveLightbox', script: rlArgs.script, selector: rlArgs.selector, args: rlArgs } ); } ); // pagination $( document ).on( 'click', '.rl-pagination a.page-numbers', function ( e ) { var link = $( this ), container = link.closest( '.rl-gallery-container' ); // ajax type pagination? if ( container.hasClass( 'rl-pagination-ajax' ) ) { e.preventDefault(); e.stopPropagation(); var gallery_id = container.data( 'gallery_id' ); // add loading class container.addClass( 'rl-loading' ); $.post( rlArgs.ajaxurl, { action: 'rl-get-gallery-page-content', gallery_id: gallery_id, page: parse_str( 'rl_page', link.prop( 'href' ) ), nonce: rlArgs.nonce } ).done( function ( response ) { // replace container with new content container.replaceWith( $( response ).removeClass( 'rl-loading' ) ); // trigger main event $.event.trigger( { type: 'doResponsiveLightbox', script: rlArgs.script, selector: rlArgs.selector, args: rlArgs, pagination_type: 'ajax', gallery_id: gallery_id } ); } ).fail( function () { container.removeClass( 'rl-loading' ); } ); return false; } } ); // this is similar to the WP function add_action(); $( document ).on( 'doResponsiveLightbox', function ( event ) { if ( typeof event.masonry !== 'undefined' && event.masonry === true ) { return false; } var script = event.script, selector = event.selector, args = event.args; if ( typeof script === 'undefined' || typeof selector === 'undefined' ) { return false; } rl_view_image = function ( script, url ) { $.event.trigger( { type: 'doLightboxViewImage', script: script, url: url } ); } rl_hide_image = function ( script, url ) { $.event.trigger( { type: 'doLightboxHideImage', script: script, url: url } ); } // WooCommerce 3.0+ compatibility setTimeout( function () { var flex = $( '.flex-viewport' ); if ( args.woocommerce_gallery === '1' && flex.length ) { $( '.zoomImg' ).css( 'cursor', 'pointer' ); $( document ).on( 'click', '.flex-active-slide .zoomImg', function ( e ) { e.preventDefault(); e.stopPropagation(); flex.find( '.flex-active-slide a[data-rel]' ).trigger( 'click' ); } ); } }, 10 ); // init lightbox switch ( script ) { case 'swipebox': var slide = $( '#swipebox-overlay' ).find( '.slide.current' ), image_source = '', allow_hide = false, close_executed = false; $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).swipebox( { useCSS: ( args.animation === '1' ? true : false ), useSVG: ( args.useSVG === '1' ? true : false ), hideCloseButtonOnMobile: ( args.hideCloseButtonOnMobile === '1' ? true : false ), removeBarsOnMobile: ( args.removeBarsOnMobile === '1' ? true : false ), hideBarsDelay: ( args.hideBars === '1' ? parseInt( args.hideBarsDelay ) : 0 ), videoMaxWidth: parseInt( args.videoMaxWidth ), loopAtEnd: ( args.loopAtEnd === '1' ? true : false ), afterOpen: function () { close_executed = false; // update current slide container slide = $( '#swipebox-overlay' ).find( '.slide.current' ); // get image source var image = slide.find( 'img' ).attr( 'src' ); // valid image source? if ( typeof image !== 'undefined' ) { image_source = image; // trigger image view rl_view_image( script, image_source ); } else { image_source = ''; } // add current slide observer observe_script_dom( document.getElementById( 'swipebox-slider' ), false, function () { if ( image_source === '' ) { // get image source var image = slide.find( 'img' ).attr( 'src' ); // valid image source? if ( typeof image !== 'undefined' ) { image_source = image; // trigger image view rl_view_image( script, image_source ); } else { image_source = ''; } } } ); }, nextSlide: function () { // update current slide container slide = $( '#swipebox-overlay' ).find( '.slide.current' ); // get image source var image = slide.find( 'img' ).attr( 'src' ); // valid image source? if ( typeof image !== 'undefined' ) { image_source = image; // trigger image view rl_view_image( script, image_source ); } else { image_source = ''; } }, prevSlide: function () { // update current slide container slide = $( '#swipebox-overlay' ).find( '.slide.current' ); // get image source var image = slide.find( 'img' ).attr( 'src' ); // valid image source? if ( typeof image !== 'undefined' ) { image_source = image; // trigger image view rl_view_image( script, image_source ); } else { image_source = ''; } }, afterClose: function () { // afterClose event executed close_executed = true; // allow to hide image? if ( allow_hide ) { // trigger image hide rl_hide_image( script, image_source ); allow_hide = false; } } } ); // additional event to prevent rl_hide_image to execure while opening modal $( window ).on( 'resize', function () { if ( !close_executed ) { allow_hide = true; } } ); break; case 'prettyphoto': var view_disabled = false, last_image = ''; $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).each( function () { var el = $( this ); // set description el.attr( 'title', el.data( 'rl_caption' ) ); // set title el.find( 'img' ).attr( 'alt', el.data( 'rl_title' ) ); } ); $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).prettyPhoto( { hook: 'data-rel', animation_speed: args.animationSpeed, slideshow: ( args.slideshow === '1' ? parseInt( args.slideshowDelay ) : false ), autoplay_slideshow: ( args.slideshowAutoplay === '1' ? true : false ), opacity: args.opacity, show_title: ( args.showTitle === '1' ? true : false ), allow_resize: ( args.allowResize === '1' ? true : false ), allow_expand: ( args.allowExpand === '1' ? true : false ), default_width: parseInt( args.width ), default_height: parseInt( args.height ), counter_separator_label: args.separator, theme: args.theme, horizontal_padding: parseInt( args.horizontalPadding ), hideflash: ( args.hideFlash === '1' ? true : false ), wmode: args.wmode, autoplay: ( args.videoAutoplay === '1' ? true : false ), modal: ( args.modal === '1' ? true : false ), deeplinking: ( args.deeplinking === '1' ? true : false ), overlay_gallery: ( args.overlayGallery === '1' ? true : false ), keyboard_shortcuts: ( args.keyboardShortcuts === '1' ? true : false ), social_tools: ( args.social === '1' ? '
' : '' ), ie6_fallback: true, changepicturecallback: function () { // is view disabled? if ( view_disabled ) { // enable view view_disabled = false; return; } last_image = $( '#pp_full_res' ).find( 'img' ).attr( 'src' ); // trigger image view rl_view_image( script, last_image ); // is expanding allowed? if ( args.allowExpand === '1' ) { // disable changepicturecallback event after expanding $( 'a.pp_expand' ).on( 'click', function () { view_disabled = true; } ); } }, callback: function () { // trigger image hide rl_hide_image( script, last_image ); } } ); break; case 'fancybox': var last_image = ''; $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).fancybox( { modal: ( args.modal === '1' ? true : false ), overlayShow: ( args.showOverlay === '1' ? true : false ), showCloseButton: ( args.showCloseButton === '1' ? true : false ), enableEscapeButton: ( args.enableEscapeButton === '1' ? true : false ), hideOnOverlayClick: ( args.hideOnOverlayClick === '1' ? true : false ), hideOnContentClick: ( args.hideOnContentClick === '1' ? true : false ), cyclic: ( args.cyclic === '1' ? true : false ), showNavArrows: ( args.showNavArrows === '1' ? true : false ), autoScale: ( args.autoScale === '1' ? true : false ), scrolling: args.scrolling, centerOnScroll: ( args.centerOnScroll === '1' ? true : false ), opacity: ( args.opacity === '1' ? true : false ), overlayOpacity: parseFloat( args.overlayOpacity / 100 ), overlayColor: args.overlayColor, titleShow: ( args.titleShow === '1' ? true : false ), titlePosition: args.titlePosition, transitionIn: args.transitions, transitionOut: args.transitions, easingIn: args.easings, easingOut: args.easings, speedIn: parseInt( args.speeds ), speedOut: parseInt( args.speeds ), changeSpeed: parseInt( args.changeSpeed ), changeFade: parseInt( args.changeFade ), padding: parseInt( args.padding ), margin: parseInt( args.margin ), width: parseInt( args.videoWidth ), height: parseInt( args.videoHeight ), onComplete: function () { last_image = $( '#fancybox-content' ).find( 'img' ).attr( 'src' ); // trigger image view rl_view_image( script, last_image ); }, onClosed: function () { // trigger image hide rl_hide_image( script, last_image ); } } ); break; case 'nivo': $.each( $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ), function () { var attr = $( this ).attr( 'data-rel' ); // check data-rel attribute first if ( typeof attr === 'undefined' || attr == false ) { // if not found then try to check rel attribute for backward compatibility attr = $( this ).attr( 'rel' ); } // for some browsers, `attr` is undefined; for others, `attr` is false. Check for both. if ( typeof attr !== 'undefined' && attr !== false ) { var match = attr.match( new RegExp( selector + '\\-(gallery\\-(?:[\\da-z]{1,4}))', 'ig' ) ); if ( match !== null ) { $( this ).attr( 'data-lightbox-gallery', match[0] ); } } } ); var observer_initialized = false, change_allowed = true, last_image = ''; $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).nivoLightbox( { effect: args.effect, clickOverlayToClose: ( args.clickOverlayToClose === '1' ? true : false ), keyboardNav: ( args.keyboardNav === '1' ? true : false ), errorMessage: args.errorMessage, afterShowLightbox: function ( lightbox ) { var content = $( lightbox )[0].find( '.nivo-lightbox-content' ); // is observer initialized? if ( !observer_initialized ) { // turn it off observer_initialized = true; // add content observer observe_script_dom( document.getElementsByClassName( 'nivo-lightbox-content' )[0], true, function () { if ( change_allowed ) { last_image = content.find( '.nivo-lightbox-image img' ).attr( 'src' ); // trigger image view rl_view_image( script, last_image ); // disallow observer changes change_allowed = false; } } ); } }, afterHideLightbox: function () { // allow observer changes change_allowed = true; // trigger image hide rl_hide_image( script, last_image ); }, onPrev: function ( element ) { // disallow observer changes change_allowed = false; last_image = element[0].attr( 'href' ); // trigger image view rl_view_image( script, last_image ); }, onNext: function ( element ) { // disallow observer changes change_allowed = false; last_image = element[0].attr( 'href' ); // trigger image view rl_view_image( script, last_image ); } } ); break; case 'imagelightbox': var selectors = [ ], last_image = ''; $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).each( function ( i, item ) { var attr = $( item ).attr( 'data-rel' ); // check data-rel attribute first if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) selectors.push( attr ); // if not found then try to check rel attribute for backward compatibility else { attr = $( item ).attr( 'rel' ); if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) selectors.push( attr ); } } ); if ( selectors.length > 0 ) { // make unique selectors = $.unique( selectors ); $( selectors ).each( function ( i, item ) { if ( typeof event.pagination_type !== 'undefined' ) { $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).each( function() { $( this ).off( 'click.imageLightbox' ); } ); } $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).imageLightbox( { animationSpeed: parseInt( args.animationSpeed ), preloadNext: ( args.preloadNext === '1' ? true : false ), enableKeyboard: ( args.enableKeyboard === '1' ? true : false ), quitOnEnd: ( args.quitOnEnd === '1' ? true : false ), quitOnImgClick: ( args.quitOnImageClick === '1' ? true : false ), quitOnDocClick: ( args.quitOnDocumentClick === '1' ? true : false ), onLoadEnd: function () { last_image = $( '#imagelightbox' ).attr( 'src' ); // trigger image view rl_view_image( script, last_image ); }, onEnd: function () { // trigger image hide rl_hide_image( script, last_image ); } } ); } ); } break; case 'tosrus': var selectors = [ ], last_image = ''; $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).each( function ( i, item ) { var attr = $( item ).attr( 'data-rel' ); // check data-rel attribute first if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) selectors.push( attr ); // if not found then try to check rel attribute for backward compatibility else { attr = $( item ).attr( 'rel' ); if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) selectors.push( attr ); } } ); if ( selectors.length > 0 ) { // make unique selectors = $.unique( selectors ); $( selectors ).each( function ( i, item ) { if ( typeof event.pagination_type !== 'undefined' ) { $( 'body' ).find( '.tosrus-' + item ).remove(); $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).each( function() { $( this ).off( 'click.tos' ); } ); } var tos = $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).tosrus( { infinite: ( args.infinite === '1' ? true : false ), autoplay: { play: ( args.autoplay === '1' ? true : false ), pauseOnHover: ( args.pauseOnHover === '1' ? true : false ), timeout: args.timeout }, effect: args.effect, keys: { prev: ( args.keys === '1' ? true : false ), next: ( args.keys === '1' ? true : false ), close: ( args.keys === '1' ? true : false ) }, pagination: { add: ( args.pagination === '1' ? true : false ), type: args.paginationType }, // forced show: false, buttons: true, caption: { add: true, attributes: [ "title" ] }, wrapper: { classes: 'tosrus-' + item, onClick: args.closeOnClick === '1' ? 'close' : 'toggleUI' } } ); tos.bind( 'sliding.tos', function ( event, number ) { last_image = $( $( event.target ).find( '.tos-slider .tos-slide' )[number] ).find( 'img' ).attr( 'src' ); // trigger image view rl_view_image( script, last_image ); } ); tos.bind( 'closing.tos', function () { // trigger image hide rl_hide_image( script, last_image ); } ); } ); } break; case 'featherlight': var selectors = [ ], last_image = ''; $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).each( function ( i, item ) { var attr = $( item ).attr( 'data-rel' ); // check data-rel attribute first if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) selectors.push( attr ); // if not found then try to check rel attribute for backward compatibility else { attr = $( item ).attr( 'rel' ); if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) selectors.push( attr ); } } ); if ( selectors.length > 0 ) { // make unique selectors = $.unique( selectors ); // set defaults $.extend( $.featherlight.defaults, { openSpeed: parseInt( args.openSpeed ), closeSpeed: parseInt( args.closeSpeed ), closeOnClick: args.closeOnClick, closeOnEsc: ( args.closeOnEsc === '1' ? true : false ), afterOpen: function ( event ) { last_image = event.currentTarget.href; // trigger image view rl_view_image( script, last_image ); }, afterClose: function () { // trigger image hide rl_hide_image( script, last_image ); } } ); $( selectors ).each( function ( i, item ) { if ( typeof event.pagination_type !== 'undefined' ) { $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).each( function() { $( this ).off( 'click.featherlight' ); } ); } // gallery? if ( /-gallery-/.test( item ) ) { $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).featherlightGallery( { galleryFadeIn: parseInt( args.galleryFadeIn ), galleryFadeOut: parseInt( args.galleryFadeOut ), previousIcon: '❮', nextIcon: '❯' } ); // video? } else if ( /-video-/.test( item ) ) { $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).featherlight(); // single image? } else { $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ).featherlight(); } } ); } break; case 'magnific': var selectors = [ ], last_image = ''; $( 'a[rel*="' + selector + '"], a[data-rel*="' + selector + '"]' ).each( function ( i, item ) { var attr = $( item ).attr( 'data-rel' ); // check data-rel attribute first if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) selectors.push( attr ); // if not found then try to check rel attribute for backward compatibility else { attr = $( item ).attr( 'rel' ); if ( typeof attr !== 'undefined' && attr !== false && attr !== 'norl' ) selectors.push( attr ); } } ); if ( selectors.length > 0 ) { // make unique selectors = $.unique( selectors ); $( selectors ).each( function ( i, item ) { var subselector = $( 'a[data-rel="' + item + '"], a[rel="' + item + '"]' ), element = $( subselector[0] ), media_type = element.data( 'magnific_type' ), content_type = element.data( 'rl_content' ); // check content type first if ( typeof content_type !== 'undefined' ) { media_type = content_type; } // then media type if needed if ( typeof media_type === 'undefined' ) { media_type = 'image'; } subselector.magnificPopup( { type: media_type === 'gallery' ? 'image' : ( media_type === 'video' ? 'iframe' : media_type ), disableOn: args.disableOn, midClick: args.midClick === '1', preloader: args.preloader === '1', closeOnContentClick: args.closeOnContentClick === '1', closeOnBgClick: args.closeOnBgClick === '1', closeBtnInside: args.closeBtnInside === '1', showCloseBtn: args.showCloseBtn === '1', enableEscapeKey: args.enableEscapeKey === '1', alignTop: args.alignTop === '1', autoFocusLast: args.autoFocusLast === '1', fixedContentPos: args.fixedContentPos === 'auto' ? 'auto' : ( args.fixedContentPos === '1' ), fixedBgPos: args.fixedBgPos === 'auto' ? 'auto' : ( args.fixedBgPos === '1' ), image: { titleSrc: function ( item ) { return item.el.attr( 'data-rl_title' ) + '' + item.el.attr( 'data-rl_caption' ) + ''; } }, gallery: { enabled: subselector.length > 1 && media_type === 'gallery', navigateByImgClick: true, preload: [0,1] }, callbacks: { close: function() { rl_hide_image( script, this.currItem.src ); }, imageLoadComplete: function() { // trigger image view rl_view_image( script, this.currItem.src ); } } } ); } ); } break; } } ); } )( jQuery ); // source --> https://www.coachingydesarrollo.org/wp-content/themes/tempera/js/frontend.js?ver=1.4.1 /* * Tempera Theme custom frontend scripting * http://www.cryoutcreations.eu/ * * Copyright 2013-14, Cryout Creations * Free to use and abuse under the GPL v3 license. */ jQuery(document).ready(function() { /* Standard menu touch support for tablets */ var custom_event = ('ontouchstart' in window) ? 'touchstart' : 'click'; // check touch support var ios = /iPhone|iPad|iPod/i.test(navigator.userAgent); jQuery('#access .menu > ul > li a').on('click', function(e){ var $link_id = jQuery(this).attr('href'); if (jQuery(this).parent().data('clicked') == $link_id) { // second touch jQuery(this).parent().data('clicked', null); } else { // first touch if (custom_event != 'click' && !ios && (jQuery(this).parent().children('.sub-menu').length >0)) {e.preventDefault();} jQuery(this).parent().data('clicked', $link_id); } }); /* Back to top button animation */ var offset = 500; var duration = 500; jQuery(window).scroll(function() { if (jQuery(this).scrollTop() > offset) { jQuery('#toTop').css({'margin-left':''+cryout_toTop_offset+'px','opacity':1}); jQuery('#toTop').css({'margin-right':''+cryout_toTop_offset+'px','opacity':1}); } else { jQuery('#toTop').css({'margin-left':''+(cryout_toTop_offset+150)+'px','opacity':0}); jQuery('#toTop').css({'margin-right':''+(cryout_toTop_offset+150)+'px','opacity':0}); } }); jQuery('#toTop').click(function(event) { event.preventDefault(); jQuery('html, body').animate({scrollTop: 0}, duration); return false; }); /* Menu animation */ jQuery("#access ul ul").css({display: "none"}); /* Opera Fix */ jQuery("#access > .menu ul li > a:not(:only-child)").attr("aria-haspopup","true");/* IE10 mobile Fix */ jQuery("#access li").hover(function(){ jQuery(this).find('ul:first').stop(); jQuery(this).find('ul:first').css({opacity: "0",marginTop:"50px"}).css({visibility: "visible",display: "block",overflow:"visible"}).animate({"opacity":"1",marginTop:"-=50"},{queue:false}); },function(){ jQuery(this).find('ul:first').css({visibility: "visible",display: "block",overflow:"visible"}).animate({marginTop:"+=50"}, {queue:false}).fadeOut(); }); /* Social Icons Animation */ jQuery(".socialicons").append('
'); jQuery(".socialicons").hover(function(){ jQuery(this).find(".socials-hover").animate({"width":"26px","height":"26px","top":"2px","left":"2px"},{queue:false,duration:250}); },function() { jQuery(this).find(".socials-hover").animate({"width":"0px","height":"0px","top":"50%","left":"50%"},{queue:false,duration:250, complete: function() { /*jQuery(this).css({bottom:"-30px"});*/ } }); } ); /* Detect and apply custom class for Safari */ if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) { jQuery('body').addClass('safari'); } }); /* end document.ready */ /* Mobile Menu v2 */ function tempera_mobilemenu_init() { var state = false; jQuery("#nav-toggle").click(function(){ jQuery("#access").slideToggle(function(){ if (state) {jQuery(this).removeAttr( 'style' )}; state = ! state; } ); }); } /* Columns equalizer, used if at least one sidebar has a bg color */ function equalizeHeights(){ var h1 = jQuery("#primary").height(); var h2 = jQuery("#secondary").height(); var h3 = jQuery("#content").height(); var max = Math.max(h1,h2,h3); if (h1').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%"); $this.removeAttr('height').removeAttr('width'); }); }); }; })( jQuery ); /* Returns the version of Internet Explorer or a -1 (indicating the use of another browser). */ function getInternetExplorerVersion() { var rv = -1; /* assume not IE. */ if (navigator.appName == 'Microsoft Internet Explorer') { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) rv = parseFloat( RegExp.$1 ); } return rv; }; // source --> https://www.coachingydesarrollo.org/wp-content/themes/tempera/js/nivo-slider.js?ver=1.4.1 /* * jQuery Nivo Slider v3.2 * http://nivo.dev7studios.com * * Copyright 2012, Dev7studios * Free to use and abuse under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ (function(e){var t=function(t,n){var r=e.extend({},e.fn.nivoSlider.defaults,n);var i={currentSlide:0,currentImage:"",totalSlides:0,running:false,paused:false,stop:false,controlNavEl:false};var s=e(t);s.data("nivo:vars",i).addClass("nivoSlider");var o=s.children();o.each(function(){var t=e(this);var n="";if(!t.is("img")){if(t.is("a")){t.addClass("nivo-imageLink");n=t}t=t.find("img:first")}var r=r===0?t.attr("width"):t.width(),s=s===0?t.attr("height"):t.height();if(n!==""){n.css("display","none")}t.css("display","none");i.totalSlides++});if(r.randomStart){r.startSlide=Math.floor(Math.random()*i.totalSlides)}if(r.startSlide>0){if(r.startSlide>=i.totalSlides){r.startSlide=i.totalSlides-1}i.currentSlide=r.startSlide}if(e(o[i.currentSlide]).is("img")){i.currentImage=e(o[i.currentSlide])}else{i.currentImage=e(o[i.currentSlide]).find("img:first")}if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}var u=e("").addClass("nivo-main-image");u.attr("src",i.currentImage.attr("src")).show();s.append(u);e(window).resize(function(){s.children("img").width(s.width());u.attr("src",i.currentImage.attr("src"));u.stop().height("auto");e(".nivo-slice").remove();e(".nivo-box").remove()});s.append(e('
'));var a=function(t){var n=e(".nivo-caption",s);if(i.currentImage.attr("title")!=""&&i.currentImage.attr("title")!=undefined){var r=i.currentImage.attr("title");if(r.substr(0,1)=="#")r=e(r).html();if(n.css("display")=="block"){setTimeout(function(){n.html(r)},t.animSpeed)}else{n.html(r);n.stop().fadeIn(t.animSpeed)}}else{n.stop().fadeOut(t.animSpeed)}};a(r);var f=0;if(!r.manualAdvance&&o.length>1){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}if(r.directionNav){s.append('
'+r.prevText+''+r.nextText+"
");e(s).on("click","a.nivo-prevNav",function(){if(i.running){return false}clearInterval(f);f="";i.currentSlide-=2;d(s,o,r,"prev")});e(s).on("click","a.nivo-nextNav",function(){if(i.running){return false}clearInterval(f);f="";d(s,o,r,"next")})}if(r.controlNav){i.controlNavEl=e('
');s.after(i.controlNavEl);for(var l=0;l')}else{i.controlNavEl.append(''+(l+1)+"")}}e("a:eq("+i.currentSlide+")",i.controlNavEl).addClass("active");e("a",i.controlNavEl).bind("click",function(){if(i.running)return false;if(e(this).hasClass("active"))return false;clearInterval(f);f="";u.attr("src",i.currentImage.attr("src"));i.currentSlide=e(this).attr("rel")-1;d(s,o,r,"control")})}if(r.pauseOnHover){s.hover(function(){i.paused=true;clearInterval(f);f=""},function(){i.paused=false;if(f===""&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}})}s.bind("nivo:animFinished",function(){u.attr("src",i.currentImage.attr("src"));i.running=false;e(o).each(function(){if(e(this).is("a")){e(this).css("display","none")}});if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}if(f===""&&!i.paused&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}r.afterChange.call(this)});var h=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().is("a")?e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().height():e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height();for(var s=0;s').css({left:o*s+"px",width:t.width()-o*s+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}else{t.append(e('
').css({left:o*s+"px",width:o+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}}e(".nivo-slice",t).height(i);u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var p=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=Math.round(t.width()/n.boxCols),s=Math.round(e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height()/n.boxRows);for(var o=0;o').css({opacity:0,left:i*a+"px",top:s*o+"px",width:t.width()-i*a+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}else{t.append(e('
').css({opacity:0,left:i*a+"px",top:s*o+"px",width:i+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}}}u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var d=function(t,n,r,i){var s=t.data("nivo:vars");if(s&&s.currentSlide===s.totalSlides-1){r.lastSlide.call(this)}if((!s||s.stop)&&!i){return false}r.beforeChange.call(this);if(!i){u.attr("src",s.currentImage.attr("src"))}else{if(i==="prev"){u.attr("src",s.currentImage.attr("src"))}if(i==="next"){u.attr("src",s.currentImage.attr("src"))}}s.currentSlide++;if(s.currentSlide===s.totalSlides){s.currentSlide=0;r.slideshowEnd.call(this)}if(s.currentSlide<0){s.currentSlide=s.totalSlides-1}if(e(n[s.currentSlide]).is("img")){s.currentImage=e(n[s.currentSlide])}else{s.currentImage=e(n[s.currentSlide]).find("img:first")}if(r.controlNav){e("a",s.controlNavEl).removeClass("active");e("a:eq("+s.currentSlide+")",s.controlNavEl).addClass("active")}a(r);e(".nivo-slice",t).remove();e(".nivo-box",t).remove();var o=r.effect,f="";if(r.effect==="random"){f=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade","boxRandom","boxRain","boxRainReverse","boxRainGrow","boxRainGrowReverse");o=f[Math.floor(Math.random()*(f.length+1))];if(o===undefined){o="fade"}}if(r.effect.indexOf(",")!==-1){f=r.effect.split(",");o=f[Math.floor(Math.random()*f.length)];if(o===undefined){o="fade"}}if(s.currentImage.attr("data-transition")){o=s.currentImage.attr("data-transition")}s.running=true;var l=0,c=0,d="",m="",g="",y="";if(o==="sliceDown"||o==="sliceDownRight"||o==="sliceDownLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({top:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUp"||o==="sliceUpRight"||o==="sliceUpLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceUpLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({bottom:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUpDown"||o==="sliceUpDownRight"||o==="sliceUpDownLeft"){h(t,r,s);l=0;c=0;var b=0;d=e(".nivo-slice",t);if(o==="sliceUpDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);if(c===0){n.css("top","0px");c++}else{n.css("bottom","0px");c=0}if(b===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;b++})}else if(o==="fold"){h(t,r,s);l=0;c=0;e(".nivo-slice",t).each(function(){var n=e(this);var i=n.width();n.css({top:"0px",width:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="fade"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:t.width()+"px"});m.animate({opacity:"1.0"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInRight"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInLeft"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1",left:"",right:"0px"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){m.css({left:"0px",right:""});t.trigger("nivo:animFinished")})}else if(o==="boxRandom"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;y=v(e(".nivo-box",t));y.each(function(){var n=e(this);if(c===g-1){setTimeout(function(){n.animate({opacity:"1"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1"},r.animSpeed)},100+l)}l+=20;c++})}else if(o==="boxRain"||o==="boxRainReverse"||o==="boxRainGrow"||o==="boxRainGrowReverse"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;var w=0;var E=0;var S=[];S[w]=[];y=e(".nivo-box",t);if(o==="boxRainReverse"||o==="boxRainGrowReverse"){y=e(".nivo-box",t)._reverse()}y.each(function(){S[w][E]=e(this);E++;if(E===r.boxCols){w++;E=0;S[w]=[]}});for(var x=0;x=0&&T