PageSourceSearch

https://mauistanduppaddleboarding.com/wp-content/cache/wpfc-minified/2f8oiq9g/efr9.js

js mauistanduppaddleboarding.com collected 2026-10-08 04:10:41 UTC 272,232 bytes, 5,699 lines download raw bytes

1if(! Array.isArray){
2Array.isArray=function(arg){
3return Object.prototype.toString.call(arg)==='[object Array]';
4};}
5(function($){
6"use strict";
7$(function(){
8var aviabodyclasses=AviaBrowserDetection('html');
9$.avia_utilities=$.avia_utilities||{};
10if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&'ontouchstart' in document.documentElement){
11$.avia_utilities.isMobile=true;
12}else{
13$.avia_utilities.isMobile=false;
14}
15avia_scroll_top_fade();
16aviaCalcContentWidth();
17new $.AviaTooltip({
18"class": 'avia-search-tooltip',
19data: 'avia-search-tooltip',
20event: 'click',
21position: 'bottom',
22scope: "body",
23attach: 'element',
24within_screen: true,
25close_keys: 27
26});
27new $.AviaTooltip({
28"class": 'avia-related-tooltip',
29data: 'avia-related-tooltip',
30scope: ".related_posts, .av-share-box",
31attach: 'element',
32delay: 0
33});
34new $.AviaAjaxSearch({scope:'#header, .avia_search_element'});
35if($.fn.avia_iso_sort){
36$('.grid-sort-container').avia_iso_sort();
37}
38AviaSidebarShaowHelper();
39$.avia_utilities.avia_ajax_call();
40});
41$.avia_utilities=$.avia_utilities||{};
42$.avia_utilities.avia_ajax_call=function(container){
43if(typeof container=='undefined'){
44container='body';
45};
46$('a.avianolink').on('click', function(e){ e.preventDefault(); });
47$('a.aviablank').attr('target', '_blank');
48if($.fn.avia_activate_lightbox){
49$(container).avia_activate_lightbox();
50}
51if($.fn.avia_scrollspy){
52if(container=='body'){
53$('body').avia_scrollspy({target:'.main_menu .menu li > a'});
54}else{
55$('body').avia_scrollspy('refresh');
56}}
57if($.fn.avia_smoothscroll){
58$('a[href*="#"]', container).avia_smoothscroll(container);
59}
60avia_small_fixes(container);
61avia_hover_effect(container);
62avia_iframe_fix(container);
63if($.fn.avia_html5_activation&&$.fn.mediaelementplayer){
64$(".avia_video, .avia_audio", container).avia_html5_activation({ratio:'16:9'});
65}};
66$.avia_utilities.log=function(text, type, extra){
67if(typeof console=='undefined'){
68return;
69}
70if(typeof type=='undefined'){
71type="log";
72}
73type="AVIA-" + type.toUpperCase();
74console.log("["+type+"] "+text);
75if(typeof extra!='undefined'){
76console.log(extra);
77}};
78function aviaCalcContentWidth(){
79var win=$(window),
80width_select=$('html').is('.html_header_sidebar') ? "#main":"#header",
81outer=$(width_select),
82outerParent=outer.parents('div').eq(0),
83the_main=$(width_select + ' .container').first(),
84css_block="",
85calc_dimensions=function(){
86var css="",
87w_12=Math.round(the_main.width()),
88w_outer=Math.round(outer.width()),
89w_inner=Math.round(outerParent.width());
90css +=" #header .three.units{width:"	+(w_12 * 0.25)+	"px;}";
91css +=" #header .six.units{width:"		+(w_12 * 0.50)+	"px;}";
92css +=" #header .nine.units{width:"	+(w_12 * 0.75)+	"px;}";
93css +=" #header .twelve.units{width:"	+(w_12)		+	"px;}";
94css +=" .av-framed-box .av-layout-tab-inner .container{width:"	+(w_inner)+	"px;}";
95css +=" .html_header_sidebar .av-layout-tab-inner .container{width:"	+(w_outer)+	"px;}";
96css +=" .boxed .av-layout-tab-inner .container{width:"	+(w_outer)+	"px;}";
97css +=" .av-framed-box#top .av-submenu-container{width:"	+(w_inner)+	"px;}";
98try{
99css_block.text(css);
100}
101catch(err){
102css_block.remove();
103var headFirst=$('head').first();
104css_block=$("<style type='text/css' id='av-browser-width-calc'>"+css+"</style>").appendTo(headFirst);
105}};
106if($('.avia_mega_div').length > 0||$('.av-layout-tab-inner').length > 0||$('.av-submenu-container').length > 0){
107var headFirst=$('head').first();
108css_block=$("<style type='text/css' id='av-browser-width-calc'></style>").appendTo(headFirst);
109win.on('debouncedresize', calc_dimensions);
110calc_dimensions();
111}}
112function AviaSidebarShaowHelper(){
113var $sidebar_container=$('.sidebar_shadow#top #main .sidebar');
114var $content_container=$('.sidebar_shadow .content');
115if($sidebar_container.height() >=$content_container.height()){
116$sidebar_container.addClass('av-enable-shadow');
117}else{
118$content_container.addClass('av-enable-shadow');
119}}
120function AviaScrollSpy(element, options){
121var self=this;
122var process=$.proxy(self.process, self)
123, refresh=$.proxy(self.refresh, self)
124, $element=$(element).is('body') ? $(window):$(element)
125, href;
126self.$body=$('body');
127self.$win=$(window);
128self.options=$.extend({}, $.fn.avia_scrollspy.defaults, options);
129self.selector=(self.options.target
130|| ((href=$(element).attr('href'))&&href.replace(/.*(?=#[^\s]+$)/, ''))
131|| '');
132self.activation_true=false;
133if(self.$body.find(self.selector + "[href*='#']").length){
134self.$scrollElement=$element.on('scroll.scroll-spy.data-api', process);
135self.$win.on('av-height-change', refresh);
136self.$body.on('av_resize_finished', refresh);
137self.activation_true=true;
138self.checkFirst();
139setTimeout(function(){
140self.refresh();
141self.process();
142},100);
143}}
144AviaScrollSpy.prototype={
145constructor: AviaScrollSpy
146, checkFirst: function (){
147var current=window.location.href.split('#')[0],
148matching_link=this.$body.find(this.selector + "[href='"+current+"']").attr('href',current+'#top');
149}
150, refresh: function (){
151if(!this.activation_true) return;
152var self=this
153, $targets;
154this.offsets=$([]);
155this.targets=$([]);
156$targets=this.$body
157.find(this.selector)
158.map(function (){
159var $el=$(this)
160, href=$el.data('target')||$el.attr('href')
161, hash=this.hash
162, hash=hash.replace(/\//g, "")
163, $href=/^#\w/.test(hash)&&$(hash);
164var obj=self.$scrollElement.get(0);
165var isWindow=obj!=null&&obj===obj.window;
166return($href
167&& $href.length
168&& [[ $href.position().top +(! isWindow&&self.$scrollElement.scrollTop()), href ]])||null;
169})
170.sort(function (a, b){ return a[0] - b[0]; })
171.each(function (){
172self.offsets.push(this[0]);
173self.targets.push(this[1]);
174});
175}
176, process: function (){
177if(!this.offsets) return;
178if(isNaN(this.options.offset)) this.options.offset=0;
179var scrollTop=this.$scrollElement.scrollTop() + this.options.offset
180, scrollHeight=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight
181, maxScroll=scrollHeight - this.$scrollElement.height()
182, offsets=this.offsets
183, targets=this.targets
184, activeTarget=this.activeTarget
185, i;
186if(scrollTop >=maxScroll){
187return activeTarget!=(i=targets.last()[0])
188&& this.activate(i);
189}
190for (i=offsets.length; i--;){
191activeTarget!=targets[i]
192&& scrollTop >=offsets[i]
193&& (!offsets[i + 1]||scrollTop <=offsets[i + 1])
194&& this.activate(targets[i]);
195}}
196, activate: function (target){
197var active
198, selector;
199this.activeTarget=target;
200$(this.selector)
201.parent('.' + this.options.applyClass)
202.removeClass(this.options.applyClass);
203selector=this.selector
204+ '[data-target="' + target + '"],'
205+ this.selector + '[href="' + target + '"]';
206active=$(selector)
207.parent('li')
208.addClass(this.options.applyClass);
209if(active.parent('.sub-menu').length){
210active=active.closest('li.dropdown_ul_available').addClass(this.options.applyClass);
211}
212active.trigger('activate');
213}};
214$.fn.avia_scrollspy=function (option){
215return this.each(function (){
216var $this=$(this)
217, data=$this.data('scrollspy')
218, options=typeof option=='object'&&option;
219if(!data) $this.data('scrollspy', (data=new AviaScrollSpy(this, options)));
220if(typeof option=='string') data[option]();
221});
222};
223$.fn.avia_scrollspy.Constructor=AviaScrollSpy;
224$.fn.avia_scrollspy.calc_offset=function(){
225var 	offset_1=(parseInt($('.html_header_sticky #main').data('scroll-offset'), 10))||0,
226offset_2=($(".html_header_sticky:not(.html_top_nav_header) #header_main_alternate").outerHeight())||0,
227offset_3=($(".html_header_sticky.html_header_unstick_top_disabled #header_meta").outerHeight())||0,
228offset_4=1,
229offset_5=parseInt($('html').css('margin-top'),10)||0,
230offset_6=parseInt($('.av-frame-top ').outerHeight(),10)||0;
231return offset_1 + offset_2 + offset_3 + offset_4 + offset_5 + offset_6;
232};
233$.fn.avia_scrollspy.defaults =
234{
235offset: $.fn.avia_scrollspy.calc_offset(),
236applyClass: 'current-menu-item'
237};
238function AviaBrowserDetection(outputClassElement){
239var current_browser={},
240uaMatch=function(ua){
241ua=ua.toLowerCase();
242var match=/(edge)\/([\w.]+)/.exec(ua) ||
243/(opr)[\/]([\w.]+)/.exec(ua) ||
244/(chrome)[ \/]([\w.]+)/.exec(ua) ||
245/(iemobile)[\/]([\w.]+)/.exec(ua) ||
246/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(ua) ||
247/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(ua) ||
248/(webkit)[ \/]([\w.]+)/.exec(ua) ||
249/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
250/(msie) ([\w.]+)/.exec(ua) ||
251ua.indexOf("trident") >=0&&/(rv)(?::|)([\w.]+)/.exec(ua) ||
252ua.indexOf("compatible") < 0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
253[];
254return {
255browser: match[ 5 ]||match[ 3 ]||match[ 1 ]||"",
256version: match[ 2 ]||match[ 4 ]||"0",
257versionNumber: match[ 4 ]||match[ 2 ]||"0"
258};};
259var matched=uaMatch(navigator.userAgent);
260if(matched.browser){
261current_browser.browser=matched.browser;
262current_browser[ matched.browser ]=true;
263current_browser.version=matched.version;
264}
265if(current_browser.chrome){
266current_browser.webkit=true;
267}else if(current_browser.webkit){
268current_browser.safari=true;
269}
270if(typeof(current_browser)!=='undefined'){
271var bodyclass='', version=current_browser.version ? parseInt(current_browser.version):"";
272if(current_browser.msie||current_browser.rv||current_browser.iemobile){
273bodyclass +='avia-msie';
274}else if(current_browser.webkit){
275bodyclass +='avia-webkit';
276}else if(current_browser.mozilla){
277bodyclass +='avia-mozilla';
278}
279if(current_browser.version) bodyclass +=' ' + bodyclass + '-' + version + ' ';
280if(current_browser.browser) bodyclass +=' avia-' + current_browser.browser + ' avia-' +current_browser.browser +'-' + version + ' ';
281}
282if(outputClassElement) $(outputClassElement).addClass(bodyclass);
283return bodyclass;
284}
285$.fn.avia_html5_activation=function(options){
286var defaults =
287{
288ratio: '16:9'
289};
290var options=$.extend(defaults, options),
291isMobile=$.avia_utilities.isMobile;
292this.each(function(){
293var fv=$(this),
294id_to_apply='#' + fv.attr('id'),
295posterImg=fv.attr('poster'),
296features=[ 'playpause', 'progress', 'current', 'duration', 'tracks', 'volume' ],
297container=fv.closest('.avia-video');
298if(container.length > 0&&container.hasClass('av-html5-fullscreen-btn')){
299features.push('fullscreen');
300}
301fv.mediaelementplayer({
302defaultVideoWidth: 480,
303defaultVideoHeight: 270,
304videoWidth: -1,
305videoHeight: -1,
306audioWidth: 400,
307audioHeight: 30,
308startVolume: 0.8,
309loop: false,
310enableAutosize: false,
311features: features,
312alwaysShowControls: false,
313iPadUseNativeControls: false,
314iPhoneUseNativeControls: false,
315AndroidUseNativeControls: false,
316alwaysShowHours: false,
317showTimecodeFrameCount: false,
318framesPerSecond: 25,
319enableKeyboard: true,
320pauseOtherPlayers: false,
321poster: posterImg,
322success: function (mediaElement, domObject, instance){
323$.AviaVideoAPI.players[ fv.attr('id').replace(/_html5/,'') ]=instance;
324setTimeout(function(){
325if(mediaElement.pluginType=='flash'){
326mediaElement.addEventListener('canplay', function(){ fv.trigger('av-mediajs-loaded'); }, false);
327}else{
328fv.trigger('av-mediajs-loaded').addClass('av-mediajs-loaded');
329}
330mediaElement.addEventListener('ended', function(){  fv.trigger('av-mediajs-ended'); }, false);
331var html5MediaElement=document.getElementById($(mediaElement).attr('id') + '_html5');
332if(html5MediaElement&&html5MediaElement!==mediaElement){
333mediaElement.addEventListener("ended", function(){
334$(html5MediaElement).trigger('av-mediajs-ended');
335});
336}}, 10);
337},
338error: function (){
339},
340keyActions: []
341});
342});
343};
344function avia_hover_effect(container){
345if($.avia_utilities.isMobile) return;
346if($('body').hasClass('av-disable-avia-hover-effect')){
347return;
348}
349var overlay="", cssTrans=$.avia_utilities.supports('transition');
350if(container=='body'){
351var 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');
352}else{
353var 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);
354}
355elements.each(function(e){
356var link=$(this),
357current=link.find('img').first();
358if(current.hasClass('alignleft')) link.addClass('alignleft').css({float:'left', margin:0, padding:0});
359if(current.hasClass('alignright')) link.addClass('alignright').css({float:'right', margin:0, padding:0});
360if(current.hasClass('aligncenter')) link.addClass('aligncenter').css({float:'none','text-align':'center', margin:0, padding:0});
361if(current.hasClass('alignnone')){
362link.addClass('alignnone').css({margin:0, padding:0});;
363if(!link.css('display')||link.css('display')=='inline'){ link.css({display:'inline-block'});}}
364if(!link.css('position')||link.css('position')=='static'){ link.css({position:'relative', overflow:'hidden'});}
365var url=link.attr('href'),
366span_class="overlay-type-video",
367opa=link.data('opacity')||0.7,
368overlay_offset=5,
369overlay=link.find('.image-overlay');
370if(url){
371if(url.match(/(jpg|gif|jpeg|png|tif)/)) span_class="overlay-type-image";
372if(!url.match(/(jpg|gif|jpeg|png|\.tif|\.mov|\.swf|vimeo\.com|youtube\.com)/)) span_class="overlay-type-extern";
373}
374if(!overlay.length){
375overlay=$("<span class='image-overlay "+span_class+"'><span class='image-overlay-inside'></span></span>").appendTo(link);
376}
377link.on('mouseenter', function(e){
378var current=link.find('img').first(),
379_self=current.get(0),
380outerH=current.outerHeight(),
381outerW=current.outerWidth(),
382pos=current.position(),
383linkCss=link.css('display'),
384overlay=link.find('.image-overlay');
385if(outerH > 100){
386if(!overlay.length){
387overlay=$("<span class='image-overlay "+span_class+"'><span class='image-overlay-inside'></span></span>
387").appendTo(link);
388}
389if(link.height()==0){ link.addClass(_self.className); _self.className=""; }
390if(!linkCss||linkCss=='inline'){ link.css({display:'block'});}
391overlay.css({left:(pos.left - overlay_offset) + parseInt(current.css("margin-left"),10), top:pos.top + parseInt(current.css("margin-top"),10)})
392.css({overflow:'hidden',display:'block','height':outerH,'width':(outerW + (2*overlay_offset))});
393if(cssTrans===false) overlay.stop().animate({opacity:opa}, 400);
394}else{
395overlay.css({display:"none"});
396}}).on('mouseleave', elements, function(){
397if(overlay.length){
398if(cssTrans===false) overlay.stop().animate({opacity:0}, 400);
399}});
400});
401}
402(function($){
403$.fn.avia_smoothscroll=function(apply_to_container){
404if(! this.length){
405return;
406}
407var the_win=$(window),
408$header=$('#header'),
409$main=$('.html_header_top.html_header_sticky #main').not('.page-template-template-blank-php #main'),
410$meta=$('.html_header_top.html_header_unstick_top_disabled #header_meta'),
411$alt=$('.html_header_top:not(.html_top_nav_header) #header_main_alternate'),
412menu_above_logo=$('.html_header_top.html_top_nav_header'),
413shrink=$('.html_header_top.html_header_shrinking').length,
414frame=$('.av-frame-top'),
415fixedMainPadding=0,
416isMobile=$.avia_utilities.isMobile,
417sticky_sub=$('.sticky_placeholder').first(),
418calc_main_padding=function(){
419if($header.css('position')=="fixed"){
420var tempPadding=parseInt($main.data('scroll-offset'),10)||0,
421non_shrinking=parseInt($meta.outerHeight(),10)||0,
422non_shrinking2=parseInt($alt.outerHeight(),10)||0;
423if(tempPadding > 0&&shrink){
424tempPadding=(tempPadding / 2) + non_shrinking + non_shrinking2;
425}else{
426tempPadding=tempPadding + non_shrinking + non_shrinking2;
427}
428tempPadding +=parseInt($('html').css('margin-top'),10);
429fixedMainPadding=tempPadding;
430}else{
431fixedMainPadding=parseInt($('html').css('margin-top'),10);
432}
433if(frame.length){
434fixedMainPadding +=frame.height();
435}
436if(menu_above_logo.length){
437fixedMainPadding=$('.html_header_sticky #header_main_alternate').height() + parseInt($('html').css('margin-top'),10);
438}
439if(isMobile){
440fixedMainPadding=0;
441}};
442if(isMobile){
443shrink=false;
444}
445calc_main_padding();
446the_win.on("debouncedresize av-height-change", calc_main_padding);
447var hash=window.location.hash.replace(/\//g, "");
448if(fixedMainPadding > 0&&hash&&apply_to_container=='body'&&hash.charAt(1)!="!"&&hash.indexOf("=")===-1){
449var scroll_to_el=$(hash), modifier=0;
450if(scroll_to_el.length){
451the_win.on('scroll.avia_first_scroll', function(){
452setTimeout(function(){
453if(sticky_sub.length&&scroll_to_el.offset().top > sticky_sub.offset().top){
454modifier=sticky_sub.outerHeight() - 3;
455}
456the_win.off('scroll.avia_first_scroll').scrollTop(scroll_to_el.offset().top - fixedMainPadding - modifier);
457},10);
458});
459}}
460return this.each(function(){
461$(this).on('click', function(e){
462var newHash=this.hash.replace(/\//g, ""),
463clicked=$(this),
464data=clicked.data();
465if(newHash!=''&&newHash!='#'&&newHash!='#prev'&&newHash!='#next'&&!clicked.is('.comment-reply-link, #cancel-comment-reply-link, .no-scroll')){
466var container="",
467originHash="";
468if('#next-section'==newHash){
469originHash=newHash;
470var next_containers=clicked.parents('.container_wrap').eq(0).nextAll('.container_wrap');
471next_containers.each(function(){
472var cont=$(this);
473if(cont.css('display')=='none'||cont.css('visibility')=='hidden'){
474return;
475}
476container=cont;
477return false;
478});
479if('object'==typeof container&&container.length > 0){
480newHash='#' + container.attr('id') ;
481}}else{
482container=$(this.hash.replace(/\//g, ""));
483}
484if(container.length){
485var cur_offset=the_win.scrollTop(),
486container_offset=container.offset().top,
487target=container_offset - fixedMainPadding,
488hash=window.location.hash,
489hash=hash.replace(/\//g, ""),
490oldLocation=window.location.href.replace(hash, ''),
491newLocation=this,
492duration=data.duration||1200,
493easing=data.easing||'easeInOutQuint';
494if(sticky_sub.length&&container_offset > sticky_sub.offset().top){
495target -=sticky_sub.outerHeight() - 3;
496}
497if(oldLocation+newHash==newLocation||originHash){
498if(cur_offset!=target){
499if(!(cur_offset==0&&target <=0)){
500the_win.trigger('avia_smooth_scroll_start');
501$('html:not(:animated),body:not(:animated)').animate({ scrollTop: target }, duration, easing, function(){
502if(window.history.replaceState){
503window.history.replaceState("", "", newHash);
504}});
505}}
506e.preventDefault();
507}}
508}});
509});
510};})(jQuery);
511function avia_iframe_fix(container){
512var iframe=jQuery('iframe[src*="youtube.com"]:not(.av_youtube_frame)', container),
513youtubeEmbed=jQuery('iframe[src*="youtube.com"]:not(.av_youtube_frame) object, iframe[src*="youtube.com"]:not(.av_youtube_frame) embed', container).attr('wmode','opaque');
514iframe.each(function(){
515var current=jQuery(this),
516src=current.attr('src');
517if(src){
518if(src.indexOf('?')!==-1){
519src +="&wmode=opaque&rel=0";
520}else{
521src +="?wmode=opaque&rel=0";
522}
523current.attr('src', src);
524}});
525}
526function avia_small_fixes(container){
527if(!container) container=document;
528var win=jQuery(window),
529iframes=jQuery('.avia-iframe-wrap iframe:not(.avia-slideshow iframe):not(iframe.no_resize):not(.avia-video iframe)', container),
530adjust_iframes=function(){
531iframes.each(function(){
532var iframe=jQuery(this), parent=iframe.parent(), proportions=56.25;
533if(this.width&&this.height){
534proportions=(100/ this.width) * this.height;
535parent.css({"padding-bottom":proportions+"%"});
536}});
537};
538adjust_iframes();
539}
540function avia_scroll_top_fade(){
541var win=$(window),
542timeo=false,
543scroll_top=$('#scroll-top-link'),
544set_status=function(){
545var st=win.scrollTop();
546if(st < 500){
547scroll_top.removeClass('avia_pop_class');
548}
549else if(!scroll_top.is('.avia_pop_class')){
550scroll_top.addClass('avia_pop_class');
551}};
552win.on('scroll',  function(){ window.requestAnimationFrame(set_status); });
553set_status();
554}
555$.AviaAjaxSearch=function(options){
556var defaults={
557delay: 300,
558minChars: 3,
559scope: 'body'
560};
561this.options=$.extend({}, defaults, options);
562this.scope=$(this.options.scope);
563this.timer=false;
564this.lastVal="";
565this.bind_events();
566};
567$.AviaAjaxSearch.prototype =
568{
569bind_events: function(){
570this.scope.on('keyup', '#s:not(".av_disable_ajax_search #s")' , $.proxy(this.try_search, this));
571this.scope.on('click', '#s.av-results-parked' , $.proxy(this.reset, this));
572},
573try_search: function(e){
574var form=$(e.currentTarget).parents('form').eq(0),
575resultscontainer=form.find('.ajax_search_response');
576clearTimeout(this.timer);
577if(e.keyCode===27){
578this.reset(e);
579return;
580}
581if(e.currentTarget.value.length >=this.options.minChars&&this.lastVal!=e.currentTarget.value.trim()){
582this.timer=setTimeout($.proxy(this.do_search, this, e), this.options.delay);
583}
584else if(e.currentTarget.value.length==0){
585this.timer=setTimeout($.proxy(this.reset, this, e), this.options.delay);
586}},
587reset: function(e){
588var form=$(e.currentTarget).parents('form').eq(0),
589resultscontainer=form.find('.ajax_search_response'),
590alternative_resultscontainer=$(form.attr('data-ajaxcontainer')).find('.ajax_search_response'),
591searchInput=$(e.currentTarget);
592if($(e.currentTarget).hasClass('av-results-parked')){
593resultscontainer.show();
594alternative_resultscontainer.show();
595$('body > .ajax_search_response').show();
596}else{
597resultscontainer.remove();
598alternative_resultscontainer.remove();
599searchInput.val('');
600$('body > .ajax_search_response').remove();
601}},
602do_search: function(e){
603var obj=this,
604currentField=$(e.currentTarget).attr("autocomplete", "off"),
605currentFieldWrapper=$(e.currentTarget).parents('.av_searchform_wrapper').eq(0),
606currentField_position=currentFieldWrapper.offset(),
607currentField_width=currentFieldWrapper.outerWidth(),
608currentField_height=currentFieldWrapper.outerHeight(),
609form=currentField.parents('form').eq(0),
610submitbtn=form.find('#searchsubmit'),
611resultscontainer=form,
612results=resultscontainer.find('.ajax_search_response'),
613loading=$('<div class="ajax_load"><span class="ajax_load_inner"></span></div>'),
614action=form.attr('action'),
615values=form.serialize(),
616elementID=form.data('element_id'),
617custom_color=form.data('custom_color');
618values +='&action=avia_ajax_search';
619if(! results.length){
620results=$('<div class="ajax_search_response" style="display:none;"></div>');
621}
622if('undefined'!=typeof elementID){
623results.addClass(elementID);
624}
625if('undefined'!=typeof custom_color&&custom_color!=''){
626results.addClass('av_has_custom_color');
627}
628if(form.attr('id')=='searchform_element'){
629results.addClass('av_searchform_element_results');
630}
631if(action.indexOf('?')!=-1){
632action=action.split('?');
633values +="&" + action[1];
634}
635if(form.attr('data-ajaxcontainer')){
636var rescon=form.attr('data-ajaxcontainer');
637if($(rescon).length){
638$(rescon).find('.ajax_search_response').remove();
639resultscontainer=$(rescon);
640}}
641results_css={};
642if(form.hasClass('av_results_container_fixed')){
643$('body').find('.ajax_search_response').remove();
644resultscontainer=$('body');
645var results_css={
646top: currentField_position.top + currentField_height,
647left: currentField_position.left,
648width: currentField_width
649};
650results.addClass('main_color');
651$(window).resize(function(){
652results.remove();
653$.proxy(this.reset, this);
654currentField.val('');
655});
656}
657if(form.attr('data-results_style')){
658var results_style=JSON.parse(form.attr('data-results_style'));
659results_css=Object.assign(results_css, results_style);
660if("color" in results_css){
661results.addClass('av_has_custom_color');
662}}
663results.css(results_css);
664if(resultscontainer.hasClass('avia-section')){
665results.addClass('container');
666}
667results.appendTo(resultscontainer);
668if(results.find('.ajax_not_found').length&&e.currentTarget.value.indexOf(this.lastVal)!=-1){
669return;
670}
671this.lastVal=e.currentTarget.value;
672$.ajax({
673url: avia_framework_globals.ajaxurl,
674type: "POST",
675data:values,
676beforeSend: function(){
677loading.insertAfter(submitbtn);
678form.addClass('ajax_loading_now');
679},
680success: function(response){
681if(response==0){
682response="";
683}
684results.html(response).show();
685},
686complete: function(){
687loading.remove();
688form.removeClass('ajax_loading_now');
689}});
690$(document).on('click',function(e){
691if(!$(e.target).closest(form).length){
692if($(results).is(":visible")){
693$(results).hide();
694currentField.addClass('av-results-parked');
695}}
696});
697}};
698$.AviaTooltip=function(options){
699var defaults={
700delay: 1500,
701delayOut: 300,
702delayHide: 0,
703"class": "avia-tooltip",
704scope: "body",
705data:  "avia-tooltip",
706attach: "body",
707event: 'mouseenter',
708position: 'top',
709extraClass: 'avia-tooltip-class',
710permanent: false,
711within_screen: false,
712close_keys: null
713};
714this.options=$.extend({}, defaults, options);
715var close_keys='';
716if(this.options.close_keys!=null){
717if(! Array.isArray(this.options.close_keys)){
718this.options.close_keys=[ this.options.close_keys ];
719}
720close_keys=' data-close-keys="' + this.options.close_keys.join(',') + '" ';
721}
722this.body=$('body');
723this.scope=$(this.options.scope);
724this.tooltip=$('<div class="' + this.options['class'] + ' avia-tt"' + close_keys + '><span class="avia-arrow-wrap"><span class="avia-arrow"></span></span></div>');
725this.inner=$('<div class="inner_tooltip"></div>').prependTo(this.tooltip);
726this.open=false;
727this.timer=false;
728this.active=false;
729this.bind_events();
730};
731$.AviaTooltip.openTTs=[];
732$.AviaTooltip.openTT_Elements=[];
733$.AviaTooltip.prototype =
734{
735bind_events: function(){
736var perma_tooltips='.av-permanent-tooltip [data-'+this.options.data+']',
737default_tooltips='[data-'+this.options.data+']:not(.av-permanent-tooltip [data-'+this.options.data+'])';
738this.scope.on('av_permanent_show', perma_tooltips, $.proxy(this.display_tooltip, this));
739$(perma_tooltips).addClass('av-perma-tooltip').trigger('av_permanent_show');
740this.scope.on(this.options.event + ' mouseleave', default_tooltips, $.proxy(this.start_countdown, this));
741if(this.options.event!='click'){
742this.scope.on('mouseleave', default_tooltips, $.proxy(this.hide_tooltip, this));
743this.scope.on('click', default_tooltips, $.proxy(this.hide_on_click_tooltip, this));
744}else{
745this.body.on('mousedown', $.proxy(this.hide_tooltip, this));
746}
747if(this.options.close_keys!=null){
748this.body.on('keyup', $.proxy(this.close_on_keyup, this));
749}},
750start_countdown: function(e){
751clearTimeout(this.timer);
752var target=this.options.event=="click" ? e.target:e.currentTarget,
753element=$(target);
754if(e.type==this.options.event){
755var delay=this.options.event=='click' ? 0:this.open ? 0:this.options.delay;
756this.timer=setTimeout($.proxy(this.display_tooltip, this, e), delay);
757}
758else if(e.type=='mouseleave'){
759if(! element.hasClass('av-close-on-click-tooltip')){
760this.timer=setTimeout($.proxy(this.stop_instant_open, this, e), this.options.delayOut);
761}}
762e.preventDefault();
763},
764reset_countdown: function(e){
765clearTimeout(this.timer);
766this.timer=false;
767},
768display_tooltip: function(e){
769var _self=this,
770target=this.options.event=="click" ? e.target:e.currentTarget,
771element=$(target),
772text=element.data(this.options.data),
773tip_index=element.data('avia-created-tooltip'),
774extraClass=element.data('avia-tooltip-class'),
775attach=this.options.attach=='element' ? element:this.body,
776offset=this.options.attach=='element' ? element.position():element.offset(),
777position=element.data('avia-tooltip-position'),
778align=element.data('avia-tooltip-alignment'),
779force_append=false,
780newTip=false,
781is_new_tip=false;
782text='string'==typeof text ? text.trim():'';
783if(element.is('.av-perma-tooltip')){
784offset={top:0, left:0 };
785attach=element;
786force_append=true;
787}
788if(text==""){
789return;
790}
791if(position==""||typeof position=='undefined'){
792position=this.options.position;
793}
794if(align==""||typeof align=='undefined'){
795align='center';
796}
797if(typeof tip_index!='undefined'){
798newTip=$.AviaTooltip.openTTs[tip_index];
799}else{
800this.inner.html(text);
801newTip=this.tooltip.clone();
802is_new_tip=true;
803if(this.options.attach=='element'&&force_append!==true){
804newTip.insertAfter(attach);
805}else{
806newTip.appendTo(attach);
807}
808if(extraClass!=""){
809newTip.addClass(extraClass);
810}}
811if(this.open&&this.active==newTip){
812return;
813}
814if(element.hasClass('av-close-on-click-tooltip')){
815this.hide_all_tooltips();
816}
817this.open=true;
818this.active=newTip;
819if(( newTip.is(':animated:visible')&&e.type=='click')||element.is('.' + this.options['class'])||element.parents('.' + this.options['class']).length!=0){
820return;
821}
822var animate1={},
823animate2={},
824pos1="",
825pos2="";
826if(position=="top"||position=="bottom"){
827switch(align){
828case "left":
829pos2=offset.left;
830break;
831case "right":
832pos2=offset.left + element.outerWidth() - newTip.outerWidth();
833break;
834default:
835pos2=(offset.left +(element.outerWidth() / 2)) -(newTip.outerWidth() / 2);
836break;
837}
838if(_self.options.within_screen){
839var boundary=element.offset().left + (element.outerWidth() / 2) - (newTip.outerWidth() / 2) + parseInt(newTip.css('margin-left'),10);
840if(boundary < 0){
841pos2=pos2 - boundary;
842}}
843}else{
844switch(align){
845case "top":
846pos1=offset.top;
847break;
848case "bottom":
849pos1=offset.top + element.outerHeight() - newTip.outerHeight();
850break;
851default:
852pos1=(offset.top + (element.outerHeight() / 2)) -(newTip.outerHeight() / 2);
853break;
854}}
855switch(position){
856case "top":
857pos1=offset.top - newTip.outerHeight();
858animate1={top: pos1 - 10, left: pos2};
859animate2={top: pos1};
860break;
861case "bottom":
862pos1=offset.top + element.outerHeight();
863animate1={top: pos1 + 10, left: pos2};
864animate2={top: pos1};
865break;
866case "left":
867pos2=offset.left  - newTip.outerWidth();
868animate1={top: pos1, left: pos2 -10};
869animate2={left: pos2};
870break;
871case "right":
872pos2=offset.left + element.outerWidth();
873animate1={top: pos1, left: pos2 + 10};
874animate2={left: pos2};
875break;
876}
877animate1['display']="block";
878animate1['opacity']=0;
879animate2['opacity']=1;
880newTip.css(animate1).stop().animate(animate2,200);
881newTip.find('input, textarea').trigger('focus');
882if(is_new_tip){
883$.AviaTooltip.openTTs.push(newTip);
884$.AviaTooltip.openTT_Elements.push(element);
885element.data('avia-created-tooltip', $.AviaTooltip.openTTs.length - 1);
886}},
887hide_on_click_tooltip: function(e){
888if(this.options.event=="click"){
889return;
890}
891var element=$(e.currentTarget);
892if(! element.hasClass('av-close-on-click-tooltip')){
893return;
894}
895if(! element.find('a')){
896e.preventDefault();
897}
898var ttip_index=element.data('avia-created-tooltip');
899if('undefined'!=typeof ttip_index){
900var current=$.AviaTooltip.openTTs[ttip_index];
901if('undefined'!=typeof current&&current==this.active){
902this.hide_all_tooltips();
903}}
904},
905close_on_keyup: function(e){
906if(this.options.close_keys==null){
907return;
908}
909if($.inArray(e.keyCode, this.options.close_keys) < 0){
910return;
911}
912this.hide_all_tooltips(e.keyCode);
913},
914hide_all_tooltips: function(keyCode){
915var ttip,
916position,
917element,
918keyCodeCheck='undefined'!=typeof keyCode ? keyCode + '':null;
919for(var index=0; index < $.AviaTooltip.openTTs.length; ++index){
920ttip=$.AviaTooltip.openTTs[index];
921element=$.AviaTooltip.openTT_Elements[index];
922position=element.data('avia-tooltip-position');
923if(keyCodeCheck!=null){
924var keys=ttip.data('close-keys');
925if('undefined'==typeof keys){
926continue;
927}
928keys=keys + '';
929keys=keys.split(',');
930if($.inArray(keyCodeCheck, keys) < 0){
931continue;
932}}
933this.animate_hide_tooltip(ttip, position);
934}
935this.open=false;
936this.active=false;
937},
938hide_tooltip: function(e){
939var element=$(e.currentTarget) , newTip, animateTo,
940position=element.data('avia-tooltip-position'),
941align=element.data('avia-tooltip-alignment'),
942newTip=false;
943if(position==""||typeof position=='undefined'){
944position=this.options.position;
945}
946if(align==""||typeof align=='undefined'){
947align='center';
948}
949if(this.options.event=='click'){
950element=$(e.target);
951if(! element.is('.' + this.options['class'])&&element.parents('.' + this.options['class']).length==0){
952if(this.active.length){
953newTip=this.active;
954this.active=false;
955}}
956}else{
957if(! element.hasClass('av-close-on-click-tooltip')){
958newTip=element.data('avia-created-tooltip');
959newTip=typeof newTip!='undefined' ? $.AviaTooltip.openTTs[newTip]:false;
960}}
961this.animate_hide_tooltip(newTip, position);
962},
963animate_hide_tooltip: function(ttip, position){
964if(ttip){
965var animate={opacity:0};
966switch(position){
967case "top":
968animate['top']=parseInt(ttip.css('top'),10) - 10;
969break;
970case "bottom":
971animate['top']=parseInt(ttip.css('top'),10) + 10;
972break;
973case "left":
974animate['left']=parseInt(ttip.css('left'), 10) - 10;
975break;
976case "right":
977animate['left']=parseInt(ttip.css('left'), 10) + 10;
978break;
979}
980ttip.animate(animate, 200, function(){
981ttip.css({display:'none'});
982});
983}},
984stop_instant_open: function(e){
985this.open=false;
986}};})(jQuery);
987!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.Context.refreshAll();for(var e in i)i[e].enabled=!0;return this},t.refreshAll=function(){t.Context.refreshAll()}
vendor: 5,257 bytes, line 987
987,t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,n.windowContext||(n.windowContext=!0,n.windowContext=new e(window)),this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical),i=this.element==this.element.window;t&&e&&!i&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s];if(null!==a.triggerPoint){var l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=Math.floor(y+l-f),h=w<s.oldScroll,p=d.triggerPoint>=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],r
987ight:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return 'function'===typeof arguments[0]&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}();
988(function(){var lastTime=0;var vendors=['ms','moz','webkit','o'];for(var x=0;x<vendors.length&&!window.requestAnimationFrame;++x){window.requestAnimationFrame=window[vendors[x]+'RequestAnimationFrame'];window.cancelAnimationFrame=window[vendors[x]+'CancelAnimationFrame']||window[vendors[x]+'CancelRequestAnimationFrame']}if(!window.requestAnimationFrame)window.requestAnimationFrame=function(callback,element){var currTime=new Date().getTime();var timeToCall=Math.max(0,16-(currTime-lastTime));var id=window.setTimeout(function(){callback(currTime+timeToCall)},timeToCall);lastTime=currTime+timeToCall;return id};if(!window.cancelAnimationFrame)window.cancelAnimationFrame=function(id){clearTimeout(id)}}());
989jQuery.expr.pseudos.regex=function(elem, index, match){
990var matchParams=match[3].split(','),
991validLabels=/^(data|css):/,
992attr={
993method: matchParams[0].match(validLabels) ?
994matchParams[0].split(':')[0]:'attr',
995property: matchParams.shift().replace(validLabels,'')
996},
997regexFlags='ig',
998regex=new RegExp(matchParams.join('').replace(/^\s+|\s+$/g,''), regexFlags);
999return regex.test(jQuery(elem)[attr.method](attr.property));
1000};
1001(function($){
1002"use strict";
1003$(function(){
1004$.avia_utilities=$.avia_utilities||{};
1005if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&'ontouchstart' in document.documentElement){
1006$.avia_utilities.isMobile=true;
1007}else{
1008$.avia_utilities.isMobile=false;
1009}
1010if($.fn.avia_mobile_fixed){
1011$('.avia-bg-style-fixed').avia_mobile_fixed();
1012}
1013if($.fn.avia_parallax){
1014$('.av-parallax').avia_parallax();
1015}
1016if($.fn.avia_browser_height){
1017$('.av-minimum-height, .avia-fullscreen-slider, .av-cell-min-height').avia_browser_height();
1018}
1019if($.fn.avia_video_section){
1020$('.av-section-with-video-bg').avia_video_section();
1021}
1022new $.AviaTooltip({'class': "avia-tooltip", data: "avia-tooltip", delay:0, scope: "body"});
1023new $.AviaTooltip({'class': "avia-tooltip avia-icon-tooltip", data: "avia-icon-tooltip", delay:0, scope: "body"});
1024$.avia_utilities.activate_shortcode_scripts();
1025if($.fn.layer_slider_height_helper){
1026$('.avia-layerslider').layer_slider_height_helper();
1027}
1028if($.fn.avia_portfolio_preview){
1029$('.grid-links-ajax').avia_portfolio_preview();
1030}
1031if($.fn.avia_masonry){
1032$('.av-masonry').avia_masonry();
1033}
1034if($.fn.aviaccordion){
1035$('.aviaccordion').aviaccordion();
1036}
1037if($.fn.avia_textrotator){
1038$('.av-rotator-container').avia_textrotator();
1039}
1040if($.fn.avia_sc_tab_section){
1041$('.av-tab-section-container').avia_sc_tab_section();
1042}
1043if($.fn.avia_hor_gallery){
1044$('.av-horizontal-gallery').avia_hor_gallery();
1045}
1046if($.fn.avia_link_column){
1047$('.avia-link-column').avia_link_column();
1048}
1049if($.fn.avia_delayed_animation_in_container){
1050$('.av-animation-delay-container').avia_delayed_animation_in_container();
1051}});
1052$.avia_utilities=$.avia_utilities||{};
1053$.avia_utilities.activate_shortcode_scripts=function(container){
1054if(typeof container=='undefined'){
1055container='body';
1056}
1057if($.fn.avia_ajax_form){
1058$('.avia_ajax_form:not(.avia-disable-default-ajax)', container).avia_ajax_form();
1059}
1060activate_waypoints(container);
1061if($.fn.aviaVideoApi){
1062$('.avia-slideshow iframe[src*="youtube.com"], .av_youtube_frame, .av_vimeo_frame, .avia-slideshow video').aviaVideoApi({}, 'li');
1063}
1064if($.fn.avia_sc_toggle){
1065$('.togglecontainer', container).avia_sc_toggle();
1066}
1067if($.fn.avia_sc_tabs){
1068$('.top_tab', container).avia_sc_tabs();
1069$('.sidebar_tab', container).avia_sc_tabs({sidebar:true});
1070}
1071if($.fn.avia_sc_gallery){
1072$('.avia-gallery', container).avia_sc_gallery();
1073}
1074if($.fn.avia_sc_animated_number){
1075$('.avia-animated-number', container).avia_sc_animated_number();
1076}
1077if($.fn.avia_sc_animation_delayed){
1078$('.av_font_icon', container).avia_sc_animation_delayed({delay:100});
1079$('.avia-image-container', container).avia_sc_animation_delayed({delay:100});
1080$('.av-hotspot-image-container', container).avia_sc_animation_delayed({delay:100});
1081$('.av-animated-generic', container).avia_sc_animation_delayed({delay:100});
1082}
1083if($.fn.avia_sc_iconlist){
1084$('.avia-icon-list.av-iconlist-big.avia-iconlist-animate', container).avia_sc_iconlist();
1085}
1086if($.fn.avia_sc_progressbar){
1087$('.avia-progress-bar-container', container).avia_sc_progressbar();
1088}
1089if($.fn.avia_sc_testimonial){
1090$('.avia-testimonial-wrapper', container).avia_sc_testimonial();
1091}
1092if($.fn.aviaFullscreenSlider){
1093$('.avia-slideshow.av_fullscreen', container).aviaFullscreenSlider();
1094}
1095if($.fn.aviaSlider){
1096$('.avia-slideshow:not(.av_fullscreen)', container).aviaSlider();
1097$('.avia-content-slider-active', container).aviaSlider({wrapElement: '.avia-content-slider-inner', slideElement:'.slide-entry-wrap', fullfade:true});
1098$('.avia-slider-testimonials', container).aviaSlider({wrapElement: '.avia-testimonial-row', slideElement:'.avia-testimonial', fullfade:true});
1099}
1100if($.fn.aviaMagazine){
1101$('.av-magazine-tabs-active', container).aviaMagazine();
1102}
1103if($.fn.aviaHotspots){
1104$('.av-hotspot-image-container', container).aviaHotspots();
1105}
1106if($.fn.aviaCountdown){
1107$('.av-countdown-timer', container).aviaCountdown();
1108}
1109if($.fn.aviaPlayer){
1110$('.av-player', container).aviaPlayer();
1111}};
1112function activate_waypoints(container){
1113if($.fn.avia_waypoints){
1114if(typeof container=='undefined'){
1115container='body';
1116}
1117$('.avia_animate_when_visible', container).avia_waypoints();
1118$('.avia_animate_when_almost_visible', container).avia_waypoints({ offset: '80%'});
1119if(container=='body'){
1120container='.avia_desktop body';
1121}
1122$('.av-animated-generic', container).avia_waypoints({ offset: '95%'});
1123}}
1124$.AviaParallaxElement=function(options, element){
1125this.$el=$(element).addClass('active-parallax');
1126this.$win=$(window);
1127this.$body=$('body');
1128this.$parent=this.$el.parent();
1129this.property={};
1130this.isMobile=$.avia_utilities.isMobile;
1131this.ratio=this.$el.data('avia-parallax-ratio')||0.5;
1132this.transform=document.documentElement.className.indexOf('avia_transform')!==-1 ? true:false;
1133this.transform3d=document.documentElement.className.indexOf('avia_transform3d')!==-1 ? true:false;
1134this.ticking=false;
1135if($.avia_utilities.supported.transition===undefined){
1136$.avia_utilities.supported.transition=$.avia_utilities.supports('transition');
1137}
1138this._init(options);
1139};
1140$.AviaParallaxElement.prototype =
1141{
1142_init: function(options){
1143var _self=this;
1144if(_self.isMobile){
1145return;
1146}
1147setTimeout(function(){
1148_self._fetch_properties();
1149},30);
1150this.$win.on("debouncedresize av-height-change",  $.proxy(_self._fetch_properties, _self));
1151this.$body.on("av_resize_finished",  $.proxy(_self._fetch_properties, _self));
1152setTimeout(function(){
1153_self.$win.on('scroll', $.proxy(_self._on_scroll, _self));
1154},100);
1155},
1156_fetch_properties: function(){
1157this.property.offset=this.$parent.offset().top;
1158this.property.wh=this.$win.height();
1159this.property.height=this.$parent.outerHeight();
1160this.$el.height(Math.ceil((this.property.wh * this.ratio) + this.property.height));
1161this._parallax_scroll();
1162},
1163_on_scroll: function(e){
1164var _self=this;
1165if(!_self.ticking){
1166_self.ticking=true;
1167window.requestAnimationFrame($.proxy(_self._parallax_scroll, _self));
1168}},
1169_parallax_scroll: function(e){
1170var winTop=this.$win.scrollTop(),
1171winBottom=winTop + this.property.wh,
1172scrollPos="0",
1173prop={};
1174if(this.property.offset < winBottom&&winTop <=this.property.offset + this.property.height){
1175scrollPos=Math.ceil((winBottom - this.property.offset) * this.ratio);
1176if(this.transform3d){
1177prop[$.avia_utilities.supported.transition+"transform"]="translate3d(0px,"+ scrollPos +"px, 0px)";
1178}
1179else if(this.transform){
1180prop[$.avia_utilities.supported.transition+"transform"]="translate(0px,"+ scrollPos +"px)";
1181}else{
1182prop["background-position"]="0px "+ scrollPos +"px";
1183}
1184this.$el.css(prop);
1185}
1186this.ticking=false;
1187}};
1188$.fn.avia_parallax=function(options){
1189return this.each(function(){
1190var self=$.data(this, 'aviaParallax');
1191if(!self){
1192self=$.data(this, 'aviaParallax', new $.AviaParallaxElement(options, this));
1193}});
1194};
1195$.fn.avia_mobile_fixed=function(options){
1196var isMobile=$.avia_utilities.isMobile;
1197if(!isMobile) return;
1198return this.each(function(){
1199var current=$(this).addClass('av-parallax-section'),
1200$background=current.attr('style'),
1201$attachment_class=current.data('section-bg-repeat'),
1202template="";
1203if($attachment_class=='stretch'||$attachment_class=='no-repeat'){
1204$attachment_class=" avia-full-stretch";
1205}else{
1206$attachment_class="";
1207}
1208template="<div class='av-parallax " + $attachment_class + "' data-avia-parallax-ratio='0.0' style='" + $background + "' ></div>";
1209current.prepend(template);
1210current.attr('style','');
1211});
1212};
1213$.fn.avia_sc_animation_delayed=function(options){
1214var global_timer=0,
1215delay=options.delay||50,
1216max_timer=10,
1217new_max=setTimeout(function(){ max_timer=20; }, 500);
1218return this.each(function(){
1219var elements=$(this);
1220elements.on('avia_start_animation', function(){
1221var element=$(this);
1222if(global_timer < max_timer) global_timer ++;
1223setTimeout(function(){
1224element.addClass('avia_start_delayed_animation');
1225if(global_timer > 0) global_timer --;
1226}, (global_timer * delay));
1227});
1228});
1229};
1230$.fn.avia_delayed_animation_in_container=function(options){
1231return this.each(function(){
1232var elements=$(this);
1233elements.on('avia_start_animation_if_current_slide_is_active', function(){
1234var current=$(this),
1235animate=current.find('.avia_start_animation_when_active');
1236animate.addClass('avia_start_animation').trigger('avia_start_animation');
1237});
1238elements.on('avia_remove_animation', function(){
1239var current=$(this),
1240animate=current.find('.avia_start_animation_when_active, .avia_start_animation');
1241animate.removeClass('avia_start_animation avia_start_delayed_animation');
1242});
1243});
1244};
1245$.fn.avia_browser_height=function(){
1246if(!this.length) return;
1247var win=$(window),
1248html_el=$('html'),
1249headFirst=$('head').first(),
1250subtract=$('#wpadminbar, #header.av_header_top:not(.html_header_transparency #header), #main>.title_container'),
1251css_block=$("<style type='text/css' id='av-browser-height'></style>").appendTo(headFirst),
1252sidebar_menu=$('.html_header_sidebar #top #header_main'),
1253full_slider=$('.html_header_sidebar .avia-fullscreen-slider.avia-builder-el-0.avia-builder-el-no-sibling').addClass('av-solo-full'),
1254pc_heights=[ 25, 50, 75 ],
1255calc_height=function(){
1256var css="",
1257wh100=win.height(),
1258ww100=win.width(),
1259wh100_mod=wh100,
1260whCover=(wh100 / 9) * 16,
1261wwCover=(ww100 / 16) * 9,
1262solo=0,
1263whCustom=[];
1264if(sidebar_menu.length) solo=sidebar_menu.height();
1265subtract.each(function(){ wh100_mod -=this.offsetHeight - 1; });
1266var whCoverMod=(wh100_mod / 9) * 16;
1267css +=".avia-section.av-minimum-height .container{opacity: 1; }\n";
1268css +=".av-minimum-height-100 .container, .avia-fullscreen-slider .avia-slideshow, #top.avia-blank .av-minimum-height-100 .container, .av-cell-min-height-100 > .flex_cell{height:"+wh100+"px;}\n";
1269$.each(pc_heights, function(index, value){
1270var wh=Math.round(wh100 *(value / 100.0));
1271css +=".av-minimum-height-" + value + " .container, .av-cell-min-height-" + value + " > .flex_cell	{height:" + wh + "px;}\n";
1272});
1273css +=".avia-builder-el-0.av-minimum-height-100 .container, .avia-builder-el-0.avia-fullscreen-slider .avia-slideshow, .avia-builder-el-0.av-cell-min-height-100 > .flex_cell{height:"+wh100_mod+"px;}\n";
1274css +="#top .av-solo-full .avia-slideshow {min-height:"+solo+"px;}\n";
1275if(ww100/wh100 < 16/9){
1276css +="#top .av-element-cover iframe, #top .av-element-cover embed, #top .av-element-cover object, #top .av-element-cover video{width:"+whCover+"px; left: -"+(whCover - ww100)/2+"px;}\n";
1277}else{
1278css +="#top .av-element-cover iframe, #top .av-element-cover embed, #top .av-element-cover object, #top .av-element-cover video{height:"+wwCover+"px; top: -"+(wwCover - wh100)/2+"px;}\n";
1279}
1280if(ww100/wh100_mod < 16/9){
1281css +="#top .avia-builder-el-0 .av-element-cover iframe, #top .avia-builder-el-0 .av-element-cover embed, #top .avia-builder-el-0 .av-element-cover object, #top .avia-builder-el-0 .av-element-cover video{width:"+whCoverMod+"px; left: -"+(whCoverMod - ww100)/2+"px;}\n";
1282}else{
1283css +="#top .avia-builder-el-0 .av-element-cover iframe, #top .avia-builder-el-0 .av-element-cover embed, #top .avia-builder-el-0 .av-element-cover object, #top .avia-builder-el-0 .av-element-cover video{height:"+wwCover+"px; top: -"+(wwCover - wh100_mod)/2+"px;}\n";
1284}
1285try{
1286css_block.text(css);
1287}
1288catch(err){
1289css_block.remove();
1290css_block=$("<style type='text/css' id='av-browser-height'>"+css+"</style>").appendTo(headFirst);
1291}
1292setTimeout(function(){ win.trigger('av-height-change');  },100);
1293};
1294this.each(function(index){
1295var height=$(this).data('av_minimum_height_pc');
1296if('number'!=typeof height){
1297return this;
1298}
1299height=parseInt(height);
1300if(( -1==$.inArray(height, pc_heights))&&(height!=100)){
1301pc_heights.push(height);
1302}
1303return this;
1304});
1305win.on('debouncedresize', calc_height);
1306calc_height();
1307};
1308$.fn.avia_video_section=function(){
1309if(!this.length) return;
1310var elements=this.length, content="",
1311win=$(window),
1312headFirst=$('head').first(),
1313css_block=$("<style type='text/css' id='av-section-height'></style>").appendTo(headFirst),
1314calc_height=function(section, counter){
1315if(counter===0){ content="";}
1316var css="",
1317the_id='#' +section.attr('id'),
1318wh100=section.height(),
1319ww100=section.width(),
1320aspect=section.data('sectionVideoRatio').split(':'),
1321video_w=aspect[0],
1322video_h=aspect[1],
1323whCover=(wh100 / video_h) * video_w,
1324wwCover=(ww100 / video_w) * video_h;
1325if(ww100/wh100 < video_w/video_h){
1326css +="#top "+the_id+" .av-section-video-bg iframe, #top "+the_id+" .av-section-video-bg embed, #top "+the_id+" .av-section-video-bg object, #top "+the_id+" .av-section-video-bg video{width:"+whCover+"px; left: -"+(whCover - ww100)/2+"px;}\n";
1327}else{
1328css +="#top "+the_id+" .av-section-video-bg iframe, #top "+the_id+" .av-section-video-bg embed, #top "+the_id+" .av-section-video-bg object, #top "+the_id+" .av-section-video-bg video{height:"+wwCover+"px; top: -"+(wwCover - wh100)/2+"px;}\n";
1329}
1330content=content + css;
1331if(elements==counter + 1){
1332try{
1333css_block.text(content);
1334}
1335catch(err){
1336css_block.remove();
1337css_block=$("<style type='text/css' id='av-section-height'>"+content+"</style>").appendTo(headFirst);
1338}}
1339};
1340return this.each(function(i){
1341var self=$(this);
1342win.on('debouncedresize', function(){ calc_height(self, i); });
1343calc_height(self, i);
1344});
1345};
1346$.fn.avia_link_column=function(){
1347return this.each(function(){
1348$(this).on('click', function(e){
1349if('undefined'!==typeof e.target&&'undefined'!==typeof e.target.href){
1350return;
1351}
1352var	column=$(this),
1353url=column.data('link-column-url'),
1354target=column.data('link-column-target'),
1355link=window.location.hostname+window.location.pathname;
1356if('undefined'===typeof url||'string'!==typeof url){
1357return;
1358}
1359if('undefined'!==typeof target||'_blank'==target){
1360var a=document.createElement('a');
1361a.href=url;
1362a.target='_blank';
1363a.rel='noopener noreferrer';
1364a.click();
1365return false;
1366}else{
1367if(column.hasClass('av-cell-link')||column.hasClass('av-column-link')){
1368var reader=column.hasClass('av-cell-link') ? column.prev('a.av-screen-reader-only').first():column.find('a.av-screen-reader-only').first();
1369url=url.trim();
1370if((0==url.indexOf("#"))||((url.indexOf(link) >=0)&&(url.indexOf("#") > 0))){
1371reader.trigger('click');
1372return;
1373}}
1374window.location.href=url;
1375}
1376e.preventDefault();
1377return;
1378});
1379});
1380};
1381$.fn.avia_waypoints=function(options_passed){
1382if(! $('html').is('.avia_transform')) return;
1383var defaults={ offset: 'bottom-in-view' , triggerOnce: true},
1384options=$.extend({}, defaults, options_passed),
1385isMobile=$.avia_utilities.isMobile;
1386return this.each(function(){
1387var element=$(this);
1388setTimeout(function(){
1389if(isMobile){
1390element.addClass('avia_start_animation').trigger('avia_start_animation');
1391}else{
1392element.waypoint(function(direction){
1393var current=$(this.element),
1394parent=current.parents('.av-animation-delay-container').eq(0);
1395if(parent.length){
1396current.addClass('avia_start_animation_when_active').trigger('avia_start_animation_when_active');
1397}
1398if(!parent.length||(parent.length&&parent.is('.__av_init_open'))||(parent.length&&parent.is('.av-active-tab-content'))){
1399current.addClass('avia_start_animation').trigger('avia_start_animation');
1400}}, options);
1401}},100);
1402});
1403};
1404var $event=$.event, $special, resizeTimeout;
1405$special=$event.special.debouncedresize={
1406setup: function(){
1407$(this).on("resize", $special.handler);
1408},
1409teardown: function(){
1410$(this).off("resize", $special.handler);
1411},
1412handler: function(event, execAsap){
1413var context=this,
1414args=arguments,
1415dispatch=function(){
1416event.type="debouncedresize";
1417$event.dispatch.apply(context, args);
1418};
1419if(resizeTimeout){
1420clearTimeout(resizeTimeout);
1421}
1422execAsap ?
1423dispatch() :
1424resizeTimeout=setTimeout(dispatch, $special.threshold);
1425},
1426threshold: 150
1427};})(jQuery);
1428(function($){
1429"use strict";
1430$.avia_utilities=$.avia_utilities||{};
1431$.avia_utilities.loading=function(attach_to, delay){
1432var loader={
1433active: false,
1434show: function(){
1435if(loader.active===false){
1436loader.active=true;
1437loader.loading_item.css({display:'block', opacity:0});
1438}
1439loader.loading_item.stop().animate({opacity:1});
1440},
1441hide: function(){
1442if(typeof delay==='undefined'){ delay=600; }
1443loader.loading_item.stop().delay(delay).animate({opacity:0}
1443, function(){
1444loader.loading_item.css({display:'none'});
1445loader.active=false;
1446});
1447},
1448attach: function(){
1449if(typeof attach_to==='undefined'){ attach_to='body';}
1450loader.loading_item=$('<div class="avia_loading_icon"><div class="av-siteloader"></div></div>').css({display:"none"}).appendTo(attach_to);
1451}};
1452loader.attach();
1453return loader;
1454};
1455$.avia_utilities.playpause=function(attach_to, delay){
1456var pp={
1457active: false,
1458to1: "",
1459to2: "",
1460set: function(status){
1461pp.loading_item.removeClass('av-play av-pause');
1462pp.to1=setTimeout(function(){ pp.loading_item.addClass('av-' + status); },10);
1463pp.to2=setTimeout(function(){ pp.loading_item.removeClass('av-' + status); },1500);
1464},
1465attach: function(){
1466if(typeof attach_to==='undefined'){ attach_to='body';}
1467pp.loading_item=$('<div class="avia_playpause_icon"></div>').css({display:"none"}).appendTo(attach_to);
1468}};
1469pp.attach();
1470return pp;
1471};
1472$.avia_utilities.preload=function(options_passed){
1473new $.AviaPreloader(options_passed);
1474};
1475$.AviaPreloader=function(options){
1476this.win=$(window);
1477this.defaults	=
1478{
1479container:			'body',
1480maxLoops:			10,
1481trigger_single:		true,
1482single_callback:	function(){},
1483global_callback:	function(){}};
1484this.options=$.extend({}, this.defaults, options);
1485this.preload_images=0;
1486this.load_images();
1487};
1488$.AviaPreloader.prototype  =
1489{
1490load_images: function(){
1491var _self=this;
1492if(typeof _self.options.container==='string'){ _self.options.container=$(_self.options.container); }
1493_self.options.container.each(function(){
1494var container=$(this);
1495container.images=container.find('img');
1496container.allImages=container.images;
1497_self.preload_images +=container.images.length;
1498setTimeout(function(){ _self.checkImage(container); }, 10);
1499});
1500},
1501checkImage: function(container){
1502var _self=this;
1503container.images.each(function(){
1504if(this.complete===true){
1505container.images=container.images.not(this);
1506_self.preload_images -=1;
1507}});
1508if(container.images.length&&_self.options.maxLoops >=0){
1509_self.options.maxLoops-=1;
1510setTimeout(function(){ _self.checkImage(container); }, 500);
1511}else{
1512_self.preload_images=_self.preload_images - container.images.length;
1513_self.trigger_loaded(container);
1514}},
1515trigger_loaded: function(container){
1516var _self=this;
1517if(_self.options.trigger_single!==false){
1518_self.win.trigger('avia_images_loaded_single', [container]);
1519_self.options.single_callback.call(container);
1520}
1521if(_self.preload_images===0){
1522_self.win.trigger('avia_images_loaded');
1523_self.options.global_callback.call();
1524}}
1525};
1526$.avia_utilities.css_easings={
1527linear:			'linear',
1528swing:			'ease-in-out',
1529bounce:			'cubic-bezier(0.0, 0.35, .5, 1.3)',
1530easeInQuad:     'cubic-bezier(0.550, 0.085, 0.680, 0.530)' ,
1531easeInCubic:    'cubic-bezier(0.550, 0.055, 0.675, 0.190)' ,
1532easeInQuart:    'cubic-bezier(0.895, 0.030, 0.685, 0.220)' ,
1533easeInQuint:    'cubic-bezier(0.755, 0.050, 0.855, 0.060)' ,
1534easeInSine:     'cubic-bezier(0.470, 0.000, 0.745, 0.715)' ,
1535easeInExpo:     'cubic-bezier(0.950, 0.050, 0.795, 0.035)' ,
1536easeInCirc:     'cubic-bezier(0.600, 0.040, 0.980, 0.335)' ,
1537easeInBack:     'cubic-bezier(0.600, -0.280, 0.735, 0.04)' ,
1538easeOutQuad:    'cubic-bezier(0.250, 0.460, 0.450, 0.940)' ,
1539easeOutCubic:   'cubic-bezier(0.215, 0.610, 0.355, 1.000)' ,
1540easeOutQuart:   'cubic-bezier(0.165, 0.840, 0.440, 1.000)' ,
1541easeOutQuint:   'cubic-bezier(0.230, 1.000, 0.320, 1.000)' ,
1542easeOutSine:    'cubic-bezier(0.390, 0.575, 0.565, 1.000)' ,
1543easeOutExpo:    'cubic-bezier(0.190, 1.000, 0.220, 1.000)' ,
1544easeOutCirc:    'cubic-bezier(0.075, 0.820, 0.165, 1.000)' ,
1545easeOutBack:    'cubic-bezier(0.175, 0.885, 0.320, 1.275)' ,
1546easeInOutQuad:  'cubic-bezier(0.455, 0.030, 0.515, 0.955)' ,
1547easeInOutCubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)' ,
1548easeInOutQuart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)' ,
1549easeInOutQuint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)' ,
1550easeInOutSine:  'cubic-bezier(0.445, 0.050, 0.550, 0.950)' ,
1551easeInOutExpo:  'cubic-bezier(1.000, 0.000, 0.000, 1.000)' ,
1552easeInOutCirc:  'cubic-bezier(0.785, 0.135, 0.150, 0.860)' ,
1553easeInOutBack:  'cubic-bezier(0.680, -0.550, 0.265, 1.55)' ,
1554easeInOutBounce:'cubic-bezier(0.580, -0.365, 0.490, 1.365)',
1555easeOutBounce:	'cubic-bezier(0.760, 0.085, 0.490, 1.365)'
1556};
1557$.avia_utilities.supported={};
1558$.avia_utilities.supports=(function(){
1559var div=document.createElement('div'),
1560vendors=['Khtml', 'Ms','Moz','Webkit'];
1561return function(prop, vendor_overwrite){
1562if(div.style[prop]!==undefined){ return ""; }
1563if(vendor_overwrite!==undefined){ vendors=vendor_overwrite; }
1564prop=prop.replace(/^[a-z]/, function(val){
1565return val.toUpperCase();
1566});
1567var len=vendors.length;
1568while(len--){
1569if(div.style[vendors[len] + prop]!==undefined){
1570return "-" + vendors[len].toLowerCase() + "-";
1571}}
1572return false;
1573};}());
1574$.fn.avia_animate=function(prop, speed, easing, callback){
1575if(typeof speed==='function'){callback=speed; speed=false; }
1576if(typeof easing==='function'){callback=easing; easing=false;}
1577if(typeof speed==='string'){easing=speed; speed=false;}
1578if(callback===undefined||callback===false){ callback=function(){};}
1579if(easing===undefined||easing===false){ easing='easeInQuad'; }
1580if(speed===undefined||speed===false){ speed=400; }
1581if($.avia_utilities.supported.transition===undefined){
1582$.avia_utilities.supported.transition=$.avia_utilities.supports('transition');
1583}
1584if($.avia_utilities.supported.transition!==false){
1585var prefix=$.avia_utilities.supported.transition + 'transition',
1586cssRule={},
1587cssProp={},
1588thisStyle=document.body.style,
1589end=(thisStyle.WebkitTransition!==undefined) ? 'webkitTransitionEnd':(thisStyle.OTransition!==undefined) ? 'oTransitionEnd':'transitionend';
1590easing=$.avia_utilities.css_easings[easing];
1591cssRule[prefix]='all '+(speed/1000)+'s '+easing;
1592end=end + ".avia_animate";
1593for (var rule in prop){
1594if(prop.hasOwnProperty(rule)){ cssProp[rule]=prop[rule]; }}
1595prop=cssProp;
1596this.each(function(){
1597var element=$(this), css_difference=false, rule, current_css;
1598for (rule in prop){
1599if(prop.hasOwnProperty(rule)){
1600current_css=element.css(rule);
1601if(prop[rule]!=current_css&&prop[rule]!=current_css.replace(/px|%/g,"")){
1602css_difference=true;
1603break;
1604}}
1605}
1606if(css_difference){
1607if(!($.avia_utilities.supported.transition+"transform" in prop)){
1608prop[$.avia_utilities.supported.transition+"transform"]="translateZ(0)";
1609}
1610var endTriggered=false;
1611element.on(end,  function(event){
1612if(event.target!=event.currentTarget) return false;
1613if(endTriggered==true) return false;
1614endTriggered=true;
1615cssRule[prefix]="none";
1616element.off(end);
1617element.css(cssRule);
1618setTimeout(function(){ callback.call(element); });
1619});
1620setTimeout(function(){
1621if(!endTriggered&&!avia_is_mobile&&$('html').is('.avia-safari')){
1622element.trigger(end);
1623$.avia_utilities.log('Safari Fallback '+end+' trigger');
1624}}, speed + 100);
1625setTimeout(function(){ element.css(cssRule);},10);
1626setTimeout(function(){ element.css(prop);	},20);
1627}else{
1628setTimeout(function(){ callback.call(element); });
1629}});
1630}else{
1631this.animate(prop, speed, easing, callback);
1632}
1633return this;
1634};})(jQuery);
1635(function($){
1636"use strict";
1637$.fn.avia_keyboard_controls=function(options_passed){
1638var defaults	=
1639{
164037: '.prev-slide',
164139: '.next-slide'
1642},
1643methods={
1644mousebind: function(slider){
1645slider.on('mouseenter', function(){
1646slider.mouseover=true;  })
1647.on('mouseleave', function(){
1648slider.mouseover=false; }
1649);
1650},
1651keybind: function(slider){
1652$(document).on('keydown', function(e){
1653if(slider.mouseover&&typeof slider.options[e.keyCode]!=='undefined'){
1654var item;
1655if(typeof slider.options[e.keyCode]==='string'){
1656item=slider.find(slider.options[e.keyCode]);
1657}else{
1658item=slider.options[e.keyCode];
1659}
1660if(item.length){
1661item.trigger('click', ['keypress']);
1662return false;
1663}}
1664});
1665}};
1666return this.each(function(){
1667var slider=$(this);
1668slider.options=$.extend({}, defaults, options_passed);
1669slider.mouseover=false;
1670methods.mousebind(slider);
1671methods.keybind(slider);
1672});
1673};
1674$.fn.avia_swipe_trigger=function(passed_options){
1675var win=$(window),
1676isMobile=$.avia_utilities.isMobile,
1677defaults	=
1678{
1679prev: '.prev-slide',
1680next: '.next-slide',
1681event: {
1682prev: 'click',
1683next: 'click'
1684}},
1685methods={
1686activate_touch_control: function(slider){
1687var i, differenceX, differenceY;
1688slider.touchPos={};
1689slider.hasMoved=false;
1690slider.on('touchstart', function(event){
1691slider.touchPos.X=event.originalEvent.touches[0].clientX;
1692slider.touchPos.Y=event.originalEvent.touches[0].clientY;
1693});
1694slider.on('touchend', function(event){
1695slider.touchPos={};
1696if(slider.hasMoved){ event.preventDefault(); }
1697slider.hasMoved=false;
1698});
1699slider.on('touchmove', function(event){
1700if(!slider.touchPos.X){
1701slider.touchPos.X=event.originalEvent.touches[0].clientX;
1702slider.touchPos.Y=event.originalEvent.touches[0].clientY;
1703}else{
1704differenceX=event.originalEvent.touches[0].clientX - slider.touchPos.X;
1705differenceY=event.originalEvent.touches[0].clientY - slider.touchPos.Y;
1706if(Math.abs(differenceX) > Math.abs(differenceY)){
1707event.preventDefault();
1708if(slider.touchPos!==event.originalEvent.touches[0].clientX){
1709if(Math.abs(differenceX) > 50){
1710i=differenceX > 0 ? 'prev':'next';
1711if(typeof slider.options[i]==='string'){
1712slider.find(slider.options[i]).trigger(slider.options.event[i], ['swipe']);
1713}else{
1714slider.options[i].trigger(slider.options.event[i], ['swipe']);
1715}
1716slider.hasMoved=true;
1717slider.touchPos={};
1718return false;
1719}}
1720}}
1721});
1722}};
1723return this.each(function(){
1724if(isMobile){
1725var slider=$(this);
1726slider.options=$.extend({}, defaults, passed_options);
1727methods.activate_touch_control(slider);
1728}});
1729};}(jQuery));
1730(function($){
1731if(typeof $.easing!=='undefined'){
1732$.easing['jswing']=$.easing['swing'];
1733}
1734var pow=Math.pow,
1735sqrt=Math.sqrt,
1736sin=Math.sin,
1737cos=Math.cos,
1738PI=Math.PI,
1739c1=1.70158,
1740c2=c1 * 1.525,
1741c3=c1 + 1,
1742c4=(2 * PI) / 3,
1743c5=(2 * PI) / 4.5;
1744function bounceOut(x){
1745var n1=7.5625,
1746d1=2.75;
1747if(x < 1/d1){
1748return n1*x*x;
1749}else if(x < 2/d1){
1750return n1*(x-=(1.5/d1))*x + .75;
1751}else if(x < 2.5/d1){
1752return n1*(x-=(2.25/d1))*x + .9375;
1753}else{
1754return n1*(x-=(2.625/d1))*x + .984375;
1755}}
1756$.extend($.easing,
1757{
1758def: 'easeOutQuad',
1759swing: function (x){
1760return $.easing[$.easing.def](x);
1761},
1762easeInQuad: function (x){
1763return x * x;
1764},
1765easeOutQuad: function (x){
1766return 1 -(1 - x) *(1 - x);
1767},
1768easeInOutQuad: function (x){
1769return x < 0.5 ?
17702 * x * x :
17711 - pow(-2 * x + 2, 2) / 2;
1772},
1773easeInCubic: function (x){
1774return x * x * x;
1775},
1776easeOutCubic: function (x){
1777return 1 - pow(1 - x, 3);
1778},
1779easeInOutCubic: function (x){
1780return x < 0.5 ?
17814 * x * x * x :
17821 - pow(-2 * x + 2, 3) / 2;
1783},
1784easeInQuart: function (x){
1785return x * x * x * x;
1786},
1787easeOutQuart: function (x){
1788return 1 - pow(1 - x, 4);
1789},
1790easeInOutQuart: function (x){
1791return x < 0.5 ?
17928 * x * x * x * x :
17931 - pow(-2 * x + 2, 4) / 2;
1794},
1795easeInQuint: function (x){
1796return x * x * x * x * x;
1797},
1798easeOutQuint: function (x){
1799return 1 - pow(1 - x, 5);
1800},
1801easeInOutQuint: function (x){
1802return x < 0.5 ?
180316 * x * x * x * x * x :
18041 - pow(-2 * x + 2, 5) / 2;
1805},
1806easeInSine: function (x){
1807return 1 - cos(x * PI/2);
1808},
1809easeOutSine: function (x){
1810return sin(x * PI/2);
1811},
1812easeInOutSine: function (x){
1813return -(cos(PI * x) - 1) / 2;
1814},
1815easeInExpo: function (x){
1816return x===0 ? 0:pow(2, 10 * x - 10);
1817},
1818easeOutExpo: function (x){
1819return x===1 ? 1:1 - pow(2, -10 * x);
1820},
1821easeInOutExpo: function (x){
1822return x===0 ? 0:x===1 ? 1:x < 0.5 ?
1823pow(2, 20 * x - 10) / 2 :
1824(2 - pow(2, -20 * x + 10)) / 2;
1825},
1826easeInCirc: function (x){
1827return 1 - sqrt(1 - pow(x, 2));
1828},
1829easeOutCirc: function (x){
1830return sqrt(1 - pow(x - 1, 2));
1831},
1832easeInOutCirc: function (x){
1833return x < 0.5 ?
1834(1 - sqrt(1 - pow(2 * x, 2))) / 2 :
1835(sqrt(1 - pow(-2 * x + 2, 2)) + 1) / 2;
1836},
1837easeInElastic: function (x){
1838return x===0 ? 0:x===1 ? 1 :
1839-pow(2, 10 * x - 10) * sin(( x * 10 - 10.75) * c4);
1840},
1841easeOutElastic: function (x){
1842return x===0 ? 0:x===1 ? 1 :
1843pow(2, -10 * x) * sin(( x * 10 - 0.75) * c4) + 1;
1844},
1845easeInOutElastic: function (x){
1846return x===0 ? 0:x===1 ? 1:x < 0.5 ?
1847-(pow(2, 20 * x - 10) * sin(( 20 * x - 11.125) * c5)) / 2 :
1848pow(2, -20 * x + 10) * sin(( 20 * x - 11.125) * c5) / 2 + 1;
1849},
1850easeInBack: function (x){
1851return c3 * x * x * x - c1 * x * x;
1852},
1853easeOutBack: function (x){
1854return 1 + c3 * pow(x - 1, 3) + c1 * pow(x - 1, 2);
1855},
1856easeInOutBack: function (x){
1857return x < 0.5 ?
1858(pow(2 * x, 2) *(( c2 + 1) * 2 * x - c2)) / 2 :
1859(pow(2 * x - 2, 2) *(( c2 + 1) *(x * 2 - 2) + c2) + 2) / 2;
1860},
1861easeInBounce: function (x){
1862return 1 - bounceOut(1 - x);
1863},
1864easeOutBounce: bounceOut,
1865easeInOutBounce: function (x){
1866return x < 0.5 ?
1867(1 - bounceOut(1 - 2 * x)) / 2 :
1868(1 + bounceOut(2 * x - 1)) / 2;
1869}});
1870}(jQuery));
1871(function($){
1872"use strict";
1873var autostarted=false,
1874container=null,
1875monitorStart=function(container){
1876var play_pause=container.find('.av-player-player-container .mejs-playpause-button');
1877if(play_pause.length==0){
1878setTimeout(function(){
1879monitorStart(container);
1880}, 200);
1881}
1882if(! play_pause.hasClass('mejs-pause')){
1883play_pause.trigger('click');
1884}};
1885$.fn.aviaPlayer=function(options){
1886if(! this.length){
1887return;
1888}
1889return this.each(function(){
1890var _self={};
1891_self.container=$(this);
1892_self.stopLoop=false;
1893_self.container.find('audio').on('play', function(){
1894if(_self.stopLoop){
1895this.pause();
1896_self.stopLoop=false;
1897}});
1898if(_self.container.hasClass('avia-playlist-no-loop')){
1899_self.container.find('audio').on('ended', function(){
1900var lastTrack=_self.container.find('.wp-playlist-tracks .wp-playlist-item').last().find('a');
1901try
1902{
1903var lastURI=decodeURI(lastTrack.attr('href'));
1904var currentURI=decodeURI(this.currentSrc);
1905if(currentURI===lastURI){
1906_self.stopLoop=true;
1907}}
1908catch(e){
1909_self.stopLoop=false;
1910}});
1911}
1912if(_self.container.hasClass('avia-playlist-autoplay')&&! autostarted){
1913if(( _self.container.css('display')=='none')||(_self.container.css("visibility")=="hidden")){
1914return;
1915}
1916autostarted=true;
1917setTimeout(function(){
1918monitorStart(_self.container, _self);
1919}, 200);
1920}});
1921};}(jQuery));
1922(function($){
1923$.fn.avia_ajax_form=function(variables){
1924var defaults =
1925{
1926sendPath: 'send.php',
1927responseContainer: '.ajaxresponse'
1928};
1929var options=$.extend(defaults, variables);
1930return this.each(function(){
1931var form=$(this),
1932form_sent=false,
1933send =
1934{
1935formElements: form.find('textarea, select, input[type=text], input[type=checkbox], input[type=hidden]'),
1936validationError:false,
1937button:form.find('input:submit'),
1938dataObj:{}},
1939responseContainer=form.next(options.responseContainer).eq(0);
1940send.button.on('click', checkElements);
1941if($.avia_utilities.isMobile){
1942send.formElements.each(function(i){
1943var currentElement=$(this),
1944is_email=currentElement.hasClass('is_email');
1945if(is_email) currentElement.attr('type','email');
1946});
1947}
1948function checkElements(e){
1949send.validationError=false;
1950send.datastring='ajax=true';
1951send.formElements=form.find('textarea, select, input[type=text], input[type=checkbox], input[type=hidden], input[type=email]');
1952send.formElements.each(function(i){
1953var currentElement=$(this),
1954surroundingElement=currentElement.parent(),
1955value=currentElement.val(),
1956name=currentElement.attr('name'),
1957classes=currentElement.attr('class'),
1958nomatch=true;
1959if(currentElement.is(':checkbox')){
1960if(currentElement.is(':checked')){ value=true; }else{ value=''; }}
1961send.dataObj[name]=encodeURIComponent(value);
1962if(classes&&classes.match(/is_empty/)){
1963if(value==''||value==null){
1964surroundingElement.removeClass("valid error ajax_alert").addClass("error");
1965send.validationError=true;
1966}else{
1967surroundingElement.removeClass("valid error ajax_alert").addClass("valid");
1968}
1969nomatch=false;
1970}
1971if(classes&&classes.match(/is_email/)){
1972if(! value.match(/^[\w|\.|\-]+@\w[\w|\.|\-]*\.[a-zA-Z]{2,20}$/)){
1973surroundingElement.removeClass("valid error ajax_alert").addClass("error");
1974send.validationError=true;
1975}else{
1976surroundingElement.removeClass("valid error ajax_alert").addClass("valid");
1977}
1978nomatch=false;
1979}
1980if(classes&&classes.match(/is_ext_email/)){
1981if(! value.match(/^[\w\.\-ÄÖÜäöü]+@\w[\w\.\-ÄÖÜäöü]*\.[a-zA-Z]{2,20}$/)){
1982surroundingElement.removeClass("valid error ajax_alert").addClass("error");
1983send.validationError=true;
1984}else{
1985surroundingElement.removeClass("valid error ajax_alert").addClass("valid");
1986}
1987nomatch=false;
1988}
1989if(classes&&classes.match(/is_special_email/)){
1990if(! value.match(/^[a-zA-Z0-9.!#$%&'*+\-\/=?^_`{|}~ÄÖÜäöü]+@\w[\w\.\-ÄÖÜäöü]*\.[a-zA-Z]{2,20}$/)){
1991surroundingElement.removeClass("valid error ajax_alert").addClass("error");
1992send.validationError=true;
1993}else{
1994surroundingElement.removeClass("valid error ajax_alert").addClass("valid");
1995}
1996nomatch=false;
1997}
1998if(classes&&classes.match(/is_phone/)){
1999if(! value.match(/^(\d|\s|\-|\/|\(|\)|\[|\]|e|x|t|ension|\.|\+|\_|\,|\:|\;){3,}$/)){
2000surroundingElement.removeClass("valid error ajax_alert").addClass("error");
2001send.validationError=true;
2002}else{
2003surroundingElement.removeClass("valid error ajax_alert").addClass("valid");
2004}
2005nomatch=false;
2006}
2007if(classes&&classes.match(/is_number/)){
2008if(! value.match(/^-?\s*(0|[1-9]\d*)([\.,]\d+)?$/)){
2009surroundingElement.removeClass("valid error ajax_alert").addClass("error");
2010send.validationError=true;
2011}else{
2012surroundingElement.removeClass("valid error ajax_alert").addClass("valid");
2013}
2014nomatch=false;
2015}
2016if(classes&&classes.match(/is_positiv_number/)){
2017if(!(av_isNumeric(value))||value==""||value < 0){
2018surroundingElement.removeClass("valid error ajax_alert").addClass("error");
2019send.validationError=true;
2020}else{
2021surroundingElement.removeClass("valid error ajax_alert").addClass("valid");
2022}
2023nomatch=false;
2024}
2025if(classes&&classes.match(/captcha/)&&! classes.match(/recaptcha/)){
2026var verifier=form.find("#" + name + "_verifier").val(),
2027lastVer=verifier.charAt(verifier.length-1),
2028finalVer=verifier.charAt(lastVer);
2029if(value!=finalVer){
2030surroundingElement.removeClass("valid error ajax_alert").addClass("error");
2031send.validationError=true;
2032}else{
2033surroundingElement.removeClass("valid error ajax_alert").addClass("valid");
2034}
2035nomatch=false;
2036}
2037if(nomatch&&value!=''){
2038surroundingElement.removeClass("valid error ajax_alert").addClass("valid");
2039}});
2040if(send.validationError==false){
2041if(form.data('av-custom-send')){
2042mailchimp_send();
2043}else{
2044send_ajax_form();
2045}}
2046return false;
2047}
2048function send_ajax_form(){
2049if(form_sent){ return false; }
2050if(send.button.hasClass('avia_button_inactive')){
2051return false;
2052}
2053form_sent=true;
2054send.button.addClass('av-sending-button');
2055send.button.val(send.button.data('sending-label'));
2056var redirect_to=form.data('avia-redirect')||false,
2057action=form.attr('action'),
2058label=form.is('.av-form-labels-style');
2059if(label) return;
2060responseContainer.load(action+' '+options.responseContainer, send.dataObj, function(){
2061if(redirect_to&&action!=redirect_to){
2062form.attr('action', redirect_to);
2063location.href=redirect_to;
2064}else{
2065responseContainer.removeClass('hidden').css({display:"block"});
2066form.slideUp(400, function(){responseContainer.slideDown(400, function(){ $('body').trigger('av_resize_finished'); });send.formElements.val('');});
2067}});
2068}
2069function mailchimp_send(){
2070if(form_sent){ return false; }
2071form_sent=true;
2072var original_label=send.button.val();
2073send.button.addClass('av-sending-button');
2074send.button.val(send.button.data('sending-label'));
2075send.dataObj.ajax_mailchimp=true;
2076var redirect_to=form.data('avia-redirect')||false,
2077action=form.attr('action'),
2078error_msg_container=form.find('.av-form-error-container'),
2079form_id=form.data('avia-form-id');
2080$.ajax({
2081url: action,
2082type: "POST",
2083data:send.dataObj,
2084beforeSend: function(){
2085if(error_msg_container.length){
2086error_msg_container.slideUp(400, function(){
2087error_msg_container.remove();
2088$('body').trigger('av_resize_finished');
2089});
2090}},
2091success: function(responseText){
2092var response=jQuery("<div>").append(jQuery.parseHTML(responseText)),
2093error=response.find('.av-form-error-container');
2094if(error.length){
2095form_sent=false;
2096form.prepend(error);
2097error.css({display:"none"}).slideDown(400, function(){
2098$('body').trigger('av_resize_finished');
2099});
2100send.button.removeClass('av-sending-button');
2101send.button.val(original_label);
2102}else{
2103if(redirect_to&&action!=redirect_to){
2104form.attr('action', redirect_to);
2105location.href=redirect_to;
2106}else{
2107var success_text=response.find(options.responseContainer + "_" + form_id);
2108responseContainer.html(success_text).removeClass('hidden').css({display:"block"});
2109form.slideUp(400, function(){
2110responseContainer.slideDown(400, function(){
2111$('body').trigger('av_resize_finished');
2112});
2113send.formElements.val('');
2114});
2115}}
2116},
2117error: function(){
2118},
2119complete: function(){
2120}});
2121}
2122function av_isNumeric(obj){
2123var type=typeof obj;
2124return(type==="number"||type==="string")&&! isNaN(obj - parseFloat(obj));
2125}});
2126};})(jQuery);
2127(function($){
2128"use strict";
2129$.AviaSlider=function(options, slider){
2130var self=this;
2131this.$win=$(window);
2132this.$slider=$(slider);
2133this.isMobile=$.avia_utilities.isMobile;
2134this._prepareSlides(options);
2135$.avia_utilities.preload({container: this.$slider, single_callback: function(){ self._init(options); }});
2136};
2137$.AviaSlider.defaults={
2138interval:5,
2139autoplay:false,
2140stopinfiniteloop: false,
2141animation:'slide',
2142transitionSpeed:900,
2143easing:'easeInOutQuart',
2144wrapElement: '>ul',
2145slideElement: '>li',
2146hoverpause: false,
2147bg_slider: false,
2148show_slide_delay: 0,
2149fullfade: false,
2150carousel: 'no',
2151carouselSlidesToShow: 3,
2152carouselSlidesToScroll: 1,
2153carouselResponsive:new Array()
2154};
2155$.AviaSlider.prototype =
2156{
2157_init: function(options){
2158this.options=this._setOptions(options);
2159this.$sliderUl=this.$slider.find(this.options.wrapElement);
2160this.$slides=this.$sliderUl.find(this.options.slideElement);
2161this.gotoButtons=this.$slider.find('.avia-slideshow-dots a');
2162this.permaCaption=this.$slider.find('>.av-slideshow-caption');
2163this.itemsCount=this.$slides.length;
2164this.current=0;
2165this.currentCarousel=0;
2166this.slideWidthCarousel='240';
2167this.loopCount=0;
2168this.isAnimating=false;
2169this.browserPrefix=$.avia_utilities.supports('transition');
2170this.cssActive=this.browserPrefix!==false ? true:false;
2171this.css3DActive=document.documentElement.className.indexOf('avia_transform3d')!==-1 ? true:false;
2172if(this.options.bg_slider==true){
2173this.imageUrls=[];
2174this.loader=$.avia_utilities.loading(this.$slider);
2175this._bgPreloadImages();
2176}else{
2177this._kickOff();
2178}
2179if(this.options.carousel==='yes'){
2180this.options.animation='carouselslide';
2181}},
2182_setOptions: function(options){
2183var newOptions=$.extend(true, {}, $.AviaSlider.defaults, options),
2184htmlData=this.$slider.data();
2185for(var i in htmlData){
2186var key=('transition_speed'!=i) ? i :'transitionSpeed';
2187if(typeof htmlData[ i ]==="string"||typeof htmlData[ i ]==="number"||typeof htmlData[ i ]==="boolean"){
2188newOptions[ key ]=htmlData[ i ];
2189}}
2190return newOptions;
2191},
2192_prepareSlides: function(options){
2193if(this.isMobile){
2194var alter=this.$slider.find('.av-mobile-fallback-image');
2195alter.each(function(){
2196var current=$(this).removeClass('av-video-slide').data({'avia_video_events': true, 'video-ratio':0}),
2197fallback=current.data('mobile-img'),
2198fallback_link=current.data('fallback-link'),
2199appendTo=current.find('.avia-slide-wrap');
2200current.find('.av-click-overlay, .mejs-mediaelement, .mejs-container').remove();
2201if(!fallback){
2202$('<p class="av-fallback-message"><span>Please set a mobile device fallback image for this video in your wordpress backend</span></p>').appendTo(appendTo);
2203}
2204if(options&&options.bg_slider){
2205current.data('img-url', fallback);
2206if(fallback_link!=""){
2207if(appendTo.is('a')){
2208appendTo.attr('href', fallback_link);
2209}else{
2210appendTo.find('a').remove();
2211appendTo.replaceWith(function(){
2212var cur_slide=$(this);
2213return $("<a>").attr({'data-rel': cur_slide.data('rel'), 'class': cur_slide.attr('class'), 'href': fallback_link}).append($(this).contents());
2214});
2215appendTo=current.find('.avia-slide-wrap');
2216}
2217if($.fn.avia_activate_lightbox){
2218current.parents('#main').avia_activate_lightbox();
2219}}
2220}else{
2221var image='<img src="'+fallback+'" alt="" title="" />';
2222var lightbox=false;
2223if('string'==typeof fallback_link&&fallback_link.trim()!=''){
2224if(appendTo.is('a')){
2225appendTo.attr('href', fallback_link);
2226}else{
2227var rel=fallback_link.match(/\.(jpg|jpeg|gif|png)$/i)!=null ? ' rel="lightbox" ':'';
2228image='<a href="' + fallback_link.trim() + '"' + rel + '>' + image + '</a>';
2229}
2230lightbox=true;
2231}
2232current.find('.avia-slide-wrap').append(image);
2233if(lightbox&&$.fn.avia_activate_lightbox){
2234current.parents('#main').avia_activate_lightbox();
2235}}
2236});
2237}},
2238_bgPreloadImages:function(callback){
2239this._getImageURLS();
2240this._preloadSingle(0, function(){
2241this._kickOff();
2242this._preloadNext(1);
2243});
2244},
2245_getImageURLS: function(){
2246var _self=this;
2247this.$slides.each(function(i){
2248_self.imageUrls[i]=[];
2249_self.imageUrls[i]['url']=$(this).data("img-url");
2250if(typeof _self.imageUrls[i]['url']=='string'){
2251_self.imageUrls[i]['status']=false;
2252}else{
2253_self.imageUrls[i]['status']=true;
2254}});
2255},
2256_preloadSingle: function(key, callback){
2257var _self=this,
2258objImage=new Image();
2259if(typeof _self.imageUrls[key]['url']=='string'){
2260$(objImage).on('load error', function(){
2261_self.imageUrls[key]['status']=true;
2262_self.$slides.eq(key).css('background-image','url(' + _self.imageUrls[key]['url'] + ')');
2263if(typeof callback=='function') callback.apply(_self, [objImage, key]);
2264});
2265if(_self.imageUrls[key]['url']!=""){
2266objImage.src=_self.imageUrls[key]['url'];
2267}else{
2268$(objImage).trigger('error');
2269}}else{
2270if(typeof callback=='function') callback.apply(_self, [objImage, key]);
2271}},
2272_preloadNext: function(key){
2273if(typeof this.imageUrls[key]!="undefined"){
2274this._preloadSingle(key, function(){
2275this._preloadNext(key + 1);
2276});
2277}},
2278_bindEvents: function(){
2279var self=this,
2280win=$(window);
2281this.$slider.on('click','.next-slide', $.proxy(this.next, this));
2282this.$slider.on('click','.prev-slide', $.proxy(this.previous, this));
2283this.$slider.on('click','.goto-slide', $.proxy(this.go2, this));
2284if(this.options.hoverpause){
2285this.$slider.on('mouseenter', $.proxy(this.pause, this));
2286this.$slider.on('mouseleave', $.proxy(this.resume, this));
2287}
2288if(this.options.stopinfiniteloop&&this.options.autoplay){
2289if(this.options.stopinfiniteloop=='last'){
2290this.$slider.on('avia_slider_last_slide', $.proxy(this._stopSlideshow, this));
2291}
2292else if(this.options.stopinfiniteloop=='first'){
2293this.$slider.on('avia_slider_first_slide', $.proxy(this._stopSlideshow, this));
2294}}
2295if(this.options.carousel==='yes'){
2296if(!this.isMobile){
2297win.on('debouncedresize',  $.proxy(this._buildCarousel, this));
2298}}else{
2299win.on('debouncedresize.aviaSlider',  $.proxy(this._setSize, this));
2300}
2301if(!this.isMobile){
2302this.$slider.avia_keyboard_controls();
2303}else{
2304this.$slider.avia_swipe_trigger();
2305}
2306self._attach_video_events();
2307},
2308_kickOff: function(){
2309var self=this,
2310first_slide=self.$slides.eq(0),
2311video=first_slide.data('video-ratio');
2312self._bindEvents();
2313this.$slider.removeClass('av-default-height-applied');
2314if(video){
2315self._setSize(true);
2316}else{
2317if(this.options.keep_pading!=true){
2318self.$sliderUl.css('padding',0);
2319self.$win.trigger('av-height-change');
2320}}
2321self._setCenter();
2322if(this.options.carousel==='no'){
2323first_slide.css({visibility:'visible', opacity:0}
2323).avia_animate({opacity:1}, function(){
2324var current=$(this).addClass('active-slide');
2325if(self.permaCaption.length){
2326self.permaCaption.addClass('active-slide');
2327}});
2328}
2329if(self.options.autoplay){
2330self._startSlideshow();
2331}
2332if(self.options.carousel==='yes'){
2333self._buildCarousel();
2334}
2335self.$slider.trigger('_kickOff');
2336},
2337_buildCarousel:function(){
2338var self=this,
2339stageWidth=this.$slider.outerWidth(),
2340slidesWidth=parseInt(stageWidth / this.options.carouselSlidesToShow),
2341windowWidth=window.innerWidth||$(window).width();
2342if(this.options.carouselResponsive &&
2343this.options.carouselResponsive.length &&
2344this.options.carouselResponsive!==null){
2345for (var breakpoint in this.options.carouselResponsive){
2346var breakpointValue=this.options.carouselResponsive[breakpoint]['breakpoint'];
2347var newSlidesToShow=this.options.carouselResponsive[breakpoint]['settings']['carouselSlidesToShow'];
2348if(breakpointValue >=windowWidth){
2349slidesWidth=parseInt(stageWidth / newSlidesToShow);
2350this.options.carouselSlidesToShow=newSlidesToShow;
2351}}
2352}
2353this.slideWidthCarousel=slidesWidth;
2354this.$slides.each(function(i){
2355$(this).width(slidesWidth);
2356});
2357var slideTrackWidth=slidesWidth * this.itemsCount;
2358this.$sliderUl.width(slideTrackWidth).css('transform', 'translateX(0px)');
2359if(this.options.carouselSlidesToShow >=this.itemsCount){
2360this.$slider.find('.av-timeline-nav').hide();
2361}},
2362_navigate:function(dir, pos){
2363if(this.isAnimating||this.itemsCount < 2 ||!this.$slider.is(":visible")){
2364return false;
2365}
2366this.isAnimating=true;
2367this.prev=this.current;
2368if(pos!==undefined){
2369this.current=pos;
2370dir=this.current > this.prev ? 'next':'prev';
2371}
2372else if(dir==='next'){
2373this.current=this.current < this.itemsCount - 1 ? this.current + 1:0;
2374if(this.current===0&&this.options.autoplay_stopper==1&&this.options.autoplay){
2375this.isAnimating=false;
2376this.current=this.prev;
2377this._stopSlideshow();
2378return false;
2379}}
2380else if(dir==='prev'){
2381this.current=this.current > 0 ? this.current - 1:this.itemsCount - 1;
2382}
2383this.gotoButtons.removeClass('active').eq(this.current).addClass('active');
2384if(this.options.carousel==='no'){
2385this._setSize();
2386}
2387if(this.options.bg_slider==true){
2388if(this.imageUrls[this.current]['status']==true){
2389this['_' + this.options.animation].call(this, dir);
2390}else{
2391this.loader.show();
2392this._preloadSingle(this.current, function(){
2393this['_' + this.options.animation].call(this, dir);
2394this.loader.hide();
2395});
2396}}else{
2397this['_' + this.options.animation].call(this, dir);
2398}
2399if(this.current==0){
2400this.loopCount++;
2401this.$slider.trigger('avia_slider_first_slide');
2402}
2403else if(this.current==this.itemsCount - 1){
2404this.$slider.trigger('avia_slider_last_slide');
2405}else{
2406this.$slider.trigger('avia_slider_navigate_slide');
2407}},
2408_setSize: function(instant){
2409if(this.options.bg_slider==true) return;
2410var self=this,
2411slide=this.$slides.eq(this.current),
2412img=slide.find('img'),
2413current=Math.floor(this.$sliderUl.height()),
2414ratio=slide.data('video-ratio'),
2415setTo=ratio ? this.$sliderUl.width() / ratio:Math.floor(slide.height()),
2416video_height=slide.data('video-height'),
2417video_toppos=slide.data('video-toppos');
2418this.$sliderUl.height(current).css('padding',0);
2419if(setTo!=current){
2420if(instant==true){
2421this.$sliderUl.css({height:setTo});
2422this.$win.trigger('av-height-change');
2423}else{
2424this.$sliderUl.avia_animate({height:setTo}, function(){
2425self.$win.trigger('av-height-change');
2426});
2427}}
2428this._setCenter();
2429if(video_height&&video_height!="set"){
2430slide.find('iframe, embed, video, object, .av_youtube_frame').css({height: video_height + '%', top: video_toppos + '%'});
2431slide.data('video-height','set');
2432}},
2433_setCenter: function(){
2434var slide=this.$slides.eq(this.current),
2435img=slide.find('img'),
2436min_width=parseInt(img.css('min-width'),10),
2437slide_width=slide.width(),
2438caption=slide.find('.av-slideshow-caption'),
2439css_left=((slide_width - min_width) / 2);
2440if(caption.length){
2441if(caption.is('.caption_left')){
2442css_left=((slide_width - min_width) / 1.5);
2443}
2444else if(caption.is('.caption_right')){
2445css_left=((slide_width - min_width) / 2.5);
2446}}
2447if(slide_width >=min_width){
2448css_left=0;
2449}
2450img.css({left:css_left});
2451},
2452_carouselmove:function(){
2453var offset=this.slideWidthCarousel*this.currentCarousel;
2454this.$sliderUl.css('transform', 'translateX(-'+offset+'px)');
2455},
2456_carouselslide: function(dir){
2457if(dir==='next'){
2458if(this.options.carouselSlidesToShow + this.currentCarousel < this.itemsCount){
2459this.currentCarousel++;
2460this._carouselmove();
2461}}
2462else if(dir==='prev'){
2463if(this.currentCarousel > 0){
2464this.currentCarousel--;
2465this._carouselmove();
2466}}
2467this.isAnimating=false;
2468},
2469_slide: function(dir){
2470var dynamic=false,
2471modifier=dynamic==true ? 2:1,
2472sliderWidth=this.$slider.width(),
2473direction=dir==='next' ? -1:1,
2474property=this.browserPrefix + 'transform',
2475reset={}, transition={},  transition2={},
2476trans_val=(sliderWidth * direction * -1),
2477trans_val2=(sliderWidth * direction) / modifier;
2478if(this.cssActive){
2479property=this.browserPrefix + 'transform';
2480if(this.css3DActive){
2481reset[property]="translate3d(" + trans_val + "px, 0, 0)";
2482transition[property]="translate3d(" + trans_val2 + "px, 0, 0)";
2483transition2[property]="translate3d(0,0,0)";
2484}else{
2485reset[property]="translate(" + trans_val + "px,0)";
2486transition[property]="translate(" + trans_val2 + "px,0)";
2487transition2[property]="translate(0,0)";
2488}}else{
2489reset.left=trans_val;
2490transition.left=trans_val2;
2491transition2.left=0;
2492}
2493if(dynamic){
2494transition['z-index']="1";
2495transition2['z-index']="2";
2496}
2497this._slide_animate(reset, transition, transition2);
2498},
2499_slide_up: function(dir){
2500var dynamic=true,
2501modifier=dynamic==true ? 2:1,
2502sliderHeight=this.$slider.height(),
2503direction=dir==='next' ? -1:1,
2504property=this.browserPrefix + 'transform',
2505reset={}, transition={},  transition2={},
2506trans_val=(sliderHeight * direction * -1),
2507trans_val2=(sliderHeight * direction) / modifier;
2508if(this.cssActive){
2509property=this.browserPrefix + 'transform';
2510if(this.css3DActive){
2511reset[property]="translate3d(0," + trans_val + "px, 0)";
2512transition[property]="translate3d(0," + trans_val2 + "px, 0)";
2513transition2[property]="translate3d(0,0,0)";
2514}else{
2515reset[property]="translate(0," + trans_val + "px)";
2516transition[property]="translate(0," + trans_val2 + "px)";
2517transition2[property]="translate(0,0)";					}}else{
2518reset.top=trans_val;
2519transition.top=trans_val2;
2520transition2.top=0;
2521}
2522if(dynamic){
2523transition['z-index']="1";
2524transition2['z-index']="2";
2525}
2526this._slide_animate(reset, transition, transition2);
2527},
2528_slide_animate: function(reset , transition , transition2){
2529var self=this,
2530displaySlide=this.$slides.eq(this.current),
2531hideSlide=this.$slides.eq(this.prev);
2532hideSlide.trigger('pause');
2533if(!displaySlide.data('disableAutoplay')){
2534if(displaySlide.hasClass('av-video-lazyload')&&!displaySlide.hasClass('av-video-lazyload-complete')){
2535displaySlide.find('.av-click-to-play-overlay').trigger('click');
2536}else{
2537displaySlide.trigger('play');
2538}}
2539displaySlide.css({visibility:'visible', zIndex:4, opacity:1, left
2539:0, top:0});
2540displaySlide.css(reset);
2541hideSlide.avia_animate(transition, this.options.transitionSpeed, this.options.easing);
2542var after_slide=function(){
2543self.isAnimating=false;
2544displaySlide.addClass('active-slide');
2545hideSlide.css({visibility:'hidden'}).removeClass('active-slide');
2546self.$slider.trigger('avia-transition-done');
2547};
2548if(self.options.show_slide_delay > 0){
2549setTimeout(function(){ displaySlide.avia_animate(transition2, self.options.transitionSpeed, self.options.easing, after_slide); },self.options.show_slide_delay);
2550}else{
2551displaySlide.avia_animate(transition2, self.options.transitionSpeed, self.options.easing, after_slide);
2552}},
2553_fade: function(){
2554var self=this,
2555displaySlide=this.$slides.eq(this.current),
2556hideSlide=this.$slides.eq(this.prev),
2557properties={visibility:'visible', zIndex:3, opacity:0},
2558fadeCallback=function(){
2559self.isAnimating=false;
2560displaySlide.addClass('active-slide');
2561hideSlide.css({visibility:'hidden', zIndex:2}).removeClass('active-slide');
2562self.$slider.trigger('avia-transition-done');
2563};
2564hideSlide.trigger('pause');
2565if(!displaySlide.data('disableAutoplay')){
2566if(displaySlide.hasClass('av-video-lazyload')&&!displaySlide.hasClass('av-video-lazyload-complete')){
2567displaySlide.find('.av-click-to-play-overlay').trigger('click');
2568}else{
2569displaySlide.trigger('play');
2570}}
2571if(self.options.fullfade==true){
2572hideSlide.avia_animate({opacity:0}
2572, 200, 'linear', function(){
2573displaySlide.css(properties).avia_animate({opacity:1}, self.options.transitionSpeed, 'linear',fadeCallback);
2574});
2575}else{
2576if(self.current===0){
2577hideSlide.avia_animate({opacity:0}, self.options.transitionSpeed/2, 'linear');
2578displaySlide.css(properties).avia_animate({opacity:1}, self.options.transitionSpeed/2, 'linear',fadeCallback);
2579}else{
2580displaySlide.css(properties).avia_animate({opacity:1}, self.options.transitionSpeed/2, 'linear', function(){
2581hideSlide.avia_animate({opacity:0}, 200, 'linear', fadeCallback);
2582});
2583}}
2584},
2585_attach_video_events: function(){
2586var self=this, $html=$('html');
2587self.$slides.each(function(i){
2588var currentSlide=$(this),
2589caption=currentSlide.find('.caption_fullwidth, .av-click-overlay'),
2590mejs=currentSlide.find('.mejs-mediaelement'),
2591lazyload=currentSlide.hasClass('av-video-lazyload') ? true:false;
2592if(currentSlide.data('avia_video_events')!=true){
2593currentSlide.data('avia_video_events', true);
2594currentSlide.on('av-video-events-bound', { slide: currentSlide, wrap: mejs , iteration: i , self: self, lazyload: lazyload }, onReady);
2595currentSlide.on('av-video-ended', { slide: currentSlide , self: self}, onFinish);
2596currentSlide.on('av-video-play-executed', function(){ setTimeout(function(){  self.pause(); }, 100); });
2597caption.on('click', { slide: currentSlide }, toggle);
2598if(currentSlide.is('.av-video-events-bound')) currentSlide.trigger('av-video-events-bound');
2599if(lazyload&&i===0&&!currentSlide.data('disableAutoplay')){
2600currentSlide.find('.av-click-to-play-overlay').trigger('click');
2601}}
2602});
2603function onReady(event){
2604if(event.data.iteration===0){
2605event.data.wrap.css('opacity',0);
2606if(!event.data.self.isMobile&&!event.data.slide.data('disableAutoplay')){
2607event.data.slide.trigger('play');
2608} 
2609setTimeout(function(){ event.data.wrap.avia_animate({opacity:1}, 400); }, 50);
2610}
2611else if($html.is('.avia-msie')&&!event.data.slide.is('.av-video-service-html5')){
2612if(!event.data.slide.data('disableAutoplay')) event.data.slide.trigger('play');
2613}
2614if(event.data.slide.is('.av-video-service-html5')&&event.data.iteration!==0){
2615event.data.slide.trigger('pause');
2616}
2617if(event.data.lazyload){
2618event.data.slide.addClass('av-video-lazyload-complete');
2619event.data.slide.trigger('play');
2620}}
2621function onFinish(event){
2622if(!event.data.slide.is('.av-single-slide')&&!event.data.slide.is('.av-loop-video')){
2623event.data.slide.trigger('reset');
2624self._navigate('next');
2625self.resume();
2626}
2627if(event.data.slide.is('.av-loop-video')&&event.data.slide.is('.av-video-service-html5')){
2628if($html.is('.avia-safari-8')){
2629setTimeout(function(){ event.data.slide.trigger('play'); },1);
2630}}
2631}
2632function toggle(event){
2633if(event.target.tagName!="A"){
2634event.data.slide.trigger('toggle');
2635}}
2636},
2637_timer: function(callback, delay, first){
2638var self=this, start, remaining=delay;
2639self.timerId=0;
2640this.pause=function(){
2641window.clearTimeout(self.timerId);
2642remaining -=new Date() - start;
2643};
2644this.resume=function(){
2645start=new Date();
2646self.timerId=window.setTimeout(callback, remaining);
2647};
2648this.destroy=function(){
2649window.clearTimeout(self.timerId);
2650};
2651this.resume(true);
2652},
2653_startSlideshow: function(){
2654var self=this;
2655this.isPlaying=true;
2656this.slideshow=new this._timer(function(){
2657self._navigate('next');
2658if(self.options.autoplay){
2659self._startSlideshow();
2660}}, (this.options.interval * 1000));
2661},
2662_stopSlideshow: function(){
2663if(this.options.autoplay){
2664this.slideshow.destroy();
2665this.isPlaying=false;
2666this.options.autoplay=false;
2667}},
2668next:function(e){
2669e.preventDefault();
2670this._stopSlideshow();
2671this._navigate('next');
2672},
2673previous:function(e){
2674e.preventDefault();
2675this._stopSlideshow();
2676this._navigate('prev');
2677},
2678go2:function(pos){
2679if(isNaN(pos)){
2680pos.preventDefault();
2681pos=pos.currentTarget.hash.replace('#','');
2682}
2683pos -=1;
2684if(pos===this.current||pos >=this.itemsCount||pos < 0){
2685return false;
2686}
2687this._stopSlideshow();
2688this._navigate(false, pos);
2689},
2690play:function(){
2691if(!this.isPlaying){
2692this.isPlaying=true;
2693this._navigate('next');
2694this.options.autoplay=true;
2695this._startSlideshow();
2696}},
2697pause:function(){
2698if(this.isPlaying){
2699this.slideshow.pause();
2700}},
2701resume:function(){
2702if(this.isPlaying){
2703this.slideshow.resume();
2704}},
2705destroy:function(callback){
2706this.slideshow.destroy(callback);
2707}};
2708$.fn.aviaSlider=function(options){
2709return this.each(function(){
2710var self=$.data(this, 'aviaSlider');
2711if(! self){
2712self=$.data(this, 'aviaSlider', new $.AviaSlider(options, this));
2713}});
2714};})(jQuery);
2715(function($){
2716"use strict";
2717var _units=['years','months','weeks','days','hours','minutes','seconds'],
2718_second=1000,
2719_minute=_second * 60,
2720_hour=_minute * 60,
2721_day=_hour * 24,
2722_week=_day * 7,
2723getDaysInMonth=function(month, year){
2724return new Date(year, month, 0).getDate();
2725},
2726splitStartDate=function(date){
2727var result={
2728year: date.getFullYear(),
2729month: date.getMonth() + 1,
2730day: date.getDate(),
2731hours: date.getHours(),
2732minutes: date.getMinutes(),
2733seconds: date.getSeconds()
2734};
2735return result;
2736},
2737getYears=function(start, endDate){
2738var diff=endDate.getFullYear() - start.year;
2739if(diff > 0){
2740var check=new Date(start.year + diff, start.month - 1, start.day, start.hours, start.minutes, start.seconds);
2741if(check > endDate){
2742diff --;
2743}}
2744return(diff >=0) ? diff:0;
2745},
2746getMonths=function(start, endDate){
2747var endMonth=endDate.getMonth() + 1;
2748var diff=endMonth - start.month;
2749if(diff < 0){
2750diff=12 - start.month + endMonth;
2751}
2752if(diff > 0){
2753var check=new Date(start.year, start.month - 1 + diff, start.day, start.hours, start.minutes, start.seconds);
2754if(check > endDate){
2755diff --;
2756}}
2757return(diff >=0) ? diff:0;
2758},
2759getDays=function(start, endDate){
2760var endDay=endDate.getDate();
2761var diff=endDay - start.day;
2762if(diff < 0){
2763diff=getDaysInMonth(start.month, start.year) - start.day + endDay;
2764}
2765if(diff > 0){
2766var check=new Date(start.year, start.month - 1, start.day + diff, start.hours, start.minutes, start.seconds);
2767if(check > endDate){
2768diff --;
2769}}
2770return(diff >=0) ? diff:0;
2771},
2772getBetween=function(startDate, endDate){
2773var start=splitStartDate(startDate),
2774result={
2775years: 0,
2776year_months: 0,
2777month_months: 0,
2778days: 0
2779};
2780result.years=getYears(start, endDate);
2781start.year +=result.years;
2782result.year_months=getMonths(start, endDate);
2783start.month +=result.year_months;
2784result.days=getDays(start, endDate);
2785start.day +=result.days;
2786result.month_months=result.years * 12 + result.year_months;
2787return result;
2788},
2789ticker=function(_self){
2790var tmLoc=new Date(),
2791_now=new Date(tmLoc.getTime() + tmLoc.getTimezoneOffset() * 60000),
2792_timestamp=_self.end - _now;
2793if(_timestamp <=0){
2794clearInterval(_self.countdown);
2795return;
2796}
2797_self.time.years=0;
2798_self.time.months=0;
2799_self.time.weeks=Math.floor(_timestamp / _week);
2800_self.time.days=Math.floor(( _timestamp % _week) / _day);
2801_self.time.hours=Math.floor(( _timestamp % _day) / _hour);
2802_self.time.minutes=Math.floor(( _timestamp % _hour) / _minute);
2803_self.time.seconds=Math.floor(( _timestamp % _minute) / _second);
2804var between=getBetween(_now, _self.end);
2805switch(_self.data.maximum){
2806case 1:
2807_self.time.seconds=Math.floor(_timestamp / _second);
2808break;
2809case 2:
2810_self.time.minutes=Math.floor(_timestamp / _minute);
2811break;
2812case 3:
2813_self.time.hours=Math.floor(_timestamp / _hour);
2814break;
2815case 4:
2816_self.time.days=Math.floor(_timestamp / _day);
2817break;
2818case 6:
2819_self.time.days=between.days;
2820_self.time.months=between.month_months;
2821break;
2822case 7:
2823_self.time.days=between.days;
2824_self.time.months=between.year_months;
2825_self.time.years=between.years;
2826break;
2827}
2828for(var i in _self.time){
2829if(typeof _self.update[i]=="object"){
2830if(_self.firstrun||_self.oldtime[i]!=_self.time[i]){
2831var labelkey=(_self.time[i]===1) ? "single":"multi";
2832_self.update[i].time_container.text(_self.time[i]);
2833_self.update[i].label_container.text(_self.update[i][labelkey]);
2834}}
2835}
2836if(_self.firstrun){
2837_self.container.addClass('av-countdown-active');
2838}
2839_self.oldtime=$.extend({}, _self.time);
2840_self.firstrun=false;
2841};
2842$.fn.aviaCountdown=function(options){
2843if(! this.length){
2844return;
2845}
2846return this.each(function(){
2847var _self={};
2848_self.update={};
2849_self.time={};
2850_self.oldtime={};
2851_self.firstrun=true;
2852_self.container=$(this);
2853_self.data=_self.container.data();
2854_self.end=new Date(_self.data.year, _self.data.month, _self.data.day, _self.data.hour, _self.data.minute);
2855if(_self.data.timezone!='0'){
2856_self.end=new Date(_self.end.getTime() - _self.data.timezone * 60000);
2857}
2858for(var i in _units){
2859_self.update[_units[i]]={
2860time_container:  _self.container.find('.av-countdown-' + _units[i] + ' .av-countdown-time'),
2861label_container: _self.container.find('.av-countdown-' + _units[i] + ' .av-countdown-time-label')
2862};
2863if(_self.update[_units[i]].label_container.length){
2864_self.update[_units[i]].single=_self.update[_units[i]].label_container.data('label');
2865_self.update[_units[i]].multi=_self.update[_units[i]].label_container.data('label-multi');
2866}}
2867ticker(_self);
2868_self.countdown=setInterval(function(){ ticker(_self); }, 1000);
2869});
2870};}(jQuery));
2871(function($){
2872"use strict";
2873$.fn.avia_hor_gallery=function(options){
2874var defaults =
2875{
2876slide_container:'.av-horizontal-gallery-inner',
2877slide_element:'.av-horizontal-gallery-slider',
2878slide_content:'.av-horizontal-gallery-wrap',
2879active:'av-active-gal-item',
2880prev:'.av-horizontal-gallery-prev',
2881next:'.av-horizontal-gallery-next'
2882};
2883var options=$.extend(defaults, options);
2884var win=$(window),
2885browserPrefix=$.avia_utilities.supports('transition'),
2886cssActive=this.browserPrefix!==false ? true:false,
2887isMobile=$.avia_utilities.isMobile,
2888transform3d=document.documentElement.className.indexOf('avia_transform3d')!==-1 ? true:false,
2889transition={};
2890return this.each(function(){
2891var container=$(this),
2892slide_container=container.find(options.slide_container),
2893slide_element=container.find(options.slide_element),
2894slide_content=container.find(options.slide_content),
2895prev=container.find(options.prev),
2896next=container.find(options.next),
2897imgs=container.find('img'),
2898all_elements_width=0,
2899currentIndex=false,
2900initial=container.data('av-initial'),
2901set_up=function(init){
2902var sl_height=(slide_container.width() / 100) * slide_container.data('av-height');
2903slide_container.css({'padding':0}).height(sl_height);
2904imgs.css('display','inline-block');
2905setTimeout(function(){ imgs.css('display','block'); }, 10);
2906all_elements_width=0;
2907slide_content.each(function(){
2908all_elements_width +=$(this).outerWidth(true);
2909});
2910slide_element.css('min-width' , all_elements_width);
2911if(currentIndex!==false){
2912change_active(currentIndex);
2913}},
2914change_active=function(index){
2915var current=slide_element.find(options.slide_content).eq(index),
2916viewport=slide_container.width(),
2917modifier=container.data('av-enlarge') > 1&&currentIndex==index ? container.data('av-enlarge'):1,
2918outerWidth=current.outerWidth(true) * modifier,
2919margin_right=parseInt(current.css('margin-right') , 10) / 2,
2920left_pos=viewport < all_elements_width ? (current.position().left * - 1) - (outerWidth / 2) + (viewport / 2): 0;
2921left_pos=left_pos + margin_right;
2922if(left_pos + all_elements_width < viewport) left_pos=(all_elements_width - viewport - parseInt(current.css('margin-right'),10)) * -1;
2923if(left_pos > 0) left_pos=0;
2924slide_element.css('left',left_pos);
2925slide_container.find("." +options.active).removeClass(options.active);
2926current.addClass(options.active);
2927currentIndex=index;
2928};
2929$.avia_utilities.preload({container: container , global_callback:  function(){
2930set_up('init');
2931win.on('debouncedresize', set_up);
2932if(initial) change_active(initial - 1);
2933setTimeout(function(){
2934container.addClass('av-horizontal-gallery-animated');
2935},10);
2936}});
2937slide_element.avia_swipe_trigger({prev:options.prev, next:options.next});
2938slide_content.on('click', function(e){
2939var current=$(this);
2940var index=slide_content.index(current);
2941if(currentIndex===index){
2942if(container.data('av-enlarge') > 1&&!$(e.target).is('a')){
2943}
2944return;
2945}
2946change_active(index);
2947});
2948prev.on('click', function(e){
2949if(currentIndex===false) currentIndex=1;
2950var index=currentIndex - 1;
2951if(index < 0) index=0;
2952change_active(index);
2953});
2954next.on('click', function(e){
2955if(currentIndex===false) currentIndex=-1;
2956var index=currentIndex + 1;
2957if(index > slide_content.length - 1) index=slide_content.length - 1;
2958change_active(index);
2959});
2960if(!isMobile){
2961container.avia_keyboard_controls({ 37: options.prev, 39: options.next });
2962}else{
2963container.avia_swipe_trigger({next: options.next, prev: options.prev});
2964}});
2965};}(jQuery));
2966(function($){
2967"use strict";
2968$.AviaTextRotator=function(options, slider){
2969this.$win=$(window);
2970this.$slider=$(slider);
2971this.$inner=this.$slider.find('.av-rotator-text');
2972this.$slides=this.$inner.find('.av-rotator-text-single');
2973this.$current=this.$slides.eq(0);
2974this.open=0;
2975this.count=this.$slides.length;
2976if($.avia_utilities.supported.transition===undefined){
2977$.avia_utilities.supported.transition=$.avia_utilities.supports('transition');
2978}
2979this.browserPrefix=$.avia_utilities.supported.transition;
2980this.cssActive=this.browserPrefix!==false ? true:false;
2981this.property=this.browserPrefix + 'transform',
2982this._init(options);
2983}
2984$.AviaTextRotator.prototype =
2985{
2986_init: function(options){
2987var _self=this;
2988if(this.count <=1) return;
2989_self.options=$.extend({}, options, this.$slider.data());
2990_self.$inner.addClass('av-rotation-active');
2991_self._autoplay();
2992if(_self.options.animation=="typewriter"){
2993_self.$slider.addClass('av-caret av-blinking-caret');
2994}},
2995_autoplay: function(){
2996var _self=this;
2997_self.autoplay=setTimeout(function(){
2998_self.open=_self.open===false ? 0:_self.open + 1;
2999if(_self.open >=_self.count) _self.open=0;
3000if(_self.options.animation!="typewriter"){
3001_self._move({}, _self.open);
3002_self._autoplay();
3003}else{
3004_self._typewriter();
3005}}, _self.options.interval * 1000);
3006},
3007_typewriter: function(event){
3008var _self=this;
3009_self.$current.css('background-color', _self.$current.css('color'));
3010_self.$slider.removeClass('av-caret av-blinking-caret').addClass('av-marked-text');
3011setTimeout(function(){
3012_self.$slider.addClass('av-caret av-blinking-caret').removeClass('av-marked-text');
3013_self.$current.data('av_typewriter_text', _self.$current.html());
3014_self.$current.css('background-color', 'transparent');
3015_self.$current.html("");
3016}, 800);
3017setTimeout(function(){
3018_self.$slider.removeClass('av-blinking-caret');
3019_self.$next=_self.$slides.eq(_self.open);
3020var content=_self.$next.data('av_typewriter_text')||_self.$next.html();
3021content=content.replace(/&amp;/g, '&');
3022_self.$current.css({display:'none'});
3023_self.$next.css({display:'inline'});
3024_self.$next.html("");
3025var i=0;
3026var speed=50; 
3027function typeWriter(){
3028if(i < content.length){
3029_self.$next[0].innerHTML +=content.charAt(i);
3030i++;
3031setTimeout(typeWriter, speed + Math.floor(Math.random() * 100));
3032}else{
3033_self.$slider.addClass('av-caret av-blinking-caret');
3034_self.$current=_self.$slides.eq(_self.open);
3035_self._autoplay();
3036}}
3037typeWriter();
3038}, 1500);
3039},
3040_move: function(event){
3041var _self=this,
3042modifier=30 * _self.options.animation,
3043fade_out={opacity:0}
3043,
3044fade_start={display:'inline-block', opacity:0},
3045fade_in={opacity:1};
3046this.$next=_self.$slides.eq(this.open);
3047if(this.cssActive){
3048fade_out[_self.property]="translate(0px," + modifier +"px)";
3049fade_start[_self.property]="translate(0px," + (modifier * -1) +"px)";
3050fade_in[_self.property]="translate(0px,0px)";
3051}else{
3052fade_out['top']=modifier;
3053fade_start['top']=(modifier * -1);
3054fade_in['top']=0;
3055}
3056_self.$current.avia_animate(fade_out, function(){
3057_self.$current.css({display:'none'});
3058_self.$next.css(fade_start).avia_animate(fade_in, function(){
3059_self.$current=_self.$slides.eq(_self.open);
3060});
3061});
3062}};
3063$.fn.avia_textrotator=function(options){
3064return this.each(function(){
3065var active=$.data(this, 'AviaTextRotator');
3066if(!active){
3067$.data(this, 'AviaTextRotator', 1);
3068new $.AviaTextRotator(options, this);
3069}});
3070};}(jQuery));
3071(function($){
3072"use strict";
3073$(window).on('load', function (e){
3074$('.avia-icon-grid-container').avia_sc_icongrid();
3075});
3076$.fn.avia_sc_icongrid=function(options){
3077return this.each(function(){
3078var icongrid_container=$(this),
3079icongrid=icongrid_container.find('.avia-icongrid'),
3080icongrid_id='#' + icongrid.attr('id'),
3081flipbox=icongrid_container.find('.avia-icongrid-flipbox'),
3082flipbox_cards=$('.avia-icongrid-flipbox li'),
3083methods={};
3084flipbox_cards.on('touchend', function(e){
3085var current=$(this),
3086container=current.closest('.avia-icongrid-flipbox');
3087if(current.hasClass('avia-hover')){
3088container.find('li').removeClass('avia-hover');
3089}else{
3090container.find('li').removeClass('avia-hover');
3091current.addClass('avia-hover');
3092}
3093var links=current.find('a');
3094if(links.length > 0){
3095links.off('touchend.aviaIconGridLink').on('touchend.aviaIconGridLink', function(e){
3096e.preventDefault();
3097e.stopImmediatePropagation();
3098var link=$(this);
3099link.css('opacity', 0.5);
3100window.location.href=link.attr('href');
3101});
3102}
3103e.preventDefault();
3104e.stopImmediatePropagation();
3105});
3106if(flipbox.hasClass('avia_flip_force_close')){
3107$('body').on('touchend', function(e){
3108var flipboxes=$('.avia-icongrid-flipbox.avia_flip_force_close');
3109flipboxes.each(function(){
3110var flipbox=$(this);
3111flipbox.find('li').removeClass('avia-hover');
3112});
3113});
3114}
3115methods =
3116{
3117buildIconGrid: function (){
3118this.setMinHeight($(icongrid_id + ' li article'));
3119if(icongrid.hasClass('avia-icongrid-flipbox')){
3120this.createFlipBackground($(icongrid_id + ' li'));
3121}},
3122setMinHeight: function (els){
3123if(els.length < 2){
3124return;
3125}
3126var elsHeights=new Array();
3127els.css('min-height', '0').each(function (i){
3128var current=icongrid.hasClass('avia-icongrid-flipbox') ? $(this):$(this).find('.avia-icongrid-front');
3129var currentHeight=current.outerHeight(true);
3130elsHeights.push(currentHeight);
3131});
3132var largest=Math.max.apply(null, elsHeights);
3133els.css('min-height', largest);
3134},
3135createFlipBackground: function(els){
3136els.each(function(index, element){
3137var back=$(this).find('.avia-icongrid-content');
3138if(back.length > 0){
3139if($(this).find('.avia-icongrid-flipback').length <=0){
3140var flipback=back.clone().addClass('avia-icongrid-flipback').removeClass('avia-icongrid-content');
3141back.after(flipback);
3142}}
3143});
3144}};
3145methods.buildIconGrid();
3146$(window).on('debouncedresize', function(){
3147methods.buildIconGrid();
3148});
3149});
3150};}(jQuery));
3151(function($){
3152"use strict";
3153$.fn.avia_sc_iconlist=function(options){
3154return this.each(function(){
3155var iconlist=$(this),
3156elements=iconlist.find('>li');
3157iconlist.on('avia_start_animation', function(){
3158elements.each(function(i){
3159var element=$(this);
3160setTimeout(function(){ element.addClass('avia_start_animation'); },(i * 350));
3161});
3162});
3163});
3164};}(jQuery));
3165(function($){
3166"use strict";
3167$.fn.aviaHotspots=function(options){
3168if(! this.length){
3169return;
3170}
3171return this.each(function(){
3172var _self={};
3173_self.container=$(this);
3174_self.hotspots=_self.container.find('.av-image-hotspot');
3175_self.container.on('avia_start_animation', function(){
3176setTimeout(function(){
3177_self.hotspots.each(function(i){
3178var current=$(this);
3179setTimeout(function(){ current.addClass('av-display-hotspot'); },300 * i);
3180});
3181},400);
3182});
3183});
3184};}(jQuery));
3185(function($){
3186"use strict";
3187var animating=false,
3188methods={
3189switchMag: function(clicked, _self){
3190var current=$(clicked);
3191if(current.is('.active_sort')||animating){
3192return;
3193}
3194var filter=current.data('filter'),
3195oldContainer=_self.container.filter(':visible'),
3196newContainer=_self.container.filter('.' + filter);
3197animating=true;
3198_self.sort_buttons.removeClass('active_sort');
3199current.addClass('active_sort');
3200_self.magazine.height(_self.magazine.outerHeight());
3201oldContainer.avia_animate({opacity:0}
3201, 200, function(){
3202oldContainer.css({display:'none'});
3203newContainer.css({opacity:0, display:'block'}).avia_animate({opacity:1}, 150, function(){
3204_self.magazine.avia_animate({height: (newContainer.outerHeight() + _self.sort_bar.outerHeight())}, 150, function(){
3205_self.magazine.height('auto');
3206animating=false;
3207});
3208});
3209});
3210}};
3211$.fn.aviaMagazine=function(options){
3212if(! this.length){
3213return;
3214}
3215return this.each(function(){
3216var _self={};
3217_self.magazine=$(this),
3218_self.sort_buttons=_self.magazine.find('.av-magazine-sort a');
3219_self.container=_self.magazine.find('.av-magazine-group');
3220_self.sort_bar=_self.magazine.find('.av-magazine-top-bar');
3221_self.sort_buttons.each(function (i){
3222var current=$(this),
3223filter=current.data('filter'),
3224entry=_self.container.filter('.' + filter);
3225if(entry.length==0||entry.html().trim()==''){
3226current.hide();
3227current.prev('span.text-sep').hide();
3228}});
3229_self.sort_buttons.on('click', function(e){
3230e.preventDefault();
3231methods.switchMag(this, _self);
3232});
3233});
3234};}(jQuery));
vendor: 35,249 bytes, lines 3234-3236
3234
3235!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,o){var n,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,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}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=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(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||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n<i.length;n++){var s=i[n],r=o&&o[s];r&&(this.off(t,s),delete o[s]),s.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",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<h;e++){var i=u[e];t[i]=0}return t}function o(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function n(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=o(e);r=200==Math.round(t(n.width)),s.isBoxSizeOuter=r,i.removeChild(e)}}function s(e){if(n(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var s=o(e);if("none"==s.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==s.boxSizing,l=0;l<h;l++){var f=u[l],c=s[f],m=parseFloat(c);a[f]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,y=a.paddingTop+a.paddingBottom,g=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,I=d&&r,x=t(s.width);x!==!1&&(a.width=x+(I?0:p+_));var S=t(s.height);return S!==!1&&(a.height=S+(I?0:y+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(y+z),a.outerWidth=a.width+g,a.outerHeight=a.height+v,a}}var r,a="undefined"==typeof console?e:function(t){console.error(t)},u=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],h=u.length,d=!1;return s}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var o=e[i],n=o+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e};var o=Array.prototype.slice;i.makeArray=function(t){if(Array.isArray(t))return t;if(null===t||void 0===t)return[];var e="object"==typeof t&&"number"==typeof t.length;return e?o.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);i!=-1&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,o){t=i.makeArray(t);var n=[];return t.forEach(function(t){if(t instanceof HTMLElement){if(!o)return void n.push(t);e(t,o)&&n.push(t);for(var i=t.querySelectorAll(o),s=0;s<i.length;s++)n.push(i[s])}}),n},i.debounceMethod=function(t,e,i){i=i||100;var o=t.prototype[e],n=e+"Timeout";t.prototype[e]=function(){var t=this[n];clearTimeout(t);var e=arguments,s=this;this[n]=setTimeout(function(){o.apply(s,e),delete s[n]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var n=t.console;return i.htmlInit=function(e,o){i.docReady(function(){var s=i.toDashed(o),r="data-"+s,a=document.querySelectorAll("["+r+"]"),u=document.querySelectorAll(".js-"+s),h=i.makeArray(a).concat(i.makeArray(u)),d=r+"-options",l=t.jQuery;h.forEach(function(t){var i,s=t.getAttribute(r)||t.getAttribute(d);try{i=s&&JSON.parse(s)}catch(a){return void(n&&n.error("Error parsing "+r+" on "+t.className+": "+a))}var u=new e(t,i);l&&l.data(t,o,u)})})},i}),function(t,e){"function"==typeof define&&define.amd?define("outlayer/item",["ev-emitter/ev-emitter","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("get-size")):(t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize))}(window,function(t,e){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function o(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}function n(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}var s=document.documentElement.style,r="string"==typeof s.transition?"transition":"WebkitTransition",a="string"==typeof s.transform?"transform":"WebkitTransform",u={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[r],h={transform:a,transition:r,transitionDuration:r+"Duration",transitionProperty:r+"Property",transitionDelay:r+"Delay"},d=o.prototype=Object.create(t.prototype);d.constructor=o,d._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},d.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},d.getSize=function(){this.size=e(this.element)},d.css=function(t){var e=this.element.style;for(var i in t){var o=h[i]||i;e[o]=t[i]}},d.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),o=t[e?"left":"right"],n=t[i?"top":"bottom"],s=parseFloat(o),r=parseFloat(n),a=this.layout.size;o.indexOf("%")!=-1&&(s=s/100*a.width),n.indexOf("%")!=-1&&(r=r/100*a.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=e?a.paddingLeft:a.paddingRight,r-=i?a.paddingTop:a.paddingBottom,this.position.x=s,this.position.y=r},d.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop"),n=i?"paddingLeft":"paddingRight",s=i?"left":"right",r=i?"right":"left",a=this.position.x+t[n];e[s]=this.getXValue(a),e[r]="";var u=o?"paddingTop":"paddingBottom",h=o?"top":"bottom",d=o?"bottom":"top",l=this.position.y+t[u];e[h]=this.getYValue(l),e[d]="",this.css(e),this.emitEvent("layout",[this])},d.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},d.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},d._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),n&&!this.isTransitioning)return void this.layoutPosition();var s=t-i,r=e-o,a={};a.transform=this.getTranslate(s,r),this.transition({to:a,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},d.getTranslate=function(t,e){var i=this.layout._getOption("originLeft"),o=this.layout._getOption("originTop");return t=i?t:-t,e=o?e:-e,"translate3d("+t+"px, "+e+"px, 0)"},d.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},d.moveTo=d._transitionTo,d.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},d._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},d.transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var l="opacity,"+n(a);d.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:l,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(u,this,!1)}},d.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},d.onotransitionend=function(t){this.ontransitionend(t)};var f={"-webkit-transform":"transform"};d.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=f[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},d.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(u,this,!1),this.isTransitioning=!1},d._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var c={transitionProperty:"",transitionDuration:"",transitionDelay:""};return d.removeTransitionStyles=function(){this.css(c)},d.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},d.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},d.remove=function(){return r&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),void this.hide()):void this.removeElem()},d.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("visibleStyle");e[i]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},d.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},d.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},d.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},i=this.getHideRevealTransitionEndProperty("hiddenStyle");e[i]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},d.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},d.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("outlayer/outlayer",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(i,o,n,s){return e(t,i,o,n,s)}):"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,i,o,n){"use strict";function s(t,e){var i=o.getQueryElement(t);if(!i)return void(u&&u.error("Bad element for "+this.constructor.namespace+": "+(i||t)));this.element=i,h&&(this.$element=h(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var n=++l;this.element.outlayerGUID=n,f[n]=this,this._create();var s=this._getOption("initLayout");s&&this.layout()}function r(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}function a(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],o=e&&e[2];if(!i.length)return 0;i=parseFloat(i);var n=m[o]||1;return i*n}var u=t.console,h=t.jQuery,d=function(){},l=0,f={};s.namespace="outlayer",s.Item=n,s.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var c=s.prototype;o.extend(c,e.prototype),c.option=function(t){o.extend(this.options,t)},c._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},s.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},c._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle);var t=this._getOption("resize");t&&this.bindResize()},c.reloadItems=function(){this.items=this._itemize(this.element.children)},c._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0;n<e.length;n++){var s=e[n],r=new i(s,this);o.push(r)}return o},c._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},c.getItemElements=function(){return this.items.map(function(t){return t.element})},c.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},c._init=c.layout,c._resetLayout=function(){this.getSize()},c.getSize=function(){this.size=i(this.element)},c._getMeasurement=function(t,e){var o,n=this.options[t];n?("string"==typeof n?o=this.element.querySelector(n):n instanceof HTMLElement&&(o=n),this[t]=o?i(o)[e]:n):this[t]=0},c.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},c._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},c._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var o=this._getItemLayoutPosition(t);o.item=t,o.isInstant=e||t.isLayoutInstant,i.push(o)},this),this._processLayoutQueue(i)}},c._getItemLayoutPosition=function(){return{x:0,y:0}},c._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},c.updateStagger=function(){var t=this.options.stagger;return null===t||void 0===t?void(this.stagger=0):(this.stagger=a(t),this.stagger)},c._positionItem=function(t,e,i,o,n){o?t.goTo(e,i):(t.stagger(n*this.stagger),t.moveTo(e,i))},c._postLayout=function(){this.resizeContainer()},c.resizeContainer=function(){var t=this._getOption("resizeContainer");if(t){var e=this._getContainerSize();e&&(this._setContainerMeasure(e.width,!0),this._setContainerMeasure(e.height,!1))}},c._getContainerSize=d,c._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},c._emitCompleteOnItems=function(t,e){function i(){n.dispatchEvent(t+"Complete",null,[e])}function o(){r++,r==s&&i()}var n=this,s=e.length;if(!e||!s)return void i();var r=0;e.forEach(function(e){e.once(t,o)})},c.dispatchEvent=function(t,e,i){var o=e?[e].concat(i):i;if(this.emitEvent(t,o),h)if(this.$element=this.$element||h(this.element),e){var n=h.Event(e);n.type=t,this.$element.trigger(n,i)}else this.$element.trigger(t,i)},c.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},c.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},c.stamp=function(t){t=this._find(t),t&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},c.unstamp=function(t){t=this._find(t),t&&t.forEach(function(t){o.removeFrom(this.stamps,t),this.unignore(t)},this)},c._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)},c._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},c._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},c._manageStamp=d,c._getElementOffset=function(t){var e=t.getBoundingClientRect(),o=this._boundingRect,n=i(t),s={left:e.left-o.left-n.marginLeft,top:e.top-o.top-n.marginTop,right:o.right-e.right-n.marginRight,bottom:o.bottom-e.bottom-n.marginBottom};return s},c.handleEvent=o.handleEvent,c.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},c.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},c.onresize=function(){this.resize()},o.debounceMethod(s,"onresize",100),c.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},c.needsResizeLayout=function(){var t=i(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},c.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},c.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},c.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},c.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},c.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},c.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},c.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},c.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},c.getItems=function(t){t=o.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},c.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),o.removeFrom(this.items,t)},this)},c.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete f[e],delete this.element.outlayerGUID,h&&h.removeData(this.element,this.constructor.namespace)},s.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&f[e]},s.create=function(t,e){var i=r(s);return i.defaults=o.extend({},s.defaults),o.extend(i.defaults,e),i.compatOptions=o.extend({},s.compatOptions),i.namespace=t,i.data=s.data,i.Item=r(n),o.htmlInit(i,t),h&&h.bridget&&h.bridget(t,i),i};var m={ms:1,s:1e3};return s.Item=n,s}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/item",["outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),o=i._create;i._create=function(){this.id=this.layout.itemGUID++,o.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var n=i.destroy;return i.destroy=function(){n.apply(this,arguments),this.css({display:""})},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):"object"==typeof module&&module.exports?module.exports=e(require("get-size"),require("outlayer")):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window,function(t,e){"use strict";function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var o=i.prototype,n=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"];return n.forEach(function(t){o[t]=function(){return e.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},o.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function n(){i.apply(this,arguments)}return n.prototype=Object.create(o),n.prototype.constructor=n,e&&(n.options=e),n.prototype.namespace=t,i.modes[t]=n,n},i}),function(t,e){"function"==typeof define&&define.amd?define("masonry-layout/masonry",["outlayer/outlayer","get-size/get-size"],e):"object"==typeof module&&module.exports?module.exports=e(require("outlayer"),require("get-size")):t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,e){var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var o=i.prototype;return o._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},o.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var o=this.columnWidth+=this.gutter,n=this.containerWidth+this.gutter,s=n/o,r=o-n%o,a=r&&r<1?"round":"floor";s=Math[a](s),this.cols=Math.max(s,1)},o.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,o=e(i);this.containerWidth=o&&o.innerWidth},o._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&e<1?"round":"ceil",o=Math[i](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var n=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",s=this[n](o,t),r={x:this.columnWidth*s.col,y:s.y},a=s.y+t.size.outerHeight,u=o+s.col,h=s.col;h<u;h++)this.colYs[h]=a;return r},o._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},o._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;o<i;o++)e[o]=this._getColGroupY(o,t);return e},o._getColGroupY=function(t,e){if(e<2)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},o._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,o=t>1&&i+t>this.cols;i=o?0:i;var n=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=n?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},o._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this._getOption("originLeft"),s=n?o.left:o.right,r=s+i.outerWidth,a=Math.floor(s/this.columnWidth);a=Math.max(0,a);var u=Math.floor(r/this.columnWidth);u-=r%this.columnWidth?0:1,u=Math.min(this.cols-1,u);for(var h=this._getOption("originTop"),d=(h?o.top:o.bottom)+i.outerHeight,l=a;l<=u;l++)this.colYs[l]=Math.max(d,this.colYs[l])},o._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},o._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/masonry",["../layout-mode","masonry-layout/masonry"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode"),require("masonry-layout")):e(t.Isotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i=t.create("masonry"),o=i.prototype,n={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(var s in e.prototype)n[s]||(o[s]=e.prototype[s]);var r=o.measureColumns;o.measureColumns=function(){this.items=this.isotope.filteredItems,r.call(this)};var a=o._getOption;return o._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:a.apply(this.isotope,arguments)},i}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/fit-rows",["../layout-mode"],e):"object"==typeof exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows"),i=e.prototype;return i._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},i._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);var o={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,o},i._getContainerSize=function(){return{height:this.maxY}},e}),function(t,e){"function"==typeof define&&define.amd?define("isotope-layout/js/layout-modes/vertical",["../layout-mode"],e):"object"==typeof module&&module.exports?module.exports=e(require("../layout-mode")):e(t.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0}),i=e.prototype;return i._resetLayout=function(){this.y=0},i._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},i._getContainerSize=function(){return{height:this.y}},e}),function(t,e){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","desandro-matches-selector/matches-selector","fizzy-ui-utils/utils","isotope-layout/js/item","isotope-layout/js/layout-mode","isotope-layout/js/layout-modes/masonry","isotope-layout/js/layout-modes/fit-rows","isotope-layout/js/layout-modes/vertical"],function(i,o,n,s,r,a){return e(t,i,o,n,s,r,a)}):"object"==typeof module&&module.exports?module.exports=e(t,require("outlayer"),require("get-size"),require("desandro-matches-selector"),require("fizzy-ui-utils"),require("isotope-layout/js/item"),require("isotope-layout/js/layout-mode"),require("isotope-layout/js/layout-modes/masonry"),require("isotope-layout/js/layout-modes/fit-rows"),require("isotope-layout/js/layout-modes/vertical")):t.Isotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.Isotope.Item,t.Isotope.LayoutMode)}(window,function(t,e,i,o,n,s,r){function a(t,e){return function(i,o){for(var n=0;n<t.length;n++){var s=t[n],r=i.sortData[s],a=o.sortData[s];if(r>a||r<a){var u=void 0!==e[s]?e[s]:e,h=u?1:-1;return(r>a?1:-1)*h}}return 0}}var u=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},d=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=s,d.LayoutMode=r;var l=d.prototype;l._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in r.modes)this._initLayoutMode(t)},l.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},l._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),i=0;i<t.length;i++){var o=t[i];o.id=this.itemGUID++}return this._updateItemsSortData(t),t},l._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?n.extend(e.options,i):i,this.modes[t]=new e(this)},l.layout=function(){return!this._isLayoutInited&&this._getOption("initLayout")?void this.arrange():void this._layout()},l._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},l.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},l._init=l.arrange,l._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},l._getIsInstant=function(){var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},l._bindArrangeComplete=function(){function t(){e&&i&&o&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}var e,i,o,n=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){i=!0,t()}),this.once("revealComplete",function(){o=!0,t()})},l._filter=function(t){var e=this.options.filter;e=e||"*";for(var i=[],o=[],n=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a=t[r];if(!a.isIgnored){var u=s(a);u&&i.push(a),u&&a.isHidden?o.push(a):u||a.isHidden||n.push(a)}}return{matches:i,needReveal:o,needHide:n}},l._getFilterTest=function(t){return u&&this.options.isJQueryFiltering?function(e){return u(e.element).is(t);
3236}:"function"==typeof t?function(e){return t(e.element)}:function(e){return o(e.element,t)}},l.updateSortData=function(t){var e;t?(t=n.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},l._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=f(i)}},l._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++){var o=t[i];o.updateSortData()}};var f=function(){function t(t){if("string"!=typeof t)return t;var i=h(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),s=n&&n[1],r=e(s,o),a=d.sortDataParsers[i[1]];return t=a?function(t){return t&&a(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},l._sort=function(){if(this.options.sortBy){var t=n.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=a(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},l._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},l._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},l._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},l._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},l._manageStamp=function(t){this._mode()._manageStamp(t)},l._getContainerSize=function(){return this._mode()._getContainerSize()},l.needsResizeLayout=function(){return this._mode().needsResizeLayout()},l.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},l.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},l._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},l.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;i<n;i++)o=e[i],this.element.appendChild(o.element);var s=this._filter(e).matches;for(i=0;i<n;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<n;i++)delete e[i].isLayoutInstant;this.reveal(s)}};var c=l.remove;return l.remove=function(t){t=n.makeArray(t);var e=this.getItems(t);c.call(this,t);for(var i=e&&e.length,o=0;i&&o<i;o++){var s=e[o];n.removeFrom(this.filteredItems,s)}},l.shuffle=function(){for(var t=0;t<this.items.length;t++){var e=this.items[t];e.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},l._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var o=t.apply(this,e);return this.options.transitionDuration=i,o},l.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},d});
vendor: 13,555 bytes, lines 3236-3237
3236
3237!function(a,b){"function"==typeof define&&define.amd?define("packery/js/rect",b):"object"==typeof module&&module.exports?module.exports=b():(a.Packery=a.Packery||{},a.Packery.Rect=b())}(window,function(){function a(b){for(var c in a.defaults)this[c]=a.defaults[c];for(c in b)this[c]=b[c]}a.defaults={x:0,y:0,width:0,height:0};var b=a.prototype;return b.contains=function(a){var b=a.width||0,c=a.height||0;return this.x<=a.x&&this.y<=a.y&&this.x+this.width>=a.x+b&&this.y+this.height>=a.y+c},b.overlaps=function(a){var b=this.x+this.width,c=this.y+this.height,d=a.x+a.width,e=a.y+a.height;return this.x<d&&b>a.x&&this.y<e&&c>a.y},b.getMaximalFreeRects=function(b){if(!this.overlaps(b))return!1;var c,d=[],e=this.x+this.width,f=this.y+this.height,g=b.x+b.width,h=b.y+b.height;return this.y<b.y&&(c=new a({x:this.x,y:this.y,width:this.width,height:b.y-this.y}),d.push(c)),e>g&&(c=new a({x:g,y:this.y,width:e-g,height:this.height}),d.push(c)),f>h&&(c=new a({x:this.x,y:h,width:this.width,height:f-h}),d.push(c)),this.x<b.x&&(c=new a({x:this.x,y:this.y,width:b.x-this.x,height:this.height}),d.push(c)),d},b.canFit=function(a){return this.width>=a.width&&this.height>=a.height},a}),function(a,b){if("function"==typeof define&&define.amd)define("packery/js/packer",["./rect"],b);else if("object"==typeof module&&module.exports)module.exports=b(require("./rect"));else{var c=a.Packery=a.Packery||{};c.Packer=b(c.Rect)}}(window,function(a){function b(a,b,c){this.width=a||0,this.height=b||0,this.sortDirection=c||"downwardLeftToRight",this.reset()}var c=b.prototype;c.reset=function(){this.spaces=[];var b=new a({x:0,y:0,width:this.width,height:this.height});this.spaces.push(b),this.sorter=d[this.sortDirection]||d.downwardLeftToRight},c.pack=function(a){for(var b=0;b<this.spaces.length;b++){var c=this.spaces[b];if(c.canFit(a)){this.placeInSpace(a,c);break}}},c.columnPack=function(a){for(var b=0;b<this.spaces.length;b++){var c=this.spaces[b],d=c.x<=a.x&&c.x+c.width>=a.x+a.width&&c.height>=a.height-.01;if(d){a.y=c.y,this.placed(a);break}}},c.rowPack=function(a){for(var b=0;b<this.spaces.length;b++){var c=this.spaces[b],d=c.y<=a.y&&c.y+c.height>=a.y+a.height&&c.width>=a.width-.01;if(d){a.x=c.x,this.placed(a);break}}},c.placeInSpace=function(a,b){a.x=b.x,a.y=b.y,this.placed(a)},c.placed=function(a){for(var b=[],c=0;c<this.spaces.length;c++){var d=this.spaces[c],e=d.getMaximalFreeRects(a);e?b.push.apply(b,e):b.push(d)}this.spaces=b,this.mergeSortSpaces()},c.mergeSortSpaces=function(){b.mergeRects(this.spaces),this.spaces.sort(this.sorter)},c.addSpace=function(a){this.spaces.push(a),this.mergeSortSpaces()},b.mergeRects=function(a){var b=0,c=a[b];a:for(;c;){for(var d=0,e=a[b+d];e;){if(e==c)d++;else{if(e.contains(c)){a.splice(b,1),c=a[b];continue a}c.contains(e)?a.splice(b+d,1):d++}e=a[b+d]}b++,c=a[b]}return a};var d={downwardLeftToRight:function(a,b){return a.y-b.y||a.x-b.x},rightwardTopToBottom:function(a,b){return a.x-b.x||a.y-b.y}};return b}),function(a,b){"function"==typeof define&&define.amd?define("packery/js/item",["outlayer/outlayer","./rect"],b):"object"==typeof module&&module.exports?module.exports=b(require("outlayer"),require("./rect")):a.Packery.Item=b(a.Outlayer,a.Packery.Rect)}(window,function(a,b){var c=document.documentElement.style,d="string"==typeof c.transform?"transform":"WebkitTransform",e=function(){a.Item.apply(this,arguments)},f=e.prototype=Object.create(a.Item.prototype),g=f._create;f._create=function(){g.call(this),this.rect=new b};var h=f.moveTo;return f.moveTo=function(a,b){var c=Math.abs(this.position.x-a),d=Math.abs(this.position.y-b),e=this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&1>c&&1>d;return e?void this.goTo(a,b):void h.apply(this,arguments)},f.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&d&&(this.element.style[d]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},f.disablePlacing=function(){this.isPlacing=!1},f.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},f.showDropPlaceholder=function(){var a=this.dropPlaceholder;a||(a=this.dropPlaceholder=document.createElement("div"),a.className="packery-drop-placeholder",a.style.position="absolute"),a.style.width=this.size.width+"px",a.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(a)},f.positionDropPlaceholder=function(){this.dropPlaceholder.style[d]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},f.hideDropPlaceholder=function(){this.layout.element.removeChild(this.dropPlaceholder)},e}),function(a,b){"function"==typeof define&&define.amd?define("packery/js/packery",["get-size/get-size","outlayer/outlayer","./rect","./packer","./item"],b):"object"==typeof module&&module.exports?module.exports=b(require("get-size"),require("outlayer"),require("./rect"),require("./packer"),require("./item")):a.Packery=b(a.getSize,a.Outlayer,a.Packery.Rect,a.Packery.Packer,a.Packery.Item)}(window,function(a,b,c,d,e){function f(a,b){return a.position.y-b.position.y||a.position.x-b.position.x}function g(a,b){return a.position.x-b.position.x||a.position.y-b.position.y}function h(a,b){var c=b.x-a.x,d=b.y-a.y;return Math.sqrt(c*c+d*d)}c.prototype.canFit=function(a){return this.width>=a.width-1&&this.height>=a.height-1};var i=b.create("packery");i.Item=e;var j=i.prototype;j._create=function(){b.prototype._create.call(this),this.packer=new d,this.shiftPacker=new d,this.isEnabled=!0,this.dragItemCount=0;var a=this;this.handleDraggabilly={dragStart:function(){a.itemDragStart(this.element)},dragMove:function(){a.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){a.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(b,c){c&&a.itemDragStart(b.currentTarget)},drag:function(b,c){c&&a.itemDragMove(b.currentTarget,c.position.left,c.position.top)},stop:function(b,c){c&&a.itemDragEnd(b.currentTarget)}}},j._resetLayout=function(){this.getSize(),this._getMeasurements();var a,b,c;this._getOption("horizontal")?(a=1/0,b=this.size.innerHeight+this.gutter,c="rightwardTopToBottom"):(a=this.size.innerWidth+this.gutter,b=1/0,c="downwardLeftToRight"),this.packer.width=this.shiftPacker.width=a,this.packer.height=this.shiftPacker.height=b,this.packer.sortDirection=this.shiftPacker.sortDirection=c,this.packer.reset(),this.maxY=0,this.maxX=0},j._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},j._getItemLayoutPosition=function(a){if(this._setRectSize(a.element,a.rect),this.isShifting||this.dragItemCount>0){var b=this._getPackMethod();this.packer[b](a.rect)}else this.packer.pack(a.rect);return this._setMaxXY(a.rect),a.rect},j.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},j._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},j._setMaxXY=function(a){this.maxX=Math.max(a.x+a.width,this.maxX),this.maxY=Math.max(a.y+a.height,this.maxY)},j._setRectSize=function(b,c){var d=a(b),e=d.outerWidth,f=d.outerHeight;(e||f)&&(e=this._applyGridGutter(e,this.columnWidth),f=this._applyGridGutter(f,this.rowHeight)),c.width=Math.min(e,this.packer.width),c.height=Math.min(f,this.packer.height)},j._applyGridGutter=function(a,b){if(!b)return a+this.gutter;b+=this.gutter;var c=a%b,d=c&&1>c?"round":"ceil";return a=Math[d](a/b)*b},j._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},j._manageStamp=function(a){var b,d=this.getItem(a);if(d&&d.isPlacing)b=d.rect;else{var e=this._getElementOffset(a);b=new c({x:this._getOption("originLeft")?e.left:e.right,y:this._getOption("originTop")?e.top:e.bottom})}this._setRectSize(a,b),this.packer.placed(b),this._setMaxXY(b)},j.sortItemsByPosition=function(){var a=this._getOption("horizontal")?g:f;this.items.sort(a)},j.fit=function(a,b,c){var d=this.getItem(a);d&&(this.stamp(d.element),d.enablePlacing(),this.updateShiftTargets(d),b=void 0===b?d.rect.x:b,c=void 0===c?d.rect.y:c,this.shift(d,b,c),this._bindFitEvents(d),d.moveTo(d.rect.x,d.rect.y),this.shiftLayout(),this.unstamp(d.element),this.sortItemsByPosition(),d.disablePlacing())},j._bindFitEvents=function(a){function b(){d++,2==d&&c.dispatchEvent("fitComplete",null,[a])}var c=this,d=0;a.once("layout",b),this.once("layoutComplete",b)},j.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},j.needsResizeLayout=function(){var b=a(this.element),c=this._getOption("horizontal")?"innerHeight":"innerWidth";return b[c]!=this.size[c]},j.resizeShiftPercentLayout=function(){var b=this._getItemsForLayout(this.items),c=this._getOption("horizontal"),d=c?"y":"x",e=c?"height":"width",f=c?"rowHeight":"columnWidth",g=c?"innerHeight":"innerWidth",h=this[f];if(h=h&&h+this.gutter){this._getMeasurements();var i=this[f]+this.gutter;b.forEach(function(a){var b=Math.round(a.rect[d]/h);a.rect[d]=b*i})}else{var j=a(this.element)[g]+this.gutter,k=this.packer[e];b.forEach(function(a){a.rect[d]=a.rect[d]/k*j})}this.shiftLayout()},j.itemDragStart=function(a){if(this.isEnabled){this.stamp(a);var b=this.getItem(a);b&&(b.enablePlacing(),b.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(b))}},j.updateShiftTargets=function(a){this.shiftPacker.reset(),this._getBoundingRect();var b=this._getOption("originLeft"),d=this._getOption("originTop");this.stamps.forEach(function(a){var e=this.getItem(a);if(!e||!e.isPlacing){var f=this._getElementOffset(a),g=new c({x:b?f.left:f.right,y:d?f.top:f.bottom});this._setRectSize(a,g),this.shiftPacker.placed(g)}},this);var e=this._getOption("horizontal"),f=e?"rowHeight":"columnWidth",g=e?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var h,i=this[f];if(i=i&&i+this.gutter){var j=Math.ceil(a.rect[g]/i),k=Math.floor((this.shiftPacker[g]+this.gutter)/i);h=(k-j)*i;for(var l=0;k>l;l++)this._addShiftTarget(l*i,0,h)}else h=this.shiftPacker[g]+this.gutter-a.rect[g],this._addShiftTarget(0,0,h);var m=this._getItemsForLayout(this.items),n=this._getPackMethod();m.forEach(function(a){var b=a.rect;this._setRectSize(a.element,b),this.shiftPacker[n](b),this._addShiftTarget(b.x,b.y,h);var c=e?b.x+b.width:b.x,d=e?b.y:b.y+b.height;if(this._addShiftTarget(c,d,h),i)for(var f=Math.round(b[g]/i),j=1;f>j;j++){var k=e?c:b.x+i*j,l=e?b.y+i*j:d;this._addShiftTarget(k,l,h)}},this)},j._addShiftTarget=function(a,b,c){var d=this._getOption("horizontal")?b:a;if(!(0!==d&&d>c)){var e=a+","+b,f=-1!=this.shiftTargetKeys.indexOf(e);f||(this.shiftTargetKeys.push(e),this.shiftTargets.push({x:a,y:b}))}},j.shift=function(a,b,c){var d,e=1/0,f={x:b,y:c};this.shiftTargets.forEach(function(a){var b=h(a,f);e>b&&(d=a,e=b)}),a.rect.x=d.x,a.rect.y=d.y};var k=120;j.itemDragMove=function(a,b,c){function d(){f.shift(e,b,c),e.positionDropPlaceholder(),f.layout()}var e=this.isEnabled&&this.getItem(a);if(e){b-=this.size.paddingLeft,c-=this.size.paddingTop;var f=this,g=new Date;this._itemDragTime&&g-this._itemDragTime<k?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(d,k)):(d(),this._itemDragTime=g)}},j.itemDragEnd=function(a){function b(){d++,2==d&&(c.element.classList.remove("is-positioning-post-drag"),c.hideDropPlaceholder(),e.dispatchEvent("dragItemPositioned",null,[c]))}var c=this.isEnabled&&this.getItem(a);if(c){clearTimeout(this.dragTimeout),c.element.classList.add("is-positioning-post-drag");var d=0,e=this;c.once("layout",b),this.once("layoutComplete",b),c.moveTo(c.rect.x,c.rect.y),this.layout(),this.dragItemCount=Math.max(0,this.dragItemCount-1),this.sortItemsByPosition(),c.disablePlacing(),this.unstamp(c.element)}},j.bindDraggabillyEvents=function(a){this._bindDraggabillyEvents(a,"on")},j.unbindDraggabillyEvents=function(a){this._bindDraggabillyEvents(a,"off")},j._bindDraggabillyEvents=function(a,b){var c=this.handleDraggabilly;a[b]("dragStart",c.dragStart),a[b]("dragMove",c.dragMove),a[b]("dragEnd",c.dragEnd)},j.bindUIDraggableEvents=function(a){this._bindUIDraggableEvents(a,"on")},j.unbindUIDraggableEvents=function(a){this._bindUIDraggableEvents(a,"off")},j._bindUIDraggableEvents=function(a,b){var c=this.handleUIDraggable;a[b]("dragstart",c.start)[b]("drag",c.drag)[b]("dragstop",c.stop)};var l=j.destroy;return j.destroy=function(){l.apply(this,arguments),this.isEnabled=!1},i.Rect=c,i.Packer=d,i}),function(a,b){"function"==typeof define&&define.amd?define(["isotope-layout/js/layout-mode","packery/js/packery"],b):"object"==typeof module&&module.exports?module.exports=b(require("isotope-layout/js/layout-mode"),require("packery")):b(a.Isotope.LayoutMode,a.Packery)}(window,function(a,b){var c=a.create("packery"),d=c.prototype,e={_getElementOffset:!0,_getMeasurement:!0};for(var f in b.prototype)e[f]||(d[f]=b.prototype[f]);var g=d._resetLayout;d._resetLayout=function(){this.packer=this.packer||new b.Packer,this.shiftPacker=this.shiftPacker||new b.Packer,g.apply(this,arguments)};var h=d._getItemLayoutPosition;d._getItemLayoutPosition=function(a){return a.rect=a.rect||new b.Rect,h.call(this,a)};var i=d.needsResizeLayout;d.needsResizeLayout=function(){return this._getOption("horizontal")?this.needsVerticalResizeLayout():i.call(this)};var j=d._getOption;return d._getOption=function(a){return"horizontal"==a?void 0!==this.options.isHorizontal?this.options.isHorizontal:this.options.horizontal:j.apply(this.isotope,arguments)},c});
3237
3238(function($){
3239"use strict";
3240$.fn.avia_masonry=function(options){
3241if(!this.length) return this;
3242var the_body=$('body'),
3243the_win=$(window),
3244isMobile=$.avia_utilities.isMobile,
3245loading=false,
3246methods={
3247masonry_filter: function(){
3248var current=$(this),
3249linktext=current.html(),
3250selector=current.data('filter'),
3251masonry=current.parents('.av-masonry').eq(0),
3252container=masonry.find('.av-masonry-container').eq(0),
3253links=masonry.find('.av-masonry-sort a'),
3254activeCat=masonry.find('.av-current-sort-title');
3255links.removeClass('active_sort');
3256current.addClass('active_sort');
3257container.attr('id', 'masonry_id_'+selector);
3258if(activeCat.length) activeCat.html(linktext);
3259methods.applyMasonry(container, selector, function(){
3260container.css({overflow:'visible'});
3261});
3262setTimeout(function(){ the_win.trigger('debouncedresize'); }, 500);
3263return false;
3264},
3265applyMasonry: function(container, selector, callback){
3266var filters=selector ? {filter: '.'+selector}:{};
3267filters['layoutMode']='packery';
3268filters['packery']={gutter:0};
3269filters['percentPosition']=true;
3270filters['itemSelector']="a.isotope-item, div.isotope-item";
3271filters['originLeft']=$('body').hasClass('rtl') ? false:true;
3272container.isotope(filters, function(){
3273the_win.trigger('av-height-change');
3274});
3275if(typeof callback==='function'){
3276setTimeout(callback, 0);
3277}},
3278show_bricks: function(bricks, callback){
3279bricks.each(function(i){
3280var currentLink=$(this),
3281browserPrefix=$.avia_utilities.supports('transition'),
3282multiplier=isMobile ? 0:100;
3283setTimeout(function(){
3284if(browserPrefix===false){
3285currentLink.css({visibility:"visible", opacity:0}).animate({opacity:1},1500);
3286}else{
3287currentLink.addClass('av-masonry-item-loaded');
3288}
3289if(i==bricks.length - 1&&typeof callback=='function'){
3290callback.call();
3291the_win.trigger('av-height-change');
3292}}, (multiplier * i));
3293});
3294},
3295loadMore: function(e){
3296e.preventDefault();
3297if(loading) return false;
3298loading=true;
3299var current=$(this),
3300data=current.data(),
3301masonry=current.parents('.av-masonry').eq(0),
3302container=masonry.find('.av-masonry-container'),
3303items=masonry.find('.av-masonry-entry'),
3304loader=$.avia_utilities.loading(),
3305finished=function(){ loading=false; loader.hide(); the_body.trigger('av_resize_finished'); };
3306if(!data.offset){ data.offset=0; }
3307data.offset +=data.items;
3308data.action='avia_ajax_masonry_more';
3309data.loaded=[];
3310items.each(function(){
3311var item_id=$(this).data('av-masonry-item');
3312if(item_id) data.loaded.push(item_id);
3313});
3314$.ajax({
3315url: avia_framework_globals.ajaxurl,
3316type: "POST",
3317data:data,
3318beforeSend: function(){
3319loader.show();
3320},
3321success: function(response){
3322if(response.indexOf("{av-masonry-loaded}")!==-1){
3323var response=response.split('{av-masonry-loaded}'),
3324new_items=$(response.pop()).filter('.isotope-item');
3325if(new_items.length > data.items){
3326new_items=new_items.not(new_items.last());
3327}else{
3328current.addClass('av-masonry-no-more-items');
3329}
3330var load_container=$('<div class="loadcontainer"></div>').append(new_items);
3331$.avia_utilities.preload({container: load_container, single_callback:  function(){
3332var links=masonry.find('.av-masonry-sort a'),
3333filter_container=masonry.find('.av-sort-by-term'),
3334allowed_filters=filter_container.data("av-allowed-sort");
3335filter_container.hide();
3336loader.hide();
3337container.isotope('insert', new_items);
3338$.avia_utilities.avia_ajax_call(masonry);
3339setTimeout(function(){ methods.show_bricks(new_items , finished); },150);
3340setTimeout(function(){ the_win.trigger('av-height-change'); }, 550);
3341if(links){
3342$(links).each(function(filterlinkindex){
3343var filterlink=$(this),
3344sort=filterlink.data('filter');
3345if(new_items){
3346$(new_items).each(function(itemindex){
3347var item=$(this);
3348if(item.hasClass(sort)&&allowed_filters.indexOf(sort)!==-1){
3349var term_count=filterlink.find('.avia-term-count').text();
3350filterlink.find('.avia-term-count').text(' ' + (parseInt(term_count) + 1) + ' ');
3351if(filterlink.hasClass('avia_hide_sort')){
3352filterlink.removeClass('avia_hide_sort').addClass('avia_show_sort');
3353masonry.find('.av-masonry-sort .'+sort+'_sep').removeClass('avia_hide_sort').addClass('avia_show_sort');
3354masonry.find('.av-masonry-sort .av-sort-by-term').removeClass('hidden');
3355}}
3356});
3357}});
3358}
3359filter_container.fadeIn();
3360}});
3361}else{
3362finished();
3363}},
3364error: finished,
3365complete: function(){
3366setTimeout(function(){ the_win.trigger('debouncedresize'); }, 500);
3367}});
3368}};
3369return this.each(function(){
3370var masonry=$(this),
3371container=masonry.find('.av-masonry-container'),
3372bricks=masonry.find('.isotope-item'),
3373filter=masonry.find('.av-masonry-sort').css({visibility:"visible", opacity:0}
3373).on('click', 'a',  methods.masonry_filter),
3374load_more=masonry.find('.av-masonry-load-more').css({visibility:"visible", opacity:0});
3375$.avia_utilities.preload({container: container, single_callback:  function(){
3376var start_animation=function(){
3377filter.animate({opacity:1}, 400);
3378if(container.outerHeight() + container.offset().top + $('#footer').outerHeight() > $(window).height()){
3379$('html').css({'overflow-y':'scroll'});
3380}
3381methods.applyMasonry(container, false, function(){
3382masonry.addClass('avia_sortable_active');
3383container.removeClass('av-js-disabled ');
3384});
3385methods.show_bricks(bricks, function(){
3386load_more.css({opacity:1}).on('click',  methods.loadMore);
3387});
3388};
3389if(isMobile){
3390start_animation();
3391}else{
3392masonry.waypoint(start_animation , { offset: '80%'});
3393}
3394$(window).on('debouncedresize', function(){
3395methods.applyMasonry(container, false, function(){
3396masonry.addClass('avia_sortable_active');
3397});
3398});
3399}});
3400});
3401};}(jQuery));
3402(function($){
3403"use strict";
3404$.avia_utilities=$.avia_utilities||{};
3405$(function(){
3406$.avia_utilities=$.avia_utilities||{};
3407if($.avia_utilities.avia_sticky_submenu){
3408$.avia_utilities.avia_sticky_submenu();
3409}});
3410$.avia_utilities.avia_sticky_submenu=function(){
3411var win=$(window),
3412html=$('html').first(),
3413header=$('.html_header_top.html_header_sticky #header'),
3414html_margin=parseInt($('html').first().css('margin-top'), 10),
3415setWitdth=$('.html_header_sidebar #main, .boxed #main'),
3416menus=$('.av-submenu-container'),
3417bordermod=html.is('.html_minimal_header') ? 0:1,
3418fixed_frame=$('.av-frame-top').height(),
3419burger_menu=$('.av-burger-menu-main'),
3420calc_margin=function(){
3421html_margin=parseInt(html.css('margin-top'), 10);
3422if(!$('.mobile_menu_toggle:visible').length){
3423$('.av-open-submenu').removeClass('av-open-submenu');
3424}
3425menus.filter('.av-sticky-submenu').each(function(){
3426$(this).next('.sticky_placeholder').height($(this).height());
3427});
3428},
3429calc_values=function(){
3430var content_width=setWitdth.width();
3431html_margin=parseInt(html.css('margin-top'), 10);
3432menus.width(content_width);
3433},
3434check=function(placeholder, no_timeout){
3435var menu_pos=this.offset().top,
3436top_pos=placeholder.offset().top,
3437scrolled=win.scrollTop(),
3438modifier=html_margin,
3439fixed=false;
3440if(burger_menu.is(":visible")){
3441this.css({top: 'auto', position: 'absolute'});fixed=false;
3442return;
3443}
3444if(header.length){
3445modifier +=header.outerHeight() + parseInt(header.css('margin-top'), 10);
3446}
3447if(fixed_frame){
3448modifier +=fixed_frame;
3449}
3450if(scrolled + modifier > top_pos){
3451if(!fixed){
3452this.css({top: modifier - bordermod, position: 'fixed'});fixed=true;
3453}}else{
3454this.css({top: 'auto', position: 'absolute'});fixed=false;
3455}},
3456toggle=function(e){
3457e.preventDefault();
3458var clicked=$(this),
3459menu=clicked.siblings('.av-subnav-menu');
3460if(menu.hasClass('av-open-submenu')){
3461menu.removeClass('av-open-submenu');
3462}else{
3463menu.addClass('av-open-submenu');
3464}};
3465win.on("debouncedresize av-height-change",  calc_margin); calc_margin();
3466if(setWitdth.length){
3467win.on("debouncedresize av-height-change",  calc_values);
3468calc_values();
3469}
3470menus.each(function(){
3471var menu=$(this), sticky=menu.filter('.av-sticky-submenu'),  placeholder=menu.next('.sticky_placeholder'), mobile_button=menu.find('.mobile_menu_toggle');
3472if(sticky.length) win.on('scroll debouncedresize',  function(){ window.requestAnimationFrame($.proxy(check, sticky, placeholder)); });
3473if(mobile_button.length){
3474mobile_button.on('click',  toggle);
3475}});
3476html.on('click', '.av-submenu-hidden .av-open-submenu li a', function(){
3477var current=$(this);
3478var list_item=current.siblings('ul, .avia_mega_div');
3479if(list_item.length){
3480if(list_item.hasClass('av-visible-sublist')){
3481list_item.removeClass('av-visible-sublist');
3482}else{
3483list_item.addClass('av-visible-sublist');
3484}
3485return false;
3486}});
3487$('.avia_mobile').on('click', '.av-menu-mobile-disabled li a', function(){
3488var current=$(this);
3489var list_item=current.siblings('ul');
3490if(list_item.length){
3491if(list_item.hasClass('av-visible-mobile-sublist')){
3492}else{
3493$('.av-visible-mobile-sublist').removeClass('av-visible-mobile-sublist');
3494list_item.addClass('av-visible-mobile-sublist');
3495return false;
3496}}
3497});
3498};}(jQuery));
3499(function($){
3500"use strict";
3501$.fn.avia_sc_messagebox=function (options){
3502"use strict";
3503return this.each(function (){
3504var container=$(this),
3505close_btn=container.find('.av_message_close'),
3506mbox_ID=container.attr('id'),
3507aviaSetCookie=function(CookieName,CookieValue,CookieDays){
3508var expires="";
3509if(CookieDays){
3510var date=new Date();
3511date.setTime(date.getTime() +(CookieDays*24*60*60*1000));
3512expires="; expires=" + date.toGMTString();
3513}
3514document.cookie=CookieName + "=" + CookieValue + expires + "; path=/; samesite=strict";
3515},
3516aviaGetCookie=function(CookieName){
3517var docCookiesStr=CookieName + "=";
3518var docCookiesArr=document.cookie.split(';');
3519for(var i=0; i < docCookiesArr.length; i++){
3520var thisCookie=docCookiesArr[i];
3521while(thisCookie.charAt(0)==' '){
3522thisCookie=thisCookie.substring(1,thisCookie.length);
3523}
3524if(thisCookie.indexOf(docCookiesStr)==0){
3525var cookieContents=container.attr('data-contents');
3526var savedContents=thisCookie.substring(docCookiesStr.length, thisCookie.length);
3527if(savedContents==cookieContents){
3528return savedContents;
3529}}
3530}
3531return null;
3532};
3533if(! aviaGetCookie(mbox_ID)){
3534container.removeClass('messagebox-hidden');
3535}
3536close_btn.on('click', function(){
3537var cookieContents=container.attr('data-contents');
3538var cookieLifetime="";
3539if(container.hasClass('messagebox-session_cookie')){
3540cookieLifetime="";
3541}
3542else if(container.hasClass('messagebox-custom_cookie')){
3543cookieLifetime=parseInt(container.attr('data-cookielifetime'));
3544}
3545aviaSetCookie(mbox_ID, cookieContents, cookieLifetime);
3546container.addClass('messagebox-hidden');
3547});
3548});
3549};
3550$('.avia_message_box').avia_sc_messagebox();
3551}(jQuery));
3552(function($){
3553$.fn.avia_sc_animated_number=function(options){
3554if(!this.length) return;
3555if(this.is('.avia_sc_animated_number_active')) return;
3556this.addClass('avia_sc_animated_number_active');
3557var simple_upcount=(options&&options.simple_up) ? true:false,
3558start_timer=(options&&options.start_timer) ? options.start_timer:300,
3559format_number=function(number, number_format, final_number){
3560var prepend='',
3561addZeros=final_number.toString().length - number.toString().length;
3562for(var i=addZeros; i > 0; i--){
3563prepend +='0';
3564}
3565number=(simple_upcount) ? number.toString():prepend + number.toString();
3566if(''==number_format){
3567return number;
3568}
3569return number.split(/(?=(?:...)*$)/).join(number_format);
3570},
3571start_count=function(element, countTo, increment, current, fakeCountTo, number_format){
3572var newCount=current + increment,
3573final='';
3574if(newCount >=fakeCountTo){
3575final=format_number(countTo, number_format, countTo);
3576element.text(final);
3577}else{
3578final=format_number(newCount, number_format, countTo);
3579element.text(final);
3580window.requestAnimationFrame(function(){ start_count(element, countTo, increment, newCount, fakeCountTo, number_format); });
3581}};
3582return this.each(function(){
3583var number_container=$(this),
3584elements=number_container.find('.__av-single-number'),
3585countTimer=number_container.data('timer')||3000;
3586elements.each(function(i){
3587var element=$(this),
3588text=element.text();
3589if(window.addEventListener) element.text(text.replace(/./g, "0")); 
3590});
3591number_container.addClass('number_prepared').on('avia_start_animation', function(){
3592if(number_container.is('.avia_animation_done')) return;
3593number_container.addClass('avia_animation_done');
3594elements.each(function(i){
3595var element=$(this),
3596countTo=element.data('number'),
3597fakeCountTo=countTo,
3598current=parseInt(element.text(),10),
3599zeroOnly=/^0+$/.test(countTo),
3600increment=0,
3601number_format='';
3602if('undefined'!=typeof element.data('start_from')){
3603current=element.data('start_from');
3604}
3605if('undefined'!=typeof element.data('number_format')){
3606number_format=element.data('number_format');
3607}
3608if(zeroOnly&&countTo!==0){
3609fakeCountTo=countTo.replace(/0/g, '9');
3610}
3611increment=Math.round(fakeCountTo * 32 / countTimer);
3612if(increment==0||increment % 10==0) increment +=1;
3613setTimeout(function(){ start_count(element, countTo, increment, current, fakeCountTo, number_format);}, start_timer);
3614});
3615});
3616if(options&&options.instant_start==true){
3617number_container.trigger('avia_start_animation');
3618}});
3619};})(jQuery);
3620(function($){
3621"use strict";
3622$.avia_utilities=$.avia_utilities||{};
3623$.fn.avia_iso_sort=function(options){
3624return this.each(function(){
3625var the_body=$('body'),
3626container=$(this),
3627portfolio_id=container.data('portfolio-id'),
3628parentContainer=container.closest('.av-portfolio-grid-sorting-container, .entry-content-wrapper, .avia-fullwidth-portfolio'),
3629filter=parentContainer.find('.sort_width_container[data-portfolio-id="' + portfolio_id + '"]').find('#js_sort_items').css({visibility:"visible", opacity:0}),
3630links=filter.find('a'),
3631imgParent=container.find('.grid-image'),
3632isoActive=false,
3633items=$('.post-entry', container),
3634is_originLeft=the_body.hasClass('rtl') ? false:true;
3635function applyIso(){
3636container.addClass('isotope_activated').isotope({
3637layoutMode:'fitRows', itemSelector:'.flex_column', originLeft: is_originLeft
3638});
3639container.isotope('on', 'layoutComplete', function(){
3640container.css({overflow:'visible'});
3641the_body.trigger('av_resize_finished');
3642});
3643isoActive=true;
3644setTimeout(function(){ parentContainer.addClass('avia_sortable_active'); }, 0);
3645};
3646links.on('click',function(){
3647var current=$(this),
3648selector=current.data('filter'),
3649linktext=current.html(),
3650activeCat=parentContainer.find('.av-current-sort-title');
3651if(activeCat.length) activeCat.html(linktext);
3652links.removeClass('active_sort');
3653current.addClass('active_sort');
3654container.attr('id', 'grid_id_'+selector);
3655parentContainer.find('.open_container .ajax_controlls .avia_close').trigger('click');
3656container.isotope({ layoutMode:'fitRows', itemSelector:'.flex_column' , filter: '.'+selector, originLeft: is_originLeft });
3657return false;
3658});
3659$(window).on('debouncedresize', function(){
3660applyIso();
3661});
3662$.avia_utilities.preload({container: container, single_callback:  function(){
3663filter.animate({opacity:1}, 400); applyIso();
3664setTimeout(function(){ applyIso(); });
3665imgParent.css({height:'auto'}).each(function(i){
3666var currentLink=$(this);
3667setTimeout(function(){
3668currentLink.animate({opacity:1},1500);
3669}, (100 * i));
3670});
3671}});
3672});
3673};
3674$.fn.avia_portfolio_preview=function(passed_options){
3675var win=$(window),
3676the_body=$('body'),
3677isMobile=$.avia_utilities.isMobile,
3678defaults =
3679{
3680open_in:	'.portfolio-details-inner',
3681easing:		'easeOutQuint',
3682timing:		800,
3683transition:	'slide' // 'fade' or 'slide'
3684},
3685options=$.extend({}, defaults, passed_options);
3686return this.each(function(){
3687var container=$(this),
3688portfolio_id=container.data('portfolio-id'),
3689target_wrap=$('.portfolio_preview_container[data-portfolio-id="' + portfolio_id + '"]'),
3690target_container=target_wrap.find(options.open_in),
3691items=container.find('.grid-entry'),
3692content_retrieved={},
3693is_open=false,
3694animating=false,
3695index_open=false,
3696ajax_call=false,
3697methods,
3698controls,
3699loader=$.avia_utilities.loading();
3700methods =
3701{
3702load_item: function(e){
3703e.preventDefault();
3704var link=$(this),
3705post_container=link.parents('.post-entry').eq(0),
3706post_id="ID_" + post_container.data('ajax-id'),
3707clickedIndex=items.index(post_container);
3708if(post_id===is_open||animating==true){
3709return false;
3710}
3711animating=true;
3712container.find('.active_portfolio_item').removeClass('active_portfolio_item');
3713post_container.addClass('active_portfolio_item');
3714loader.show();
3715methods.ajax_get_contents(post_id, clickedIndex);
3716},
3717scroll_top: function(){
3718setTimeout(function(){
3719var target_offset=target_wrap.offset().top - 175,
3720window_offset=win.scrollTop();
3721if(window_offset > target_offset||target_offset - window_offset > 100){
3722$('html:not(:animated),body:not(:animated)').animate({ scrollTop: target_offset }, options.timing, options.easing);
3723}},10);
3724},
3725attach_item: function(post_id){
3726content_retrieved[post_id]=$(content_retrieved[post_id]).appendTo(target_container);
3727ajax_call=true;
3728},
3729remove_video: function(){
3730var del=target_wrap.find('iframe, .avia-video').parents('.ajax_slide:not(.open_slide)');
3731if(del.length > 0){
3732del.remove();
3733content_retrieved["ID_" + del.data('slideId')]=undefined;
3734}},
3735show_item: function(post_id, clickedIndex){
3736if(post_id===is_open){
3737return false;
3738}
3739animating=true;
3740loader.hide();
3741if(false===is_open){
3742target_wrap.addClass('open_container');
3743content_retrieved[post_id].addClass('open_slide');
3744methods.scroll_top();
3745target_wrap.css({display:'none'}).slideDown(options.timing, options.easing, function(){
3746if(ajax_call){
3747$.avia_utilities.activate_shortcode_scripts(content_retrieved[post_id]);
3748$.avia_utilities.avia_ajax_call(content_retrieved[post_id]);
3749the_body.trigger('av_resize_finished');
3750ajax_call=false;
3751}
3752methods.remove_video();
3753the_body.trigger('av_resize_finished');
3754});
3755index_open=clickedIndex;
3756is_open=post_id;
3757animating=false;
3758}else{
3759methods.scroll_top();
3760var initCSS={ zIndex:3 },
3761easing=options.easing;
3762if(index_open > clickedIndex){ initCSS.left='-110%'; }
3763if(options.transition==='fade'){ initCSS.left='0%'; initCSS.opacity=0; easing='easeOutQuad'; }
3764target_container.height(target_container.height());
3765content_retrieved[post_id].css(initCSS).avia_animate({'left':"0%", opacity:1}, options.timing, easing);
3766content_retrieved[is_open].avia_animate({opacity:0}, options.timing, easing, function(){
3767content_retrieved[is_open].attr({'style':""}).removeClass('open_slide');
3768content_retrieved[post_id].addClass('open_slide');
3769target_container.avia_animate({height: content_retrieved[post_id].outerHeight() + 2}, options.timing/2, options.easing, function(){
3770target_container.attr({'style':""});
3771is_open=post_id;
3772index_open=clickedIndex;
3773animating=false;
3774methods.remove_video();
3775if(ajax_call){
3776the_body.trigger('av_resize_finished');
3777$.avia_utilities.activate_shortcode_scripts(content_retrieved[post_id]);
3778$.avia_utilities.avia_ajax_call(content_retrieved[post_id]);
3779ajax_call=false;
3780}});
3781});
3782}},
3783ajax_get_contents: function(post_id, clickedIndex){
3784if(content_retrieved[post_id]!==undefined){
3785methods.show_item(post_id, clickedIndex);
3786return;
3787}
3788var template=$('#avia-tmpl-portfolio-preview-' + post_id.replace(/ID_/,""));
3789if(template.length==0){
3790setTimeout(function(){ methods.ajax_get_contents(post_id, clickedIndex); return; }, 500);
3791}
3792content_retrieved[post_id]=template.html();
3793content_retrieved[post_id]=content_retrieved[post_id].replace('','').replace('*]]>','');
3794methods.attach_item(post_id);
3795$.avia_utilities.preload({container: content_retrieved[post_id] , single_callback:  function(){ methods.show_item(post_id, clickedIndex); }});
3796},
3797add_controls: function(){
3798controls=target_wrap.find('.ajax_controlls');
3799target_wrap.avia_keyboard_controls({27:'.avia_close', 37:'.ajax_previous', 39:'.ajax_next'});
3800items.each(function(){
3801var current=$(this), overlay;
3802current.addClass('no_combo').on('click', function(event){
3803overlay=current.find('.slideshow_overlay');
3804if(overlay.length){
3805event.stopPropagation();
3806methods.load_item.apply(current.find('a').eq(0));
3807return false;
3808}});
3809});
3810},
3811control_click: function(){
3812var showItem,
3813activeID=container.find('.active_portfolio_item').data('ajax-id'),
3814active=container.find('.post-entry-'+activeID);
3815switch(this.hash){
3816case '#next':
3817showItem=active.nextAll('.post-entry:visible').eq(0).find('a').eq(0);
3818if(!showItem.length){ showItem=$('.post-entry:visible', container).eq(0).find('a').eq(0); }
3819showItem.trigger('click');
3820break;
3821case '#prev':
3822showItem=active.prevAll('.post-entry:visible').eq(0).find('a').eq(0);
3823if(!showItem.length){ showItem=$('.post-entry:visible', container).last().find('a').eq(0); }
3824showItem.trigger('click');
3825break;
3826case '#close':
3827animating=true;
3828target_wrap.slideUp(options.timing, options.easing, function(){
3829container.find('.active_portfolio_item').removeClass('active_portfolio_item');
3830content_retrieved[is_open].attr({'style':""}).removeClass('open_slide');
3831target_wrap.removeClass('open_container');
3832animating=is_open=index_open=false;
3833methods.remove_video();
3834the_body.trigger('av_resize_finished');
3835});
3836break;
3837}
3838return false;
3839},
3840resize_reset: function(){
3841if(is_open===false){
3842target_container.html('');
3843content_retrieved=[];
3844}}
3845};
3846methods.add_controls();
3847container.on("click", "a", methods.load_item);
3848controls.on("click", "a", methods.control_click);
3849win.on('debouncedresize', methods.resize_reset);
3850});
3851};}(jQuery));
3852(function($){
3853"use strict";
3854$.fn.avia_sc_progressbar=function(options){
3855return this.each(function(){
3856var container=$(this), elements=container.find('.avia-progress-bar');
3857container.on('avia_start_animation', function(){
3858elements.each(function(i){
3859var element=$(this);
3860setTimeout(function(){
3861element.find('.progress').addClass('avia_start_animation');
3862element.find('.progressbar-percent').avia_sc_animated_number({
3863instant_start:true, simple_up:true, start_timer: 10
3864});
3865}, (i * 250));
3866});
3867});
3868});
3869};}(jQuery));
3870(function($){
3871"use strict";
3872$.AviaVideoAPI=function(options, video, option_container){
3873this.videoElement=video;
3874this.$video=$(video);
3875this.$option_container=option_container ? $(option_container):this.$video;
3876this.load_btn=this.$option_container.find('.av-click-to-play-overlay');
3877this.video_wrapper=this.$video.parents('ul').eq(0);
3878this.lazy_load=this.video_wrapper.hasClass('av-show-video-on-click') ? true:false;
3879this.isMobile=$.avia_utilities.isMobile;
3880this.fallback=this.isMobile ? this.$option_container.is('.av-mobile-fallback-image'):false;
3881if(this.fallback) return;
3882this._init(options);
3883}
3884$.AviaVideoAPI.defaults={
3885loop: false,
3886mute: false,
3887controls: false,
3888events: 'play pause mute unmute loop toggle reset unload'
3889};
3890$.AviaVideoAPI.apiFiles =
3891{
3892youtube:{loaded: false, src: 'https://www.youtube.com/iframe_api' }}
3893$.AviaVideoAPI.players =
3894{
3895}
3896$.AviaVideoAPI.prototype =
3897{
3898_init: function(options){
3899this.options=this._setOptions(options);
3900this.type=this._getPlayerType();
3901this.player=false;
3902this._bind_player();
3903this.eventsBound=false;
3904this.playing=false;
3905this.$option_container.addClass('av-video-paused');
3906this.pp=$.avia_utilities.playpause(this.$option_container);
3907},
3908_setOptions: function(options){
3909var newOptions=$.extend(true, {}, $.AviaVideoAPI.defaults, options),
3910htmlData=this.$option_container.data(),
3911i="";
3912for (i in htmlData){
3913if(htmlData.hasOwnProperty(i)&&(typeof htmlData[i]==="string"||typeof htmlData[i]==="number"||typeof htmlData[i]==="boolean")){
3914newOptions[i]=htmlData[i];
3915}}
3916return newOptions;
3917},
3918_getPlayerType: function(){
3919var vid_src=this.$video.get(0).src||this.$video.data('src');
3920if(this.$video.is('video')) 				return 'html5';
3921if(this.$video.is('.av_youtube_frame')) 	return 'youtube';
3922if(vid_src.indexOf('vimeo.com')!=-1) 	return 'vimeo';
3923if(vid_src.indexOf('youtube.com')!=-1) 	return 'youtube';
3924},
3925_bind_player: function(){
3926var _self=this;
3927var cookie_check=$('html').hasClass('av-cookies-needs-opt-in')||$('html').hasClass('av-cookies-can-opt-out');
3928var allow_continue=true;
3929var silent_accept_cookie=$('html').hasClass('av-cookies-user-silent-accept');
3930var self_hosted='html5'==this.type;
3931if(cookie_check&&! silent_accept_cookie&&! self_hosted){
3932if(! document.cookie.match(/aviaCookieConsent/)||$('html').hasClass('av-cookies-session-refused')){
3933allow_continue=false;
3934}else{
3935if(! document.cookie.match(/aviaPrivacyRefuseCookiesHideBar/)){
3936allow_continue=false;
3937}
3938else if(! document.cookie.match(/aviaPrivacyEssentialCookiesEnabled/)){
3939allow_continue=false;
3940}
3941else if(document.cookie.match(/aviaPrivacyVideoEmbedsDisabled/)){
3942allow_continue=false;
3943}}
3944}
3945if(! allow_continue){
3946this._use_external_link();
3947return;
3948}
3949if(this.lazy_load&&this.load_btn.length&&this.type!="html5"){
3950this.$option_container.addClass('av-video-lazyload');
3951this.load_btn.on('click', function(){
3952_self.load_btn.remove();
3953_self._setPlayer();
3954});
3955}else{
3956this.lazy_load=false;
3957this._setPlayer();
3958}},
3959_use_external_link: function(){
3960this.$option_container.addClass('av-video-lazyload');
3961this.load_btn.on('click', function(e){
3962if(e.originalEvent===undefined) return;
3963var src_url=$(this).parents('.avia-slide-wrap').find('div[data-original_url]').data('original_url');
3964if(src_url) window.open(src_url , '_blank');
3965});
3966},
3967_setPlayer: function(){
3968var _self=this;
3969switch(this.type){
3970case "html5":
3971this.player=this.$video.data('mediaelementplayer');
3972if(!this.player){
3973this.$video.data('mediaelementplayer', $.AviaVideoAPI.players[ this.$video.attr('id').replace(/_html5/,'') ]);
3974this.player=this.$video.data('mediaelementplayer');
3975}
3976this._playerReady();
3977break;
3978case "vimeo":
3979var ifrm=document.createElement("iframe");
3980var $ifrm=$(ifrm);
3981ifrm.onload=function(){
3982_self.player=Froogaloop(ifrm);
3983_self._playerReady();
3984_self.$option_container.trigger('av-video-loaded');
3985};
3986ifrm.setAttribute("src", this.$video.data('src'));
3987$ifrm.insertAfter(this.$video);
3988this.$video.remove();
3989this.$video=ifrm;
3990break;
3991case "youtube":
3992this._getAPI(this.type);
3993$('body').on('av-youtube-iframe-api-loaded', function(){ _self._playerReady(); });
3994break;
3995}},
3996_getAPI: function(api){
3997if($.AviaVideoAPI.apiFiles[api].loaded===false){
3998$.AviaVideoAPI.apiFiles[api].loaded=true;
3999var tag=document.createElement('script'),
4000first=document.getElementsByTagName('script')[0];
4001tag.src=$.AviaVideoAPI.apiFiles[api].src;
4002first.parentNode.insertBefore(tag, first);
4003}},
4004_playerReady: function(){
4005var _self=this;
4006this.$option_container.on('av-video-loaded', function(){ _self._bindEvents(); });
4007switch(this.type){
4008case "html5":
4009this.$video.on('av-mediajs-loaded', function(){ _self.$option_container.trigger('av-video-loaded'); });
4010this.$video.on('av-mediajs-ended' , function(){ _self.$option_container.trigger('av-video-ended');  });
4011break;
4012case "vimeo":
4013_self.player.addEvent('ready',  function(){ _self.$option_container.trigger('av-video-loaded');
4014_self.player.addEvent('finish', function(){ _self.$option_container.trigger('av-video-ended');  });
4015});
4016break;
4017case "youtube":
4018var params=_self.$video.data();
4019if(_self._supports_video()) params.html5=1;
4020_self.player=new YT.Player(_self.$video.attr('id'), {
4021videoId: params.videoid,
4022height: _self.$video.attr('height'),
4023width: _self.$video.attr('width'),
4024playerVars: params,
4025events: {
4026'onReady': function(){ _self.$option_container.trigger('av-video-loaded'); },
4027'onError': function(player){ $.avia_utilities.log('YOUTUBE ERROR:', 'error', player); },
4028'onStateChange': function(event){
4029if(event.data===YT.PlayerState.ENDED){
4030var command=_self.options.loop!=false ? 'loop':'av-video-ended';
4031_self.$option_container.trigger(command);
4032}}
4033}});
4034break;
4035}
4036setTimeout(function(){
4037if(_self.eventsBound==true||typeof _self.eventsBound=='undefined'||_self.type=='youtube'){ return; }
4038$.avia_utilities.log('Fallback Video Trigger "'+_self.type+'":', 'log', _self);
4039_self.$option_container.trigger('av-video-loaded');
4040},2000);
4041},
4042_bindEvents: function(){
4043if(this.eventsBound==true||typeof this.eventsBound=='undefined'){
4044return;
4045}
4046var _self=this, volume='unmute';
4047this.eventsBound=true;
4048this.$option_container.on(this.options.events, function(e){
4049_self.api(e.type);
4050});
4051if(!_self.isMobile){
4052if(this.options.mute!=false){ volume="mute"; 	 }
4053if(this.options.loop!=false){ _self.api('loop'); }
4054_self.api(volume);
4055}
4056setTimeout(function(){
4057_self.$option_container.trigger('av-video-events-bound').addClass('av-video-events-bound');
4058},50);
4059},
4060_supports_video: function(){
4061return !!document.createElement('video').canPlayType;
4062},
4063api: function(action){
4064if(this.isMobile&&!this.was_started()) return;
4065if(this.options.events.indexOf(action)===-1) return;
4066this.$option_container.trigger('av-video-'+action+'-executed');
4067if(typeof this[ '_' + this.type + '_' + action]=='function'){
4068this[ '_' + this.type + '_' + action].call(this);
4069}
4070if(typeof this[ '_' + action]=='function'){
4071this[ '_' + action].call(this);
4072}},
4073was_started: function(){
4074if(!this.player) return false;
4075switch(this.type){
4076case "html5":
4077if(this.player.getCurrentTime() > 0) return true;
4078break;
4079case "vimeo":
4080if(this.player.api('getCurrentTime') > 0) return true;
4081break;
4082case "youtube":
4083if(this.player.getPlayerState()!==-1) return true;
4084break;
4085}
4086return false;
4087},
4088_play: function(){
4089this.playing=true;
4090this.$option_container.addClass('av-video-playing').removeClass('av-video-paused');
4091},
4092_pause: function(){
4093this.playing=false;
4094this.$option_container.removeClass('av-video-playing').addClass('av-video-paused');
4095},
4096_loop: function(){
4097this.options.loop=true;
4098},
4099_toggle: function(){
4100var command=this.playing==true ? 'pause':'play';
4101this.api(command);
4102this.pp.set(command);
4103},
4104_vimeo_play: function(){
4105this.player.api('play');
4106},
4107_vimeo_pause: function(){
4108this.player.api('pause');
4109},
4110_vimeo_mute: function(){
4111this.player.api('setVolume', 0);
4112},
4113_vimeo_unmute: function(){
4114this.player.api('setVolume', 0.7);
4115},
4116_vimeo_loop: function(){
4117},
4118_vimeo_reset: function(){
4119this.player.api('seekTo',0);
4120},
4121_vimeo_unload: function(){
4122this.player.api('unload');
4123},
4124_youtube_play: function(){
4125this.player.playVideo();
4126},
4127_youtube_pause: function(){
4128this.player.pauseVideo()
4129},
4130_youtube_mute: function(){
4131this.player.mute();
4132},
4133_youtube_unmute: function(){
4134this.player.unMute();
4135},
4136_youtube_loop: function(){
4137if(this.playing==true) this.player.seekTo(0);
4138},
4139_youtube_reset: function(){
4140this.player.stopVideo();
4141},
4142_youtube_unload: function(){
4143this.player.clearVideo();
4144},
4145_html5_play: function(){
4146if(this.player){
4147this.player.options.pauseOtherPlayers=false;
4148this.player.play();
4149}},
4150_html5_pause: function(){
4151if(this.player) this.player.pause();
4152},
4153_html5_mute: function(){
4154if(this.player) this.player.setMuted(true);
4155},
4156_html5_unmute: function(){
4157if(this.player) this.player.setVolume(0.7);
4158},
4159_html5_loop: function(){
4160if(this.player) this.player.options.loop=true;
4161},
4162_html5_reset: function(){
4163if(this.player) this.player.setCurrentTime(0);
4164},
4165_html5_unload: function(){
4166this._html5_pause();
4167this._html5_reset();
4168}}
4169$.fn.aviaVideoApi=function(options , apply_to_parent){
4170return this.each(function(){
4171var applyTo=this;
4172if(apply_to_parent){
4173applyTo=$(this).parents(apply_to_parent).get(0);
4174}
4175var self=$.data(applyTo, 'aviaVideoApi');
4176if(!self){
4177self=$.data(applyTo, 'aviaVideoApi', new $.AviaVideoAPI(options, this, applyTo));
4178}});
4179}})(jQuery);
4180window.onYouTubeIframeAPIReady=function(){ jQuery('body').trigger('av-youtube-iframe-api-loaded'); };
4181var Froogaloop=(function(){
4182function Froogaloop(iframe){
4183return new Froogaloop.fn.init(iframe);
4184}
4185var eventCallbacks={},
4186hasWindowEvent=false,
4187isReady=false,
4188slice=Array.prototype.slice,
4189playerOrigin='*';
4190Froogaloop.fn=Froogaloop.prototype={
4191element: null,
4192init: function(iframe){
4193if(typeof iframe==="string"){
4194iframe=document.getElementById(iframe);
4195}
4196this.element=iframe;
4197return this;
4198},
4199api: function(method, valueOrCallback){
4200if(!this.element||!method){
4201return false;
4202}
4203var self=this,
4204element=self.element,
4205target_id=element.id!=='' ? element.id:null,
4206params = !isFunction(valueOrCallback) ? valueOrCallback:null,
4207callback=isFunction(valueOrCallback) ? valueOrCallback:null;
4208if(callback){
4209storeCallback(method, callback, target_id);
4210}
4211postMessage(method, params, element);
4212return self;
4213},
4214addEvent: function(eventName, callback){
4215if(!this.element){
4216return false;
4217}
4218var self=this,
4219element=self.element,
4220target_id=element.id!=='' ? element.id:null;
4221storeCallback(eventName, callback, target_id);
4222if(eventName!='ready'){
4223postMessage('addEventListener', eventName, element);
4224}
4225else if(eventName=='ready'&&isReady){
4226callback.call(null, target_id);
4227}
4228return self;
4229},
4230removeEvent: function(eventName){
4231if(!this.element){
4232return false;
4233}
4234var self=this,
4235element=self.element,
4236target_id=element.id!=='' ? element.id:null,
4237removed=removeCallback(eventName, target_id);
4238if(eventName!='ready'&&removed){
4239postMessage('removeEventListener', eventName, element);
4240}}
4241};
4242function postMessage(method, params, target){
4243if(!target.contentWindow.postMessage){
4244return false;
4245}
4246var data=JSON.stringify({
4247method: method,
4248value: params
4249});
4250target.contentWindow.postMessage(data, playerOrigin);
4251}
4252function onMessageReceived(event){
4253var data, method;
4254try {
4255data=JSON.parse(event.data);
4256method=data.event||data.method;
4257}
4258catch(e){
4259}
4260if(method=='ready'&&!isReady){
4261isReady=true;
4262}
4263if(!(/^https?:\/\/player.vimeo.com/).test(event.origin)){
4264return false;
4265}
4266if(playerOrigin==='*'){
4267playerOrigin=event.origin;
4268}
4269var value=data.value,
4270eventData=data.data,
4271target_id=target_id==='' ? null:data.player_id,
4272callback=getCallback(method, target_id),
4273params=[];
4274if(!callback){
4275return false;
4276}
4277if(value!==undefined){
4278params.push(value);
4279}
4280if(eventData){
4281params.push(eventData);
4282}
4283if(target_id){
4284params.push(target_id);
4285}
4286return params.length > 0 ? callback.apply(null, params):callback.call();
4287}
4288function storeCallback(eventName, callback, target_id){
4289if(target_id){
4290if(!eventCallbacks[target_id]){
4291eventCallbacks[target_id]={};}
4292eventCallbacks[target_id][eventName]=callback;
4293}else{
4294eventCallbacks[eventName]=callback;
4295}}
4296function getCallback(eventName, target_id){
4297if(target_id&&eventCallbacks[target_id]&&eventCallbacks[target_id][eventName]){
4298return eventCallbacks[target_id][eventName];
4299}else{
4300return eventCallbacks[eventName];
4301}}
4302function removeCallback(eventName, target_id){
4303if(target_id&&eventCallbacks[target_id]){
4304if(!eventCallbacks[target_id][eventName]){
4305return false;
4306}
4307eventCallbacks[target_id][eventName]=null;
4308}else{
4309if(!eventCallbacks[eventName]){
4310return false;
4311}
4312eventCallbacks[eventName]=null;
4313}
4314return true;
4315}
4316function isFunction(obj){
4317return !!(obj&&obj.constructor&&obj.call&&obj.apply);
4318}
4319function isArray(obj){
4320return toString.call(obj)==='[object Array]';
4321}
4322Froogaloop.fn.init.prototype=Froogaloop.fn;
4323if(window.addEventListener){
4324window.addEventListener('message', onMessageReceived, false);
4325}else{
4326window.attachEvent('onmessage', onMessageReceived);
4327}
4328return (window.Froogaloop=window.$f=Froogaloop);
4329})();
4330(function($){
4331"use strict";
4332$.AviaFullscreenSlider=function(options, slider){
4333this.$slider=$(slider);
4334this.$inner=this.$slider.find('.avia-slideshow-inner');
4335this.$innerLi=this.$inner.find('>li');
4336this.$caption=this.$inner.find('.avia-slide-wrap .caption_container');
4337this.$win=$(window);
4338this.isMobile=$.avia_utilities.isMobile;
4339this.property={};
4340this.scrollPos="0";
4341this.transform3d=document.documentElement.className.indexOf('avia_transform3d')!==-1 ? true:false;
4342this.ticking=false;
4343if($.avia_utilities.supported.transition===undefined){
4344$.avia_utilities.supported.transition=$.avia_utilities.supports('transition');
4345}
4346this._init(options);
4347}
4348$.AviaFullscreenSlider.defaults={
4349height: 100,
4350subtract: '#wpadminbar, #header, #main>.title_container'
4351};
4352$.AviaFullscreenSlider.prototype =
4353{
4354_init: function(options){
4355var _self=this;
4356this.options=$.extend(true, {}, $.AviaFullscreenSlider.defaults, options);
4357if(this.$slider.data('slide_height')) this.options.height=this.$slider.data('slide_height');
4358this.options.parallax_enabled=this.$slider.data('image_attachment')=="" ? true:false;
4359this.$subtract=$(this.options.subtract);
4360this._setSize();
4361this.$win.on('debouncedresize',  $.proxy(this._setSize, this));
4362setTimeout(function(){
4363if(!_self.isMobile&&_self.options.parallax_enabled){
4364_self.$win.on('scroll', $.proxy(_self._on_scroll, _self));
4365}},100);
4366this.$slider.aviaSlider({bg_slider:true});
4367},
4368_on_scroll: function(e){
4369var _self=this;
4370if(!_self.ticking){
4371_self.ticking=true;
4372window.requestAnimationFrame($.proxy(_self._parallax_scroll, _self));
4373}},
4374_fetch_properties: function(slide_height){
4375this.property.offset=this.$slider.offset().top;
4376this.property.wh=this.$win.height();
4377this.property.height=slide_height||this.$slider.outerHeight();
4378this._parallax_scroll();
4379},
4380_setSize: function(){
4381if(!$.fn.avia_browser_height){
4382var viewport=this.$win.height(),
4383slide_height=Math.ceil((viewport / 100) * this.options.height);
4384if(this.$subtract.length&&this.options.height==100){
4385this.$subtract.each(function(){
4386slide_height -=this.offsetHeight - 0.5;
4387});
4388}else{
4389slide_height -=1;
4390}
4391this.$slider.height(slide_height).removeClass('av-default-height-applied');
4392this.$inner.css('padding',0);
4393}
4394this._fetch_properties(slide_height);
4395},
4396_parallax_scroll: function(e){
4397if(this.isMobile||! this.options.parallax_enabled) return;
4398var winTop=this.$win.scrollTop(),
4399winBottom=winTop + this.property.wh,
4400scrollPos="0",
4401prop={}, prop2={};
4402if(this.property.offset < winTop&&winTop <=this.property.offset + this.property.height){
4403scrollPos=Math.round((winTop - this.property.offset) * 0.3);
4404}
4405if(this.scrollPos!=scrollPos){
4406this.scrollPos=scrollPos;
4407if(this.transform3d){
4408prop[$.avia_utilities.supported.transition+"transform"]="translate3d(0px,"+ scrollPos +"px,0px)";
4409}else{
4410prop[$.avia_utilities.supported.transition+"transform"]="translate(0px,"+ scrollPos +"px)";
4411}
4412this.$inner.css(prop);
4413}
4414this.ticking=false;
4415}};
4416$.fn.aviaFullscreenSlider=function(options){
4417return this.each(function(){
4418var active=$.data(this, 'aviaFullscreenSlider');
4419if(!active){
4420$.data(this, 'aviaFullscreenSlider', 1);
4421new $.AviaFullscreenSlider(options, this);
4422}});
4423}})(jQuery);
4424(function($){
4425"use strict";
4426$.fn.layer_slider_height_helper=function(options){
4427return this.each(function(){
4428var container=$(this),
4429first_div=container.find('>div').first(),
4430timeout=false,
4431counter=0,
4432reset_size=function(){
4433if(first_div.height() > 0||counter > 5){
4434container.height('auto');
4435}else{
4436timeout=setTimeout(reset_size, 500);
4437counter++;
4438}};
4439if(! first_div.length){
4440return;
4441}
4442timeout=setTimeout(reset_size, 0);
4443});
4444};}(jQuery));
4445(function($){
4446"use strict";
4447$.fn.avia_sc_tab_section=function(){
4448var win=$(window),
4449browserPrefix=$.avia_utilities.supports('transition'),
4450cssActive=this.browserPrefix!==false ? true:false,
4451isMobile=$.avia_utilities.isMobile,
4452transform3d=document.documentElement.className.indexOf('avia_transform3d')!==-1 ? true:false,
4453transition={};
4454return this.each(function(){
4455var container=$(this),
4456tabs=container.find('.av-section-tab-title'),
4457tab_outer=container.find('.av-tab-section-outer-container'),
4458tab_wrap=container.find('.av-tab-section-tab-title-container'),
4459tab_nav=container.find('.av_tab_navigation'),
4460arrows_wrap=container.find('.av-tabsection-arrow'),
4461arrows=arrows_wrap.find('.av-tab-section-slide'),
4462content_wrap=container.find('.av-tab-section-inner-container'),
4463single_tabs=container.find('.av-animation-delay-container'),
4464inner_content=container.find('.av-layout-tab-inner'),
4465sliding_active=container.is('.av-tab-slide-transition'),
4466flexible=container.is('.av-tab-content-auto'),
4467current_content=container.find('.__av_init_open'),
4468min_width=0,
4469change_tab=function(e, prevent_hash){
4470e.preventDefault();
4471var current_tab=$(e.currentTarget),
4472current_arrow=current_tab.find('.av-tab-arrow-container span'),
4473tab_nr=current_tab.data('av-tab-section-title');
4474current_content=container.find('[data-av-tab-section-content="'+tab_nr+'"]');
4475var prev_container=container.find('.av-active-tab-content').not('[data-av-tab-section-content="'+tab_nr+'"]');
4476tabs.removeClass('av-active-tab-title');
4477current_tab.removeClass('no-scroll');
4478current_tab.addClass('av-active-tab-title');
4479current_content.addClass('av-active-tab-content');
4480var new_pos=(( parseInt(tab_nr, 10) - 1) * -100);
4481if($('body').hasClass('rtl')){
4482new_pos=(( parseInt(tab_nr,10) - 1) * 100);
4483}
4484if(cssActive){
4485new_pos=new_pos / tabs.length;
4486transition['transform']=transform3d ? "translate3d(" + new_pos  + "%, 0, 0)":"translate(" + new_pos + "%,0)";
4487transition['left']="0%";
4488content_wrap.css(transition);
4489}else{
4490content_wrap.css('left', new_pos + "%");
4491}
4492set_tab_title_pos();
4493set_slide_height();
4494if(! prevent_hash){
4495location.hash=current_tab.attr('href');
4496}
4497setTimeout(function(){
4498current_content.trigger('avia_start_animation_if_current_slide_is_active');
4499if(! isMobile){
4500single_tabs.not(current_content).trigger('avia_remove_animation');
4501}}, 600);
4502},
4503set_min_width=function(){
4504min_width=0;
4505tabs.each(function(){
4506min_width +=$(this).outerWidth();
4507});
4508tab_wrap.css('min-width', min_width);
4509},
4510set_slide_height=function(){
4511if(current_content.length&&flexible){
4512inner_content.height('auto');
4513var content_height=current_content.find('.av-layout-tab-inner').height(),
4514height=current_content.outerHeight(),
4515add_height=tab_wrap.height();
4516tab_outer.css('max-height', height + add_height + 100);
4517inner_content.height(content_height);
4518inner_content.css('overflow', 'hidden');
4519setTimeout(function(){ win.trigger('av-height-change'); }, 600);
4520}},
4521set_tab_title_pos=function(){
4522var current_tab=container.find('.av-active-tab-title'),
4523viewport=container.width(),
4524left_pos=(current_tab.position().left * - 1) -(current_tab.outerWidth() / 2) +(viewport / 2);
4525if(! $('body').hasClass('rtl')){
4526if(viewport >=min_width){
4527left_pos=0;
4528}
4529if(left_pos + min_width < viewport){
4530left_pos=(min_width - viewport) * -1;
4531}
4532if(left_pos > 0){
4533left_pos=0;
4534}
4535tab_wrap.css('left', left_pos);
4536var show_prev=left_pos!==0;
4537var show_next=left_pos + min_width > viewport;
4538set_arrows_visibility(show_prev, show_next);
4539}else{
4540var right_pos=0;
4541if(viewport < min_width){
4542if(left_pos + min_width > viewport){
4543if(left_pos > 0){
4544left_pos=0;
4545}
4546right_pos=(left_pos + min_width - viewport) * -1;
4547}}
4548tab_wrap.css('left', 'auto');
4549tab_wrap.css('right', right_pos);
4550var show_prev=right_pos + min_width > viewport;
4551var show_next=right_pos!==0;
4552set_arrows_visibility(show_prev, show_next);
4553}},
4554set_arrows_visibility=function(show_prev, show_next){
4555if(show_prev){
4556arrows_wrap.addClass('av-visible-prev');
4557}else{
4558arrows_wrap.removeClass('av-visible-prev');
4559}
4560if(show_next){
4561arrows_wrap.addClass('av-visible-next');
4562}else{
4563arrows_wrap.removeClass('av-visible-next');
4564}},
4565swipe_to_next_prev=function(e){
4566if(! isMobile){
4567return;
4568}
4569switch_to_next_prev(e);
4570},
4571switch_to_next_prev=function(e){
4572e.preventDefault();
4573var clicked=$(e.currentTarget),
4574current_tab=container.find('.av-active-tab-title');
4575if(clicked.is('.av_prev_tab_section')){
4576if(! $('body').hasClass('rtl')){
4577current_tab.prev('.av-section-tab-title').trigger('click');
4578}else{
4579current_tab.next('.av-section-tab-title').trigger('click');
4580}}else{
4581if(! $('body').hasClass('rtl')){
4582current_tab.next('.av-section-tab-title').trigger('click');
4583}else{
4584current_tab.prev('.av-section-tab-title').trigger('click');
4585}}
4586},
4587get_init_open=function(){
4588if(! hash&&window.location.hash) var hash=window.location.hash;
4589var open=tabs.filter('[href="'+hash+'"]');
4590if(open.length){
4591if(!open.is('.active_tab')) open.trigger('click');
4592}else{
4593container.find('.av-active-tab-title').trigger('click', true);
4594}};
4595$.avia_utilities.preload({
4596container: current_content,
4597single_callback:  function(){
4598tabs.on('click', change_tab);
4599tab_nav.on('click', swipe_to_next_prev);
4600arrows.on('click', switch_to_next_prev);
4601win.on('debouncedresize', set_tab_title_pos);
4602win.on('debouncedresize av-content-el-height-changed', set_slide_height);
4603set_min_width();
4604set_slide_height();
4605get_init_open();
4606}});
4607content_wrap.avia_swipe_trigger({prev:'.av_prev_tab_section', next:'.av_next_tab_section'});
4608});
4609};}(jQuery));
4610(function($){
4611"use strict";
4612$.fn.avia_sc_tabs=function(options){
4613var defaults =
4614{
4615heading: '.tab',
4616content:'.tab_content',
4617active:'active_tab',
4618sidebar: false
4619};
4620var win=$(window),
4621options=$.extend(defaults, options);
4622return this.each(function(){
4623var container=$(this),
4624tab_titles=$('<div class="tab_titles"></div>').prependTo(container),
4625tabs=$(options.heading, container),
4626content=$(options.content, container),
4627newtabs=false,
4628oldtabs=false;
4629newtabs=tabs.clone();
4630oldtabs=tabs.addClass('fullsize-tab').attr('aria-hidden', true);
4631tabs=newtabs;
4632tabs.prependTo(tab_titles).each(function(i){
4633var tab=$(this),
4634the_oldtab=false;
4635if(newtabs){
4636the_oldtab=oldtabs.eq(i);
4637}
4638tab.addClass('tab_counter_'+i).on('click', function(){
4639open_content(tab, i, the_oldtab);
4640return false;
4641});
4642tab.on('keydown', function(objEvent){
4643if(objEvent.keyCode===13){
4644tab.trigger('click');
4645}});
4646if(newtabs){
4647the_oldtab.on('click', function(){
4648open_content(the_oldtab, i, tab);
4649return false;
4650});
4651the_oldtab.on('keydown', function(objEvent){
4652if(objEvent.keyCode===13){
4653the_oldtab.trigger('click');
4654}});
4655}});
4656set_size();
4657trigger_default_open(false);
4658win.on("debouncedresize", set_size);
4659$('a').on('click',function(){
4660var hash=$(this).attr('href');
4661if(typeof hash!="undefined"&&hash){
4662hash=hash.replace(/^.*?#/,'');
4663trigger_default_open('#'+hash);
4664}});
4665function set_size(){
4666if(! options.sidebar){
4667return;
4668}
4669content.css({'min-height': tab_titles.outerHeight() + 1});
4670}
4671function open_content(tab, i, alternate_tab){
4672if(!tab.is('.'+options.active)){
4673$('.'+options.active, container).removeClass(options.active);
4674$('.'+options.active+'_content', container).attr('aria-hidden', true).removeClass(options.active+'_content');
4675tab.addClass(options.active);
4676var new_loc=tab.data('fake-id');
4677if(typeof new_loc=='string'){
4678window.location.replace(new_loc);
4679}
4680if(alternate_tab){
4681alternate_tab.addClass(options.active);
4682}
4683var active_c=content.eq(i).addClass(options.active+'_content').attr('aria-hidden', false);
4684if(typeof click_container!='undefined'&&click_container.length){
4685sidebar_shadow.height(active_c.outerHeight());
4686}
4687var el_offset=active_c.offset().top,
4688scoll_target=el_offset - 50 - parseInt($('html').css('margin-top'),10);
4689if(win.scrollTop() > el_offset){
4690$('html:not(:animated),body:not(:animated)').scrollTop(scoll_target);
4691}}
4692win.trigger('av-content-el-height-changed', tab);
4693}
4694function trigger_default_open(hash){
4695if(! hash&&window.location.hash){
4696hash=window.location.hash;
4697}
4698if(! hash){
4699return;
4700}
4701var open=tabs.filter('[data-fake-id="'+hash+'"]');
4702if(open.length){
4703if(! open.is('.active_tab')){
4704open.trigger('click');
4705}
4706window.scrollTo(0, container.offset().top - 70);
4707}}
4708});
4709};}(jQuery));
4710(function($){
4711"use strict";
4712$(window).on('load', function (e){
4713if($.AviaSlider){
4714$('.avia-timeline-container').avia_sc_timeline();
4715}});
4716$.fn.avia_sc_timeline=function (options){
4717return this.each(function (){
4718var container=this,
4719timeline_id='#' + $(this).attr('id'),
4720timeline=$(timeline_id),
4721methods;
4722methods =
4723{
4724matchHeights: function(){
4725this.setMinHeight($(timeline_id + ' .av-milestone-placement-top .av-milestone-date'), true);
4726this.setMinHeight($(timeline_id + ' .av-milestone-placement-bottom .av-milestone-content-wrap'), true);
4727this.setMinHeight($(timeline_id + ' .av-milestone-placement-bottom.avia-timeline-boxshadow .av-milestone-contentbox'), false);
4728this.setMinHeight($(timeline_id + ' .av-milestone-placement-top.avia-timeline-boxshadow .av-milestone-contentbox'), false);
4729this.setMinHeight($(timeline_id + ' .avia-timeline-horizontal.av-milestone-placement-alternate li >:first-child'), true);
4730},
4731setMinHeight: function(els, setNav){
4732if(els.length < 2){
4733return;
4734}
4735var elsHeights=new Array();
4736els.css('min-height','0').each(function(i){
4737var current=$(this);
4738var currentHeight=current.outerHeight(true);
4739elsHeights.push(currentHeight);
4740});
4741var largest=Math.max.apply(null, elsHeights);
4742els.css('min-height', largest);
4743if(setNav){
4744var $firstElement=els.first(),
4745$parent=$firstElement.closest('.avia-timeline-container'),
4746$pos=$firstElement.height();
4747$parent.find('.av-timeline-nav').css('top',$pos);
4748}},
4749createCarousel:function(e){
4750var self=this,
4751slider=$(timeline_id + '.avia-slideshow-carousel'),
4752slides_num=3,
4753slides_num_small=1;
4754if(timeline.attr('avia-data-slides')){
4755slides_num=parseInt(timeline.attr('avia-data-slides'));
4756}
4757if(slides_num >=2){
4758slides_num_small=2;
4759}
4760var sliderOptions={
4761carousel:'yes',
4762keep_pading:true,
4763carouselSlidesToShow:slides_num,
4764carouselSlidesToScroll:3,
4765carouselResponsive:[
4766{
4767breakpoint: 989,
4768settings: {
4769carouselSlidesToShow: slides_num_small,
4770carouselSlidesToScroll: slides_num_small
4771}},
4772{
4773breakpoint: 767,
4774settings: {
4775carouselSlidesToShow: 1,
4776carouselSlidesToScroll: 1
4777}}
4778]
4779};
4780slider.aviaSlider(sliderOptions);
4781slider.on('_kickOff',function(){
4782self.matchHeights();
4783});
4784$(window).on('resize', function(){
4785self.matchHeights();
4786});
4787},
4788layoutHelpers:function(e){
4789$(timeline_id + ' .avia-timeline-vertical li').each(function(index, element){
4790var $length=$(this).parents('ul').find('li').length;
4791var $icon_wrap=$(this).find('.av-milestone-icon-wrap');
4792var $icon_wrap_height=$icon_wrap.outerHeight(true);
4793var $icon_wrap_height_half=parseInt($icon_wrap_height / 2);
4794if(index===($length - 1)){
4795$icon_wrap.css({
4796'height': $icon_wrap_height_half
4797});
4798}else{
4799$icon_wrap.css({
4800'height': $icon_wrap_height
4801});
4802}});
4803},
4804fireAnimations:function(e){
4805if($(timeline_id + ' > ul').hasClass('avia-timeline-vertical')){
4806var milestone=timeline.find('.av-milestone');
4807timeline.on('avia_start_animation', function(){
4808milestone.each(function(i){
4809var element=$(this);
4810setTimeout(function(){ element.addClass('avia_start_animation'); },(i * 350));
4811});
4812});
4813}}
4814};
4815methods.createCarousel();
4816methods.layoutHelpers();
4817methods.fireAnimations();
4818methods.matchHeights();
4819});
4820};})(jQuery);
4821(function($){
4822"use strict";
4823$.fn.avia_sc_toggle=function(options){
4824var defaults =
4825{
4826single: '.single_toggle',
4827heading: '.toggler',
4828content: '.toggle_wrap',
4829sortContainer:'.taglist'
4830};
4831var win=$(window),
4832options=$.extend(defaults, options);
4833return this.each(function(){
4834var container=$(this).addClass('enable_toggles'),
4835toggles=$(options.single, container),
4836heading=$(options.heading, container),
4837allContent=$(options.content, container),
4838sortLinks=$(options.sortContainer + " a", container),
4839preview=$('#av-admin-preview');
4840var activeStyle='',
4841headingStyle='';
4842heading.each(function(i){
4843var thisheading=$(this),
4844content=thisheading.next(options.content, container);
4845function scroll_to_viewport(){
4846var el_offset=content.offset().top,
4847scoll_target=el_offset - 50 - parseInt($('html').css('margin-top'),10);
4848if(win.scrollTop() > el_offset){
4849$('html:not(:animated),body:not(:animated)').animate({scrollTop: scoll_target},200);
4850}}
4851if(content.css('visibility')!="hidden"){
4852thisheading.addClass('activeTitle').attr('style',activeStyle);
4853}
4854thisheading.on('keydown', function(objEvent){
4855if(objEvent.keyCode===13){
4856thisheading.trigger('click');
4857}});
4858thisheading.on('click', function(){
4859if(content.css('visibility')!="hidden"){
4860content.slideUp(200, function(){
4861content.removeClass('active_tc').attr({style:''});
4862win.trigger('av-height-change');
4863win.trigger('av-content-el-height-changed', this);
4864if(preview.length==0){
4865location.replace(thisheading.data('fake-id') + "-closed");
4866}});
4867thisheading.removeClass('activeTitle').attr('style',headingStyle);
4868}else{
4869if(container.is('.toggle_close_all')){
4870allContent.not(content).slideUp(200, function(){
4871$(this).removeClass('active_tc').attr({style:''});
4872scroll_to_viewport();
4873});
4874heading.removeClass('activeTitle').attr('style',headingStyle);
4875}
4876content.addClass('active_tc');
4877setTimeout(function(){
4878content.slideDown(200, function(){
4879if(!container.is('.toggle_close_all')){
4880scroll_to_viewport();
4881}
4882win.trigger('av-height-change');
4883win.trigger('av-content-el-height-changed', this);
4884});
4885}, 1);
4886thisheading.addClass('activeTitle').attr('style',activeStyle);
4887if(preview.length==0){
4888location.replace(thisheading.data('fake-id'));
4889}}
4890});
4891});
4892sortLinks.on('click', function(e){
4893e.preventDefault();
4894var show=toggles.filter('[data-tags~="'+$(this).data('tag')+'"]'),
4895hide=toggles.not('[data-tags~="'+$(this).data('tag')+'"]');
4896sortLinks.removeClass('activeFilter');
4897$(this).addClass('activeFilter');
4898heading.filter('.activeTitle').trigger('click');
4899show.slideDown();
4900hide.slideUp();
4901});
4902function trigger_default_open(hash){
4903if(! hash&&window.location.hash){
4904hash=window.location.hash;
4905}
4906if(! hash){
4907return;
4908}
4909var open=heading.filter('[data-fake-id="'+hash+'"]');
4910if(open.length){
4911if(!open.is('.activeTitle')){
4912open.trigger('click');
4913}
4914window.scrollTo(0, container.offset().top - 70);
4915}}
4916trigger_default_open(false);
4917$('a').on('click', function(){
4918var hash=$(this).attr('href');
4919if(typeof hash!="undefined"&&hash){
4920hash=hash.replace(/^.*?#/,'');
4921trigger_default_open('#'+hash);
4922}});
4923});
4924};}(jQuery));
4925(function($){
4926"use strict";
4927$('body').on('click', '.av-lazyload-video-embed .av-click-to-play-overlay', function(e){
4928var clicked=$(this);
4929var cookie_check=$('html').hasClass('av-cookies-needs-opt-in')||$('html').hasClass('av-cookies-can-opt-out');
4930var allow_continue=true;
4931var silent_accept_cookie=$('html').hasClass('av-cookies-user-silent-accept');
4932if(cookie_check&&! silent_accept_cookie){
4933if(! document.cookie.match(/aviaCookieConsent/)||$('html').hasClass('av-cookies-session-refused')){
4934allow_continue=false;
4935}else{
4936if(! document.cookie.match(/aviaPrivacyRefuseCookiesHideBar/)){
4937allow_continue=false;
4938}
4939else if(! document.cookie.match(/aviaPrivacyEssentialCookiesEnabled/)){
4940allow_continue=false;
4941}
4942else if(document.cookie.match(/aviaPrivacyVideoEmbedsDisabled/)){
4943allow_continue=false;
4944}}
4945}
4946var container=clicked.parents('.av-lazyload-video-embed');
4947if(container.hasClass('avia-video-lightbox')&&container.hasClass('avia-video-standard-html')){
4948allow_continue=true;
4949}
4950if(! allow_continue){
4951if(typeof e.originalEvent=='undefined'){ return; }
4952var src_url=container.data('original_url');
4953if(src_url) window.open(src_url , '_blank', 'noreferrer noopener');
4954return;
4955}
4956var video=container.find('.av-video-tmpl').html();
4957var link='';
4958if(container.hasClass('avia-video-lightbox')){
4959link=container.find('a.lightbox-link');
4960if(link.length==0){
4961container.append(video);
4962setTimeout(function(){
4963link=container.find('a.lightbox-link');
4964if($('html').hasClass('av-default-lightbox')){
4965link.addClass('lightbox-added').magnificPopup($.avia_utilities.av_popup);
4966link.trigger('click');
4967}else{
4968link.trigger('avia-open-video-in-lightbox');
4969}}, 100);
4970}else{
4971link.trigger('click');
4972}}else{
4973container.html(video);
4974}});
4975$('.av-lazyload-immediate .av-click-to-play-overlay').trigger('click');
4976}(jQuery));
4977(function($){
4978"use strict";
4979$(function(){
4980$.avia_utilities=$.avia_utilities||{};
4981if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&'ontouchstart' in document.documentElement){
4982$.avia_utilities.isMobile=true;
4983}else{
4984$.avia_utilities.isMobile=false;
4985}
4986avia_hamburger_menu();
4987$(window).trigger('resize');
4988});
4989$.avia_utilities=$.avia_utilities||{};
4990function avia_hamburger_menu(){
4991var header=$('#header'),
4992header_main=$('#main .av-logo-container'),
4993menu=$('#avia-menu'),
4994burger_wrap=$('.av-burger-menu-main a'),
4995htmlEL=$('html').eq(0),
4996overlay=$('<div class="av-burger-overlay"></div>'),
4997overlay_scroll=$('<div class="av-burger-overlay-scroll"></div>').appendTo(overlay),
4998inner_overlay=$('<div class="av-burger-overlay-inner"></div>').appendTo(overlay_scroll),
4999bgColor=$('<div class="av-burger-overlay-bg"></div>').appendTo(overlay),
5000animating=false,
5001first_level={},
5002logo_container=$('.av-logo-container .inner-container'),
5003menu_in_logo_container=logo_container.find('.main_menu'),
5004cloneFirst=htmlEL.is('.html_av-submenu-display-click.html_av-submenu-clone, .html_av-submenu-display-hover.html_av-submenu-clone'),
5005menu_generated=false,
5006cloned_menu_cnt=0;
5007var alternate=$('#avia_alternate_menu');
5008if(alternate.length > 0){
5009menu=alternate;
5010}
5011var	set_list_container_height=function(){
5012if($.avia_utilities.isMobile){
5013overlay_scroll.outerHeight(window.innerHeight);
5014}},
5015create_list=function(items , append_to){
5016if(!items) return;
5017var list, link, current, subitems, megacolumns, sub_current, sub_current_list, new_li, new_ul;
5018items.each(function(){
5019current=$(this);
5020subitems=current.find(' > .sub-menu > li');
5021if(subitems.length==0){
5022subitems=current.find(' > .children > li');
5023}
5024megacolumns=current.find('.avia_mega_div > .sub-menu > li.menu-item');
5025var cur_menu=current.find('>a');
5026var clone_events=true;
5027if(cur_menu.length){
5028if(cur_menu.get(0).hash=='#'||'undefined'==typeof cur_menu.attr('href')||cur_menu.attr('href')=='#'){
5029if(subitems.length > 0||megacolumns.length > 0){
5030clone_events=false;
5031}}
5032}
5033link=cur_menu.clone(clone_events).attr('style','');
5034if('undefined'==typeof cur_menu.attr('href')){
5035link.attr('href', '#');
5036}
5037new_li=$('<li>').append(link);
5038var cls=[];
5039if('undefined'!=typeof current.attr('class')){
5040cls=current.attr('class').split(/\s+/);
5041$.each(cls, function(index, value){
5042if(( value.indexOf('menu-item')!=0)&&(value.indexOf('page-item') < 0)&&(value.indexOf('page_item')!=0)&&(value.indexOf('dropdown_ul') < 0)){
5043new_li.addClass(value);
5044}
5045return true;
5046});
5047}
5048if('undefined'!=typeof current.attr('id')&&''!=current.attr('id')){
5049new_li.addClass(current.attr('id'));
5050}else{
5051$.each(cls, function(index, value){
5052if(value.indexOf('page-item-') >=0){
5053new_li.addClass(value);
5054return false;
5055}});
5056}
5057append_to.append(new_li);
5058if(subitems.length){
5059new_ul=$('<ul class="sub-menu">').appendTo(new_li);
5060if(cloneFirst&&(link.get(0).hash!='#'&&link.attr('href')!='#')){
5061new_li.clone(true).prependTo(new_ul);
5062}
5063new_li.addClass('av-width-submenu').find('>a').append('<span class="av-submenu-indicator">');
5064create_list(subitems , new_ul);
5065}
5066else if(megacolumns.length){
5067new_ul=$('<ul class="sub-menu">').appendTo(new_li);
5068if(cloneFirst&&(link.get(0).hash!='#'&&link.attr('href')!='#')){
5069new_li.clone(true).prependTo(new_ul);
5070}
5071megacolumns.each(function(iteration){
5072var megacolumn=$(this),
5073mega_current=megacolumn.find('> .sub-menu'),
5074mega_title=megacolumn.find('> .mega_menu_title'),
5075mega_title_link=mega_title.find('a').attr('href')||"#",
5076current_megas=mega_current.length > 0 ? mega_current.find('>li'):null,
5077mega_title_set=false,
5078mega_link=new_li.find('>a'),
5079hide_enty='';
5080if(( current_megas===null)||(current_megas.length==0)){
5081if(mega_title_link=='#'){
5082hide_enty=' style="display: none;"';
5083}}
5084if(iteration==0) new_li.addClass('av-width-submenu').find('>a').append('<span class="av-submenu-indicator">');
5085if(mega_title.length&&mega_title.text()!=""){
5086mega_title_set=true;
5087if(iteration > 0){
5088var check_li=new_li.parents('li').eq(0);
5089if(check_li.length) new_li=check_li;
5090new_ul=$('<ul class="sub-menu">').appendTo(new_li);
5091}
5092new_li=$('<li' + hide_enty + '>').appendTo(new_ul);
5093new_ul=$('<ul class="sub-menu">').appendTo(new_li);
5094$('<a href="'+mega_title_link+'"><span class="avia-bullet"></span><span class="avia-menu-text">' +mega_title.text()+ '</span></a>').insertBefore(new_ul);
5095mega_link=new_li.find('>a');
5096if(cloneFirst&&(mega_current.length > 0)&&(mega_link.length&&mega_link.get(0).hash!='#'&&mega_link.attr('href')!='#')){
5097new_li.clone(true).addClass('av-cloned-title').prependTo(new_ul);
5098}}
5099if(mega_title_set&&(mega_current.length > 0)) new_li.addClass('av-width-submenu').find('>a').append('<span class="av-submenu-indicator">');
5100create_list(current_megas , new_ul);
5101});
5102}});
5103burger_wrap.trigger('avia_burger_list_created');
5104return list;
5105};
5106var burger_ul, burger;
5107$('body').on('mousewheel DOMMouseScroll touchmove', '.av-burger-overlay-scroll', function (e){
5108var height=this.offsetHeight,
5109scrollHeight=this.scrollHeight,
5110direction=e.originalEvent.wheelDelta;
5111if(scrollHeight!=this.clientHeight){
5112if(( this.scrollTop >=(scrollHeight - height)&&direction < 0)||(this.scrollTop <=0&&direction > 0)){
5113e.preventDefault();
5114}}else{
5115e.preventDefault();
5116}});
5117$(document).on('mousewheel DOMMouseScroll touchmove', '.av-burger-overlay-bg, .av-burger-overlay-active .av-burger-menu-main', function (e){
5118e.preventDefault();
5119});
5120var touchPos={};
5121$(document).on('touchstart', '.av-burger-overlay-scroll', function(e){
5122touchPos.Y=e.originalEvent.touches[0].clientY;
5123});
5124$(document).on('touchend', '.av-burger-overlay-scroll', function(e){
5125touchPos={};});
5126$(document).on('touchmove', '.av-burger-overlay-scroll', function (e){
5127if(!touchPos.Y){
5128touchPos.Y=e.originalEvent.touches[0].clientY;
5129}
5130var	differenceY=e.originalEvent.touches[0].clientY - touchPos.Y,
5131element=this,
5132top=element.scrollTop,
5133totalScroll=element.scrollHeight,
5134currentScroll=top + element.offsetHeight,
5135direction=differenceY > 0 ? "up":"down";
5136$('body').get(0).scrollTop=touchPos.body;
5137if(top <=0){
5138if(direction=="up"){
5139e.preventDefault();
5140}}
5141else if(currentScroll >=totalScroll){
5142if(direction=="down"){
5143e.preventDefault();
5144}}
5145});
5146$(window).on('debouncedresize', function (e){
5147var close=true;
5148if($.avia_utilities.isMobile&&htmlEL.hasClass('av-mobile-menu-switch-portrait')&&htmlEL.hasClass('html_text_menu_active')){
5149var height=$(window).height();
5150var width=$(window).width();
5151if(width <=height){
5152htmlEL.removeClass('html_burger_menu');
5153}else{
5154var switch_width=htmlEL.hasClass('html_mobile_menu_phone') ? 768:990;
5155if(height < switch_width){
5156htmlEL.addClass('html_burger_menu');
5157close=false;
5158}else{
5159htmlEL.removeClass('html_burger_menu');
5160}}
5161}
5162if(close&&burger&&burger.length){
5163if(! burger_wrap.is(':visible')){
5164burger.filter(".is-active").parents('a').eq(0).trigger('click');
5165}}
5166set_list_container_height();
5167});
5168$('.html_av-overlay-side').on('click', '.av-burger-overlay-bg', function (e){
5169e.preventDefault();
5170burger.parents('a').eq(0).trigger('click');
5171});
5172$(window).on('avia_smooth_scroll_start', function(){
5173if(burger&&burger.length){
5174burger.filter(".is-active").parents('a').eq(0).trigger('click');
5175}});
5176$('.html_av-submenu-display-hover').on('mouseenter', '.av-width-submenu', function (e){
5177$(this).children("ul.sub-menu").slideDown('fast');
5178});
5179$('.html_av-submenu-display-hover').on('mouseleave', '.av-width-submenu', function (e){
5180$(this).children("ul.sub-menu").slideUp('fast');
5181});
5182$('.html_av-submenu-display-hover').on('click', '.av-width-submenu > a', function (e){
5183e.preventDefault();
5184e.stopImmediatePropagation();
5185});
5186$('.html_av-submenu-display-hover').on('touchstart', '.av-width-submenu > a', function (e){
5187var menu=$(this);
5188toggle_submenu(menu, e);
5189});
5190$('.html_av-submenu-display-click').on('click', '.av-width-submenu > a', function (e){
5191var menu=$(this);
5192toggle_submenu(menu, e);
5193});
5194$('.html_av-submenu-display-click').on('click', '.av-burger-overlay a', function (e){
5195var loc=window.location.href.match(/(^[^#]*)/)[0];
5196var cur=$(this).attr('href').match(/(^[^#]*)/)[0];
5197if(cur==loc){
5198e.preventDefault();
5199e.stopImmediatePropagation();
5200burger.parents('a').eq(0).trigger('click');
5201return false;
5202}
5203return true;
5204});
5205function toggle_submenu(menu, e){
5206e.preventDefault();
5207e.stopImmediatePropagation();
5208var parent=menu.parents('li').eq(0);
5209parent.toggleClass('av-show-submenu');
5210if(parent.is('.av-show-submenu')){
5211parent.children("ul.sub-menu").slideDown('fast');
5212}else{
5213parent.children("ul.sub-menu").slideUp('fast');
5214}};
5215(function normalize_layout(){
5216if(menu_in_logo_container.length){
5217return;
5218}
5219var menu2=$('#header .main_menu').clone(true),
5220ul=menu2.find('ul.av-main-nav'),
5221id=ul.attr('id');
5222if('string'==typeof id&&''!=id.trim()){
5223ul.attr('id', id + '-' + cloned_menu_cnt++);
5224}
5225menu2.find('.menu-item:not(.menu-item-avia-special)').remove();
5226menu2.insertAfter(logo_container.find('.logo').first());
5227var social=$('#header .social_bookmarks').clone(true);
5228if(! social.length){
5229social=$('.av-logo-container .social_bookmarks').clone(true);
5230}
5231if(social.length){
5232menu2.find('.avia-menu').addClass('av_menu_icon_beside');
5233menu2.append(social);
5234}
5235burger_wrap=$('.av-burger-menu-main a');
5236}());
5237burger_wrap.on('click', function(e){
5238if(animating){
5239return;
5240}
5241burger=$(this).find('.av-hamburger'),
5242animating=true;
5243if(!menu_generated){
5244menu_generated=true;
5245burger.addClass("av-inserted-main-menu");
5246burger_ul=$('<ul>').attr({id:'av-burger-menu-ul', class:''});
5247var first_level_items=menu.find('> li:not(.menu-item-avia-special)');
5248var	list=create_list(first_level_items , burger_ul);
5249burger_ul.find('.noMobile').remove();
5250burger_ul.appendTo(inner_overlay);
5251first_level=inner_overlay.find('#av-burger-menu-ul > li');
5252if($.fn.avia_smoothscroll){
5253$('a[href*="#"]', overlay).avia_smoothscroll(overlay);
5254}}
5255if(burger.is(".is-active")){
5256burger.removeClass("is-active");
5257htmlEL.removeClass("av-burger-overlay-active-delayed");
5258overlay.animate({opacity:0}
5258, function(){
5259overlay.css({display:'none'});
5260htmlEL.removeClass("av-burger-overlay-active");
5261animating=false;
5262});
5263}else{
5264set_list_container_height();
5265var offsetTop=header_main.length ? header_main.outerHeight() + header_main.position().top:header.outerHeight() + header.position().top;
5266overlay.appendTo($(e.target).parents('.avia-menu'));
5267burger_ul.css({padding:(offsetTop) + "px 0px"});
5268first_level.removeClass('av-active-burger-items');
5269burger.addClass("is-active");
5270htmlEL.addClass("av-burger-overlay-active");
5271overlay.css({display:'block'}).animate({opacity:1}, function(){
5272animating=false;
5273});
5274setTimeout(function(){
5275htmlEL.addClass("av-burger-overlay-active-delayed");
5276}, 100);
5277first_level.each(function(i){
5278var _self=$(this);
5279setTimeout(function(){
5280_self.addClass('av-active-burger-items');
5281}, (i + 1) * 125);
5282});
5283}
5284e.preventDefault();
5285});
5286}})(jQuery);
5287!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(window.jQuery||window.Zepto)}(function(e){var t,i,n,o,a,r,s=function(){},l=!!window.jQuery,c=e(window),d=function(e,i){t.ev.on("mfp"+e+".mfp",i)},p=function(t,i,n,o){var a=document.createElement("div");return a.className="mfp-"+t,n&&(a.innerHTML=n),o?i&&i.appendChild(a):(a=e(a),i&&a.appendTo(i)),a},u=function(e,i){t.ev.triggerHandler("mfp"+e,i),t.st.callbacks&&(e=e.charAt(0).toLowerCase()+e.slice(1),t.st.callbacks[e]&&t.st.callbacks[e].apply(t,Array.isArray(i)?i:[i]))},f=function(i){return i===r&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),r=i),t.currTemplate.closeBtn},m=function(){e.magnificPopup.instance||((t=new s).init(),e.magnificPopup.instance=t)};s.prototype={constructor:s,init:function(){var i=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener,t.isAndroid=/android/gi.test(i),t.isIOS=/iphone|ipad|ipod/gi.test(i),t.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),n=e(document),t.popupsCache={}},open:function(i){var o;if(!1===i.isObj){t.items=i.items.toArray(),t.index=0;var r,s=i.items;for(o=0;o<s.length;o++)if((r=s[o]).parsed&&(r=r.el[0]),r===i.el[0]){t.index=o;break}}else t.items=Array.isArray(i.items)?i.items:[i.items],t.index=i.index||0;if(!t.isOpen){t.types=[],a="",i.mainEl&&i.mainEl.length?t.ev=i.mainEl.eq(0):t.ev=n,i.key?(t.popupsCache[i.key]||(t.popupsCache[i.key]={}),t.currTemplate=t.popupsCache[i.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,i),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=p("bg").on("click.mfp",function(){t.close()}),t.wrap=p("wrap").attr("tabindex",-1).on("click.mfp",function(e){t._checkIfClose(e.target)&&t.close()}),t.container=p("container",t.wrap)),t.contentContainer=p("content"),t.st.preloader&&(t.preloader=p("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(o=0;o<l.length;o++){var m=l[o];m=m.charAt(0).toUpperCase()+m.slice(1),t["init"+m].call(t)}u("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(d("MarkupParse",function(e,t,i,n){i.close_replaceWith=f(n.type)}),a+=" mfp-close-btn-in"):t.wrap.append(f())),t.st.alignTop&&(a+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:c.scrollTop(),position:"absolute"}),(!1===t.st.fixedBgPos||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:n.height(),position:"absolute"}),t.st.enableEscapeKey&&n.on("keyup.mfp",function(e){27===e.keyCode&&t.close()}),c.on("resize.mfp",function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var g=t.wH=c.height(),v={};if(t.fixedContentPos&&t._hasScrollBar(g)){var h=t._getScrollbarSize();h&&(v.marginRight=h)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):v.overflow="hidden");var y=t.st.mainClass;return t.isIE7&&(y+=" mfp-ie7"),y&&t._addClassToMFP(y),t.updateItemHTML(),u("BuildControls"),e("html").css(v),t.bgOverlay.add(t.wrap).prependTo(t.st.prepe
5287ndTo||e(document.body)),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP("mfp-ready"),t._setFocus()):t.bgOverlay.addClass("mfp-ready"),n.on("focusin.mfp",t._onFocusIn)},16),t.isOpen=!0,t.updateSize(g),u("Open"),i}t.updateItemHTML()},close:function(){t.isOpen&&(u("BeforeClose"),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP("mfp-removing"),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){u("Close");var i="mfp-removing mfp-ready ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(i+=t.st.mainClass+" "),t._removeClassFromMFP(i),t.fixedContentPos){var o={marginRight:""};t.isIE7?e("body, html").css("overflow",""):o.overflow="",e("html").css(o)}n.off("keyup.mfp focusin.mfp"),t.ev.off(".mfp"),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&!0!==t.currTemplate[t.currItem.type]||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t.st.autoFocusLast&&t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,u("AfterClose")},updateSize:function(e){if(t.isIOS){var i=document.documentElement.clientWidth/window.innerWidth,n=window.innerHeight*i;t.wrap.css("height",n),t.wH=n}else t.wH=e||c.height();t.fixedContentPos||t.wrap.css("height",t.wH),u("Resize")},updateItemHTML:function(){var i=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),i.parsed||(i=t.parseEl(t.index));var n=i.type;if(u("BeforeChange",[t.currItem?t.currItem.type:"",n]),t.currItem=i,!t.currTemplate[n]){var a=!!t.st[n]&&t.st[n].markup;u("FirstMarkupParse",a),t.currTemplate[n]=!a||e(a)}o&&o!==i.type&&t.container.removeClass("mfp-"+o+"-holder");var r=t["get"+n.charAt(0).toUpperCase()+n.slice(1)](i,t.currTemplate[n]);t.appendContent(r,n),i.preloaded=!0,u("Change",i),o=i.type,t.container.prepend(t.contentContainer),u("AfterChange")},appendContent:function(e,i){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&!0===t.currTemplate[i]?t.content.find(".mfp-close").length||t.content.append(f()):t.content=e:t.content="",u("BeforeAppend"),t.container.addClass("mfp-"+i+"-holder"),t.contentContainer.append(t.content)},parseEl:function(i){var n,o=t.items[i];if(o.tagName?o={el:e(o)}:(n=o.type,o={data:o,src:o.src}),o.el){for(var a=t.types,r=0;r<a.length;r++)if(o.el.hasClass("mfp-"+a[r])){n=a[r];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=n||t.st.type||"inline",o.index=i,o.parsed=!0,t.items[i]=o,u("ElementParse",o),t.items[i]},addGroup:function(e,i){var n=function(n){n.mfpEl=this,t._openClick(n,e,i)};i||(i={});var o="click.magnificPopup";i.mainEl=e,i.items?(i.isObj=!0,e.off(o).on(o,n)):(i.isObj=!1,i.delegate?e.off(o).on(o,i.delegate,n):(i.items=e,e.off(o).on(o,n)))},_openClick:function(i,n,o){if((void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick)||!(2===i.which||i.ctrlKey||i.metaKey||i.altKey||i.shiftKey)){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if("function"==typeof a){if(!a.call(t))return!0}else if(c.width()<a)return!0;i.type&&(i.preventDefault(),t.isOpen&&i.stopPropagation()),o.el=e(i.mfpEl),o.delegate&&(o.items=n.find(o.delegate)),t.open(o)}},updateStatus:function(e,n){if(t.preloader){i!==e&&t.container.removeClass("mfp-s-"+i),n||"loading"!==e||(n=t.st.tLoading);var o={status:e,text:n};u("UpdateStatus",o),e=o.status,n=o.text,t.preloader.html(n),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),i=e}},_checkIfClose:function(i){if(!e(i).hasClass("mfp-prevent-close")){var n=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(n&&o)return!0;if(!t.content||e(i).hasClass("mfp-close")||t.preloader&&i===t.preloader[0])return!0;if(i===t.content[0]||e.contains(t.content[0],i)){if(n)return!0}else if(o&&e.contains(document,i))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?n.height():document.body.scrollHeight)>(e||c.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(i){if(i.target!==t.wrap[0]&&!e.contains(t.wrap[0],i.target))return t._setFocus(),!1},_parseMarkup:function(t,i,n){var o;n.data&&(i=e.extend(n.data,i)),u("MarkupParse",[t,i,n]),e.each(i,function(i,n){if(void 0===n||!1===n)return!0;
5287if((o=i.split("_")).length>1){var a=t.find(".mfp-"+o[0]);if(a.length>0){var r=o[1];"replaceWith"===r?a[0]!==n[0]&&a.replaceWith(n):"img"===r?a.is("img")?a.attr("src",n):a.replaceWith(e("<img>").attr("src",n).attr("class",a.attr("class"))):a.attr(o[1],n)}}else t.find(".mfp-"+i).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:s.prototype,modules:[],open:function(t,i){return m(),(t=t?e.extend(!0,{},t):{}).isObj=!0,t.index=i||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,i){i.options&&(e.magnificPopup.defaults[t]=i.options),e.extend(this.proto,i.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},e.fn.magnificPopup=function(i){m();var n=e(this);if("string"==typeof i)if("open"===i){var o,a=l?n.data("magnificPopup"):n[0].magnificPopup,r=parseInt(arguments[1],10)||0;a.items?o=a.items[r]:(o=n,a.delegate&&(o=o.find(a.delegate)),o=o.eq(r)),t._openClick({mfpEl:o},n,a)}else t.isOpen&&t[i].apply(t,Array.prototype.slice.call(arguments,1));else i=e.extend(!0,{},i),l?n.data("magnificPopup",i):n[0].magnificPopup=i,t.addGroup(n,i);return n};var g,v,h,y=function(){h&&(v.after(h.addClass(g)).detach(),h=null)};e.magnificPopup.registerModule("inline",{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push("inline"),d("Close.inline",function(){y()})},getInline:function(i,n){if(y(),i.src){var o=t.st.inline,a=e(i.src);if(a.length){var r=a[0].parentNode;r&&r.tagName&&(v||(g=o.hiddenClass,v=p(g),g="mfp-"+g),h=a.after(v).detach().removeClass(g)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),a=e("<div>");return i.inlineElement=a,a}return t.updateStatus("ready"),t._parseMarkup(n,{},i),n}}});var C,b=function(){C&&e(document.body).removeClass(C)},w=function(){b(),t.req&&t.req.abort()};e.magnificPopup.registerModule("ajax",{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push("ajax"),C=t.st.ajax.cursor,d("Close.ajax",w),d("BeforeChange.ajax",w)},getAjax:function(i){C&&e(document.body).addClass(C),t.updateStatus("loading");var n=e.extend({url:i.src,success:function(n,o,a){var r={data:n,xhr:a};u("ParseAjax",r),t.appendContent(e(r.data),"ajax"),i.finished=!0,b(),t._setFocus(),setTimeout(function(){t.wrap.addClass("mfp-ready")},16),t.updateStatus("ready"),u("AjaxContentAdded")},error:function(){b(),i.finished=i.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",i.src))}},t.st.ajax.settings);return t.req=e.ajax(n),""}}});var I,x=function(e){if(e.data&&void 0!==e.data.title)return e.data.title;
5287var i=t.st.image.titleSrc;if(i){if("function"==typeof i)return i.call(t,e);if(e.el)return e.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var i=t.st.image,n=".image";t.types.push("image"),d("Open"+n,function(){"image"===t.currItem.type&&i.cursor&&e(document.body).addClass(i.cursor)}),d("Close"+n,function(){i.cursor&&e(document.body).removeClass(i.cursor),c.off("resize.mfp")}),d("Resize"+n,t.resizeImage),t.isLowIE&&d("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var i=0;t.isLowIE&&(i=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-i)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,I&&clearInterval(I),e.isCheckingImgSize=!1,u("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var i=0,n=e.img[0],o=function(a){I&&clearInterval(I),I=setInterval(function(){n.naturalWidth>0?t._onImageHasSize(e):(i>200&&clearInterval(I),3===++i?o(10):40===i?o(50):100===i&&o(500))},a)};o(1)},getImage:function(i,n){var o=0,a=function(){i&&(i.img[0].complete?(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("ready")),i.hasSize=!0,i.loaded=!0,u("ImageLoadComplete")):++o<200?setTimeout(a,100):r())},r=function(){i&&(i.img.off(".mfploader"),i===t.currItem&&(t._onImageHasSize(i),t.updateStatus("error",s.tError.replace("%url%",i.src))),i.hasSize=!0,i.loaded=!0,i.loadError=!0)},s=t.st.image,l=n.find(".mfp-img");if(l.length){var c=document.createElement("img");if(c.className="mfp-img",i.el&&i.el.find("img").length&&(c.alt=i.el.find("img").attr("alt")),i.img=e(c).on("load.mfploader",a).on("error.mfploader",r),c.src=i.src,e("body").hasClass("responsive-images-lightbox-support")){var d=i.el.data("srcset"),p=i.el.data("sizes");void 0!==d?(c.srcset=d,void 0!==p&&(c.sizes=p)):(void 0!==(d=i.el.find("img").attr("srcset"))&&(c.srcset=d),void 0!==(p=i.el.find("img").attr("sizes"))&&(c.sizes=p))}l.is("img")&&(i.img=i.img.clone()),(c=i.img[0]).naturalWidth>0?i.hasSize=!0:c.width||(i.hasSize=!1)}return t._parseMarkup(n,{title:x(i),img_replaceWith:i.img},i),t.resizeImage(),i.hasSize?(I&&clearInterval(I),i.loadError?(n.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",i.src))):(n.removeClass("mfp-loading"),t.updateStatus("ready")),n):(t.updateStatus("loading"),i.loading=!0,i.hasSize||(i.imgHidden=!0,n.addClass("mfp-loading"),t.findImageSize(i)),n)}}});var k;e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,i=t.st.zoom,n=".zoom";if(i.enabled&&t.supportsTransition){var o,a,r=i.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),n="all "+i.duration/1e3+"s "+i.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},a="transition";return o["-webkit-"+a]=o["-moz-"+a]=o["-o-"+a]=o[a]=n,t.css(o),t},l=function(){t.content.css("visibility","visible")};d("BuildControls"+n,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),!(e=t._getItemToZoom()))return void l();(a=s(e)).css(t._getOffset()),t.wrap.append(a),o=setTimeout(function(){a.css(t._getOffset(!0)),o=setTimeout(function(){l(),setTimeout(function(){a.remove(),e=a=null,u("ZoomAnimationEnded")},16)},r)},16)}}),d("BeforeClose"+n,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=r,!e){if(!(e=t._getItemToZoom()))return;a=s(e)}a.css(t._getOffset(!0)),t.wrap.append(a),t.content.css("visibility","hidden"),setTimeout(function(){a.css(t._getOffset())},16)}}),d("Close"+n,function(){t._allowZoom()&&(l(),a&&a.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return!!t.currItem.hasSize&&t.currItem.img},_getOffset:function(i){var n,o=(n=i?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem)).offset(),a=parseInt(n.css("padding-top"),10),r=parseInt(n.css("padding-bottom"),10);o.top-=e(window).scrollTop()-a;var s={width:n.width(),height:(l?n.innerHeight():n[0].offsetHeight)-r-a};return void 0===k&&(k=void 0!==document.createElement("p").style.MozTransform),k?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var T=function(e){if(t.currTemplate.iframe){var i=t.currTemplate.iframe.find("iframe");i.length&&(e||(i[0].src="//about:blank"),t.isIE8&&i.css("display",e?"block":"none"))}};e.magnificPopup.registerModule("iframe",{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push("iframe"),d("BeforeChange",function(e,t,i){t!==i&&("iframe"===t?T():"iframe"===i&&T(!0))}),d("Close.iframe",function(){T()})},getIframe:function(i,n){var o=i.src,a=t.st.iframe;e.each(a.patterns,function(){if(o.indexOf(this.index)>-1)return this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id
5287)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1});var r={};return a.srcAction&&(r[a.srcAction]=o),t._parseMarkup(n,r,i),t.updateStatus("ready"),n}}});var _=function(e){var i=t.items.length;return e>i-1?e-i:e<0?i+e:e},P=function(e,t,i){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,i)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var i=t.st.gallery,o=".mfp-gallery";if(t.direction=!0,!i||!i.enabled)return!1;a+=" mfp-gallery",d("Open"+o,function(){i.navigateByImgClick&&t.wrap.on("click"+o,".mfp-img",function(){if(t.items.length>1)return t.next(),!1}),n.on("keydown"+o,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),d("UpdateStatus"+o,function(e,i){i.text&&(i.text=P(i.text,t.currItem.index,t.items.length))}),d("MarkupParse"+o,function(e,n,o,a){var r=t.items.length;o.counter=r>1?P(i.tCounter,a.index,r):""}),d("BuildControls"+o,function(){if(t.items.length>1&&i.arrows&&!t.arrowLeft){var n=i.arrowMarkup,o=t.arrowLeft=e(n.replace(/%title%/gi,i.tPrev).replace(/%dir%/gi,"left")).addClass("mfp-prevent-close"),a=t.arrowRight=e(n.replace(/%title%/gi,i.tNext).replace(/%dir%/gi,"right")).addClass("mfp-prevent-close");o.on("click",function(){t.prev()}),a.on("click",function(){t.next()}),t.container.append(o.add(a))}}),d("Change"+o,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),d("Close"+o,function(){n.off(o),t.wrap.off("click"+o),t.arrowRight=t.arrowLeft=null})},next:function(){t.direction=!0,t.index=_(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=_(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,i=t.st.gallery.preload,n=Math.min(i[0],t.items.length),o=Math.min(i[1],t.items.length);for(e=1;e<=(t.direction?o:n);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?n:o);e++)t._preloadItem(t.index-e)},_preloadItem:function(i){if(i=_(i),!t.items[i].preloaded){var n=t.items[i];if(n.parsed||(n=t.parseEl(i)),u("LazyLoad",n),"image"===n.type&&(n.img=e('<img class="mfp-img" />').on("load.mfploader",function(){n.hasSize=!0}).on("error.mfploader",function(){n.hasSize=!0,n.loadError=!0,u("LazyLoadError",n)}).attr("src",n.src),e("body").hasClass("responsive-images-lightbox-support")&&n.el.length>0)){var o=e(n.el[0]),a=o.data("srcset"),r=o.data("sizes");if(void 0!==a)n.img.attr("srcset",a),void 0!==r&&n.img.attr("sizes",r);else{var s=e(n.el[0]).find("img");void 0!==(a=s.attr("srcset"))&&n.img.attr("srcset",a),void 0!==(r=s.attr("sizes"))&&n.img.attr("sizes",r)}}n.preloaded=!0}}}});e.magnificPopup.registerModule("retina",{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,i=e.ratio;(i=isNaN(i)?i():i)>1&&(d("ImageHasSize.retina",function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/i,width:"100%"})}),d("ElementParse.retina",function(t,n){n.src=e.replaceSrc(n,i)}))}}}}),m()});
5288(function($){
5289"use strict";
5290$.avia_utilities=$.avia_utilities||{};
5291$.avia_utilities.av_popup={
5292type: 				'image',
5293mainClass: 			'avia-popup mfp-zoom-in',
5294tLoading: 			'',
5295tClose: 			'',
5296removalDelay: 		300,
5297closeBtnInside: 	true,
5298closeOnContentClick:false,
5299midClick: 			true,
5300autoFocusLast: 		false,
5301fixedContentPos: 	false,
5302iframe: {
5303patterns: {
5304youtube: {
5305index: 'youtube.com/watch',
5306id: function(url){
5307var m=url.match(/[\\?\\&]v=([^\\?\\&]+)/), id, params;
5308if(!m||!m[1]) return null;
5309id=m[1];
5310params=url.split('/watch');
5311params=params[1];
5312return id + params;
5313},
5314src: '//www.youtube.com/embed/%id%'
5315},
5316vimeo: {
5317index: 'vimeo.com/',
5318id: function(url){
5319var m=url.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/), id, params;
5320if(!m||!m[5]) return null;
5321id=m[5];
5322params=url.split('?');
5323params=params[1];
5324return id + '?' + params;
5325},
5326src: '//player.vimeo.com/video/%id%'
5327}}
5328},
5329image: {
5330titleSrc: function(item){
5331var title=item.el.attr('title');
5332if(! title){
5333title=item.el.find('img').attr('title');
5334}
5335if(! title){
5336title=item.el.parent().next('.wp-caption-text').html();
5337}
5338if(typeof title!="undefined"){
5339return title;
5340}
5341if(! $('body').hasClass('avia-mfp-show-alt-text')){
5342return '';
5343}
5344var alt=item.el.attr('alt');
5345if(typeof alt!="undefined"){
5346return alt;
5347}
5348alt=item.el.find('img').attr('alt');
5349if(typeof alt!="undefined"){
5350return alt;
5351}
5352return '';
5353}},
5354gallery: {
5355tPrev:		'',
5356tNext:		'',
5357tCounter:	'%curr% / %total%',
5358enabled:	true,
5359preload:	[1,1]
5360},
5361callbacks:
5362{
5363beforeOpen: function(){
5364if(this.st.el&&this.st.el.data('fixed-content')){
5365this.fixedContentPos=true;
5366}},
5367open: function(){
5368$.magnificPopup.instance.next=function(){
5369var self=this;
5370self.wrap.removeClass('mfp-image-loaded');
5371setTimeout(function(){ $.magnificPopup.proto.next.call(self); }, 120);
5372};
5373$.magnificPopup.instance.prev=function(){
5374var self=this;
5375self.wrap.removeClass('mfp-image-loaded');
5376setTimeout(function(){ $.magnificPopup.proto.prev.call(self); }, 120);
5377};
5378if(this.st.el&&this.st.el.data('av-extra-class')){
5379this.wrap.addClass(this.currItem.el.data('av-extra-class'));
5380}},
5381markupParse: function(template, values, item){
5382if(typeof values.img_replaceWith=='undefined'||typeof values.img_replaceWith.length=='undefined'||values.img_replaceWith.length==0){
5383return;
5384}
5385var img=$(values.img_replaceWith[0]);
5386if(typeof img.attr('alt')!='undefined'){
5387return;
5388}
5389var alt=item.el.attr('alt');
5390if(typeof alt=="undefined"){
5391alt=item.el.find('img').attr('alt');
5392}
5393if(typeof alt!="undefined"){
5394img.attr('alt', alt);
5395}
5396return;
5397},
5398imageLoadComplete: function(){
5399var self=this;
5400setTimeout(function(){ self.wrap.addClass('mfp-image-loaded'); }, 16);
5401},
5402change: function(){
5403if(this.currItem.el){
5404var current=this.currItem.el;
5405this.content.find('.av-extra-modal-content, .av-extra-modal-markup').remove();
5406if(current.data('av-extra-content')){
5407var extra=current.data('av-extra-content');
5408this.content.append("<div class='av-extra-modal-content'>" + extra + "</div>");
5409}
5410if(current.data('av-extra-markup')){
5411var markup=current.data('av-extra-markup');
5412this.wrap.append("<div class='av-extra-modal-markup'>" + markup + "</div>");
5413}}
5414}}
5415},
5416$.fn.avia_activate_lightbox=function(variables){
5417var defaults={
5418groups:['.avia-slideshow', '.avia-gallery', '.av-horizontal-gallery', '.av-instagram-pics', '.portfolio-preview-image', '.portfolio-preview-content', '.isotope', '.post-entry', '.sidebar', '#main', '.main_menu', '.woocommerce-product-gallery'],
5419autolinkElements:   'a.lightbox, a[rel^="prettyPhoto"], a[rel^="lightbox"], a[href$=jpg], a[href$=webp], 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"]',
5420videoElements:'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"]',
5421exclude:'.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]'
5422},
5423options=$.extend({}, defaults, variables),
5424active = !$('html').is('.av-custom-lightbox');
5425if(!active) return this;
5426return this.each(function(){
5427var container=$(this),
5428videos=$(options.videoElements, this).not(options.exclude).addClass('mfp-iframe'), 
5429ajaxed		= !container.is('body')&&!container.is('.ajax_slide');
5430for (var i=0; i < options.groups.length; i++){
5431container.find(options.groups[i]).each(function(){
5432var links=$(options.autolinkElements, this);
5433if(ajaxed) links.removeClass('lightbox-added');
5434links.not(options.exclude).addClass('lightbox-added').magnificPopup($.avia_utilities.av_popup);
5435});
5436}});
5437};})(jQuery);
5438(function($){
5439"use strict";
5440$(function(){
5441avia_header_size();
5442});
5443function av_change_class($element, change_method, class_name){
5444if($element[0].classList){
5445if(change_method=="add"){
5446$element[0].classList.add(class_name);
5447}else{
5448$element[0].classList.remove(class_name);
5449}}else{
5450if(change_method=="add"){
5451$element.addClass(class_name);
5452}else{
5453$element.removeClass(class_name);
5454}}
5455}
5456function avia_header_size(){
5457var win=$(window),
5458header=$('.html_header_top.html_header_sticky #header'),
5459unsticktop=$('.av_header_unstick_top');
5460if(! header.length&&! unsticktop.length){
5461return;
5462}
5463var logo=$('#header_main .container .logo img, #header_main .container .logo svg, #header_main .container .logo a'),
5464elements=$('#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'),
5465el_height=$(elements).first().height(),
5466isMobile=$.avia_utilities.isMobile,
5467scroll_top=$('#scroll-top-link'),
5468transparent=header.is('.av_header_transparency'),
5469shrinking=header.is('.av_header_shrinking'),
5470header_meta=header.find('#header_meta'),
5471topbar_height=header_meta.length ? header_meta.outerHeight():0,
5472set_height=function(){
5473var st=win.scrollTop(),
5474newH=0,
5475st_real=st;
5476if(unsticktop){
5477st -=topbar_height;
5478}
5479if(st < 0){
5480st=0;
5481}
5482if(shrinking&&! isMobile){
5483if(st < el_height/2){
5484newH=el_height - st;
5485if(st <=0){
5486newH=el_height;
5487}
5488av_change_class(header, 'remove', 'header-scrolled');
5489}else{
5490newH=el_height/2;
5491av_change_class(header, 'add', 'header-scrolled');
5492}
5493if(st - 30 < el_height){
5494av_change_class(header, 'remove', 'header-scrolled-full');
5495}else{
5496av_change_class(header, 'add', 'header-scrolled-full');
5497}
5498elements.css({'height': newH + 'px', 'lineHeight': newH + 'px'});
5499logo.css({'maxHeight': newH + 'px'});
5500}
5501if(unsticktop.length){
5502if(st <=0){
5503if(st_real <=0){
5504st_real=0;
5505}
5506unsticktop.css({"margin-top":"-"+st_real+"px"});
5507}else{
5508unsticktop.css({"margin-top":"-"+topbar_height+"px"});
5509}}
5510if(transparent){
5511if(st > 50){
5512av_change_class(header, 'remove', 'av_header_transparency');
5513}else{
5514av_change_class(header, 'add', 'av_header_transparency');
5515}}
5516};
5517if($('body').is('.avia_deactivate_menu_resize')){
5518shrinking=false;
5519}
5520if(! transparent&&! shrinking&&! unsticktop.length){
5521return;
5522}
5523win.on('debouncedresize',  function(){
5524el_height=$(elements).attr('style',"").first().height();
5525set_height();
5526});
5527win.on('scroll',  function(){
5528window.requestAnimationFrame(set_height);
5529});
5530set_height();
5531}})(jQuery);
5532(function($){
5533"use strict";
5534var win=null,
5535body=null,
5536placeholder=null,
5537footer=null,
5538max_height=null;
5539$(function(){
5540win=$(window);
5541body=$('body');
5542if(body.hasClass('av-curtain-footer')){
5543aviaFooterCurtain();
5544return;
5545}
5546return;
5547});
5548function aviaFooterCurtain(){
5549footer=body.find('.av-curtain-footer-container');
5550if(footer.length==0){
5551body.removeClass('av-curtain-footer av-curtain-activated av-curtain-numeric av-curtain-screen');
5552return;
5553}
5554placeholder=$('<div id="av-curtain-footer-placeholder"></div>');
5555footer.before(placeholder);
5556if(body.hasClass('av-curtain-numeric')){
5557max_height=footer.data('footer_max_height');
5558if('undefined'==typeof max_height){
5559max_height=70;
5560}else{
5561max_height=parseInt(max_height, 10);
5562if(isNaN(max_height)){
5563max_height=70;
5564}}
5565}
5566aviaCurtainEffects();
5567win.on('debouncedresize', aviaCurtainEffects);
5568}
5569function aviaCurtainEffects(){
5570var height=Math.floor(footer.outerHeight()),
5571viewportHeight=win.innerHeight();
5572if(null==max_height){
5573placeholder.css({ height: height + 'px' });
5574}else{
5575var limit=Math.floor(viewportHeight *(max_height / 100.0));
5576if(height > limit){
5577body.removeClass('av-curtain-activated');
5578placeholder.css({ height: '' });
5579}else{
5580body.addClass('av-curtain-activated');
5581placeholder.css({ height: height + 'px' });
5582}}
5583}})(jQuery);
5584(function($){
5585"use strict";
5586$(function(){
5587$('.avia_auto_toc').each(function(){
5588var $toc_section=$(this).attr('id');
5589var $levels='h1';
5590var $levelslist=new Array();
5591var $excludeclass='';
5592var $toc_container=$(this).find('.avia-toc-container');
5593if($toc_container.length){
5594var $levels_attr=$toc_container.attr('data-level');
5595var $excludeclass_attr=$toc_container.attr('data-exclude');
5596if(typeof $levels_attr!='undefined'){
5597$levels=$levels_attr;
5598}
5599if(typeof $excludeclass_attr!='undefined'){
5600$excludeclass=$excludeclass_attr.trim();
5601}}
5602$levelslist=$levels.split(',');
5603$('.entry-content-wrapper').find($levels).each(function(){
5604var headline=$(this);
5605if(headline.hasClass('av-no-toc')){
5606return;
5607}
5608if($excludeclass!=''&&(headline.hasClass($excludeclass)||headline.parent().hasClass($excludeclass))){
5609return;
5610}
5611var $h_id=headline.attr('id');
5612var $tagname=headline.prop('tagName').toLowerCase();
5613var $txt=headline.text();
5614var $pos=$levelslist.indexOf($tagname);
5615if(typeof $h_id=='undefined'){
5616var $new_id=av_pretty_url($txt);
5617headline.attr('id', $new_id);
5618$h_id=$new_id;
5619}
5620var $list_tag='<a href="#' + $h_id + '" class="avia-toc-link avia-toc-level-' + $pos + '"><span>' + $txt + '</span></a>';
5621$toc_container.append($list_tag);
5622});
5623$(".avia-toc-smoothscroll .avia-toc-link").on('click', function(e){
5624e.preventDefault();
5625var $target=$(this).attr('href');
5626var $offset=50;
5627var $sticky_header=$('.html_header_top.html_header_sticky #header');
5628if($sticky_header.length){
5629$offset=$sticky_header.outerHeight() + 50;
5630}
5631$('html,body').animate({ scrollTop: $($target).offset().top - $offset });
5632});
5633});
5634});
5635function av_pretty_url(text){
5636return text.toLowerCase()
5637.replace(/[^a-z0-9]+/g, "-")
5638.replace(/^-+|-+$/g, "-")
5639.replace(/^-+|-+$/g, '');
5640}})(jQuery);
5641(function($){
5642"use strict";
5643var elements=$('.has-background, .has-text-color');
5644elements.each(function(i){
5645var element=$(this);
5646if(!(element.hasClass('has-background')||element.hasClass('has-text-color'))){
5647return;
5648}
5649var classList=element.attr('class').split(/\s+/);
5650var color='';
5651var style='';
5652if(element.hasClass('has-background')){
5653$.each(classList, function(index, item){
5654item=item.trim().toLowerCase();
5655if(0==item.indexOf('has-col-')&&-1!=item.indexOf('-background-color')){
5656color=item.replace('has-col-', '');
5657color=color.replace('-background-color', '');
5658color=color.replace(/-|[^0-9a-fA-F]/g, '');
5659if(color.length==3||color.length==6){
5660element.css({ 'background-color': '', 'border-color': '' });
5661style='undefined'!=typeof element.attr('style') ? element.attr('style'):'';
5662element.attr('style', style + ' background-color: #' + color + '; border-color: #' + color + ';');
5663}}
5664});
5665}
5666if(element.hasClass('has-text-color')){
5667$.each(classList, function(index, item){
5668item=item.trim().toLowerCase();
5669if(0==item.indexOf('has-col-')&&-1==item.indexOf('-background-color')&&-1!=item.indexOf('-color')){
5670var color=item.replace('has-col-', '');
5671color=color.replace('-color', '');
5672color=color.replace(/-|[^0-9a-fA-F]/g, '');
5673if(color.length==3||color.length==6){
5674element.css('color', '');
5675style='undefined'!=typeof element.attr('style') ? element.attr('style'):'';
5676element.attr('style', style + ' color: #' + color + ';');
5677}}
5678});
5679}});
5680elements=$('[class^="has-fs-"][class$="-font-size"]');
5681elements.each(function(i){
5682var element=$(this);
5683var classList=element.attr('class').split(/\s+/);
5684$.each(classList, function(index, item){
5685item=item.trim().toLowerCase();
5686item=item.replace('has-fs-', '');
5687item=item.replace('-font-size', '');
5688item=item.split('-');
5689if(item.length!=2){
5690return;
5691}
5692var style='undefined'!=typeof element.attr('style') ? element.attr('style'):'';
5693element.attr('style', style + ' font-size:' + item[0] + item[1] + ';');
5694});
5695});
5696})(jQuery);
5697(()=>{"use strict";var e={d:(t,d)=>{for(var o in d)e.o(d,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:d[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function d(e){"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",e):e())}e.d(t,{default:()=>d}),(window.wp=window.wp||{}).domReady=t.default})();
5698(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
5698),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{actions:()=>S,addAction:()=>m,addFilter:()=>p,applyFilters:()=>k,createHooks:()=>h,currentAction:()=>w,currentFilter:()=>I,defaultHooks:()=>f,didAction:()=>O,didFilter:()=>j,doAction:()=>b,doingAction:()=>x,doingFilter:()=>T,filters:()=>z,hasAction:()=>v,hasFilter:()=>y,removeAction:()=>A,removeAllActions:()=>F,removeAllFilters:()=>g,removeFilter:()=>_});const n=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};const r=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};const o=function(t,e){return function(o,i,s,c=10){const l=t[e];if(!r(o))return;if(!n(i))return;if("function"!=typeof s)return void console.error("The hook callback must be a function.");if("number"!=typeof c)return void console.error("If specified, the hook priority must be a number.");const u={callback:s,priority:c,namespace:i};if(l[o]){const t=l[o].handlers;let e;for(e=t.length;e>0&&!(c>=t[e-1].priority);e--);e===t.length?t[e]=u:t.splice(e,0,u),l.__current.forEach((t=>{t.name===o&&t.currentIndex>=e&&t.currentIndex++}))}else l[o]={handlers:[u],runs:0};"hookAdded"!==o&&t.doAction("hookAdded",o,i,s,c)}};const i=function(t,e,o=!1){return function(i,s){const c=t[e];if(!r(i))return;if(!o&&!n(s))return;if(!c[i])return 0;let l=0;if(o)l=c[i].handlers.length,c[i]={runs:c[i].runs,handlers:[]};else{const t=c[i].handlers;for(let e=t.length-1;e>=0;e--)t[e].namespace===s&&(t.splice(e,1),l++,c.__current.forEach((t=>{t.name===i&&t.currentIndex>=e&&t.currentIndex--})))}return"hookRemoved"!==i&&t.doAction("hookRemoved",i,s),l}};const s=function(t,e){return function(n,r){const o=t[e];return void 0!==r?n in o&&o[n].handlers.some((t=>t.namespace===r)):n in o}};const c=function(t,e,n=!1){return function(r,...o){const i=t[e];i[r]||(i[r]={handlers:[],runs:0}),i[r].runs++;const s=i[r].handlers;if(!s||!s.length)return n?o[0]:void 0;const c={name:r,currentIndex:0};for(i.__current.push(c);c.currentIndex<s.length;){const t=s[c.currentIndex].callback.apply(null,o);n&&(o[0]=t),c.currentIndex++}return i.__current.pop(),n?o[0]:void 0}};const l=function(t,e){return function(){var n;const r=t[e];return null!==(n=r.__current[r.__current.length-1]?.name)&&void 0!==n?n:null}};const u=function(t,e){return function(n){const r=t[e];return void 0===n?void 0!==r.__current[0]:!!r.__current[0]&&n===r.__current[0].name}};const a=function(t,e){return function(n){const o=t[e];if(r(n))return o[n]&&o[n].runs?o[n].runs:0}};class d{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=o(this,"actions"),this.addFilter=o(this,"filters"),this.removeAction=i(this,"actions"),this.removeFilter=i(this,"filters"),this.hasAction=s(this,"actions"),this.hasFilter=s(this,"filters"),this.removeAllActions=i(this,"actions",!0),this.removeAllFilters=i(this,"filters",!0),this.doAction=c(this,"actions"),this.applyFilters=c(this,"filters",!0),this.currentAction=l(this,"actions"),this.currentFilter=l(this,"filters"),this.doingAction=u(this,"actions"),this.doingFilter=u(this,"filters"),this.didAction=a(this,"actions"),this.didFilter=a(this,"filters")}}const h=function(){return new d},f=h(),{addAction:m,addFilter:p,removeAction:A,removeFilter:_,hasAction:v,hasFilter:y,removeAllActions:F,removeAllFilters:g,doAction:b,applyFilters:k,currentAction:w,currentFilter:I,doingAction:x,doingFilter:T,didAction:O,didFilter:j,actions:S,filters:z}=f;(window.wp=window.wp||{}).hooks=e})();
5699(()=>{var t={2058:(t,e,r)=>{var n;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(t){return function(t,e){var r,n,o,s,l,u,p,c,f,d=1,h=t.length,g="";for(n=0;n<h;n++)if("string"==typeof t[n])g+=t[n];
5699else if("object"==typeof t[n]){if((s=t[n]).keys)for(r=e[d],o=0;o<s.keys.length;o++){if(null==r)throw new Error(a('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[o],s.keys[o-1]));r=r[s.keys[o]]}else r=s.param_no?e[s.param_no]:e[d++];if(i.not_type.test(s.type)&&i.not_primitive.test(s.type)&&r instanceof Function&&(r=r()),i.numeric_arg.test(s.type)&&"number"!=typeof r&&isNaN(r))throw new TypeError(a("[sprintf] expecting number but found %T",r));switch(i.number.test(s.type)&&(c=r>=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?g+=r:(!i.number.test(s.type)||c&&!s.sign?f="":(f=c?"+":"-",r=r.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",p=s.width-(f+r).length,l=s.width&&p>0?u.repeat(p):"",g+=s.align?f+r+l:"0"===u?f+l+r:l+f+r)}return g}(function(t){if(s[t])return s[t];var e,r=t,n=[],a=0;for(;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else{if(null===(e=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){a|=1;var o=[],l=e[2],u=[];if(null===(u=i.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(u[1]);""!==(l=l.substring(u[0].length));)if(null!==(u=i.key_access.exec(l)))o.push(u[1]);else{if(null===(u=i.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(u[1])}e[2]=o}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return s[t]=n}(t),arguments)}function o(t,e){return a.apply(null,[t].concat(e||[]))}var s=Object.create(null);e.sprintf=a,e.vsprintf=o,"undefined"!=typeof window&&(window.sprintf=a,window.vsprintf=o,void 0===(n=function(){return{sprintf:a,vsprintf:o}}.call(e,r,e,t))||(t.exports=n))}()}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{__:()=>F,_n:()=>j,_nx:()=>L,_x:()=>S,createI18n:()=>x,defaultI18n:()=>_,getLocaleData:()=>v,hasTranslation:()=>D,isRTL:()=>T,resetLocaleData:()=>w,setLocaleData:()=>m,sprintf:()=>a,subscribe:()=>k});var t=r(2058),e=r.n(t);const i=function(t,e){var r,n,i=0;function a(){var a,o,s=r,l=arguments.length;t:for(;s;){if(s.args.length===arguments.length){for(o=0;o<l;o++)if(s.args[o]!==arguments[o]){s=s.next;continue t}return s!==r&&(s===n&&(n=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=r,s.prev=null,r.prev=s,r=s),s.val}s=s.next}for(a=new Array(l),o=0;o<l;o++)a[o]=arguments[o];return s={args:a,val:t.apply(null,a)},r?(r.prev=s,s.next=r):n=s,i===e.maxSize?(n=n.prev).next=null:i++,r=s,s.val}return e=e||{},a.clear=function(){r=null,n=null,i=0},a}(console.error);function a(t,...r){try{return e().sprintf(t,...r)}catch(e){return e instanceof Error&&i("sprintf error: \n\n"+e.toString()),t}}var o,s,l,u;o={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},s=["(","?"],l={")":["("],":":["?","?:"]},u=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var p={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t<e},"<=":function(t,e){return t<=e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,r){if(t)throw e;return r}};function c(t){var e=function(t){for(var e,r,n,i,a=[],p=[];e=t.match(u);){for(r=e[0],(n=t.substr(0,e.index).trim())&&a.push(n);i=p.pop();){if(l[r]){if(l[r][0]===i){r=l[r][1]||r;break}}else if(s.indexOf(i)>=0||o[i]<o[r]){p.push(i);break}a.push(i)}l[r]||p.push(r),t=t.substr(e.index+r.length)}return(t=t.trim())&&a.push(t),a.concat(p.reverse())}(t);return function(t){return function(t,e){var r,n,i,a,o,s,l=[];for(r=0;r<t.length;r++){if(o=t[r],a=p[o]){for(n=a.length,i=Array(n);n--;)i[n]=l.pop();try{s=a.apply(null,i)}catch(t){return t}}else s=e.hasOwnProperty(o)?e[o]:+o;l.push(s)}return l[0]}(e,t)}}var f={contextDelimiter:"�",onMissingKey:null};function d(t,e){var r;for(r in this.data=t,this.pluralForms={},this.options={},f)this.options[r]=void 0!==e&&r in e?e[r]:f[r]}d.prototype.getPluralForm=function(t,e){var r,n,i,a=this.pluralForms[t];return a||("function"!=typeof(i=(r=this.data[t][""])["Plural-Forms"]||r["plural-forms"]||r.plural_forms)&&(n=function(t){var e,r,n;for(e=t.split(";"),r=0;r<e.length;r++)if(0===(n=e[r].trim()).indexOf("plural="))return n.substr(7)}(r["Plural-Forms"]||r["plural-forms"]||r.plural_forms),i=function(t){var e=c(t);return function(t){return+e({n:t})}}(n)),a=this.pluralForms[t]=i),a(e)},d.prototype.dcnpgettext=function(t,e,r,n,i){var a,o,s;return a=void 0===i?0:this.getPluralForm(t,i),o=r,e&&(o=e+this.options.contextDelimiter+r),(s=this.data[t][o])&&s[a]?s[a]:(this.options.onMissingKey&&this.options.onMissingKey(r,t),0===a?r:n)};const h={plural_forms:t=>1===t?0:1},g=/^i18n\.(n?gettext|has_translation)(_|$)/,x=(t,e,r)=>{const n=new d({}),i=new Set,a=()=>
5699{i.forEach((t=>t()))},o=(t,e="default")=>{n.data[e]={...n.data[e],...t},n.data[e][""]={...h,...n.data[e]?.[""]},delete n.pluralForms[e]},s=(t,e)=>{o(t,e),a()},l=(t="default",e,r,i,a)=>(n.data[t]||o(void 0,t),n.dcnpgettext(t,e,r,i,a)),u=(t="default")=>t,p=(t,e,n)=>{let i=l(n,e,t);return r?(i=r.applyFilters("i18n.gettext_with_context",i,t,e,n),r.applyFilters("i18n.gettext_with_context_"+u(n),i,t,e,n)):i};if(t&&s(t,e),r){const t=t=>{g.test(t)&&a()};r.addAction("hookAdded","core/i18n",t),r.addAction("hookRemoved","core/i18n",t)}return{getLocaleData:(t="default")=>n.data[t],setLocaleData:s,addLocaleData:(t,e="default")=>{n.data[e]={...n.data[e],...t,"":{...h,...n.data[e]?.[""],...t?.[""]}},delete n.pluralForms[e],a()},resetLocaleData:(t,e)=>{n.data={},n.pluralForms={},s(t,e)},subscribe:t=>(i.add(t),()=>i.delete(t)),__:(t,e)=>{let n=l(e,void 0,t);return r?(n=r.applyFilters("i18n.gettext",n,t,e),r.applyFilters("i18n.gettext_"+u(e),n,t,e)):n},_x:p,_n:(t,e,n,i)=>{let a=l(i,void 0,t,e,n);return r?(a=r.applyFilters("i18n.ngettext",a,t,e,n,i),r.applyFilters("i18n.ngettext_"+u(i),a,t,e,n,i)):a},_nx:(t,e,n,i,a)=>{let o=l(a,i,t,e,n);return r?(o=r.applyFilters("i18n.ngettext_with_context",o,t,e,n,i,a),r.applyFilters("i18n.ngettext_with_context_"+u(a),o,t,e,n,i,a)):o},isRTL:()=>"rtl"===p("ltr","text direction"),hasTranslation:(t,e,i)=>{const a=e?e+"�"+t:t;let o=!!n.data?.[null!=i?i:"default"]?.[a];return r&&(o=r.applyFilters("i18n.has_translation",o,t,e,i),o=r.applyFilters("i18n.has_translation_"+u(i),o,t,e,i)),o}}},y=window.wp.hooks,b=x(void 0,void 0,y.defaultHooks),_=b,v=b.getLocaleData.bind(b),m=b.setLocaleData.bind(b),w=b.resetLocaleData.bind(b),k=b.subscribe.bind(b),F=b.__.bind(b),S=b._x.bind(b),j=b._n.bind(b),L=b._nx.bind(b),T=b.isRTL.bind(b),D=b.hasTranslation.bind(b)})(),(window.wp=window.wp||{}).i18n=n})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.