(function($){ "use strict"; $(window).bind("pageshow", function(event){ if(event.originalEvent.persisted){ avia_site_preloader(); }}); $(document).ready(function(){ var aviabodyclasses=AviaBrowserDetection('html'); $.avia_utilities=$.avia_utilities||{}; if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&'ontouchstart' in document.documentElement){ $.avia_utilities.isMobile=true; }else{ $.avia_utilities.isMobile=false; } if(aviabodyclasses.indexOf("avia-msie-7")==-1) avia_responsive_menu(); avia_header_size(); avia_sidebar_menu(); avia_sticky_submenu(); avia_hamburger_menu(); avia_scroll_top_fade(); avia_site_preloader(); aviaCalcContentWidth(); new $.AviaTooltip({"class": 'avia-search-tooltip',data: 'avia-search-tooltip', event:'click', position:'bottom', scope: "body", attach:'element'}); new $.AviaTooltip({"class": 'avia-related-tooltip', data: 'avia-related-tooltip', scope: ".related_posts, .av-share-box", attach:'element', delay:0}); new $.AviaAjaxSearch({scope:'#header'}); if($.fn.avia_iso_sort) $('.grid-sort-container').avia_iso_sort(); if($.fn.aviaMegamenu) $(".main_menu .menu").aviaMegamenu({modify_position:true}); $.avia_utilities.avia_ajax_call(); }); $.avia_utilities=$.avia_utilities||{}; $.avia_utilities.avia_ajax_call=function(container){ if(typeof container=='undefined'){ container='body';}; $('a.avianolink').on('click', function(e){ e.preventDefault(); }); $('a.aviablank').attr('target', '_blank'); $(container).avia_activate_lightbox(); if($.fn.avia_scrollspy){ if(container=='body'){ $('body').avia_scrollspy({target:'.main_menu .menu li > a'}); }else{ $('body').avia_scrollspy('refresh'); }} if($.fn.avia_smoothscroll) $('a[href*="#"]', container).avia_smoothscroll(container); avia_small_fixes(container); avia_hover_effect(container); avia_iframe_fix(container); if($.fn.avia_html5_activation&&$.fn.mediaelementplayer) $(".avia_video, .avia_audio", container).avia_html5_activation({ratio:'16:9'}); } $.avia_utilities.log=function(text, type, extra){ if(typeof console=='undefined'){return;} if(typeof type=='undefined'){type="log"} type="AVIA-" + type.toUpperCase(); console.log("["+type+"] "+text); if(typeof extra!='undefined') console.log(extra); } function aviaCalcContentWidth(){ var win=$(window), width_select=$('html').is('.html_header_sidebar') ? "#main":"#header", outer=$(width_select), outerParent=outer.parents('div:eq(0)'), the_main=$(width_select + ' .container:first'), css_block="", calc_dimensions=function(){ var css="", w_12=Math.round(the_main.width()), w_outer=Math.round(outer.width()), w_inner=Math.round(outerParent.width()); css +=" #header .three.units{width:" +(w_12 * 0.25)+ "px;}"; css +=" #header .six.units{width:" +(w_12 * 0.50)+ "px;}"; css +=" #header .nine.units{width:" +(w_12 * 0.75)+ "px;}"; css +=" #header .twelve.units{width:" +(w_12) + "px;}"; css +=" .av-framed-box .av-layout-tab-inner .container{width:" +(w_inner)+ "px;}"; css +=" .html_header_sidebar .av-layout-tab-inner .container{width:" +(w_outer)+ "px;}"; css +=" .boxed .av-layout-tab-inner .container{width:" +(w_outer)+ "px;}"; css +=" .av-framed-box#top .av-submenu-container{width:" +(w_inner)+ "px;}"; try{ css_block.text(css); } catch(err){ css_block.remove(); css_block=$("").appendTo('head:first'); }}; if($('.avia_mega_div').length > 0||$('.av-layout-tab-inner').length > 0||$('.av-submenu-container').length > 0){ css_block=$("").appendTo('head:first') win.on('debouncedresize', calc_dimensions); calc_dimensions(); }} function AviaScrollSpy(element, options){ var self=this; var process=$.proxy(self.process, self) , refresh=$.proxy(self.refresh, self) , $element=$(element).is('body') ? $(window):$(element) , href self.$body=$('body') self.$win=$(window) self.options=$.extend({}, $.fn.avia_scrollspy.defaults, options) self.selector=(self.options.target || ((href=$(element).attr('href'))&&href.replace(/.*(?=#[^\s]+$)/, '')) || '') self.activation_true=false; if(self.$body.find(self.selector + "[href*='#']").length){ self.$scrollElement=$element.on('scroll.scroll-spy.data-api', process); self.$win.on('av-height-change', refresh); self.$body.on('av_resize_finished', refresh); self.activation_true=true; self.checkFirst(); setTimeout(function(){ self.refresh() self.process() },100); }} AviaScrollSpy.prototype={ constructor: AviaScrollSpy , checkFirst: function (){ var current=window.location.href.split('#')[0], matching_link=this.$body.find(this.selector + "[href='"+current+"']").attr('href',current+'#top'); } , refresh: function (){ if(!this.activation_true) return; var self=this , $targets this.offsets=$([]) this.targets=$([]) $targets=this.$body .find(this.selector) .map(function (){ var $el=$(this) , href=$el.data('target')||$el.attr('href') , hash=this.hash , hash=hash.replace(/\//g, "") , $href=/^#\w/.test(hash)&&$(hash) return($href && $href.length && [[ $href.position().top + (!$.isWindow(self.$scrollElement.get(0))&&self.$scrollElement.scrollTop()), href ]])||null }) .sort(function (a, b){ return a[0] - b[0] }) .each(function (){ self.offsets.push(this[0]) self.targets.push(this[1]) }) } , process: function (){ if(!this.offsets) return; if(isNaN(this.options.offset)) this.options.offset=0; var scrollTop=this.$scrollElement.scrollTop() + this.options.offset , scrollHeight=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight , maxScroll=scrollHeight - this.$scrollElement.height() , offsets=this.offsets , targets=this.targets , activeTarget=this.activeTarget , i if(scrollTop >=maxScroll){ return activeTarget!=(i=targets.last()[0]) && this.activate(i) } for (i=offsets.length; i--;){ activeTarget!=targets[i] && scrollTop >=offsets[i] && (!offsets[i + 1]||scrollTop <=offsets[i + 1]) && this.activate(targets[i]) }} , activate: function (target){ var active , selector this.activeTarget=target $(this.selector) .parent('.' + this.options.applyClass) .removeClass(this.options.applyClass) selector=this.selector + '[data-target="' + target + '"],' + this.selector + '[href="' + target + '"]' active=$(selector) .parent('li') .addClass(this.options.applyClass) if(active.parent('.sub-menu').length){ active=active.closest('li.dropdown_ul_available').addClass(this.options.applyClass) } active.trigger('activate') }} $.fn.avia_scrollspy=function (option){ return this.each(function (){ var $this=$(this) , data=$this.data('scrollspy') , options=typeof option=='object'&&option if(!data) $this.data('scrollspy', (data=new AviaScrollSpy(this, options))) if(typeof option=='string') data[option]() }) } $.fn.avia_scrollspy.Constructor=AviaScrollSpy $.fn.avia_scrollspy.calc_offset=function(){ var offset_1=(parseInt($('.html_header_sticky #main').data('scroll-offset'), 10))||0, offset_2=($(".html_header_sticky:not(.html_top_nav_header) #header_main_alternate").outerHeight())||0, offset_3=($(".html_header_sticky.html_header_unstick_top_disabled #header_meta").outerHeight())||0, offset_4=1, offset_5=parseInt($('html').css('margin-top'),10)||0, offset_6=parseInt($('.av-frame-top ').outerHeight(),10)||0; return offset_1 + offset_2 + offset_3 + offset_4 + offset_5 + offset_6; } $.fn.avia_scrollspy.defaults = { offset: $.fn.avia_scrollspy.calc_offset(), applyClass: 'current-menu-item' } function avia_site_preloader(){ var win=$(window), preloader_active=$('html.av-preloader-active'), pre_wrap; if(preloader_active.length){ var hide=function(){ pre_wrap.avia_animate({opacity:0}, function(){ preloader_active.removeClass('av-preloader-active'); }); }; pre_wrap=$('.av-siteloader-wrap'); setTimeout(function(){ $.avia_utilities.preload({container: preloader_active, global_callback: hide }); setTimeout(function(){ if(preloader_active.is('.av-preloader-active')){  hide(); $.avia_utilities.log('Hide Preloader (Fallback)'); }},4000); if(pre_wrap.is('.av-transition-enabled')){ var comp=new RegExp(location.host), exclude=" .no-transition, .mfp-iframe, .lightbox-added, .grid-links-ajax a, #menu-item-search a"; preloader_active.on('click', 'a:not('+exclude+')',function(e){ if(!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey){ var link=this; if(comp.test(link.href)&&link.href.split('#')[0]!=location.href.split('#')[0]&&link.target==""){ if(link.href.indexOf('mailto:')==-1&&link.href.indexOf('add-to-cart=')==-1){ e.preventDefault(); preloader_active.addClass('av-preloader-active av-preloader-reactive'); pre_wrap.avia_animate({opacity:1}, function(){ window.location=link.href; }); }} }}); }}, 500); }} function AviaBrowserDetection(outputClassElement){ if(typeof($.browser)!=='undefined'){ var bodyclass='', version=$.browser.version ? parseInt($.browser.version):""; if($.browser.msie){ bodyclass +='avia-msie'; }else if($.browser.webkit){ bodyclass +='avia-webkit'; }else if($.browser.mozilla){ bodyclass +='avia-mozilla'; } if($.browser.version) bodyclass +=' ' + bodyclass + '-' + version + ' '; if($.browser.name) bodyclass +=' avia-' + $.browser.name + ' avia-' +$.browser.name +'-' + version + ' '; if($.browser.ipad){ bodyclass +=' avia-ipad '; }else if($.browser.iphone){ bodyclass +=' avia-iphone '; }else if($.browser.android){ bodyclass +=' avia-android '; }else if($.browser.win){ bodyclass +=' avia-windows '; }else if($.browser.mac){ bodyclass +=' avia-mac '; }else if($.browser.linux){ bodyclass +=' avia-linux '; }} if(outputClassElement) $(outputClassElement).addClass(bodyclass) return bodyclass; } function avia_responsive_menu(){ var $html=$('html'), win=$(window), header=$('.responsive #header'); if(!header.length) return; var menu=header.find('.main_menu ul:eq(0)'), first_level_items=menu.find('>li').length, container=$('#wrap_all'), show_menu_btn=$('#advanced_menu_toggle'), hide_menu_btn=$('#advanced_menu_hide'), mobile_advanced=menu.clone().attr({id:"mobile-advanced", "class":""}), sub_hidden=$html.is('.html_header_mobile_behavior'), insert_menu=function(){ if(first_level_items==0){ show_menu_btn.remove(); }else{ var after_menu=$('#header .logo'); if(after_menu.length==0) after_menu="#main .logo:eq(0)"; show_menu_btn.insertAfter(after_menu); mobile_advanced.find('.noMobile').remove(); mobile_advanced.prependTo(container); hide_menu_btn.prependTo(container); }}, set_height=function(){ var height=mobile_advanced.outerHeight(true), win_h=win.height(); if(height < win_h) height=win_h; container.css({'height':height}); mobile_advanced.css({position:'absolute', 'min-height':win_h}); }, hide_menu=function(){ container.removeClass('show_mobile_menu'); setTimeout(function(){ container.css({'height':"auto", 'overflow':'hidden', 'minHeight':0}); mobile_advanced.css({display:'none'}); },600); return false; }, autohide=function(){ if(container.is('.show_mobile_menu')&&hide_menu_btn.css('display')=='none'){ hide_menu(); }}, show_menu=function(){ if(container.is('.show_mobile_menu')){ hide_menu(); }else{ win.scrollTop(0); mobile_advanced.css({display:'block'}); setTimeout(function(){container.addClass('show_mobile_menu'); },10); set_height(); } return false; }; $html.on('click', '#mobile-advanced li a, #mobile-advanced .mega_menu_title', function(){ var current=$(this); if(sub_hidden){ var list_item=current.siblings('ul, .avia_mega_div'); if(current.siblings('ul').children('.avia_mega_text_block').length&¤t.siblings('ul').children('li').length==1){ list_item=''; } if(list_item.length){ if(list_item.hasClass('visible_sublist')){ list_item.removeClass('visible_sublist'); }else{ list_item.addClass('visible_sublist'); } set_height(); return false; }} if(current.filter('[href*="#"]').length){ container.removeClass('show_mobile_menu'); container.css({'height':"auto"}); }}); show_menu_btn.click(show_menu); hide_menu_btn.click(hide_menu); win.on('debouncedresize', autohide); insert_menu(); } $.fn.avia_html5_activation=function(options){ var defaults = { ratio: '16:9' }; var options=$.extend(defaults, options), isMobile=$.avia_utilities.isMobile; this.each(function(){ var fv=$(this), id_to_apply='#' + fv.attr('id'), posterImg=fv.attr('poster'); fv.mediaelementplayer({ defaultVideoWidth: 480, defaultVideoHeight: 270, videoWidth: -1, videoHeight: -1, audioWidth: 400, audioHeight: 30, startVolume: 0.8, loop: false, enableAutosize: false, features: ['playpause','progress','current','duration','tracks','volume'], alwaysShowControls: false, iPadUseNativeControls: false, iPhoneUseNativeControls: false, AndroidUseNativeControls: false, alwaysShowHours: false, showTimecodeFrameCount: false, framesPerSecond: 25, enableKeyboard: true, pauseOtherPlayers: false, poster: posterImg, success: function (mediaElement, domObject){ setTimeout(function(){ if(mediaElement.pluginType=='flash'){ mediaElement.addEventListener('canplay', function(){ fv.trigger('av-mediajs-loaded'); }, false); }else{ fv.trigger('av-mediajs-loaded').addClass('av-mediajs-loaded'); } mediaElement.addEventListener('ended', function(){ fv.trigger('av-mediajs-ended'); }, false); },10); }, error: function (){ }, keyActions: [] }); }); } function avia_hover_effect(container){ if($.avia_utilities.isMobile) return; var overlay="", cssTrans=$.avia_utilities.supports('transition'); if(container=='body'){ var elements=$('#main a img').parents('a').not('.noLightbox, .noLightbox a, .avia-gallery-thumb a, .ls-wp-container a, .noHover, .noHover a, .av-logo-container .logo a').add('#main .avia-hover-fx'); }else{ var elements=$('a img', container).parents('a').not('.noLightbox, .noLightbox a, .avia-gallery-thumb a, .ls-wp-container a, .noHover, .noHover a, .av-logo-container .logo a').add('.avia-hover-fx', container); } elements.each(function(e){ var link=$(this), current=link.find('img:first'); if(current.hasClass('alignleft')) link.addClass('alignleft').css({float:'left', margin:0, padding:0}); if(current.hasClass('alignright')) link.addClass('alignright').css({float:'right', margin:0, padding:0}); if(current.hasClass('aligncenter')) link.addClass('aligncenter').css({float:'none','text-align':'center', margin:0, padding:0}); if(current.hasClass('alignnone')){ link.addClass('alignnone').css({margin:0, padding:0});; if(!link.css('display')||link.css('display')=='inline'){ link.css({display:'inline-block'});}} if(!link.css('position')||link.css('position')=='static'){ link.css({position:'relative', overflow:'hidden'});} var url=link.attr('href'), span_class="overlay-type-video", opa=link.data('opacity')||0.7, overlay_offset=5, overlay=link.find('.image-overlay'); if(url){ if(url.match(/(jpg|gif|jpeg|png|tif)/)) span_class="overlay-type-image"; if(!url.match(/(jpg|gif|jpeg|png|\.tif|\.mov|\.swf|vimeo\.com|youtube\.com)/)) span_class="overlay-type-extern"; } if(!overlay.length){ overlay=$("").appendTo(link); } link.on('mouseenter', function(e){ var current=link.find('img:first'), _self=current.get(0), outerH=current.outerHeight(), outerW=current.outerWidth(), pos=current.position(), linkCss=link.css('display'), overlay=link.find('.image-overlay'); if(outerH > 100){ if(!overlay.length){ overlay=$("").appendTo(link); } if(link.height()==0){ link.addClass(_self.className); _self.className=""; } if(!linkCss||linkCss=='inline'){ link.css({display:'block'});} overlay.css({left:(pos.left - overlay_offset) + parseInt(current.css("margin-left"),10), top:pos.top + parseInt(current.css("margin-top"),10)}) .css({overflow:'hidden',display:'block','height':outerH,'width':(outerW + (2*overlay_offset))}); if(cssTrans===false) overlay.stop().animate({opacity:opa}, 400); }else{ overlay.css({display:"none"}); }}).on('mouseleave', elements, function(){ if(overlay.length){ if(cssTrans===false) overlay.stop().animate({opacity:0}, 400); }}); }); } (function($){ $.fn.avia_smoothscroll=function(apply_to_container){ if(!this.length) return; var the_win=$(window), $header=$('#header'), $main=$('.html_header_top.html_header_sticky #main').not('.page-template-template-blank-php #main'), $meta=$('.html_header_top.html_header_unstick_top_disabled #header_meta'), $alt=$('.html_header_top:not(.html_top_nav_header) #header_main_alternate'), menu_above_logo=$('.html_header_top.html_top_nav_header'), shrink=$('.html_header_top.html_header_shrinking').length, frame=$('.av-frame-top'), fixedMainPadding=0, isMobile=$.avia_utilities.isMobile, sticky_sub=$('.sticky_placeholder:first'), calc_main_padding=function(){ if($header.css('position')=="fixed"){ var tempPadding=parseInt($main.data('scroll-offset'),10)||0, non_shrinking=parseInt($meta.outerHeight(),10)||0, non_shrinking2=parseInt($alt.outerHeight(),10)||0; if(tempPadding > 0&&shrink){ tempPadding=(tempPadding / 2) + non_shrinking + non_shrinking2; }else{ tempPadding=tempPadding + non_shrinking + non_shrinking2; } tempPadding +=parseInt($('html').css('margin-top'),10); fixedMainPadding=tempPadding; }else{ fixedMainPadding=parseInt($('html').css('margin-top'),10); } if(frame.length){ fixedMainPadding +=frame.height(); } if(menu_above_logo.length){ fixedMainPadding=$('.html_header_sticky #header_main_alternate').height() + parseInt($('html').css('margin-top'),10); } if(isMobile){ fixedMainPadding=0; }}; if(isMobile) shrink=false; calc_main_padding(); the_win.on("debouncedresize av-height-change", calc_main_padding); var hash=window.location.hash.replace(/\//g, ""); if(fixedMainPadding > 0&&hash&&apply_to_container=='body'&&hash.charAt(1)!="!"&&hash.indexOf("=")===-1){ var scroll_to_el=$(hash), modifier=0; if(scroll_to_el.length){ the_win.on('scroll.avia_first_scroll', function(){ setTimeout(function(){ if(sticky_sub.length&&scroll_to_el.offset().top > sticky_sub.offset().top){ modifier=sticky_sub.outerHeight() - 3; } the_win.off('scroll.avia_first_scroll').scrollTop(scroll_to_el.offset().top - fixedMainPadding - modifier); },10); }); }} return this.each(function(){ $(this).click(function(e){ var newHash=this.hash.replace(/\//g, ""), clicked=$(this), data=clicked.data(); if(newHash!=''&&newHash!='#'&&newHash!='#prev'&&newHash!='#next'&&!clicked.is('.comment-reply-link, #cancel-comment-reply-link, .no-scroll')){ var container="", originHash=""; if("#next-section"==newHash){ originHash=newHash; container=clicked.parents('.container_wrap:eq(0)').nextAll('.container_wrap:eq(0)'); newHash='#' + container.attr('id') ; }else{ container=$(this.hash.replace(/\//g, "")); } if(container.length){ var cur_offset=the_win.scrollTop(), container_offset=container.offset().top, target=container_offset - fixedMainPadding, hash=window.location.hash, hash=hash.replace(/\//g, ""), oldLocation=window.location.href.replace(hash, ''), newLocation=this, duration=data.duration||1200, easing=data.easing||'easeInOutQuint'; if(sticky_sub.length&&container_offset > sticky_sub.offset().top){ target -=sticky_sub.outerHeight() - 3;} if(oldLocation+newHash==newLocation||originHash){ if(cur_offset!=target){ if(!(cur_offset==0&&target <=0)){ $('html:not(:animated),body:not(:animated)').animate({ scrollTop: target }, duration, easing, function(){ if(window.history.replaceState) window.history.replaceState("", "", newHash); }); }} e.preventDefault(); }} }}); }); };})(jQuery); function avia_iframe_fix(container){ var iframe=jQuery('iframe[src*="youtube.com"]:not(.av_youtube_frame)', container), youtubeEmbed=jQuery('iframe[src*="youtube.com"]:not(.av_youtube_frame) object, iframe[src*="youtube.com"]:not(.av_youtube_frame) embed', container).attr('wmode','opaque'); iframe.each(function(){ var current=jQuery(this), src=current.attr('src'); if(src){ if(src.indexOf('?')!==-1){ src +="&wmode=opaque"; }else{ src +="?wmode=opaque"; } current.attr('src', src); }}); } function avia_small_fixes(container){ if(!container) container=document; var win=jQuery(window), iframes=jQuery('.avia-iframe-wrap iframe:not(.avia-slideshow iframe):not(iframe.no_resize):not(.avia-video iframe)', container), adjust_iframes=function(){ iframes.each(function(){ var iframe=jQuery(this), parent=iframe.parent(), proportions=56.25; if(this.width&&this.height){ proportions=(100/ this.width) * this.height; parent.css({"padding-bottom":proportions+"%"}); }}); }; adjust_iframes(); } (function($){ $.fn.avia_activate_lightbox=function(variables){ var defaults={ groups:['.avia-slideshow', '.avia-gallery', '.av-instagram-pics', '.portfolio-preview-image', '.portfolio-preview-content', '.isotope', '.post-entry', '.sidebar', '#main', '.main_menu'], autolinkElements: 'a.lightbox, a[rel^="prettyPhoto"], a[rel^="lightbox"], a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg], a[href*=".jpg?"], a[href*=".png?"], a[href*=".gif?"], a[href*=".jpeg?"], a[href$=".mov"] , a[href$=".swf"] , a:regex(href, .vimeo\.com/[0-9]) , a[href*="youtube.com/watch"] , a[href*="screenr.com"], a[href*="iframe=true"]', videoElements:'a[href$=".mov"] , a[href$=".swf"] , a:regex(href, .vimeo\.com/[0-9]) , a[href*="youtube.com/watch"] , a[href*="screenr.com"], a[href*="iframe=true"]', exclude:'.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]', }, options=$.extend({}, defaults, variables), av_popup={ type: 'image', mainClass: 'avia-popup mfp-zoom-in', tLoading: '', tClose: '', removalDelay: 300, closeBtnInside: true, closeOnContentClick:false, midClick: true, fixedContentPos: false, image: { titleSrc: function(item){ var title=item.el.attr('title'); if(!title) title=item.el.find('img').attr('title'); if(!title) title=item.el.parent().next('.wp-caption-text').html(); if(typeof title=="undefined") return ""; return title; }}, gallery: { tPrev: '', tNext: '', tCounter: '%curr% / %total%', enabled: true, preload: [1,1] }, callbacks: { beforeOpen: function(){ if(this.st.el&&this.st.el.data('fixed-content')){ this.fixedContentPos=true; }}, open: function(){ $.magnificPopup.instance.next=function(){ var self=this; self.wrap.removeClass('mfp-image-loaded'); setTimeout(function(){ $.magnificPopup.proto.next.call(self); }, 120); } $.magnificPopup.instance.prev=function(){ var self=this; self.wrap.removeClass('mfp-image-loaded'); setTimeout(function(){ $.magnificPopup.proto.prev.call(self); }, 120); } if(this.st.el&&this.st.el.data('av-extra-class')){ this.wrap.addClass(this.currItem.el.data('av-extra-class')); }}, imageLoadComplete: function(){ var self=this; setTimeout(function(){ self.wrap.addClass('mfp-image-loaded'); }, 16); }, change: function(){ if(this.currItem.el){ var current=this.currItem.el; this.content.find('.av-extra-modal-content, .av-extra-modal-markup').remove(); if(current.data('av-extra-content')){ var extra=current.data('av-extra-content'); this.content.append("
" + extra + "
"); } if(current.data('av-extra-markup')){ var markup=current.data('av-extra-markup'); this.wrap.append("
" + markup + "
"); }} }, }}, active = !$('html').is('.av-custom-lightbox'); if(!active) return this; return this.each(function(){ var container=$(this), videos=$(options.videoElements, this).not(options.exclude).addClass('mfp-iframe'), ajaxed = !container.is('body')&&!container.is('.ajax_slide'); for (var i=0; i < options.groups.length; i++){ container.find(options.groups[i]).each(function(){ var links=$(options.autolinkElements, this); if(ajaxed) links.removeClass('lightbox-added'); links.not(options.exclude).addClass('lightbox-added').magnificPopup(av_popup); }); }}); }})(jQuery); (function($){ $.fn.aviaMegamenu=function(variables){ var defaults = { modify_position:true, delay:300 }; var options=$.extend(defaults, variables), win=$(window); return this.each(function(){ var the_html=$('html:first'), main=$('#main .container:first'), left_menu=the_html.filter('.html_menu_left, .html_logo_center').length, isMobile=$.avia_utilities.isMobile, menu=$(this), menuItems=menu.find(">li:not(.ignore_menu)"), megaItems=menuItems.find(">div").parent().css({overflow:'hidden'}), menuActive=menu.find('>.current-menu-item>a, >.current_page_item>a'), dropdownItems=menuItems.find(">ul").parent(), parentContainer=menu.parent(), mainMenuParent=menu.parents('.main_menu').eq(0), parentContainerWidth=parentContainer.width(), delayCheck={}, mega_open=[]; if(!menuActive.length){ menu.find('.current-menu-ancestor:eq(0) a:eq(0), .current_page_ancestor:eq(0) a:eq(0)').parent().addClass('active-parent-item')} if(!the_html.is('.html_header_top')){ options.modify_position=false; } menuItems.on('click' ,'a', function(){ if(this.href==window.location.href + "#"||this.href==window.location.href + "/#") return false; }); menuItems.each(function(){ var item=$(this), pos=item.position(), megaDiv=item.find("div:first").css({opacity:0, display:"none"}), normalDropdown=""; if(!megaDiv.length){ normalDropdown=item.find(">ul").css({display:"none"}); } if(megaDiv.length||normalDropdown.length){ var link=item.addClass('dropdown_ul_available').find('>a'); link.append(''); if(typeof link.attr('href')!='string'||link.attr('href')=="#"){ link.css('cursor','default').click(function(){return false;});}} if(options.modify_position&&megaDiv.length){ item.on('mouseenter', function(){ calc_offset(item, pos, megaDiv, parentContainerWidth) }); }}); function calc_offset(item, pos, megaDiv, parentContainerWidth){ pos=item.position(); if(!left_menu){ if(pos.left + megaDiv.width() < parentContainerWidth){ megaDiv.css({right: -megaDiv.outerWidth() + item.outerWidth() }); } else if(pos.left + megaDiv.width() > parentContainerWidth){ megaDiv.css({right: -mainMenuParent.outerWidth() + (pos.left + item.outerWidth()) }); }}else{ if(megaDiv.width() > pos.left + item.outerWidth()){ megaDiv.css({left: (pos.left* -1)}); } else if(pos.left + megaDiv.width() > parentContainerWidth){ megaDiv.css({left: (megaDiv.width() - pos.left) * -1 }); }} } function megaDivShow(i){ if(delayCheck[i]==true){ var item=megaItems.filter(':eq('+i+')').css({overflow:'visible'}).find("div:first"), link=megaItems.filter(':eq('+i+')').find("a:first"); mega_open["check"+i]=true; item.stop().css('display','block').animate({opacity:1},300); if(item.length){ link.addClass('open-mega-a'); }} } function megaDivHide (i){ if(delayCheck[i]==false){ megaItems.filter(':eq('+i+')').find(">a").removeClass('open-mega-a'); var listItem=megaItems.filter(':eq('+i+')'), item=listItem.find("div:first"); item.stop().css('display','block').animate({opacity:0},300, function(){ $(this).css('display','none'); listItem.css({overflow:'hidden'}); mega_open["check"+i]=false; }); }} if(isMobile){ megaItems.each(function(i){ $(this).bind('click', function(){ if(mega_open["check"+i]!=true) return false; }); }); } megaItems.each(function(i){ $(this).hover(function(){ delayCheck[i]=true; setTimeout(function(){megaDivShow(i); },options.delay); }, function(){ delayCheck[i]=false; setTimeout(function(){megaDivHide(i); },options.delay); } ); }); dropdownItems.find('li').addBack().each(function(){ var currentItem=$(this), sublist=currentItem.find('ul:first'), showList=false; if(sublist.length){ sublist.css({display:'block', opacity:0, visibility:'hidden'}); var currentLink=currentItem.find('>a'); currentLink.bind('mouseenter', function(){ sublist.stop().css({visibility:'visible'}).animate({opacity:1}); }); currentItem.bind('mouseleave', function(){ sublist.stop().animate({opacity:0}, function(){ sublist.css({visibility:'hidden'}); }); }); }}); }); };})(jQuery); $.fn.avia_iso_sort=function(options){ return this.each(function(){ var the_body=$('body'), container=$(this), portfolio_id=container.data('portfolio-id'), parentContainer=container.parents('.entry-content-wrapper, .avia-fullwidth-portfolio'), filter=parentContainer.find('.sort_width_container[data-portfolio-id="' + portfolio_id + '"]').find('#js_sort_items').css({visibility:"visible", opacity:0}), links=filter.find('a'), imgParent=container.find('.grid-image'), isoActive=false, items=$('.post-entry', container); function applyIso(){ container.addClass('isotope_activated').isotope({ layoutMode:'fitRows', itemSelector:'.flex_column' }); container.isotope('on', 'layoutComplete', function(){ container.css({overflow:'visible'}); the_body.trigger('av_resize_finished'); }); isoActive=true; setTimeout(function(){ parentContainer.addClass('avia_sortable_active'); }, 0); }; links.bind('click',function(){ var current=$(this), selector=current.data('filter'), linktext=current.html(), activeCat=parentContainer.find('.av-current-sort-title'); if(activeCat.length) activeCat.html(linktext); links.removeClass('active_sort'); current.addClass('active_sort'); container.attr('id', 'grid_id_'+selector); parentContainer.find('.open_container .ajax_controlls .avia_close').trigger('click'); container.isotope({ layoutMode:'fitRows', itemSelector:'.flex_column' , filter: '.'+selector}); return false; }); $(window).on('debouncedresize', function(){ applyIso(); }); $.avia_utilities.preload({container: container, single_callback: function(){ filter.animate({opacity:1}, 400); applyIso(); setTimeout(function(){ applyIso(); }); imgParent.css({height:'auto'}).each(function(i){ var currentLink=$(this); setTimeout(function(){ currentLink.animate({opacity:1},1500); }, (100 * i)); }); }}); }); }; function avia_sticky_submenu(){ var win=$(window), html=$('html:first'), header=$('.html_header_top.html_header_sticky #header'), html_margin=parseInt($('html:first').css('margin-top'), 10), setWitdth=$('.html_header_sidebar #main, .boxed #main'), menus=$('.av-submenu-container'), bordermod=html.is('.html_minimal_header') ? 0:1, fixed_frame=$('.av-frame-top').height(), calc_margin=function(){ html_margin=parseInt(html.css('margin-top'), 10); if(!$('.mobile_menu_toggle:visible').length){ $('.av-open-submenu').removeClass('av-open-submenu'); } menus.filter('.av-sticky-submenu').each(function(){ $(this).next('.sticky_placeholder').height($(this).height()); }); }, calc_values=function(){ var content_width=setWitdth.width(); html_margin=parseInt(html.css('margin-top'), 10); menus.width(content_width); }, check=function(placeholder, no_timeout){ var menu_pos=this.offset().top, top_pos=placeholder.offset().top, scrolled=win.scrollTop(), modifier=html_margin, fixed=false; if(header.length){ modifier +=header.outerHeight() + parseInt(header.css('margin-top'), 10); } if(fixed_frame){ modifier +=fixed_frame; } if(scrolled + modifier > top_pos){ if(!fixed){ this.css({top: modifier - bordermod, position: 'fixed'});fixed=true }}else{ this.css({top: 'auto', position: 'absolute'});fixed=false }}, toggle=function(e){ e.preventDefault(); var clicked=$(this), menu=clicked.siblings('.av-subnav-menu'); if(menu.hasClass('av-open-submenu')){ menu.removeClass('av-open-submenu'); }else{ menu.addClass('av-open-submenu'); }}; win.on("debouncedresize av-height-change", calc_margin); calc_margin(); if(setWitdth.length){ win.on("debouncedresize av-height-change", calc_values); calc_values(); } menus.each(function(){ var menu=$(this), sticky=menu.filter('.av-sticky-submenu'), placeholder=menu.next('.sticky_placeholder'), mobile_button=menu.find('.mobile_menu_toggle'); if(sticky.length) win.on('scroll', function(){ window.requestAnimationFrame($.proxy(check, sticky, placeholder))}); if(mobile_button.length){ mobile_button.on('click', toggle); }}); html.on('click', '.av-submenu-hidden .av-open-submenu li a', function(){ var current=$(this); var list_item=current.siblings('ul, .avia_mega_div'); if(list_item.length){ if(list_item.hasClass('av-visible-sublist')){ list_item.removeClass('av-visible-sublist'); }else{ list_item.addClass('av-visible-sublist'); } return false; }}); $('.avia_mobile').on('click', '.av-menu-mobile-disabled li a', function(){ var current=$(this); var list_item=current.siblings('ul'); if(list_item.length){ if(list_item.hasClass('av-visible-mobile-sublist')){ }else{ $('.av-visible-mobile-sublist').removeClass('av-visible-mobile-sublist'); list_item.addClass('av-visible-mobile-sublist'); return false; }} }); } function avia_sidebar_menu(){ var win=$(window), main=$('#main'), sb_header=$('.html_header_sidebar #header_main'), sidebar=$('.html_header_sidebar #header.av_conditional_sticky'); if(!sb_header.length) return; if(!sidebar.length) return; var innerSidebar=$('#header_main'), wrap=$('#wrap_all'), fixed_frame=$('.av-frame-top').height() * 2, subtract=parseInt($('html').css('margin-top'), 10), calc_values=function(){ if(innerSidebar.outerHeight() + fixed_frame < win.height()){ sidebar.addClass('av_always_sticky'); }else{ sidebar.removeClass('av_always_sticky'); } wrap.css({'min-height': win.height() - subtract}); }; calc_values(); win.on("debouncedresize av-height-change", calc_values); } function av_change_class($element, change_method, class_name){ if($element[0].classList){ if(change_method=="add"){ $element[0].classList.add(class_name); }else{ $element[0].classList.remove(class_name); }}else{ if(change_method=="add"){ $element.addClass(class_name); }else{ $element.removeClass(class_name); }} } function avia_header_size(){ var win=$(window), header=$('.html_header_top.html_header_sticky #header'), unsticktop=$('.av_header_unstick_top'); if(!header.length&&!unsticktop.length) return; var logo=$('#header_main .container .logo img, #header_main .container .logo a'), elements=$('#header_main .container:not(#header_main_alternate>.container), #header_main .main_menu ul:first-child > li > a:not(.avia_mega_div a, #header_main_alternate a), #header_main #menu-item-shop .cart_dropdown_link'), el_height=$(elements).filter(':first').height(), isMobile=$.avia_utilities.isMobile, scroll_top=$('#scroll-top-link'), transparent=header.is('.av_header_transparency'), shrinking=header.is('.av_header_shrinking'), topbar_height=header.find('#header_meta').outerHeight(), set_height=function(){ var st=win.scrollTop(), newH=0, st_real=st; if(unsticktop) st -=topbar_height; if(st < 0) st=0; if(shrinking&&!isMobile){ if(st < el_height/2){ newH=el_height - st; if(st <=0){ newH=el_height; } av_change_class(header, 'remove', 'header-scrolled'); }else{ newH=el_height/2; av_change_class(header, 'add', 'header-scrolled'); } if(st - 30 < el_height){ av_change_class(header, 'remove', 'header-scrolled-full'); }else{ av_change_class(header, 'add', 'header-scrolled-full'); } elements.css({'height': newH + 'px', 'lineHeight': newH + 'px'}); logo.css({'maxHeight': newH + 'px'}); } if(unsticktop.length){ if(st <=0){ if(st_real <=0) st_real=0; unsticktop.css({"margin-top":"-"+st_real+"px"}); }else{ unsticktop.css({"margin-top":"-"+topbar_height+"px"}); }} if(transparent){ if(st > 50){ av_change_class(header, 'remove', 'av_header_transparency'); }else{ av_change_class(header, 'add', 'av_header_transparency'); }} } if($('body').is('.avia_deactivate_menu_resize')) shrinking=false; if(!transparent&&!shrinking&&!unsticktop.length) return; win.on('debouncedresize', function(){ el_height=$(elements).attr('style',"").filter(':first').height(); set_height(); }); win.on('scroll', function(){ window.requestAnimationFrame(set_height)}); set_height(); } function avia_scroll_top_fade(){ var win=$(window), timeo=false, scroll_top=$('#scroll-top-link'), set_status=function(){ var st=win.scrollTop(); if(st < 500){ scroll_top.removeClass('avia_pop_class'); } else if(!scroll_top.is('.avia_pop_class')){ scroll_top.addClass('avia_pop_class'); }}; win.on('scroll', function(){ window.requestAnimationFrame(set_status)}); set_status(); } function avia_hamburger_menu(){ var menu=$('#avia-menu'), burger_wrap=$('.av-burger-menu-main a'), burger=burger_wrap.find('.av-hamburger'), htmlEL=$('.html_burger_menu'), overlay=$('
'), inner_overlay=$('
').appendTo(overlay), bgColor=$('
').appendTo(overlay), animating=false, first_level={}; burger_wrap.click(function(e){ if(animating) return; animating=true; if(!burger.is(".av-inserted-main-menu")){ var new_menu=menu.clone(); new_menu.find('.menu-item-avia-special').remove(); new_menu.find('ul').attr('style',''); new_menu.attr({id:'av-burger-menu-ul', class:''}).appendTo(inner_overlay); new_menu.find('li').hover(function (){ $(this).children("ul.sub-menu").slideDown('fast'); }, function (){ $(this).children("ul.sub-menu").slideUp('fast'); }); burger.addClass("av-inserted-main-menu"); overlay.appendTo('.avia-menu'); if($.fn.avia_smoothscroll) $('a[href*="#"]', overlay).avia_smoothscroll(overlay); $('a[href*="#"]', overlay).click(function(){ burger_wrap.trigger('click'); }) first_level=overlay.find('#av-burger-menu-ul > li'); console.log(first_level); } if(burger.is(".is-active")){ burger.removeClass("is-active"); overlay.avia_animate({opacity:0}, function(){ overlay.css({display:'none'}); htmlEL.removeClass("av-burger-overlay-active"); animating=false; }); }else{ first_level.removeClass('av-active-burger-items'); burger.addClass("is-active"); htmlEL.addClass("av-burger-overlay-active"); overlay.css({display:'block'}).avia_animate({opacity:1}, function(){ animating=false; }); first_level.each(function(i){ var _self=$(this); setTimeout(function(){ _self.addClass('av-active-burger-items'); }, (i + 1) * 125) }); } e.preventDefault(); }); } $.AviaAjaxSearch=function(options){ var defaults={ delay: 300, minChars: 3, scope: 'body' } this.options=$.extend({}, defaults, options); this.scope=$(this.options.scope); this.timer=false; this.lastVal=""; this.bind_events(); } $.AviaAjaxSearch.prototype = { bind_events: function(){ this.scope.on('keyup', '#s:not(".av_disable_ajax_search #s")' , $.proxy(this.try_search, this)); }, try_search: function(e){ clearTimeout(this.timer); if(e.currentTarget.value.length >=this.options.minChars&&this.lastVal!=$.trim(e.currentTarget.value)){ this.timer=setTimeout($.proxy(this.do_search, this, e), this.options.delay); }}, do_search: function(e){ var obj=this, currentField=$(e.currentTarget).attr("autocomplete", "off"), form=currentField.parents('form:eq(0)'), results=form.find('.ajax_search_response'), loading=$('
'), action=form.attr('action'), values=form.serialize(); values +='&action=avia_ajax_search'; if(action.indexOf('?')!=-1){ action=action.split('?'); values +="&" + action[1]; } if(!results.length) results=$('
').appendTo(form); if(results.find('.ajax_not_found').length&&e.currentTarget.value.indexOf(this.lastVal)!=-1) return; this.lastVal=e.currentTarget.value; $.ajax({ url: avia_framework_globals.ajaxurl, type: "POST", data:values, beforeSend: function(){ loading.insertAfter(currentField); }, success: function(response){ if(response==0) response=""; results.html(response); }, complete: function(){ loading.remove(); }}); }} $.AviaTooltip=function(options){ var defaults={ delay: 1500, delayOut: 300, delayHide: 0, "class": "avia-tooltip", scope: "body", data: "avia-tooltip", attach:"body", event: 'mouseenter', position:'top', extraClass:'avia-tooltip-class', permanent: false } this.options=$.extend({}, defaults, options); this.body=$('body'); this.scope=$(this.options.scope); this.tooltip=$('
'); this.inner=$('
').prependTo(this.tooltip); this.open=false; this.timer=false; this.active=false; this.bind_events(); } $.AviaTooltip.openTTs=[]; $.AviaTooltip.prototype = { bind_events: function(){ var perma_tooltips='.av-permanent-tooltip [data-'+this.options.data+']', default_tooltips='[data-'+this.options.data+']:not(.av-permanent-tooltip [data-'+this.options.data+'])'; this.scope.on('av_permanent_show', perma_tooltips, $.proxy(this.display_tooltip, this)); $(perma_tooltips).addClass('av-perma-tooltip').trigger('av_permanent_show'); this.scope.on(this.options.event + ' mouseleave', default_tooltips, $.proxy(this.start_countdown, this)); if(this.options.event!='click'){ this.scope.on('mouseleave', default_tooltips, $.proxy(this.hide_tooltip, this)); }else{ this.body.on('mousedown', $.proxy(this.hide_tooltip, this)); }}, start_countdown: function(e){ clearTimeout(this.timer); if(e.type==this.options.event){ var delay=this.options.event=='click' ? 0:this.open ? 0:this.options.delay; this.timer=setTimeout($.proxy(this.display_tooltip, this, e), delay); } else if(e.type=='mouseleave'){ this.timer=setTimeout($.proxy(this.stop_instant_open, this, e), this.options.delayOut); } e.preventDefault(); }, reset_countdown: function(e){ clearTimeout(this.timer); this.timer=false; }, display_tooltip: function(e){ var target=this.options.event=="click" ? e.target:e.currentTarget, element=$(target), text=element.data(this.options.data), newTip=element.data('avia-created-tooltip'), extraClass=element.data('avia-tooltip-class'), attach=this.options.attach=='element' ? element:this.body, offset=this.options.attach=='element' ? element.position():element.offset(), position=element.data('avia-tooltip-position'), align=element.data('avia-tooltip-alignment'), force_append=false; text=$.trim(text); if(element.is('.av-perma-tooltip')){ offset={top:0, left:0 }; attach=element; force_append=true; } if(text=="") return; if(position==""||typeof position=='undefined') position=this.options.position; if(align==""||typeof align=='undefined') align='center'; if(typeof newTip!='undefined'){ newTip=$.AviaTooltip.openTTs[newTip]; }else{ this.inner.html(text); newTip=this.tooltip.clone(); if(this.options.attach=='element'&&force_append!==true){ newTip.insertAfter(attach); }else{ newTip.appendTo(attach); } if(extraClass!="") newTip.addClass(extraClass); } this.open=true; this.active=newTip; if((newTip.is(':animated:visible')&&e.type=='click')||element.is('.'+this.options['class'])||element.parents('.'+this.options['class']).length!=0) return; var animate1={}, animate2={}, pos1="", pos2=""; if(position=="top"|| position=="bottom"){ switch(align){ case "left": pos2=offset.left; break; case "right": pos2=offset.left + element.outerWidth() - newTip.outerWidth(); break; default: pos2=(offset.left + (element.outerWidth() / 2)) - (newTip.outerWidth() / 2); break; }}else{ switch(align){ case "top": pos1=offset.top; break; case "bottom": pos1=offset.top + element.outerHeight() - newTip.outerHeight(); break; default: pos1=(offset.top + (element.outerHeight() / 2)) - (newTip.outerHeight() / 2); break; }} switch(position){ case "top": pos1=offset.top - newTip.outerHeight(); animate1={top: pos1 - 10, left: pos2}; animate2={top: pos1}; break; case "bottom": pos1=offset.top + element.outerHeight(); animate1={top: pos1 + 10, left: pos2}; animate2={top: pos1}; break; case "left": pos2=offset.left - newTip.outerWidth(); animate1={top: pos1, left: pos2 -10}; animate2={left: pos2}; break; case "right": pos2=offset.left + element.outerWidth(); animate1={top: pos1, left: pos2 + 10}; animate2={left: pos2}; break; } animate1['display']="block"; animate1['opacity']=0; animate2['opacity']=1; newTip.css(animate1).stop().animate(animate2,200); newTip.find('input, textarea').focus(); $.AviaTooltip.openTTs.push(newTip); element.data('avia-created-tooltip', $.AviaTooltip.openTTs.length - 1); }, hide_tooltip: function(e){ var element=$(e.currentTarget) , newTip, animateTo, position=element.data('avia-tooltip-position'), align=element.data('avia-tooltip-alignment'); if(position==""||typeof position=='undefined') position=this.options.position; if(align==""||typeof align=='undefined') align='center'; if(this.options.event=='click'){ element=$(e.target); if(!element.is('.'+this.options['class'])&&element.parents('.'+this.options['class']).length==0){ if(this.active.length){ newTip=this.active; this.active=false;}} }else{ newTip=element.data('avia-created-tooltip'); newTip=typeof newTip!='undefined' ? $.AviaTooltip.openTTs[newTip]:false; } if(newTip){ var animate={opacity:0}; switch(position){ case "top": animate['top']=parseInt(newTip.css('top'),10) - 10; break; case "bottom": animate['top']=parseInt(newTip.css('top'),10) + 10; break; case "left": animate['left']=parseInt(newTip.css('left'), 10) - 10; break; case "right": animate['left']=parseInt(newTip.css('left'), 10) + 10; break; } newTip.animate(animate, 200, function(){ newTip.css({display:'none'}); }); }}, stop_instant_open: function(e){ this.open=false; }} })(jQuery); !function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,n){var o,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,n);o=void 0===o?l:o}),void 0!==o?o:t}function h(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new s(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return u(this,t,e)}return h(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return n.indexOf(e)==-1&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return n!=-1&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];o;){var r=s&&s[o];r&&(this.off(t,o),delete s[o]),o.apply(this,e),n+=r?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e