(function($)

{"use strict";$(window).bind("pageshow",function(event){if(event.originalEvent.persisted){avia_site_preloader();}});$(document).ready(function()

{var aviabodyclasses=AviaBrowserDetection('html');$.avia_utilities=$.avia_utilities||{};if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&'ontouchstart'in document.documentElement)

{$.avia_utilities.isMobile=true;}

else

{$.avia_utilities.isMobile=false;}

if(aviabodyclasses.indexOf("avia-msie-7")==-1)avia_responsive_menu();avia_header_size();avia_sidebar_menu();avia_sticky_submenu();avia_hamburger_menu();avia_scroll_top_fade();avia_site_preloader();new $.AviaTooltip({"class":'avia-search-tooltip',data:'avia-search-tooltip',event:'click',position:'bottom',scope:"body",attach:'element'});new $.AviaTooltip({"class":'avia-related-tooltip',data:'avia-related-tooltip',scope:".related_posts, .av-share-box",attach:'element',delay:0});new $.AviaAjaxSearch({scope:'#header'});if($.fn.avia_iso_sort)

$('.grid-sort-container').avia_iso_sort();if($.fn.aviaMegamenu)

$(".main_menu .menu").aviaMegamenu({modify_position:true});$.avia_utilities.avia_ajax_call();});$.avia_utilities=$.avia_utilities||{};$.avia_utilities.avia_ajax_call=function(container)

{if(typeof container=='undefined'){container='body';};$('a.avianolink').on('click',function(e){e.preventDefault();});$('a.aviablank').attr('target','_blank');$(container).avia_activate_lightbox();if($.fn.avia_scrollspy)

{if(container=='body')

{$('body').avia_scrollspy({target:'.main_menu .menu li > a'});}

else

{$('body').avia_scrollspy('refresh');}}

if($.fn.avia_smoothscroll)

$('a[href*="#"]',container).avia_smoothscroll(container);avia_small_fixes(container);avia_hover_effect(container);avia_iframe_fix(container);if($.fn.avia_html5_activation&&$.fn.mediaelementplayer)

$(".avia_video, .avia_audio",container).avia_html5_activation({ratio:'16:9'});}

$.avia_utilities.log=function(text,type,extra)

{if(typeof console=='undefined'){return;}if(typeof type=='undefined'){type="log"}type="AVIA-"+type.toUpperCase();console.log("["+type+"] "+text);if(typeof extra!='undefined')console.log(extra);}

function AviaScrollSpy(element,options)

{var self=this;var process=$.proxy(self.process,self),refresh=$.proxy(self.refresh,self),$element=$(element).is('body')?$(window):$(element),href

self.$body=$('body')

self.$win=$(window)

self.options=$.extend({},$.fn.avia_scrollspy.defaults,options)

self.selector=(self.options.target||((href=$(element).attr('href'))&&href.replace(/.*(?=#[^\s]+$)/,''))||'')

self.activation_true=false;if(self.$body.find(self.selector+"[href*='#']").length)

{self.$scrollElement=$element.on('scroll.scroll-spy.data-api',process);self.$win.on('av-height-change',refresh);self.$body.on('av_resize_finished',refresh);self.activation_true=true;self.checkFirst();setTimeout(function()

{self.refresh()

self.process()},100);}}

AviaScrollSpy.prototype={constructor:AviaScrollSpy,checkFirst:function(){var current=window.location.href.split('#')[0],matching_link=this.$body.find(this.selector+"[href='"+current+"']").attr('href',current+'#top');},refresh:function(){if(!this.activation_true)return;var self=this,$targets

this.offsets=$([])

this.targets=$([])

$targets=this.$body.find(this.selector).map(function(){var $el=$(this),href=$el.data('target')||$el.attr('href'),hash=this.hash,hash=hash.replace(/\//g,""),$href=/^#\w/.test(hash)&&$(hash)

return($href&&$href.length&&[[$href.position().top+(!$.isWindow(self.$scrollElement.get(0))&&self.$scrollElement.scrollTop()),href]])||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){self.offsets.push(this[0])

self.targets.push(this[1])})},process:function(){if(!this.offsets)return;if(isNaN(this.options.offset))this.options.offset=0;var scrollTop=this.$scrollElement.scrollTop()+this.options.offset,scrollHeight=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,maxScroll=scrollHeight-this.$scrollElement.height(),offsets=this.offsets,targets=this.targets,activeTarget=this.activeTarget,i

if(scrollTop>=maxScroll){return activeTarget!=(i=targets.last()[0])&&this.activate(i)}

for(i=offsets.length;i--;){activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(!offsets[i+1]||scrollTop<=offsets[i+1])&&this.activate(targets[i])}},activate:function(target){var active,selector

this.activeTarget=target

$(this.selector).parent('.'+this.options.applyClass).removeClass(this.options.applyClass)

selector=this.selector

+'[data-target="'+target+'"],'

+this.selector+'[href="'+target+'"]'

active=$(selector).parent('li').addClass(this.options.applyClass)

if(active.parent('.sub-menu').length){active=active.closest('li.dropdown_ul_available').addClass(this.options.applyClass)}

active.trigger('activate')}}

$.fn.avia_scrollspy=function(option){return this.each(function(){var $this=$(this),data=$this.data('scrollspy'),options=typeof option=='object'&&option

if(!data)$this.data('scrollspy',(data=new AviaScrollSpy(this,options)))

if(typeof option=='string')data[option]()})}

$.fn.avia_scrollspy.Constructor=AviaScrollSpy

$.fn.avia_scrollspy.calc_offset=function()

{var offset_1=(parseInt($('.html_header_sticky #main').data('scroll-offset'),10))||0,offset_2=($(".html_header_sticky:not(.html_top_nav_header) #header_main_alternate").outerHeight())||0,offset_3=($(".html_header_sticky.html_header_unstick_top_disabled #header_meta").outerHeight())||0,offset_4=1,offset_5=parseInt($('html').css('margin-top'),10)||0,offset_6=parseInt($('.av-frame-top ').outerHeight(),10)||0;return offset_1+offset_2+offset_3+offset_4+offset_5+offset_6;}

$.fn.avia_scrollspy.defaults={offset:$.fn.avia_scrollspy.calc_offset(),applyClass:'current-menu-item'}

function avia_site_preloader()

{var win=$(window),preloader_active=$('html.av-preloader-active'),pre_wrap;if(preloader_active.length)

{var hide=function()

{pre_wrap.avia_animate({opacity:0},function()

{preloader_active.removeClass('av-preloader-active');});};pre_wrap=$('.av-siteloader-wrap');setTimeout(function()

{$.avia_utilities.preload({container:preloader_active,global_callback:hide});setTimeout(function()

{if(preloader_active.is('.av-preloader-active'))

{ 

hide();$.avia_utilities.log('Hide Preloader (Fallback)');}},4000);if(pre_wrap.is('.av-transition-enabled'))

{var comp=new RegExp(location.host),exclude=" .no-transition, .mfp-iframe, .lightbox-added, .grid-links-ajax a, #menu-item-search a";preloader_active.on('click','a:not('+exclude+')',function(e)

{if(!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey)

{var link=this;if(comp.test(link.href)&&link.href.split('#')[0]!=location.href.split('#')[0]&&link.target=="")

{if(link.href.indexOf('mailto:')==-1&&link.href.indexOf('add-to-cart=')==-1)

{e.preventDefault();preloader_active.addClass('av-preloader-active av-preloader-reactive');pre_wrap.avia_animate({opacity:1},function()

{window.location=link.href;});}}}});}},500);}}

function AviaBrowserDetection(outputClassElement)

{if(typeof($.browser)!=='undefined')

{var bodyclass='',version=$.browser.version?parseInt($.browser.version):"";if($.browser.msie){bodyclass+='avia-msie';}else if($.browser.webkit){bodyclass+='avia-webkit';}else if($.browser.mozilla)

{bodyclass+='avia-mozilla';}

if($.browser.version)bodyclass+=' '+bodyclass+'-'+version+' ';if($.browser.name)bodyclass+=' avia-'+$.browser.name+' avia-'+$.browser.name+'-'+version+' ';if($.browser.ipad){bodyclass+=' avia-ipad ';}else if($.browser.iphone){bodyclass+=' avia-iphone ';}else if($.browser.android){bodyclass+=' avia-android ';}else if($.browser.win){bodyclass+=' avia-windows ';}else if($.browser.mac){bodyclass+=' avia-mac ';}else if($.browser.linux){bodyclass+=' avia-linux ';}}

if(outputClassElement)$(outputClassElement).addClass(bodyclass)

return bodyclass;}

function avia_responsive_menu()

{var $html=$('html'),win=$(window),header=$('.responsive #header');if(!header.length)return;var menu=header.find('.main_menu ul:eq(0)'),first_level_items=menu.find('>li').length,container=$('#wrap_all'),show_menu_btn=$('#advanced_menu_toggle'),hide_menu_btn=$('#advanced_menu_hide'),mobile_advanced=menu.clone().attr({id:"mobile-advanced","class":""}),sub_hidden=$html.is('.html_header_mobile_behavior'),insert_menu=function()

{if(first_level_items==0)

{show_menu_btn.remove();}

else

{var after_menu=$('#header .logo');if(after_menu.length==0)after_menu="#main .logo:eq(0)";show_menu_btn.insertAfter(after_menu);mobile_advanced.find('.noMobile').remove();mobile_advanced.prependTo(container);hide_menu_btn.prependTo(container);}},set_height=function()

{var height=mobile_advanced.outerHeight(true),win_h=win.height();if(height<win_h)height=win_h;container.css({'height':height});mobile_advanced.css({position:'absolute','min-height':win_h});},hide_menu=function()

{container.removeClass('show_mobile_menu');setTimeout(function(){container.css({'height':"auto",'overflow':'hidden','minHeight':0});mobile_advanced.css({display:'none'});},600);return false;},autohide=function()

{if(container.is('.show_mobile_menu')&&hide_menu_btn.css('display')=='none'){hide_menu();}},show_menu=function()

{if(container.is('.show_mobile_menu'))

{hide_menu();}

else

{win.scrollTop(0);mobile_advanced.css({display:'block'});setTimeout(function(){container.addClass('show_mobile_menu');},10);set_height();}

return false;};$html.on('click','#mobile-advanced li a, #mobile-advanced .mega_menu_title',function()

{var current=$(this);if(sub_hidden)

{var list_item=current.siblings('ul, .avia_mega_div');if(current.siblings('ul').children('.avia_mega_text_block').length&&current.siblings('ul').children('li').length==1){list_item='';}

if(list_item.length)

{if(list_item.hasClass('visible_sublist'))

{list_item.removeClass('visible_sublist');}

else

{list_item.addClass('visible_sublist');}

set_height();return false;}}

if(current.filter('[href*="#"]').length)

{container.removeClass('show_mobile_menu');container.css({'height':"auto"});}});show_menu_btn.click(show_menu);hide_menu_btn.click(hide_menu);win.on('debouncedresize',autohide);insert_menu();}

$.fn.avia_html5_activation=function(options)

{var defaults={ratio:'16:9'};var options=$.extend(defaults,options),isMobile=$.avia_utilities.isMobile;this.each(function()

{var fv=$(this),id_to_apply='#'+fv.attr('id'),posterImg=fv.attr('poster');fv.mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,audioWidth:400,audioHeight:30,startVolume:0.8,loop:false,enableAutosize:false,features:['playpause','progress','current','duration','tracks','volume'],alwaysShowControls:false,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,enableKeyboard:true,pauseOtherPlayers:false,poster:posterImg,success:function(mediaElement,domObject){setTimeout(function()

{if(mediaElement.pluginType=='flash')

{mediaElement.addEventListener('canplay',function(){fv.trigger('av-mediajs-loaded');},false);}

else

{fv.trigger('av-mediajs-loaded').addClass('av-mediajs-loaded');}

mediaElement.addEventListener('ended',function(){fv.trigger('av-mediajs-ended');},false);},10);},error:function(){},keyActions:[]});});}

function avia_hover_effect(container)

{if($.avia_utilities.isMobile)return;var overlay="",cssTrans=$.avia_utilities.supports('transition');if(container=='body')

{var elements=$('#main a img').parents('a').not('.noLightbox, .noLightbox a, .avia-gallery-thumb a, .ls-wp-container a, .noHover, .noHover a, .av-logo-container .logo a').add('#main .avia-hover-fx');}

else

{var elements=$('a img',container).parents('a').not('.noLightbox, .noLightbox a, .avia-gallery-thumb a, .ls-wp-container a, .noHover, .noHover a, .av-logo-container .logo a').add('.avia-hover-fx',container);}

elements.each(function(e)

{var link=$(this),current=link.find('img:first');if(current.hasClass('alignleft'))link.addClass('alignleft').css({float:'left',margin:0,padding:0});if(current.hasClass('alignright'))link.addClass('alignright').css({float:'right',margin:0,padding:0});if(current.hasClass('aligncenter'))link.addClass('aligncenter').css({float:'none','text-align':'center',margin:0,padding:0});if(current.hasClass('alignnone'))

{link.addClass('alignnone').css({margin:0,padding:0});;if(!link.css('display')||link.css('display')=='inline'){link.css({display:'inline-block'});}}

if(!link.css('position')||link.css('position')=='static'){link.css({position:'relative',overflow:'hidden'});}

var url=link.attr('href'),span_class="overlay-type-video",opa=link.data('opacity')||0.7,overlay_offset=5,overlay=link.find('.image-overlay');if(url)

{if(url.match(/(jpg|gif|jpeg|png|tif)/))span_class="overlay-type-image";if(!url.match(/(jpg|gif|jpeg|png|\.tif|\.mov|\.swf|vimeo\.com|youtube\.com)/))span_class="overlay-type-extern";}

if(!overlay.length)

{overlay=$("<span class='image-overlay "+span_class+"'><span class='image-overlay-inside'></span></span>").appendTo(link);}

link.on('mouseenter',function(e)

{var current=link.find('img:first'),_self=current.get(0),outerH=current.outerHeight(),outerW=current.outerWidth(),pos=current.position(),linkCss=link.css('display'),overlay=link.find('.image-overlay');if(outerH>100)

{if(!overlay.length)

{overlay=$("<span class='image-overlay "+span_class+"'><span class='image-overlay-inside'></span></span>").appendTo(link);}

if(link.height()==0){link.addClass(_self.className);_self.className="";}

if(!linkCss||linkCss=='inline'){link.css({display:'block'});}

overlay.css({left:(pos.left-overlay_offset)+parseInt(current.css("margin-left"),10),top:pos.top+parseInt(current.css("margin-top"),10)}).css({overflow:'hidden',display:'block','height':outerH,'width':(outerW+(2*overlay_offset))});if(cssTrans===false)overlay.stop().animate({opacity:opa},400);}

else

{overlay.css({display:"none"});}}).on('mouseleave',elements,function(){if(overlay.length)

{if(cssTrans===false)overlay.stop().animate({opacity:0},400);}});});}

(function($)

{$.fn.avia_smoothscroll=function(apply_to_container)

{if(!this.length)return;var the_win=$(window),$header=$('#header'),$main=$('.html_header_top.html_header_sticky #main').not('.page-template-template-blank-php #main'),$meta=$('.html_header_top.html_header_unstick_top_disabled #header_meta'),$alt=$('.html_header_top:not(.html_top_nav_header) #header_main_alternate'),shrink=$('.html_header_top.html_header_shrinking').length,frame=$('.av-frame-top'),fixedMainPadding=0,isMobile=$.avia_utilities.isMobile,sticky_sub=$('.sticky_placeholder:first'),calc_main_padding=function()

{if($header.css('position')=="fixed")

{var tempPadding=parseInt($main.data('scroll-offset'),10)||0,non_shrinking=parseInt($meta.outerHeight(),10)||0,non_shrinking2=parseInt($alt.outerHeight(),10)||0;if(tempPadding>0&&shrink)

{tempPadding=(tempPadding/2)+non_shrinking+non_shrinking2;}

else

{tempPadding=tempPadding+non_shrinking+non_shrinking2;}

tempPadding+=parseInt($('html').css('margin-top'),10);fixedMainPadding=tempPadding;}

else

{fixedMainPadding=parseInt($('html').css('margin-top'),10);}

if(frame.length){fixedMainPadding+=frame.height();}};if(isMobile)shrink=false;calc_main_padding();the_win.on("debouncedresize av-height-change",calc_main_padding);var hash=window.location.hash.replace(/\//g,"");if(fixedMainPadding>0&&hash&&apply_to_container=='body'&&hash.charAt(1)!="!"&&hash.indexOf("=")===-1)

{var scroll_to_el=$(hash),modifier=0;if(scroll_to_el.length)

{the_win.on('scroll.avia_first_scroll',function()

{setTimeout(function(){if(sticky_sub.length&&scroll_to_el.offset().top>sticky_sub.offset().top){modifier=sticky_sub.outerHeight()-3;}

the_win.off('scroll.avia_first_scroll').scrollTop(scroll_to_el.offset().top-fixedMainPadding-modifier);},10);});}}

return this.each(function()

{$(this).click(function(e){var newHash=this.hash.replace(/\//g,""),clicked=$(this),data=clicked.data();if(newHash!=''&&newHash!='#'&&newHash!='#prev'&&newHash!='#next'&&!clicked.is('.comment-reply-link, #cancel-comment-reply-link, .no-scroll'))

{var container="",originHash="";if("#next-section"==newHash)

{originHash=newHash;container=clicked.parents('.container_wrap:eq(0)').nextAll('.container_wrap:eq(0)');newHash='#'+container.attr('id');}

else

{container=$(this.hash.replace(/\//g,""));}

if(container.length)

{var cur_offset=the_win.scrollTop(),container_offset=container.offset().top,target=container_offset-fixedMainPadding,hash=window.location.hash,hash=hash.replace(/\//g,""),oldLocation=window.location.href.replace(hash,''),newLocation=this,duration=data.duration||1200,easing=data.easing||'easeInOutQuint';if(sticky_sub.length&&container_offset>sticky_sub.offset().top){target-=sticky_sub.outerHeight()-3;}

if(oldLocation+newHash==newLocation||originHash)

{if(cur_offset!=target)

{if(!(cur_offset==0&&target<=0))

{$('html:not(:animated),body:not(:animated)').animate({scrollTop:target},duration,easing,function(){if(window.history.replaceState)

window.history.replaceState("","",newHash);});}}

e.preventDefault();}}}});});};})(jQuery);function avia_iframe_fix(container)

{var iframe=jQuery('iframe[src*="youtube.com"]:not(.av_youtube_frame)',container),youtubeEmbed=jQuery('iframe[src*="youtube.com"]:not(.av_youtube_frame) object, iframe[src*="youtube.com"]:not(.av_youtube_frame) embed',container).attr('wmode','opaque');iframe.each(function()

{var current=jQuery(this),src=current.attr('src');if(src)

{if(src.indexOf('?')!==-1)

{src+="&wmode=opaque";}

else

{src+="?wmode=opaque";}

current.attr('src',src);}});}

function avia_small_fixes(container)

{if(!container)container=document;var win=jQuery(window),iframes=jQuery('.avia-iframe-wrap iframe:not(.avia-slideshow iframe):not( iframe.no_resize):not(.avia-video iframe)',container),adjust_iframes=function()

{iframes.each(function(){var iframe=jQuery(this),parent=iframe.parent(),proportions=56.25;if(this.width&&this.height)

{proportions=(100/this.width)*this.height;parent.css({"padding-bottom":proportions+"%"});}});};adjust_iframes();}

(function($)

{$.fn.avia_activate_lightbox=function(variables)

{var defaults={groups:['.avia-slideshow','.avia-gallery','.av-instagram-pics','.portfolio-preview-image','.portfolio-preview-content','.isotope','.post-entry','.sidebar','#main','.main_menu'],autolinkElements:'a.lightbox, a[rel^="prettyPhoto"], a[rel^="lightbox"], a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg], a[href*=".jpg?"], a[href*=".png?"], a[href*=".gif?"], a[href*=".jpeg?"], a[href$=".mov"] , a[href$=".swf"] , a:regex(href, .vimeo\.com/[0-9]) , a[href*="youtube.com/watch"] , a[href*="screenr.com"], a[href*="iframe=true"]',videoElements:'a[href$=".mov"] , a[href$=".swf"] , a:regex(href, .vimeo\.com/[0-9]) , a[href*="youtube.com/watch"] , a[href*="screenr.com"], a[href*="iframe=true"]',exclude:'.noLightbox, .noLightbox a, .fakeLightbox, .lightbox-added, a[href*="dropbox.com"]',},options=$.extend({},defaults,variables),av_popup={type:'image',mainClass:'avia-popup mfp-zoom-in',tLoading:'',tClose:'',removalDelay:300,closeBtnInside:true,closeOnContentClick:false,midClick:true,fixedContentPos:false,image:{titleSrc:function(item){var title=item.el.attr('title');if(!title)title=item.el.find('img').attr('title');if(!title)title=item.el.parent().next('.wp-caption-text').html();if(typeof title=="undefined")return"";return title;}},gallery:{tPrev:'',tNext:'',tCounter:'%curr% / %total%',enabled:true,preload:[1,1]},callbacks:{beforeOpen:function()

{if(this.st.el&&this.st.el.data('fixed-content'))

{this.fixedContentPos=true;}},open:function()

{$.magnificPopup.instance.next=function(){var self=this;self.wrap.removeClass('mfp-image-loaded');setTimeout(function(){$.magnificPopup.proto.next.call(self);},120);}

$.magnificPopup.instance.prev=function(){var self=this;self.wrap.removeClass('mfp-image-loaded');setTimeout(function(){$.magnificPopup.proto.prev.call(self);},120);}

if(this.st.el&&this.st.el.data('av-extra-class'))

{this.wrap.addClass(this.currItem.el.data('av-extra-class'));}},imageLoadComplete:function()

{var self=this;setTimeout(function(){self.wrap.addClass('mfp-image-loaded');},16);},change:function(){if(this.currItem.el)

{var current=this.currItem.el;this.content.find('.av-extra-modal-content, .av-extra-modal-markup').remove();if(current.data('av-extra-content'))

{var extra=current.data('av-extra-content');this.content.append("<div class='av-extra-modal-content'>"+extra+"</div>");}

if(current.data('av-extra-markup'))

{var markup=current.data('av-extra-markup');this.wrap.append("<div class='av-extra-modal-markup'>"+markup+"</div>");}}},}},active=!$('html').is('.av-custom-lightbox');if(!active)return this;return this.each(function()

{var container=$(this),videos=$(options.videoElements,this).not(options.exclude).addClass('mfp-iframe'),ajaxed=!container.is('body')&&!container.is('.ajax_slide');for(var i=0;i<options.groups.length;i++)

{container.find(options.groups[i]).each(function()

{var links=$(options.autolinkElements,this);if(ajaxed)links.removeClass('lightbox-added');links.not(options.exclude).addClass('lightbox-added').magnificPopup(av_popup);});}});}})(jQuery);(function($)

{$.fn.aviaMegamenu=function(variables)

{var defaults={modify_position:true,delay:300};var options=$.extend(defaults,variables),win=$(window),width_select=$('html').is('.html_header_sidebar')?"#main":"#header",the_main=$(width_select+' .container:first'),css_block=$("<style type='text/css' id='av-browser-width-mm'></style>").appendTo('head:first'),calc_dimensions=function()

{var css="",w_12=Math.round(the_main.width());css+=" #header .three.units{width:"+(w_12*0.25)+"px;}";css+=" #header .six.units{width:"+(w_12*0.50)+"px;}";css+=" #header .nine.units{width:"+(w_12*0.75)+"px;}";css+=" #header .twelve.units{width:"+(w_12)+"px;}";try{css_block.text(css);}

catch(err){css_block.remove();css_block=$("<style type='text/css' id='av-browser-width-mm'>"+css+"</style>").appendTo('head:first');}};if($('.avia_mega_div').length>0)

{win.on('debouncedresize',calc_dimensions);calc_dimensions();}

return this.each(function()

{var the_html=$('html:first'),main=$('#main .container:first'),left_menu=the_html.filter('.html_menu_left, .html_logo_center').length,isMobile=$.avia_utilities.isMobile,menu=$(this),menuItems=menu.find(">li:not(.ignore_menu)"),megaItems=menuItems.find(">div").parent().css({overflow:'hidden'}),menuActive=menu.find('>.current-menu-item>a, >.current_page_item>a'),dropdownItems=menuItems.find(">ul").parent(),parentContainer=menu.parent(),mainMenuParent=menu.parents('.main_menu').eq(0),parentContainerWidth=parentContainer.width(),delayCheck={},mega_open=[];if(!menuActive.length){menu.find('.current-menu-ancestor:eq(0) a:eq(0), .current_page_ancestor:eq(0) a:eq(0)').parent().addClass('active-parent-item')}

if(!the_html.is('.html_header_top')){options.modify_position=false;}

menuItems.on('click','a',function()

{if(this.href==window.location.href+"#"||this.href==window.location.href+"/#")

return false;});menuItems.each(function()

{var item=$(this),pos=item.position(),megaDiv=item.find("div:first").css({opacity:0,display:"none"}),normalDropdown="";if(!megaDiv.length)

{normalDropdown=item.find(">ul").css({display:"none"});}

if(megaDiv.length||normalDropdown.length)

{var link=item.addClass('dropdown_ul_available').find('>a');link.append('<span class="dropdown_available"></span>');if(typeof link.attr('href')!='string'||link.attr('href')=="#"){link.css('cursor','default').click(function(){return false;});}}

if(options.modify_position&&megaDiv.length)

{item.on('mouseenter',function(){calc_offset(item,pos,megaDiv,parentContainerWidth)});}});function calc_offset(item,pos,megaDiv,parentContainerWidth)

{pos=item.position();if(!left_menu)

{if(pos.left+megaDiv.width()<parentContainerWidth)

{megaDiv.css({right:-megaDiv.outerWidth()+item.outerWidth()});}

else if(pos.left+megaDiv.width()>parentContainerWidth)

{megaDiv.css({right:-mainMenuParent.outerWidth()+(pos.left+item.outerWidth())});}}

else

{if(megaDiv.width()>pos.left+item.outerWidth())

{megaDiv.css({left:(pos.left*-1)});}

else if(pos.left+megaDiv.width()>parentContainerWidth)

{megaDiv.css({left:(megaDiv.width()-pos.left)*-1});}}}

function megaDivShow(i)

{if(delayCheck[i]==true)

{var item=megaItems.filter(':eq('+i+')').css({overflow:'visible'}).find("div:first"),link=megaItems.filter(':eq('+i+')').find("a:first");mega_open["check"+i]=true;item.stop().css('display','block').animate({opacity:1},300);if(item.length)

{link.addClass('open-mega-a');}}}

function megaDivHide(i)

{if(delayCheck[i]==false)

{megaItems.filter(':eq('+i+')').find(">a").removeClass('open-mega-a');var listItem=megaItems.filter(':eq('+i+')'),item=listItem.find("div:first");item.stop().css('display','block').animate({opacity:0},300,function()

{$(this).css('display','none');listItem.css({overflow:'hidden'});mega_open["check"+i]=false;});}}

if(isMobile)

{megaItems.each(function(i){$(this).bind('click',function()

{if(mega_open["check"+i]!=true)return false;});});}

megaItems.each(function(i){$(this).hover(function()

{delayCheck[i]=true;setTimeout(function(){megaDivShow(i);},options.delay);},function()

{delayCheck[i]=false;setTimeout(function(){megaDivHide(i);},options.delay);});});dropdownItems.find('li').addBack().each(function()

{var currentItem=$(this),sublist=currentItem.find('ul:first'),showList=false;if(sublist.length)

{sublist.css({display:'block',opacity:0,visibility:'hidden'});var currentLink=currentItem.find('>a');currentLink.bind('mouseenter',function()

{sublist.stop().css({visibility:'visible'}).animate({opacity:1});});currentItem.bind('mouseleave',function()

{sublist.stop().animate({opacity:0},function()

{sublist.css({visibility:'hidden'});});});}});});};})(jQuery);$.fn.avia_iso_sort=function(options)

{return this.each(function()

{var the_body=$('body'),container=$(this),portfolio_id=container.data('portfolio-id'),parentContainer=container.parents('.entry-content-wrapper, .avia-fullwidth-portfolio'),filter=parentContainer.find('.sort_width_container[data-portfolio-id="'+portfolio_id+'"]').find('#js_sort_items').css({visibility:"visible",opacity:0}),links=filter.find('a'),imgParent=container.find('.grid-image'),isoActive=false,items=$('.post-entry',container);function applyIso()

{container.addClass('isotope_activated').isotope({layoutMode:'fitRows',itemSelector:'.flex_column'});container.isotope('on','layoutComplete',function()

{container.css({overflow:'visible'});the_body.trigger('av_resize_finished');});isoActive=true;setTimeout(function(){parentContainer.addClass('avia_sortable_active');},0);};links.bind('click',function()

{var current=$(this),selector=current.data('filter'),linktext=current.html(),activeCat=parentContainer.find('.av-current-sort-title');if(activeCat.length)activeCat.html(linktext);links.removeClass('active_sort');current.addClass('active_sort');container.attr('id','grid_id_'+selector);parentContainer.find('.open_container .ajax_controlls .avia_close').trigger('click');container.isotope({layoutMode:'fitRows',itemSelector:'.flex_column',filter:'.'+selector});return false;});$(window).on('debouncedresize',function()

{applyIso();});$.avia_utilities.preload({container:container,single_callback:function()

{filter.animate({opacity:1},400);applyIso();setTimeout(function(){applyIso();});imgParent.css({height:'auto'}).each(function(i)

{var currentLink=$(this);setTimeout(function()

{currentLink.animate({opacity:1},1500);},(100*i));});}});});};function avia_sticky_submenu()

{var win=$(window),html=$('html:first'),header=$('.html_header_top.html_header_sticky #header'),html_margin=parseInt($('html:first').css('margin-top'),10),setWitdth=$('.html_header_sidebar #main, .boxed #main'),menus=$('.av-submenu-container'),bordermod=html.is('.html_minimal_header')?0:1,fixed_frame=$('.av-frame-top').height(),calc_margin=function()

{html_margin=parseInt(html.css('margin-top'),10);if(!$('.mobile_menu_toggle:visible').length)

{$('.av-open-submenu').removeClass('av-open-submenu');}},calc_values=function()

{var content_width=setWitdth.width();html_margin=parseInt(html.css('margin-top'),10);menus.width(content_width);},check=function(placeholder,no_timeout)

{var menu_pos=this.offset().top,top_pos=placeholder.offset().top,scrolled=win.scrollTop(),modifier=html_margin,fixed=false;if(header.length)

{modifier+=header.outerHeight()+parseInt(header.css('margin-top'),10);}

if(fixed_frame)

{modifier+=fixed_frame;}

if(scrolled+modifier>top_pos)

{if(!fixed)

{this.css({top:modifier-bordermod,position:'fixed'});fixed=true}}

else

{this.css({top:'auto',position:'absolute'});fixed=false}},toggle=function(e)

{e.preventDefault();var clicked=$(this),menu=clicked.siblings('.av-subnav-menu');if(menu.hasClass('av-open-submenu'))

{menu.removeClass('av-open-submenu');}

else

{menu.addClass('av-open-submenu');}};win.on("debouncedresize av-height-change",calc_margin);calc_margin();if(setWitdth.length)

{win.on("debouncedresize av-height-change",calc_values);calc_values();}

$(".av-sticky-submenu").each(function()

{var menu=$(this),placeholder=menu.next('.sticky_placeholder'),mobile_button=menu.find('.mobile_menu_toggle');win.on('scroll',function(){window.requestAnimationFrame($.proxy(check,menu,placeholder))});if(mobile_button.length)

{mobile_button.on('click',toggle);}});html.on('click','.av-submenu-hidden .av-open-submenu li a',function()

{var current=$(this);var list_item=current.siblings('ul, .avia_mega_div');if(list_item.length)

{if(list_item.hasClass('av-visible-sublist'))

{list_item.removeClass('av-visible-sublist');}

else

{list_item.addClass('av-visible-sublist');}

return false;}});$('.avia_mobile').on('click','.av-menu-mobile-disabled li a',function()

{var current=$(this);var list_item=current.siblings('ul');if(list_item.length)

{if(list_item.hasClass('av-visible-mobile-sublist'))

{}

else

{$('.av-visible-mobile-sublist').removeClass('av-visible-mobile-sublist');list_item.addClass('av-visible-mobile-sublist');return false;}}});}

function avia_sidebar_menu()

{var win=$(window),main=$('#main'),sb_header=$('.html_header_sidebar #header_main'),sidebar=$('.html_header_sidebar #header.av_conditional_sticky');if(!sb_header.length)return;if(!sidebar.length)return;var innerSidebar=$('#header_main'),wrap=$('#wrap_all'),fixed_frame=$('.av-frame-top').height()*2,subtract=parseInt($('html').css('margin-top'),10),calc_values=function()

{if(innerSidebar.outerHeight()+fixed_frame<win.height())

{sidebar.addClass('av_always_sticky');}

else

{sidebar.removeClass('av_always_sticky');}

wrap.css({'min-height':win.height()-subtract});};calc_values();win.on("debouncedresize av-height-change",calc_values);}

function av_change_class($element,change_method,class_name)

{if($element[0].classList)

{if(change_method=="add")

{$element[0].classList.add(class_name);}

else

{$element[0].classList.remove(class_name);}}

else

{if(change_method=="add")

{$element.addClass(class_name);}

else

{$element.removeClass(class_name);}}}

function avia_header_size()

{var win=$(window),header=$('.html_header_top.html_header_sticky #header'),unsticktop=$('.av_header_unstick_top');if(!header.length&&!unsticktop.length)return;var logo=$('#header_main .container .logo img, #header_main .container .logo a'),elements=$('#header_main .container:not(#header_main_alternate>.container), #header_main .main_menu ul:first-child > li > a:not(.avia_mega_div a, #header_main_alternate a), #header_main #menu-item-shop .cart_dropdown_link'),el_height=$(elements).filter(':first').height(),isMobile=$.avia_utilities.isMobile,scroll_top=$('#scroll-top-link'),transparent=header.is('.av_header_transparency'),shrinking=header.is('.av_header_shrinking'),topbar_height=header.find('#header_meta').outerHeight(),set_height=function()

{var st=win.scrollTop(),newH=0,st_real=st;if(unsticktop)st-=topbar_height;if(st<0)st=0;if(shrinking&&!isMobile)

{if(st<el_height/2)

{newH=el_height-st;if(st<=0){newH=el_height;}

av_change_class(header,'remove','header-scrolled');}

else

{newH=el_height/2;av_change_class(header,'add','header-scrolled');}

if(st-30<el_height)

{av_change_class(header,'remove','header-scrolled-full');}

else

{av_change_class(header,'add','header-scrolled-full');}

elements.css({'height':newH+'px','lineHeight':newH+'px'});logo.css({'maxHeight':newH+'px'});}

if(unsticktop.length)

{if(st<=0)

{if(st_real<=0)st_real=0;unsticktop.css({"margin-top":"-"+st_real+"px"});}

else

{unsticktop.css({"margin-top":"-"+topbar_height+"px"});}}

if(transparent)

{if(st>50)

{av_change_class(header,'remove','av_header_transparency');}

else

{av_change_class(header,'add','av_header_transparency');}}}

if($('body').is('.avia_deactivate_menu_resize'))shrinking=false;if(!transparent&&!shrinking&&!unsticktop.length)return;win.on('debouncedresize',function(){el_height=$(elements).attr('style',"").filter(':first').height();set_height();});win.on('scroll',function(){window.requestAnimationFrame(set_height)});set_height();}

function avia_scroll_top_fade()

{var win=$(window),timeo=false,scroll_top=$('#scroll-top-link'),set_status=function()

{var st=win.scrollTop();if(st<500)

{scroll_top.removeClass('avia_pop_class');}

else if(!scroll_top.is('.avia_pop_class'))

{scroll_top.addClass('avia_pop_class');}};win.on('scroll',function(){window.requestAnimationFrame(set_status)});set_status();}

function avia_hamburger_menu()

{var menu=$('#avia-menu'),burger_wrap=$('.av-burger-menu-main a'),burger=burger_wrap.find('.av-hamburger'),htmlEL=$('.html_burger_menu'),overlay=$('<div class="av-burger-overlay"></div>'),inner_overlay=$('<div class="av-burger-overlay-inner"></div>').appendTo(overlay),bgColor=$('<div class="av-burger-overlay-bg"></div>').appendTo(overlay),animating=false,first_level={};burger_wrap.click(function(e)

{if(animating)return;animating=true;if(!burger.is(".av-inserted-main-menu"))

{var new_menu=menu.clone();new_menu.find('.menu-item-avia-special').remove();new_menu.find('ul').attr('style','');new_menu.attr({id:'av-burger-menu-ul',class:''}).appendTo(inner_overlay);new_menu.find('li').hover(function(){$(this).children("ul.sub-menu").slideDown('fast');},function(){$(this).children("ul.sub-menu").slideUp('fast');});burger.addClass("av-inserted-main-menu");overlay.appendTo('.avia-menu');if($.fn.avia_smoothscroll)

$('a[href*="#"]',overlay).avia_smoothscroll(overlay);$('a[href*="#"]',overlay).click(function(){burger_wrap.trigger('click');})

first_level=overlay.find('#av-burger-menu-ul > li');console.log(first_level);}

if(burger.is(".is-active"))

{burger.removeClass("is-active");overlay.avia_animate({opacity:0},function()

{overlay.css({display:'none'});htmlEL.removeClass("av-burger-overlay-active");animating=false;});}

else

{first_level.removeClass('av-active-burger-items');burger.addClass("is-active");htmlEL.addClass("av-burger-overlay-active");overlay.css({display:'block'}).avia_animate({opacity:1},function()

{animating=false;});first_level.each(function(i)

{var _self=$(this);setTimeout(function()

{_self.addClass('av-active-burger-items');},(i+1)*125)});}

e.preventDefault();});}

$.AviaAjaxSearch=function(options)

{var defaults={delay:300,minChars:3,scope:'body'}

this.options=$.extend({},defaults,options);this.scope=$(this.options.scope);this.timer=false;this.lastVal="";this.bind_events();}

$.AviaAjaxSearch.prototype={bind_events:function()

{this.scope.on('keyup','#s:not(".av_disable_ajax_search #s")',$.proxy(this.try_search,this));},try_search:function(e)

{clearTimeout(this.timer);if(e.currentTarget.value.length>=this.options.minChars&&this.lastVal!=$.trim(e.currentTarget.value))

{this.timer=setTimeout($.proxy(this.do_search,this,e),this.options.delay);}},do_search:function(e)

{var obj=this,currentField=$(e.currentTarget).attr("autocomplete","off"),form=currentField.parents('form:eq(0)'),results=form.find('.ajax_search_response'),loading=$('<div class="ajax_load"><span class="ajax_load_inner"></span></div>'),action=form.attr('action'),values=form.serialize();values+='&action=avia_ajax_search';if(action.indexOf('?')!=-1)

{action=action.split('?');values+="&"+action[1];}

if(!results.length)results=$('<div class="ajax_search_response"></div>').appendTo(form);if(results.find('.ajax_not_found').length&&e.currentTarget.value.indexOf(this.lastVal)!=-1)return;this.lastVal=e.currentTarget.value;$.ajax({url:avia_framework_globals.ajaxurl,type:"POST",data:values,beforeSend:function()

{loading.insertAfter(currentField);},success:function(response)

{if(response==0)response="";results.html(response);},complete:function()

{loading.remove();}});}}

$.AviaTooltip=function(options)

{var defaults={delay:1500,delayOut:300,delayHide:0,"class":"avia-tooltip",scope:"body",data:"avia-tooltip",attach:"body",event:'mouseenter',position:'top',extraClass:'avia-tooltip-class',permanent:false}

this.options=$.extend({},defaults,options);this.body=$('body');this.scope=$(this.options.scope);this.tooltip=$('<div class="'+this.options['class']+' avia-tt"><span class="avia-arrow-wrap"><span class="avia-arrow"></span></span></div>');this.inner=$('<div class="inner_tooltip"></div>').prependTo(this.tooltip);this.open=false;this.timer=false;this.active=false;this.bind_events();}

$.AviaTooltip.openTTs=[];$.AviaTooltip.prototype={bind_events:function()

{var perma_tooltips='.av-permanent-tooltip [data-'+this.options.data+']',default_tooltips='[data-'+this.options.data+']:not( .av-permanent-tooltip [data-'+this.options.data+'])';this.scope.on('av_permanent_show',perma_tooltips,$.proxy(this.display_tooltip,this));$(perma_tooltips).addClass('av-perma-tooltip').trigger('av_permanent_show');this.scope.on(this.options.event+' mouseleave',default_tooltips,$.proxy(this.start_countdown,this));if(this.options.event!='click')

{this.scope.on('mouseleave',default_tooltips,$.proxy(this.hide_tooltip,this));}

else

{this.body.on('mousedown',$.proxy(this.hide_tooltip,this));}},start_countdown:function(e)

{clearTimeout(this.timer);if(e.type==this.options.event)

{var delay=this.options.event=='click'?0:this.open?0:this.options.delay;this.timer=setTimeout($.proxy(this.display_tooltip,this,e),delay);}

else if(e.type=='mouseleave')

{this.timer=setTimeout($.proxy(this.stop_instant_open,this,e),this.options.delayOut);}

e.preventDefault();},reset_countdown:function(e)

{clearTimeout(this.timer);this.timer=false;},display_tooltip:function(e)

{var target=this.options.event=="click"?e.target:e.currentTarget,element=$(target),text=element.data(this.options.data),newTip=element.data('avia-created-tooltip'),extraClass=element.data('avia-tooltip-class'),attach=this.options.attach=='element'?element:this.body,offset=this.options.attach=='element'?element.position():element.offset(),position=element.data('avia-tooltip-position'),align=element.data('avia-tooltip-alignment'),force_append=false;text=$.trim(text);if(element.is('.av-perma-tooltip'))

{offset={top:0,left:0};attach=element;force_append=true;}

if(text=="")return;if(position==""||typeof position=='undefined')position=this.options.position;if(align==""||typeof align=='undefined')align='center';if(typeof newTip!='undefined')

{newTip=$.AviaTooltip.openTTs[newTip];}

else

{this.inner.html(text);newTip=this.tooltip.clone();if(this.options.attach=='element'&&force_append!==true)

{newTip.insertAfter(attach);}

else

{newTip.appendTo(attach);}

if(extraClass!="")newTip.addClass(extraClass);}

this.open=true;this.active=newTip;if((newTip.is(':animated:visible')&&e.type=='click')||element.is('.'+this.options['class'])||element.parents('.'+this.options['class']).length!=0)return;var animate1={},animate2={},pos1="",pos2="";if(position=="top"|| position=="bottom")

{switch(align)

{case"left":pos2=offset.left;break;case"right":pos2=offset.left+element.outerWidth()-newTip.outerWidth();break;default:pos2=(offset.left+(element.outerWidth()/2))-(newTip.outerWidth()/2);break;}}

else

{switch(align)

{case"top":pos1=offset.top;break;case"bottom":pos1=offset.top+element.outerHeight()-newTip.outerHeight();break;default:pos1=(offset.top+(element.outerHeight()/2))-(newTip.outerHeight()/2);break;}}

switch(position)

{case"top":pos1=offset.top-newTip.outerHeight();animate1={top:pos1-10,left:pos2};animate2={top:pos1};break;case"bottom":pos1=offset.top+element.outerHeight();animate1={top:pos1+10,left:pos2};animate2={top:pos1};break;case"left":pos2=offset.left-newTip.outerWidth();animate1={top:pos1,left:pos2-10};animate2={left:pos2};break;case"right":pos2=offset.left+element.outerWidth();animate1={top:pos1,left:pos2+10};animate2={left:pos2};break;}

animate1['display']="block";animate1['opacity']=0;animate2['opacity']=1;newTip.css(animate1).stop().animate(animate2,200);newTip.find('input, textarea').focus();$.AviaTooltip.openTTs.push(newTip);element.data('avia-created-tooltip',$.AviaTooltip.openTTs.length-1);},hide_tooltip:function(e)

{var element=$(e.currentTarget),newTip,animateTo,position=element.data('avia-tooltip-position'),align=element.data('avia-tooltip-alignment');if(position==""||typeof position=='undefined')position=this.options.position;if(align==""||typeof align=='undefined')align='center';if(this.options.event=='click')

{element=$(e.target);if(!element.is('.'+this.options['class'])&&element.parents('.'+this.options['class']).length==0)

{if(this.active.length){newTip=this.active;this.active=false;}}}

else

{newTip=element.data('avia-created-tooltip');newTip=typeof newTip!='undefined'?$.AviaTooltip.openTTs[newTip]:false;}

if(newTip)

{var animate={opacity:0};switch(position)

{case"top":animate['top']=parseInt(newTip.css('top'),10)-10;break;case"bottom":animate['top']=parseInt(newTip.css('top'),10)+10;break;case"left":animate['left']=parseInt(newTip.css('left'),10)-10;break;case"right":animate['left']=parseInt(newTip.css('left'),10)+10;break;}

newTip.animate(animate,200,function()

{newTip.css({display:'none'});});}},stop_instant_open:function(e)

{this.open=false;}}})(jQuery);

/*!

 * Isotope PACKAGED v2.0.0

 * Filter & sort magical layouts

 * http://isotope.metafizzy.co

 */

(function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function n(e,i){t.fn[e]=function(n){if("string"==typeof n){for(var s=o.call(arguments,1),a=0,u=this.length;u>a;a++){var p=this[a],h=t.data(p,e);if(h)if(t.isFunction(h[n])&&"_"!==n.charAt(0)){var f=h[n].apply(h,s);if(void 0!==f)return f}else r("no such method '"+n+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+n+"'")}return this}return this.each(function(){var o=t.data(this,e);o?(o.option(n),o._init()):(o=new i(this,n),t.data(this,e,o))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),n(t,e)},t.bridget}}var o=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i(t.jQuery)})(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(o=function(t,i,o){t[i+o]=o.handleEvent?function(){var i=e(t);o.handleEvent.call(o,i)}:function(){var i=e(t);o.call(t,i)},t.attachEvent("on"+i,t[i+o])});var n=function(){};i.removeEventListener?n=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(n=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(o){t[e+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(this),function(t){function e(t){"function"==typeof t&&(e.isReady?t():r.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==n.readyState;if(!e.isReady&&!i){e.isReady=!0;for(var o=0,s=r.length;s>o;o++){var a=r[o];a()}}}function o(o){return o.bind(n,"DOMContentLoaded",i),o.bind(n,"readystatechange",i),o.bind(t,"load",i),e}var n=t.document,r=[];e.isReady=!1,"function"==typeof define&&define.amd?(e.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],o)):t.docReady=o(t.eventie)}(this),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var o=t.prototype,n=this,r=n.EventEmitter;o.getListeners=function(t){var e,i,o=this._getEvents();if(t instanceof RegExp){e={};for(i in o)o.hasOwnProperty(i)&&t.test(i)&&(e[i]=o[i])}else e=o[t]||(o[t]=[]);return e},o.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},o.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},o.addListener=function(t,i){var o,n=this.getListenersAsObject(t),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===e(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(t){return this.getListeners(t),this},o.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},o.removeListener=function(t,i){var o,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&(o=e(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},o.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},o.manipulateListeners=function(t,e,i){var o,n,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(o=i.length;o--;)r.call(this,e,i[o]);else for(o in e)e.hasOwnProperty(o)&&(n=e[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(t){var e,i=typeof t,o=this._getEvents();if("string"===i)delete o[t];else if(t instanceof RegExp)for(e in o)o.hasOwnProperty(e)&&t.test(e)&&delete o[e];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(t,e){var i,o,n,r,s=this.getListenersAsObject(t);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},o.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return n.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof o[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,r=i.length;r>n;n++)if(e=i[n]+t,"string"==typeof o[e])return e}}var i="Webkit Moz ms Ms O".split(" "),o=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var o=s[e];t[o]=0}return t}function o(t){function o(t){if("string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var o=r(t);if("none"===o.display)return i();var n={};n.width=t.offsetWidth,n.height=t.offsetHeight;for(var h=n.isBorderBox=!(!p||!o[p]||"border-box"!==o[p]),f=0,c=s.length;c>f;f++){var d=s[f],l=o[d];l=a(t,l);var y=parseFloat(l);n[d]=isNaN(y)?0:y}var m=n.paddingLeft+n.paddingRight,g=n.paddingTop+n.paddingBottom,v=n.marginLeft+n.marginRight,_=n.marginTop+n.marginBottom,I=n.borderLeftWidth+n.borderRightWidth,L=n.borderTopWidth+n.borderBottomWidth,z=h&&u,S=e(o.width);S!==!1&&(n.width=S+(z?0:m+I));var b=e(o.height);return b!==!1&&(n.height=b+(z?0:g+L)),n.innerWidth=n.width-(m+I),n.innerHeight=n.height-(g+L),n.outerWidth=n.width+v,n.outerHeight=n.height+_,n}}function a(t,e){if(n||-1===e.indexOf("%"))return e;var i=t.style,o=i.left,r=t.runtimeStyle,s=r&&r.left;return s&&(r.left=t.currentStyle.left),i.left=e,e=i.pixelLeft,i.left=o,s&&(r.left=s),e}var u,p=t("boxSizing");return function(){if(p){var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style[p]="border-box";var i=document.body||document.documentElement;i.appendChild(t);var o=r(t);u=200===e(o.width),i.removeChild(t)}}(),o}var n=t.getComputedStyle,r=n?function(t){return n(t,null)}:function(t){return t.currentStyle},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],o):"object"==typeof exports?module.exports=o(require("get-style-property")):t.getSize=o(t.getStyleProperty)}(window),function(t,e){function i(t,e){return t[a](e)}function o(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function n(t,e){o(t);for(var i=t.parentNode.querySelectorAll(e),n=0,r=i.length;r>n;n++)if(i[n]===t)return!0;return!1}function r(t,e){return o(t),i(t,e)}var s,a=function(){if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],i=0,o=t.length;o>i;i++){var n=t[i],r=n+"MatchesSelector";if(e[r])return r}}();if(a){var u=document.createElement("div"),p=i(u,"div");s=p?i:r}else s=n;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return s}):window.matchesSelector=s}(this,Element.prototype),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){for(var e in t)return!1;return e=null,!0}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function n(t,n,r){function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var u=r("transition"),p=r("transform"),h=u&&p,f=!!r("perspective"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[u],d=["transform","transition","transitionDuration","transitionProperty"],l=function(){for(var t={},e=0,i=d.length;i>e;e++){var o=d[e],n=r(o);n&&n!==o&&(t[o]=n)}return t}();e(a.prototype,t.prototype),a.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.getSize=function(){this.size=n(this.element)},a.prototype.css=function(t){var e=this.element.style;for(var i in t){var o=l[i]||i;e[o]=t[i]}},a.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,o=e.isOriginTop,n=parseInt(t[i?"left":"right"],10),r=parseInt(t[o?"top":"bottom"],10);n=isNaN(n)?0:n,r=isNaN(r)?0:r;var a=this.layout.size;n-=i?a.paddingLeft:a.paddingRight,r-=o?a.paddingTop:a.paddingBottom,this.position.x=n,this.position.y=r},a.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={};e.isOriginLeft?(i.left=this.position.x+t.paddingLeft+"px",i.right=""):(i.right=this.position.x+t.paddingRight+"px",i.left=""),e.isOriginTop?(i.top=this.position.y+t.paddingTop+"px",i.bottom=""):(i.bottom=this.position.y+t.paddingBottom+"px",i.top=""),this.css(i),this.emitEvent("layout",[this])};var y=f?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};a.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),r=parseInt(e,10),s=n===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-i,u=e-o,p={},h=this.layout.options;a=h.isOriginLeft?a:-a,u=h.isOriginTop?u:-u,p.transform=y(a,u),this.transition({to:p,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},a.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},a.prototype.moveTo=h?a.prototype._transitionTo:a.prototype.goTo,a.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},a.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},a.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t),void 0;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 m=p&&o(p)+",opacity";a.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(c,this,!1))},a.prototype.transition=a.prototype[u?"_transition":"_nonTransition"],a.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},a.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};a.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=g[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])}},a.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(c,this,!1),this.isTransitioning=!1},a.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return a.prototype.removeTransitionStyles=function(){this.css(v)},a.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},a.prototype.remove=function(){if(!u||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.on("transitionEnd",function(){return t.removeElem(),!0}),this.hide()},a.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options;this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0})},a.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options;this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},a.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}var r=t.getComputedStyle,s=r?function(t){return r(t,null)}:function(t){return t.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],n):(t.Outlayer={},t.Outlayer.Item=n(t.EventEmitter,t.getSize,t.getStyleProperty))}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===f.call(t)}function o(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=d(e,t);-1!==i&&e.splice(i,1)}function r(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()}function s(i,s,f,d,l,y){function m(t,i){if("string"==typeof t&&(t=a.querySelector(t)),!t||!c(t))return u&&u.error("Bad "+this.constructor.namespace+" element: "+t),void 0;this.element=t,this.options=e({},this.constructor.defaults),this.option(i);var o=++g;this.element.outlayerGUID=o,v[o]=this,this._create(),this.options.isInitLayout&&this.layout()}var g=0,v={};return m.namespace="outlayer",m.Item=y,m.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e(m.prototype,f.prototype),m.prototype.option=function(t){e(this.options,t)},m.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},m.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},m.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0,r=e.length;r>n;n++){var s=e[n],a=new i(s,this);o.push(a)}return o},m.prototype._filterFindItemElements=function(t){t=o(t);for(var e=this.options.itemSelector,i=[],n=0,r=t.length;r>n;n++){var s=t[n];if(c(s))if(e){l(s,e)&&i.push(s);for(var a=s.querySelectorAll(e),u=0,p=a.length;p>u;u++)i.push(a[u])}else i.push(s)}return i},m.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},m.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},m.prototype._init=m.prototype.layout,m.prototype._resetLayout=function(){this.getSize()},m.prototype.getSize=function(){this.size=d(this.element)},m.prototype._getMeasurement=function(t,e){var i,o=this.options[t];o?("string"==typeof o?i=this.element.querySelector(o):c(o)&&(i=o),this[t]=i?d(i)[e]:o):this[t]=0},m.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},m.prototype._getItemsForLayout=function(t){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i];n.isIgnored||e.push(n)}return e},m.prototype._layoutItems=function(t,e){function i(){o.emitEvent("layoutComplete",[o,t])}var o=this;if(!t||!t.length)return i(),void 0;this._itemsOn(t,"layout",i);for(var n=[],r=0,s=t.length;s>r;r++){var a=t[r],u=this._getItemLayoutPosition(a);u.item=a,u.isInstant=e||a.isLayoutInstant,n.push(u)}this._processLayoutQueue(n)},m.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},m.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];this._positionItem(o.item,o.x,o.y,o.isInstant)}},m.prototype._positionItem=function(t,e,i,o){o?t.goTo(e,i):t.moveTo(e,i)},m.prototype._postLayout=function(){this.resizeContainer()},m.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},m.prototype._getContainerSize=h,m.prototype._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"}},m.prototype._itemsOn=function(t,e,i){function o(){return n++,n===r&&i.call(s),!0}for(var n=0,r=t.length,s=this,a=0,u=t.length;u>a;a++){var p=t[a];p.on(e,o)}},m.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},m.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},m.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,i=t.length;i>e;e++){var o=t[e];this.ignore(o)}}},m.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var o=t[e];n(o,this.stamps),this.unignore(o)}},m.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o(t)):void 0},m.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},m.prototype._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)}},m.prototype._manageStamp=h,m.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=d(t),n={left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom};return n},m.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},m.prototype.bindResize=function(){this.isResizeBound||(i.bind(t,"resize",this),this.isResizeBound=!0)},m.prototype.unbindResize=function(){this.isResizeBound&&i.unbind(t,"resize",this),this.isResizeBound=!1},m.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},m.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},m.prototype.needsResizeLayout=function(){var t=d(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},m.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},m.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},m.prototype.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)}},m.prototype.reveal=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.reveal()}},m.prototype.hide=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.hide()}},m.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];if(o.element===t)return o}},m.prototype.getItems=function(t){if(t&&t.length){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i],r=this.getItem(n);r&&e.push(r)}return e}},m.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(e&&e.length){this._itemsOn(e,"remove",function(){this.emitEvent("removeComplete",[this,e])});for(var i=0,r=e.length;r>i;i++){var s=e[i];s.remove(),n(s,this.items)}}},m.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];o.destroy()}this.unbindResize(),delete this.element.outlayerGUID,p&&p.removeData(this.element,this.constructor.namespace)},m.data=function(t){var e=t&&t.outlayerGUID;return e&&v[e]},m.create=function(t,i){function o(){m.apply(this,arguments)}return Object.create?o.prototype=Object.create(m.prototype):e(o.prototype,m.prototype),o.prototype.constructor=o,o.defaults=e({},m.defaults),e(o.defaults,i),o.prototype.settings={},o.namespace=t,o.data=m.data,o.Item=function(){y.apply(this,arguments)},o.Item.prototype=new y,s(function(){for(var e=r(t),i=a.querySelectorAll(".js-"+e),n="data-"+e+"-options",s=0,h=i.length;h>s;s++){var f,c=i[s],d=c.getAttribute(n);try{f=d&&JSON.parse(d)}catch(l){u&&u.error("Error parsing "+n+" on "+c.nodeName.toLowerCase()+(c.id?"#"+c.id:"")+": "+l);continue}var y=new o(c,f);p&&p.data(c,t,y)}}),p&&p.bridget&&p.bridget(t,o),o},m.Item=y,m}var a=t.document,u=t.console,p=t.jQuery,h=function(){},f=Object.prototype.toString,c="object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName},d=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],s):t.Outlayer=s(t.eventie,t.docReady,t.EventEmitter,t.getSize,t.matchesSelector,t.Outlayer.Item)}(window),function(t){function e(t){function e(){t.Item.apply(this,arguments)}return e.prototype=new t.Item,e.prototype._create=function(){this.id=this.layout.itemGUID++,t.Item.prototype._create.call(this),this.sortData={}},e.prototype.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)}}},e}"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],e):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window),function(t){function e(t,e){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)}return function(){function t(t){return function(){return e.prototype[t].apply(this.isotope,arguments)}}for(var o=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],n=0,r=o.length;r>n;n++){var s=o[n];i.prototype[s]=t(s)}}(),i.prototype.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;return i&&e.innerHeight!==this.isotope.size.innerHeight},i.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},i.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},i.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},i.prototype.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]}},i.prototype.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},i.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},i.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function o(){i.apply(this,arguments)}return o.prototype=new i,e&&(o.options=e),o.prototype.namespace=t,i.modes[t]=o,o},i}"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window),function(t){function e(t,e){var o=t.create("masonry");return o.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},o.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},o.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},o.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,o=e&&1>e?"round":"ceil",n=Math[o](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var r=this._getColGroup(n),s=Math.min.apply(Math,r),a=i(r,s),u={x:this.columnWidth*a,y:s},p=s+t.size.outerHeight,h=this.cols+1-r.length,f=0;h>f;f++)this.colYs[a+f]=p;return u},o.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;i>o;o++){var n=this.colYs.slice(o,o+t);e[o]=Math.max.apply(Math,n)}return e},o.prototype._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this.options.isOriginLeft?o.left:o.right,r=n+i.outerWidth,s=Math.floor(n/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=(this.options.isOriginTop?o.top:o.bottom)+i.outerHeight,p=s;a>=p;p++)this.colYs[p]=Math.max(u,this.colYs[p])},o.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},o.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},o}var i=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++){var n=t[i];if(n===e)return i}return-1};"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size"],e):t.Masonry=e(t.Outlayer,t.getSize)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t,i){var o=t.create("masonry"),n=o.prototype._getElementOffset,r=o.prototype.layout,s=o.prototype._getMeasurement;e(o.prototype,i.prototype),o.prototype._getElementOffset=n,o.prototype.layout=r,o.prototype._getMeasurement=s;var a=o.prototype.measureColumns;o.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,a.call(this)};var u=o.prototype._manageStamp;return o.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,u.apply(this,arguments)},o}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],i):i(t.Isotope.LayoutMode,t.Masonry)}(window),function(t){function e(t){var e=t.create("fitRows");return e.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0},e.prototype._getItemLayoutPosition=function(t){t.getSize(),0!==this.x&&t.size.outerWidth+this.x>this.isotope.size.innerWidth&&(this.x=0,this.y=this.maxY);var e={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=t.size.outerWidth,e},e.prototype._getContainerSize=function(){return{height:this.maxY}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],e):e(t.Isotope.LayoutMode)}(window),function(t){function e(t){var e=t.create("vertical",{horizontalAlignment:0});return e.prototype._resetLayout=function(){this.y=0},e.prototype._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}},e.prototype._getContainerSize=function(){return{height:this.y}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],e):e(t.Isotope.LayoutMode)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===h.call(t)}function o(t){var e=[];if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=f(e,t);-1!==i&&e.splice(i,1)}function r(t,i,r,u,h){function f(t,e){return function(i,o){for(var n=0,r=t.length;r>n;n++){var s=t[n],a=i.sortData[s],u=o.sortData[s];if(a>u||u>a){var p=void 0!==e[s]?e[s]:e,h=p?1:-1;return(a>u?1:-1)*h}}return 0}}var c=t.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});c.Item=u,c.LayoutMode=h,c.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),t.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var e in h.modes)this._initLayoutMode(e)},c.prototype.reloadItems=function(){this.itemGUID=0,t.prototype.reloadItems.call(this)},c.prototype._itemize=function(){for(var e=t.prototype._itemize.apply(this,arguments),i=0,o=e.length;o>i;i++){var n=e[i];n.id=this.itemGUID++}return this._updateItemsSortData(e),e},c.prototype._initLayoutMode=function(t){var i=h.modes[t],o=this.options[t]||{};this.options[t]=i.options?e(i.options,o):o,this.modes[t]=new i(this)},c.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?(this.arrange(),void 0):(this._layout(),void 0)},c.prototype._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},c.prototype.arrange=function(t){this.option(t),this._getIsInstant(),this.filteredItems=this._filter(this.items),this._sort(),this._layout()},c.prototype._init=c.prototype.arrange,c.prototype._getIsInstant=function(){var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=t,t},c.prototype._filter=function(t){function e(){f.reveal(n),f.hide(r)}var i=this.options.filter;i=i||"*";for(var o=[],n=[],r=[],s=this._getFilterTest(i),a=0,u=t.length;u>a;a++){var p=t[a];if(!p.isIgnored){var h=s(p);h&&o.push(p),h&&p.isHidden?n.push(p):h||p.isHidden||r.push(p)}}var f=this;return this._isInstant?this._noTransition(e):e(),o},c.prototype._getFilterTest=function(t){return s&&this.options.isJQueryFiltering?function(e){return s(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return r(e.element,t)}},c.prototype.updateSortData=function(t){this._getSorters(),t=o(t);var e=this.getItems(t);e=e.length?e:this.items,this._updateItemsSortData(e)},c.prototype._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=d(i)}},c.prototype._updateItemsSortData=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];o.updateSortData()}};var d=function(){function t(t){if("string"!=typeof t)return t;var i=a(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),r=n&&n[1],s=e(r,o),u=c.sortDataParsers[i[1]];return t=u?function(t){return t&&u(s(t))}:function(t){return t&&s(t)}}function e(t,e){var i;return i=t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&p(i)}}return t}();c.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},c.prototype._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=f(e,this.options.sortAscending);this.filteredItems.sort(i),t!==this.sortHistory[0]&&this.sortHistory.unshift(t)}},c.prototype._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw Error("No layout mode: "+t);return e.options=this.options[t],e},c.prototype._resetLayout=function(){t.prototype._resetLayout.call(this),this._mode()._resetLayout()},c.prototype._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},c.prototype._manageStamp=function(t){this._mode()._manageStamp(t)},c.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},c.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},c.prototype.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},c.prototype.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();var o=this._filterRevealAdded(e);this.layoutItems(i),this.filteredItems=o.concat(this.filteredItems)}},c.prototype._filterRevealAdded=function(t){var e=this._noTransition(function(){return this._filter(t)});return this.layoutItems(e,!0),this.reveal(e),t},c.prototype.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;n>i;i++)o=e[i],this.element.appendChild(o.element);var r=this._filter(e);for(this._noTransition(function(){this.hide(r)}),i=0;n>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;n>i;i++)delete e[i].isLayoutInstant;this.reveal(r)}};var l=c.prototype.remove;return c.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(l.call(this,t),e&&e.length)for(var i=0,r=e.length;r>i;i++){var s=e[i];n(s,this.filteredItems)}},c.prototype._noTransition=function(t){var e=this.options.transitionDuration;this.options.transitionDuration=0;var i=t.call(this);return this.options.transitionDuration=e,i},c}var s=t.jQuery,a=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=document.documentElement,p=u.textContent?function(t){return t.textContent}:function(t){return t.innerText},h=Object.prototype.toString,f=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],r):t.Isotope=r(t.Outlayer,t.getSize,t.matchesSelector,t.Isotope.Item,t.Isotope.LayoutMode)}(window);

/*!

Waypoints - 3.1.1

Copyright © 2011-2015 Caleb Troughton

Licensed under the MIT license.

https://github.com/imakewebthings/waypoints/blog/master/licenses.txt

*/

!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.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},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,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);t&&e&&(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],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=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 n in t){var r=t[n];for(var s in this.waypoints[n]){var a,l,h,p,u,c=this.waypoints[n][s],d=c.options.offset,f=c.triggerPoint,w=0,y=null==f;c.element!==c.element.window&&(w=c.adapter.offset()[r.offsetProp]),"function"==typeof d?d=d.apply(c):"string"==typeof d&&(d=parseFloat(d),c.options.offset.indexOf("%")>-1&&(d=Math.ceil(r.contextDimension*d/100))),a=r.contextScroll-r.contextOffset,c.triggerPoint=w+a-d,l=f<r.oldScroll,h=c.triggerPoint>=r.oldScroll,p=l&&h,u=!l&&!h,!y&&p?(c.queueTrigger(r.backward),o[c.group.id]=c.group):!y&&u?(c.queueTrigger(r.forward),o[c.group.id]=c.group):y&&r.oldScroll>=c.triggerPoint&&(c.queueTrigger(r.forward),o[c.group.id]=c.group)}}for(var g in o)o[g].flushTriggers();return 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:[],right:[]}},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 t.isFunction(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))}();!function(a,b){"use strict";var c,d;if(a.uaMatch=function(a){a=a.toLowerCase();var b=/(opr)[\/]([\w.]+)/.exec(a)||/(chrome)[ \/]([\w.]+)/.exec(a)||/(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],c=/(ipad)/.exec(a)||/(iphone)/.exec(a)||/(android)/.exec(a)||/(windows phone)/.exec(a)||/(win)/.exec(a)||/(mac)/.exec(a)||/(linux)/.exec(a)||/(cros)/i.exec(a)||[];return{browser:b[3]||b[1]||"",version:b[2]||"0",platform:c[0]||""}},c=a.uaMatch(b.navigator.userAgent),d={},c.browser&&(d[c.browser]=!0,d.version=c.version,d.versionNumber=parseInt(c.version)),c.platform&&(d[c.platform]=!0),(d.android||d.ipad||d.iphone||d["windows phone"])&&(d.mobile=!0),(d.cros||d.mac||d.linux||d.win)&&(d.desktop=!0),(d.chrome||d.opr||d.safari)&&(d.webkit=!0),d.rv){var e="msie";c.browser=e,d[e]=!0}if(d.opr){var f="opera";c.browser=f,d[f]=!0}if(d.safari&&d.android){var g="android";c.browser=g,d[g]=!0}d.name=c.browser,d.platform=c.platform,a.browser=d}(jQuery,window);var Froogaloop=function(){function e(a){return new e.fn.init(a)}function g(a,c,b){if(!b.contentWindow.postMessage)return!1;a=JSON.stringify({method:a,value:c});b.contentWindow.postMessage(a,h)}function l(a){var c,b;try{c=JSON.parse(a.data),b=c.event||c.method}catch(e){}"ready"!=b||k||(k=!0);if(!/^https?:\/\/player.vimeo.com/.test(a.origin))return!1;"*"===h&&(h=a.origin);a=c.value;var m=c.data,f=""===f?null:c.player_id;c=f?d[f][b]:d[b];b=[];if(!c)return!1;void 0!==a&&b.push(a);m&&b.push(m);f&&b.push(f);return 0<b.length?c.apply(null,b):c.call()}function n(a,c,b){b?(d[b]||(d[b]={}),d[b][a]=c):d[a]=c}var d={},k=!1,h="*";e.fn=e.prototype={element:null,init:function(a){"string"===typeof a&&(a=document.getElementById(a));this.element=a;return this},api:function(a,c){if(!this.element||!a)return!1;var b=this.element,d=""!==b.id?b.id:null,e=c&&c.constructor&&c.call&&c.apply?null:c,f=c&&c.constructor&&c.call&&c.apply?c:null;f&&n(a,f,d);g(a,e,b);return this},addEvent:function(a,c){if(!this.element)return!1;var b=this.element,d=""!==b.id?b.id:null;n(a,c,d);"ready"!=a?g("addEventListener",a,b):"ready"==a&&k&&c.call(null,d);return this},removeEvent:function(a){if(!this.element)return!1;var c=this.element,b=""!==c.id?c.id:null;a:{if(b&&d[b]){if(!d[b][a]){b=!1;break a}d[b][a]=null}else{if(!d[a]){b=!1;break a}d[a]=null}b=!0}"ready"!=a&&b&&g("removeEventListener",a,c)}};e.fn.init.prototype=e.fn;window.addEventListener?window.addEventListener("message",l,!1):window.attachEvent("onmessage",l);return window.Froogaloop=window.$f=e}();(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)}}());jQuery.expr[':'].regex=function(elem,index,match){var matchParams=match[3].split(','),validLabels=/^(data|css):/,attr={method:matchParams[0].match(validLabels)?matchParams[0].split(':')[0]:'attr',property:matchParams.shift().replace(validLabels,'')},regexFlags='ig',regex=new RegExp(matchParams.join('').replace(/^\s+|\s+$/g,''),regexFlags);return regex.test(jQuery(elem)[attr.method](attr.property));};(function($)

{"use strict";$(document).ready(function()

{$.avia_utilities=$.avia_utilities||{};if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&'ontouchstart'in document.documentElement)

{$.avia_utilities.isMobile=true;}

else

{$.avia_utilities.isMobile=false;}

if($.fn.avia_mobile_fixed)

$('.avia-bg-style-fixed').avia_mobile_fixed();if($.fn.avia_parallax)

$('.av-parallax').avia_parallax();if($.fn.avia_browser_height)

$('.av-minimum-height, .avia-fullscreen-slider').avia_browser_height();if($.fn.avia_video_section)

$('.av-section-with-video-bg').avia_video_section();new $.AviaTooltip({'class':"avia-tooltip",data:"avia-tooltip",delay:0,scope:"body"});new $.AviaTooltip({'class':"avia-tooltip avia-icon-tooltip",data:"avia-icon-tooltip",delay:0,scope:"body"});activate_shortcode_scripts();$('.avia-layerslider').layer_slider_height_helper();$('.grid-links-ajax').avia_portfolio_preview();if($.fn.avia_masonry)

$('.av-masonry').avia_masonry();if($.fn.aviaccordion)

$('.aviaccordion').aviaccordion();if($.fn.avia_textrotator)

$('.av-rotator-container').avia_textrotator();});function activate_waypoints(container)

{if($.fn.avia_waypoints)

{if(typeof container=='undefined'){container='body';};$('.avia_animate_when_visible',container).avia_waypoints();$('.avia_animate_when_almost_visible',container).avia_waypoints({offset:'80%'});if(container=='body')container='.avia_desktop body';$('.av-animated-generic',container).avia_waypoints({offset:'95%'});}}

function activate_shortcode_scripts(container)

{if(typeof container=='undefined'){container='body';}

if($.fn.avia_ajax_form)

{$('.avia_ajax_form:not( .avia-disable-default-ajax )',container).avia_ajax_form();}

activate_waypoints(container);if($.fn.aviaVideoApi)

{$('.avia-slideshow iframe[src*="youtube.com"], .av_youtube_frame, .avia-slideshow iframe[src*="vimeo.com"], .avia-slideshow video').aviaVideoApi({},'li');}

if($.fn.avia_sc_toggle)

{$('.togglecontainer',container).avia_sc_toggle();}

if($.fn.avia_sc_tabs)

{$('.top_tab',container).avia_sc_tabs();$('.sidebar_tab',container).avia_sc_tabs({sidebar:true});}

if($.fn.avia_sc_gallery)

{$('.avia-gallery',container).avia_sc_gallery();}

if($.fn.avia_sc_animated_number)

{$('.avia-animated-number',container).avia_sc_animated_number();}

if($.fn.avia_sc_animation_delayed)

{$('.av_font_icon',container).avia_sc_animation_delayed({delay:100});$('.avia-image-container',container).avia_sc_animation_delayed({delay:100});$('.av-hotspot-image-container',container).avia_sc_animation_delayed({delay:100});$('.av-animated-generic',container).avia_sc_animation_delayed({delay:100});}

if($.fn.avia_sc_iconlist)

{$('.avia-icon-list.av-iconlist-big',container).avia_sc_iconlist();}

if($.fn.avia_sc_progressbar)

{$('.avia-progress-bar-container',container).avia_sc_progressbar();}

if($.fn.avia_sc_testimonial)

{$('.avia-testimonial-wrapper',container).avia_sc_testimonial();}

$('.avia-slideshow.av_fullscreen',container).aviaFullscreenSlider();$('.avia-slideshow:not(.av_fullscreen)',container).aviaSlider();$('.avia-content-slider-active',container).aviaSlider({wrapElement:'.avia-content-slider-inner',slideElement:'.slide-entry-wrap',fullfade:true});$('.avia-slider-testimonials',container).aviaSlider({wrapElement:'.avia-testimonial-row',slideElement:'.avia-testimonial',fullfade:true});if($.fn.aviaMaps)

{$('.avia-google-map-container',container).aviaMaps();}

if($.fn.aviaMagazine)

{$('.av-magazine-tabs-active',container).aviaMagazine();}

if($.fn.aviaHotspots)

{$('.av-hotspot-image-container',container).aviaHotspots();}

if($.fn.aviaCountdown)

{$('.av-countdown-timer',container).aviaCountdown();}

if($.fn.aviaCountdown)

{$('.av-countdown-timer',container).aviaCountdown();}}

(function($)

{"use strict";var _units=['weeks','days','hours','minutes','seconds'],_second=1000,_minute=_second*60,_hour=_minute*60,_day=_hour*24,_week=_day*7,ticker=function(_self)

{var _time={},_now=new Date(),_timestamp=_self.end-_now;if(_timestamp<=0)

{clearInterval(_self.countdown);return;}

_self.time.weeks=Math.floor(_timestamp/_week);_self.time.days=Math.floor((_timestamp%_week)/_day);_self.time.hours=Math.floor((_timestamp%_day)/_hour);_self.time.minutes=Math.floor((_timestamp%_hour)/_minute);_self.time.seconds=Math.floor((_timestamp%_minute)/_second);switch(_self.data.maximum)

{case 1:_self.time.seconds=Math.floor(_timestamp/_second);break;case 2:_self.time.minutes=Math.floor(_timestamp/_minute);break;case 3:_self.time.hours=Math.floor(_timestamp/_hour);break;case 4:_self.time.days=Math.floor(_timestamp/_day);break;}

for(var i in _self.time)

{if(typeof _self.update[i]=="object")

{if(_self.firstrun||_self.oldtime[i]!=_self.time[i])

{var labelkey=(_self.time[i]===1)?"single":"multi";_self.update[i].time_container.text(_self.time[i]);_self.update[i].label_container.text(_self.update[i][labelkey]);}}}

if(_self.firstrun)_self.container.addClass('av-countdown-active')

_self.oldtime=$.extend({},_self.time);_self.firstrun=false;};$.fn.aviaCountdown=function(options)

{if(!this.length)return;return this.each(function()

{var _self={};_self.update={};_self.time={};_self.oldtime={};_self.firstrun=true;_self.container=$(this);_self.data=_self.container.data();_self.end=new Date(_self.data.year,_self.data.month,_self.data.day,_self.data.hour,_self.data.minute);for(var i in _units)

{_self.update[_units[i]]={time_container:_self.container.find('.av-countdown-'+_units[i]+' .av-countdown-time'),label_container:_self.container.find('.av-countdown-'+_units[i]+' .av-countdown-time-label'),};if(_self.update[_units[i]].label_container.length)

{_self.update[_units[i]].single=_self.update[_units[i]].label_container.data('label');_self.update[_units[i]].multi=_self.update[_units[i]].label_container.data('label-multi');}}

ticker(_self);_self.countdown=setInterval(function(){ticker(_self);},_self.data.interval);});}}(jQuery));(function($)

{"use strict";$.fn.aviaHotspots=function(options)

{if(!this.length)return;return this.each(function()

{var _self={};_self.container=$(this);_self.hotspots=_self.container.find('.av-image-hotspot');_self.container.on('avia_start_animation',function()

{setTimeout(function()

{_self.hotspots.each(function(i)

{var current=$(this);setTimeout(function(){current.addClass('av-display-hotspot');},300*i);});},400);});});}}(jQuery));(function($)

{"use strict";var animating=false,methods={switchMag:function(clicked,_self)

{var current=$(clicked)

if(current.is('.active_sort')||animating)return;var filter=current.data('filter'),oldContainer=_self.container.filter(':visible'),newContainer=_self.container.filter('.'+filter);animating=true;_self.sort_buttons.removeClass('active_sort');current.addClass('active_sort');_self.magazine.height(_self.magazine.outerHeight());oldContainer.avia_animate({opacity:0},200,function()

{oldContainer.css({display:'none'});newContainer.css({opacity:0,display:'block'}).avia_animate({opacity:1},150,function()

{_self.magazine.avia_animate({height:(newContainer.outerHeight()+_self.sort_bar.outerHeight())},150,function()

{_self.magazine.height('auto');animating=false;});});});}};$.fn.aviaMagazine=function(options)

{if(!this.length)return;return this.each(function()

{var _self={};_self.magazine=$(this),_self.sort_buttons=_self.magazine.find('.av-magazine-sort a');_self.container=_self.magazine.find('.av-magazine-group');_self.sort_bar=_self.magazine.find('.av-magazine-top-bar');_self.sort_buttons.on('click',function(e){e.preventDefault();methods.switchMag(this,_self);});});}}(jQuery));(function($)

{"use strict";$.AviaMapsAPI=function(options,container)

{if(typeof window.av_google_map=='undefined')

{$.avia_utilities.log('Map creation stopped, var av_google_map not found');return}

this.container=container;this.$container=$(container);this.$body=$('body');this.$mapid=this.$container.data('mapid')-1;this.$data=window.av_google_map[this.$mapid];this.retina=window.devicePixelRatio>1;this._init(options);}

$.AviaMapsAPI.apiFiles={loading:false,finished:false,src:'https://maps.googleapis.com/maps/api/js?v=3.27&callback=aviaOnGoogleMapsLoaded'}

$.AviaMapsAPI.prototype={_init:function()

{this._bind_execution();this._getAPI();},_getAPI:function()

{if((typeof window.google=='undefined'||typeof window.google.maps=='undefined')&&$.AviaMapsAPI.apiFiles.loading==false)

{$.AviaMapsAPI.apiFiles.loading=true;var script=document.createElement('script');script.type='text/javascript';script.src=$.AviaMapsAPI.apiFiles.src;if(avia_framework_globals.gmap_api!='undefined'&&avia_framework_globals.gmap_api!="")

{script.src+="&key="+avia_framework_globals.gmap_api;}

document.body.appendChild(script);}

else if((typeof window.google!='undefined'&&typeof window.google.maps!='undefined')||$.AviaMapsAPI.apiFiles.loading==false)

{this._applyMap();}},_bind_execution:function()

{this.$body.on('av-google-maps-api-loaded',$.proxy(this._applyMap,this));},_applyMap:function()

{if(typeof this.map!='undefined')return;if(!this.$data.marker||!this.$data.marker[0]||!this.$data.marker[0].long||!this.$data.marker[0].long)

{$.avia_utilities.log('Latitude or Longitude missing','map-error');return;}

var _self=this,mobile_drag=$.avia_utilities.isMobile?this.$data.mobile_drag_control:true,zoomValue=this.$data.zoom=="auto"?10:this.$data.zoom;this.mapVars={mapMaker:false,mapTypeControl:false,backgroundColor:'transparent',streetViewControl:false,panControl:this.$data.pan_control,zoomControl:this.$data.zoom_control,draggable:mobile_drag,scrollwheel:false,zoom:zoomValue,mapTypeId:google.maps.MapTypeId.ROADMAP,center:new google.maps.LatLng(this.$data.marker[0].lat,this.$data.marker[0].long),styles:[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]}]};this.map=new google.maps.Map(this.container,this.mapVars);this._applyMapStyle();if(this.$data.zoom=="auto")

{this._setAutoZoom();}

google.maps.event.addListenerOnce(this.map,'tilesloaded',function(){_self._addMarkers();});},_setAutoZoom:function()

{var bounds=new google.maps.LatLngBounds();for(var key in this.$data.marker)

{bounds.extend(new google.maps.LatLng(this.$data.marker[key].lat,this.$data.marker[key].long));}

this.map.fitBounds(bounds);},_applyMapStyle:function()

{var stylers=[],style=[],mapType,style_color="";if(this.$data.hue!="")stylers.push({hue:this.$data.hue});if(this.$data.saturation!="")stylers.push({saturation:this.$data.saturation});if(stylers.length)

{style=[{featureType:"all",elementType:"all",stylers:stylers},{featureType:"poi",stylers:[{visibility:"off"}]}];if(this.$data.saturation=="fill")

{style_color=this.$data.hue|| "#242424";var c=style_color.substring(1);var rgb=parseInt(c,16);var r=(rgb>>16)&0xff;var g=(rgb>>8)&0xff;var b=(rgb>>0)&0xff;var luma=0.2126*r+0.7152*g+0.0722*b;var lightness=1;var street_light=2;if(luma>60){lightness=-1;street_light=3;}

if(luma>220){lightness=-2;street_light=-2;}

style=[{"featureType":"all","elementType":"all","stylers":[{"color":style_color},{"lightness":0}]},{"featureType":"all","elementType":"labels.text.fill","stylers":[{"color":style_color},{"lightness":(25*street_light)}]},{"featureType":"all","elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":style_color},{"lightness":3}]},{"featureType":"all","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":style_color},{"lightness":30}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":style_color},{"lightness":30},{"weight":1.2}]},{"featureType":"landscape","elementType":"geometry","stylers":[{visibility:'simplified'},{"color":style_color},{"lightness":3}]},{"featureType":"poi","elementType":"geometry","stylers":[{"visibility":"off"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":style_color},{"lightness":-3}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":style_color},{"lightness":2},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":style_color},{"lightness":-3}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":style_color},{"lightness":-3}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":style_color},{"lightness":-3}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":style_color},{"lightness":-20}]}];}

mapType=new google.maps.StyledMapType(style,{name:"av_map_style"});this.map.mapTypes.set('av_styled_map',mapType);this.map.setMapTypeId('av_styled_map');}},_addMarkers:function()

{for(var key in this.$data.marker)

{var _self=this;(function(key,_self)

{setTimeout(function()

{var marker="";if(!_self.$data.marker[key]||!_self.$data.marker[key].long||!_self.$data.marker[key].long)

{$.avia_utilities.log('Latitude or Longitude for single marker missing','map-error');return;}

_self.$data.LatLng=new google.maps.LatLng(_self.$data.marker[key].lat,_self.$data.marker[key].long);var markerArgs={flat:false,position:_self.$data.LatLng,animation:google.maps.Animation.BOUNCE,map:_self.map,title:_self.$data.marker[key].address,optimized:false};if(_self.$data.marker[key].icon&&_self.$data.marker[key].imagesize)

{var size=_self.$data.marker[key].imagesize,half="",full="";if(_self.retina&&size>40)size=40;half=new google.maps.Point(size/2,size);full=new google.maps.Size(size,size);markerArgs.icon=new google.maps.MarkerImage(_self.$data.marker[key].icon,null,null,half,full);}

marker=new google.maps.Marker(markerArgs);setTimeout(function(){marker.setAnimation(null);_self._infoWindow(_self.map,marker,_self.$data.marker[key]);},500);},200*(parseInt(key,10)+1));}(key,_self));}},_infoWindow:function(map,marker,data)

{var info=$.trim(data.content);if(info!="")

{var infowindow=new google.maps.InfoWindow({content:info});google.maps.event.addListener(marker,'click',function(){infowindow.open(map,marker);});if(data.tooltip_display)infowindow.open(map,marker);}}}

$.fn.aviaMaps=function(options)

{return this.each(function()

{var self=$.data(this,'aviaMapsApi');if(!self)

{self=$.data(this,'aviaMapsApi',new $.AviaMapsAPI(options,this));}});}})(jQuery);window.aviaOnGoogleMapsLoaded=function(){$('body').trigger('av-google-maps-api-loaded');$.AviaMapsAPI.apiFiles.finished=true;};(function($)

{"use strict";$.AviaVideoAPI=function(options,video,option_container)

{this.$video=$(video);this.$option_container=option_container?$(option_container):this.$video;this.isMobile=$.avia_utilities.isMobile;this.fallback=this.isMobile?this.$option_container.is('.av-mobile-fallback-image'):false;if(this.fallback)return;this._init(options);}

$.AviaVideoAPI.defaults={loop:false,mute:false,controls:false,events:'play pause mute unmute loop toggle reset unload'};$.AviaVideoAPI.apiFiles={youtube:{loaded:false,src:'https://www.youtube.com/iframe_api'}}

$.AviaVideoAPI.prototype={_init:function(options)

{this.options=this._setOptions(options);this.type=this._getPlayerType();this._setPlayer();this.eventsBound=false;this.playing=false;this.$option_container.addClass('av-video-paused');this.pp=$.avia_utilities.playpause(this.$option_container);},_setOptions:function(options)

{var newOptions=$.extend(true,{},$.AviaVideoAPI.defaults,options),htmlData=this.$option_container.data(),i="";for(i in htmlData)

{if(htmlData.hasOwnProperty(i)&&(typeof htmlData[i]==="string"||typeof htmlData[i]==="number"||typeof htmlData[i]==="boolean"))

{newOptions[i]=htmlData[i];}}

return newOptions;},_getPlayerType:function()

{var vid_src=this.$video.get(0).src||this.$video.data('src');if(this.$video.is('video'))return'html5';if(this.$video.is('.av_youtube_frame'))return'youtube';if(vid_src.indexOf('vimeo.com')!=-1)return'vimeo';if(vid_src.indexOf('youtube.com')!=-1)return'youtube';},_setPlayer:function()

{var _self=this;switch(this.type)

{case"html5":this.player=this.$video.data('mediaelementplayer');this._playerReady();break;case"vimeo":this.player=Froogaloop(this.$video.get(0));this._playerReady();break;case"youtube":this._getAPI(this.type);$('body').on('av-youtube-iframe-api-loaded',function(){_self._playerReady();});break;}},_getAPI:function(api)

{if($.AviaVideoAPI.apiFiles[api].loaded===false)

{$.AviaVideoAPI.apiFiles[api].loaded=true;var tag=document.createElement('script'),first=document.getElementsByTagName('script')[0];tag.src=$.AviaVideoAPI.apiFiles[api].src;first.parentNode.insertBefore(tag,first);}},_playerReady:function()

{var _self=this;this.$option_container.on('av-video-loaded',function(){_self._bindEvents();});switch(this.type)

{case"html5":this.$video.on('av-mediajs-loaded',function(){_self.$option_container.trigger('av-video-loaded');});this.$video.on('av-mediajs-ended',function(){_self.$option_container.trigger('av-video-ended');});break;case"vimeo":_self.player.addEvent('ready',function(){_self.$option_container.trigger('av-video-loaded');_self.player.addEvent('finish',function(){_self.$option_container.trigger('av-video-ended');});});break;case"youtube":var params=_self.$video.data();if(_self._supports_video())params.html5=1;_self.player=new YT.Player(_self.$video.attr('id'),{videoId:params.videoid,height:_self.$video.attr('height'),width:_self.$video.attr('width'),playerVars:params,events:{'onReady':function(){_self.$option_container.trigger('av-video-loaded');},'onError':function(player){$.avia_utilities.log('YOUTUBE ERROR:','error',player);},'onStateChange':function(event){if(event.data===YT.PlayerState.ENDED)

{var command=_self.options.loop!=false?'loop':'av-video-ended';_self.$option_container.trigger(command);}}}});break;}

setTimeout(function()

{if(_self.eventsBound==true||typeof _self.eventsBound=='undefined'||_self.type=='youtube'){return;}

$.avia_utilities.log('Fallback Video Trigger "'+_self.type+'":','log',_self);_self.$option_container.trigger('av-video-loaded');},2000);},_bindEvents:function()

{if(this.eventsBound==true||typeof this.eventsBound=='undefined')

{return;}

var _self=this,volume='unmute';this.eventsBound=true;this.$option_container.on(this.options.events,function(e)

{_self.api(e.type);});if(!_self.isMobile)

{if(this.options.mute!=false){volume="mute";}

if(this.options.loop!=false){_self.api('loop');}

_self.api(volume);}

setTimeout(function()

{_self.$option_container.trigger('av-video-events-bound').addClass('av-video-events-bound');},50);},_supports_video:function(){return!!document.createElement('video').canPlayType;},api:function(action)

{if(this.isMobile&&!this.was_started())return;if(this.options.events.indexOf(action)===-1)return;this.$option_container.trigger('av-video-'+action+'-executed');if(typeof this['_'+this.type+'_'+action]=='function')

{this['_'+this.type+'_'+action].call(this);}

if(typeof this['_'+action]=='function')

{this['_'+action].call(this);}},was_started:function()

{if(!this.player)return false;switch(this.type)

{case"html5":if(this.player.getCurrentTime()>0)return true;break;case"vimeo":if(this.player.api('getCurrentTime')>0)return true;break;case"youtube":if(this.player.getPlayerState()!==-1)return true;break;}

return false;},_play:function()

{this.playing=true;this.$option_container.addClass('av-video-playing').removeClass('av-video-paused');},_pause:function()

{this.playing=false;this.$option_container.removeClass('av-video-playing').addClass('av-video-paused');},_loop:function()

{this.options.loop=true;},_toggle:function()

{var command=this.playing==true?'pause':'play';this.api(command);this.pp.set(command);},_vimeo_play:function()

{this.player.api('play');},_vimeo_pause:function()

{this.player.api('pause');},_vimeo_mute:function()

{this.player.api('setVolume',0);},_vimeo_unmute:function()

{this.player.api('setVolume',0.7);},_vimeo_loop:function()

{},_vimeo_reset:function()

{this.player.api('seekTo',0);},_vimeo_unload:function()

{this.player.api('unload');},_youtube_play:function()

{this.player.playVideo();},_youtube_pause:function()

{this.player.pauseVideo()},_youtube_mute:function()

{this.player.mute();},_youtube_unmute:function()

{this.player.unMute();},_youtube_loop:function()

{if(this.playing==true)this.player.seekTo(0);},_youtube_reset:function()

{this.player.stopVideo();},_youtube_unload:function()

{this.player.clearVideo();},_html5_play:function()

{this.player.options.pauseOtherPlayers=false;this.player.play();},_html5_pause:function()

{this.player.pause();},_html5_mute:function()

{this.player.setMuted(true);},_html5_unmute:function()

{this.player.setVolume(0.7);},_html5_loop:function()

{this.player.options.loop=true;},_html5_reset:function()

{this.player.setCurrentTime(0);},_html5_unload:function()

{this._html5_pause();this._html5_reset();}}

$.fn.aviaVideoApi=function(options,apply_to_parent)

{return this.each(function()

{var applyTo=this;if(apply_to_parent)

{applyTo=$(this).parents(apply_to_parent).get(0);}

var self=$.data(applyTo,'aviaVideoApi');if(!self)

{self=$.data(applyTo,'aviaVideoApi',new $.AviaVideoAPI(options,this,applyTo));}});}})(jQuery);window.onYouTubeIframeAPIReady=function(){$('body').trigger('av-youtube-iframe-api-loaded');};$.fn.avia_masonry=function(options)

{if(!this.length)return this;var the_body=$('body'),the_win=$(window),isMobile=$.avia_utilities.isMobile,loading=false,methods={masonry_filter:function()

{var current=$(this),linktext=current.html(),selector=current.data('filter'),masonry=current.parents('.av-masonry:eq(0)'),container=masonry.find('.av-masonry-container:eq(0)'),links=masonry.find('.av-masonry-sort a'),activeCat=masonry.find('.av-current-sort-title');links.removeClass('active_sort');current.addClass('active_sort');container.attr('id','masonry_id_'+selector);if(activeCat.length)activeCat.html(linktext);methods.applyMasonry(container,selector,function()

{container.css({overflow:'visible'});});return false;},applyMasonry:function(container,selector,callback)

{var filters=selector?{filter:'.'+selector}:{};container.isotope(filters,function()

{the_win.trigger('av-height-change');});if(typeof callback=='function')

{setTimeout(callback,0);}},show_bricks:function(bricks,callback)

{bricks.each(function(i)

{var currentLink=$(this),browserPrefix=$.avia_utilities.supports('transition'),multiplier=isMobile?0:100;setTimeout(function()

{if(browserPrefix===false)

{currentLink.css({visibility:"visible",opacity:0}).animate({opacity:1},1500);}

else

{currentLink.addClass('av-masonry-item-loaded');}

if(i==bricks.length-1&&typeof callback=='function')

{callback.call();the_win.trigger('av-height-change');}},(multiplier*i));});},loadMore:function(e)

{e.preventDefault();if(loading)return false;loading=true;var current=$(this),data=current.data(),masonry=current.parents('.av-masonry:eq(0)'),container=masonry.find('.av-masonry-container'),items=masonry.find('.av-masonry-entry'),loader=$.avia_utilities.loading(),finished=function(){loading=false;loader.hide();the_body.trigger('av_resize_finished');};if(!data.offset){data.offset=0;}

data.offset+=data.items;data.action='avia_ajax_masonry_more';data.loaded=[];items.each(function(){var item_id=$(this).data('av-masonry-item');if(item_id)data.loaded.push(item_id);});$.ajax({url:avia_framework_globals.ajaxurl,type:"POST",data:data,beforeSend:function()

{loader.show();},success:function(response)

{if(response.indexOf("{av-masonry-loaded}")!==-1)

{var response=response.split('{av-masonry-loaded}'),new_items=$(response.pop()).filter('.isotope-item');if(new_items.length>data.items)

{new_items=new_items.not(':last');}

else

{current.addClass('av-masonry-no-more-items');}

var load_container=$('<div class="loadcontainer"></div>').append(new_items);$.avia_utilities.preload({container:load_container,single_callback:function()

{var links=masonry.find('.av-masonry-sort a'),filter_container=masonry.find('.av-sort-by-term'),allowed_filters=filter_container.data("av-allowed-sort");filter_container.hide();loader.hide();container.isotope('insert',new_items);$.avia_utilities.avia_ajax_call(masonry);setTimeout(function(){methods.show_bricks(new_items,finished);},150);setTimeout(function(){the_win.trigger('av-height-change');},550);if(links)

{$(links).each(function(filterlinkindex)

{var filterlink=$(this),sort=filterlink.data('filter');if(new_items)

{$(new_items).each(function(itemindex){var item=$(this);if(item.hasClass(sort)&&allowed_filters.indexOf(sort)!==-1)

{var term_count=filterlink.find('.avia-term-count').text();filterlink.find('.avia-term-count').text(' '+(parseInt(term_count)+1)+' ');if(filterlink.hasClass('avia_hide_sort'))

{filterlink.removeClass('avia_hide_sort').addClass('avia_show_sort');masonry.find('.av-masonry-sort .'+sort+'_sep').removeClass('avia_hide_sort').addClass('avia_show_sort');masonry.find('.av-masonry-sort .av-sort-by-term').removeClass('hidden');}}});}});}

filter_container.fadeIn();}});}

else

{finished();}},error:finished,complete:function()

{}});}};return this.each(function()

{var masonry=$(this),container=masonry.find('.av-masonry-container'),bricks=masonry.find('.isotope-item'),filter=masonry.find('.av-masonry-sort').css({visibility:"visible",opacity:0}).on('click','a',methods.masonry_filter),load_more=masonry.find('.av-masonry-load-more').css({visibility:"visible",opacity:0});$.avia_utilities.preload({container:container,single_callback:function()

{var start_animation=function()

{filter.animate({opacity:1},400);if(container.outerHeight()+container.offset().top+$('#footer').outerHeight()>$(window).height())

{$('html').css({'overflow-y':'scroll'});}

methods.applyMasonry(container,false,function()

{masonry.addClass('avia_sortable_active');container.removeClass('av-js-disabled ');});methods.show_bricks(bricks,function()

{load_more.css({opacity:1}).on('click',methods.loadMore);});};if(isMobile)

{start_animation();}

else

{masonry.waypoint(start_animation,{offset:'80%'});}

$(window).on('debouncedresize',function()

{methods.applyMasonry(container,false,function()

{masonry.addClass('avia_sortable_active');});});}});});};(function($)

{"use strict";$.avia_utilities=$.avia_utilities||{};$.fn.avia_portfolio_preview=function(passed_options)

{var win=$(window),the_body=$('body'),isMobile=$.avia_utilities.isMobile,defaults={open_in:'.portfolio-details-inner',easing:'easeOutQuint',timing:800,transition:'slide'},options=$.extend({},defaults,passed_options);return this.each(function()

{var container=$(this),portfolio_id=container.data('portfolio-id'),target_wrap=$('.portfolio_preview_container[data-portfolio-id="'+portfolio_id+'"]'),target_container=target_wrap.find(options.open_in),items=container.find('.grid-entry'),content_retrieved={},is_open=false,animating=false,index_open=false,ajax_call=false,methods,controls,loader=$.avia_utilities.loading();methods={load_item:function(e)

{e.preventDefault();var link=$(this),post_container=link.parents('.post-entry:eq(0)'),post_id="ID_"+post_container.data('ajax-id'),clickedIndex=items.index(post_container);if(post_id===is_open||animating==true)

{return false;}

animating=true;container.find('.active_portfolio_item').removeClass('active_portfolio_item');post_container.addClass('active_portfolio_item');loader.show();methods.ajax_get_contents(post_id,clickedIndex);},scroll_top:function()

{setTimeout(function()

{var target_offset=target_wrap.offset().top-175,window_offset=win.scrollTop();if(window_offset>target_offset||target_offset-window_offset>100)

{$('html:not(:animated),body:not(:animated)').animate({scrollTop:target_offset},options.timing,options.easing);}},10);},attach_item:function(post_id)

{content_retrieved[post_id]=$(content_retrieved[post_id]).appendTo(target_container);ajax_call=true;},remove_video:function()

{var del=target_wrap.find('iframe, .avia-video').parents('.ajax_slide:not(.open_slide)');if(del.length>0)

{del.remove();content_retrieved["ID_"+del.data('slideId')]=undefined;}},show_item:function(post_id,clickedIndex)

{if(post_id===is_open)

{return false;}

animating=true;loader.hide();if(false===is_open)

{target_wrap.addClass('open_container');content_retrieved[post_id].addClass('open_slide');methods.scroll_top();target_wrap.css({display:'none'}).slideDown(options.timing,options.easing,function()

{if(ajax_call)

{activate_shortcode_scripts(content_retrieved[post_id]);$.avia_utilities.avia_ajax_call(content_retrieved[post_id]);the_body.trigger('av_resize_finished');ajax_call=false;}

methods.remove_video();the_body.trigger('av_resize_finished');});index_open=clickedIndex;is_open=post_id;animating=false;}

else

{methods.scroll_top();var initCSS={zIndex:3},easing=options.easing;if(index_open>clickedIndex){initCSS.left='-110%';}

if(options.transition==='fade'){initCSS.left='0%';initCSS.opacity=0;easing='easeOutQuad';}

target_container.height(target_container.height());content_retrieved[post_id].css(initCSS).avia_animate({'left':"0%",opacity:1},options.timing,easing);content_retrieved[is_open].avia_animate({opacity:0},options.timing,easing,function()

{content_retrieved[is_open].attr({'style':""}).removeClass('open_slide');content_retrieved[post_id].addClass('open_slide');target_container.avia_animate({height:content_retrieved[post_id].outerHeight()+2},options.timing/2,options.easing,function()

{target_container.attr({'style':""});is_open=post_id;index_open=clickedIndex;animating=false;methods.remove_video();if(ajax_call)

{the_body.trigger('av_resize_finished');activate_shortcode_scripts(content_retrieved[post_id]);$.avia_utilities.avia_ajax_call(content_retrieved[post_id]);ajax_call=false;}});});}},ajax_get_contents:function(post_id,clickedIndex)

{if(content_retrieved[post_id]!==undefined)

{methods.show_item(post_id,clickedIndex);return;}

content_retrieved[post_id]=$('#avia-tmpl-portfolio-preview-'+post_id.replace(/ID_/,"")).html();content_retrieved[post_id]=content_retrieved[post_id].replace('/*<![CDATA[*/','').replace('*]]>','');methods.attach_item(post_id);$.avia_utilities.preload({container:content_retrieved[post_id],single_callback:function(){methods.show_item(post_id,clickedIndex);}});},add_controls:function()

{controls=target_wrap.find('.ajax_controlls');target_wrap.avia_keyboard_controls({27:'.avia_close',37:'.ajax_previous',39:'.ajax_next'});items.each(function(){var current=$(this),overlay;current.addClass('no_combo').bind('click',function(event)

{overlay=current.find('.slideshow_overlay');if(overlay.length)

{event.stopPropagation();methods.load_item.apply(current.find('a:eq(0)'));return false;}});});},control_click:function()

{var showItem,activeID=container.find('.active_portfolio_item').data('ajax-id'),active=container.find('.post-entry-'+activeID);switch(this.hash)

{case'#next':showItem=active.nextAll('.post-entry:visible:eq(0)').find('a:eq(0)');if(!showItem.length){showItem=$('.post-entry:visible:eq(0)',container).find('a:eq(0)');}

showItem.trigger('click');break;case'#prev':showItem=active.prevAll('.post-entry:visible:eq(0)').find('a:eq(0)');if(!showItem.length){showItem=$('.post-entry:visible:last',container).find('a:eq(0)');}

showItem.trigger('click');break;case'#close':animating=true;target_wrap.slideUp(options.timing,options.easing,function()

{container.find('.active_portfolio_item').removeClass('active_portfolio_item');content_retrieved[is_open].attr({'style':""}).removeClass('open_slide');target_wrap.removeClass('open_container');animating=is_open=index_open=false;methods.remove_video();the_body.trigger('av_resize_finished');});break;}

return false;},resize_reset:function()

{if(is_open===false)

{target_container.html('');content_retrieved=[];}}};methods.add_controls();container.on("click","a",methods.load_item);controls.on("click","a",methods.control_click);if(jQuery.support.leadingWhitespace){win.bind('debouncedresize',methods.resize_reset);}});};}(jQuery));$.AviaFullscreenSlider=function(options,slider)

{this.$slider=$(slider);this.$inner=this.$slider.find('.avia-slideshow-inner');this.$innerLi=this.$inner.find('>li');this.$caption=this.$inner.find('.avia-slide-wrap .caption_container');this.$win=$(window);this.isMobile=$.avia_utilities.isMobile;this.property={};this.scrollPos="0";this.transform3d=document.documentElement.className.indexOf('avia_transform3d')!==-1?true:false;this.ticking=false;if($.avia_utilities.supported.transition===undefined)

{$.avia_utilities.supported.transition=$.avia_utilities.supports('transition');}

this._init(options);}

$.AviaFullscreenSlider.defaults={height:100,subtract:'#wpadminbar, #header, #main>.title_container'};$.AviaFullscreenSlider.prototype={_init:function(options)

{var _self=this;this.options=$.extend(true,{},$.AviaFullscreenSlider.defaults,options);if(this.$slider.data('slide_height'))this.options.height=this.$slider.data('slide_height');this.options.parallax_enabled=this.$slider.data('image_attachment')==""?true:false;this.$subtract=$(this.options.subtract);this._setSize();this.$win.on('debouncedresize',$.proxy(this._setSize,this));setTimeout(function()

{if(!_self.isMobile&&_self.options.parallax_enabled)

{_self.$win.on('scroll',$.proxy(_self._on_scroll,_self));}},100);this.$slider.aviaSlider({bg_slider:true});},_on_scroll:function(e)

{var _self=this;if(!_self.ticking){_self.ticking=true;window.requestAnimationFrame($.proxy(_self._parallax_scroll,_self));}},_fetch_properties:function(slide_height)

{this.property.offset=this.$slider.offset().top;this.property.wh=this.$win.height();this.property.height=slide_height||this.$slider.outerHeight();this._parallax_scroll();},_setSize:function()

{if(!$.fn.avia_browser_height)

{var viewport=this.$win.height(),slide_height=Math.ceil((viewport/100)*this.options.height);if(this.$subtract.length&&this.options.height==100)

{this.$subtract.each(function()

{slide_height-=this.offsetHeight-0.5;});}

else

{slide_height-=1;}

this.$slider.height(slide_height).removeClass('av-default-height-applied');this.$inner.css('padding',0);}

this._fetch_properties(slide_height);},_parallax_scroll:function(e)

{if(this.isMobile)return;var winTop=this.$win.scrollTop(),winBottom=winTop+this.property.wh,scrollPos="0",prop={},prop2={};if(this.property.offset<winTop&&winTop<=this.property.offset+this.property.height)

{scrollPos=Math.round((winTop-this.property.offset)*0.3);}

if(this.scrollPos!=scrollPos)

{this.scrollPos=scrollPos;if(this.transform3d)

{prop[$.avia_utilities.supported.transition+"transform"]="translate3d(0px,"+scrollPos+"px,0px)";}

else

{prop[$.avia_utilities.supported.transition+"transform"]="translate(0px,"+scrollPos+"px)";}

this.$inner.css(prop);}

this.ticking=false;}};$.fn.aviaFullscreenSlider=function(options)

{return this.each(function()

{var active=$.data(this,'aviaFullscreenSlider');if(!active)

{$.data(this,'aviaFullscreenSlider',1);new $.AviaFullscreenSlider(options,this);}});}

$.AviaParallaxElement=function(options,element)

{this.$el=$(element).addClass('active-parallax');this.$win=$(window);this.$body=$('body');this.$parent=this.$el.parent();this.property={};this.isMobile=$.avia_utilities.isMobile;this.ratio=this.$el.data('avia-parallax-ratio')||0.5;this.transform=document.documentElement.className.indexOf('avia_transform')!==-1?true:false;this.transform3d=document.documentElement.className.indexOf('avia_transform3d')!==-1?true:false;this.ticking=false;if($.avia_utilities.supported.transition===undefined)

{$.avia_utilities.supported.transition=$.avia_utilities.supports('transition');}

this._init(options);}

$.AviaParallaxElement.prototype={_init:function(options)

{var _self=this;if(_self.isMobile)

{return;}

setTimeout(function()

{_self._fetch_properties();},30);this.$win.on("debouncedresize av-height-change",$.proxy(_self._fetch_properties,_self));this.$body.on("av_resize_finished",$.proxy(_self._fetch_properties,_self));setTimeout(function()

{_self.$win.on('scroll',$.proxy(_self._on_scroll,_self));},100);},_fetch_properties:function()

{this.property.offset=this.$parent.offset().top;this.property.wh=this.$win.height();this.property.height=this.$parent.outerHeight();this.$el.height(Math.ceil((this.property.wh*this.ratio)+this.property.height));this._parallax_scroll();},_on_scroll:function(e)

{var _self=this;if(!_self.ticking){_self.ticking=true;window.requestAnimationFrame($.proxy(_self._parallax_scroll,_self));}},_parallax_scroll:function(e)

{var winTop=this.$win.scrollTop(),winBottom=winTop+this.property.wh,scrollPos="0",prop={};if(this.property.offset<winBottom&&winTop<=this.property.offset+this.property.height)

{scrollPos=Math.ceil((winBottom-this.property.offset)*this.ratio);if(this.transform3d)

{prop[$.avia_utilities.supported.transition+"transform"]="translate3d(0px,"+scrollPos+"px, 0px)";}

else if(this.transform)

{prop[$.avia_utilities.supported.transition+"transform"]="translate(0px,"+scrollPos+"px)";}

else

{prop["background-position"]="0px "+scrollPos+"px";}

this.$el.css(prop);}

this.ticking=false;}};$.fn.avia_parallax=function(options)

{return this.each(function()

{var self=$.data(this,'aviaParallax');if(!self)

{self=$.data(this,'aviaParallax',new $.AviaParallaxElement(options,this));}});}

$.fn.avia_mobile_fixed=function(options)

{var isMobile=$.avia_utilities.isMobile;if(!isMobile)return;return this.each(function()

{var current=$(this).addClass('av-parallax-section'),$background=current.attr('style'),$attachment_class=current.data('section-bg-repeat'),template="";if($attachment_class=='stretch'||$attachment_class=='no-repeat')

{$attachment_class=" avia-full-stretch";}

else

{$attachment_class="";}

template="<div class='av-parallax "+$attachment_class+"' data-avia-parallax-ratio='0.0' style = '"+$background+"' ></div>";current.prepend(template);current.attr('style','');});}

$.fn.layer_slider_height_helper=function(options)

{return this.each(function()

{var container=$(this),first_div=container.find('>div:first'),timeout=false,counter=0,reset_size=function()

{if(first_div.height()>0||counter>5)

{container.height('auto');}

else

{timeout=setTimeout(reset_size,500);counter++;}};if(!first_div.length)return;timeout=setTimeout(reset_size,0);});}

$.fn.avia_sc_testimonial=function(options)

{return this.each(function()

{var container=$(this),elements=container.find('.avia-testimonial');container.on('avia_start_animation',function()

{elements.each(function(i)

{var element=$(this);setTimeout(function(){element.addClass('avia_start_animation')},(i*150));});});});}

$.fn.avia_sc_progressbar=function(options)

{return this.each(function()

{var container=$(this),elements=container.find('.progress');container.on('avia_start_animation',function()

{elements.each(function(i)

{var element=$(this);setTimeout(function(){element.addClass('avia_start_animation')},(i*250));});});});}

$.fn.avia_sc_iconlist=function(options)

{return this.each(function()

{var iconlist=$(this),elements=iconlist.find('>li');iconlist.on('avia_start_animation',function()

{elements.each(function(i)

{var element=$(this);setTimeout(function(){element.addClass('avia_start_animation')},(i*350));});});});}

$.fn.avia_sc_animation_delayed=function(options)

{var global_timer=0,delay=options.delay||50;return this.each(function()

{var elements=$(this);elements.on('avia_start_animation',function()

{var element=$(this);global_timer++;setTimeout(function(){element.addClass('avia_start_delayed_animation');global_timer--;},(global_timer*delay));});});}

$.fn.avia_browser_height=function()

{if(!this.length)return;var win=$(window),html_el=$('html'),subtract=$('#wpadminbar, #header.av_header_top:not(.html_header_transparency #header), #main>.title_container'),css_block=$("<style type='text/css' id='av-browser-height'></style>").appendTo('head:first'),sidebar_menu=$('.html_header_sidebar #top #header_main'),full_slider=$('.html_header_sidebar .avia-fullscreen-slider.avia-builder-el-0.avia-builder-el-no-sibling').addClass('av-solo-full'),calc_height=function()

{var css="",wh100=win.height(),ww100=win.width(),wh100_mod=wh100,whCover=(wh100/9)*16,wwCover=(ww100/16)*9,wh75=Math.round(wh100*0.75),wh50=Math.round(wh100*0.5),wh25=Math.round(wh100*0.25),solo=0;if(sidebar_menu.length)solo=sidebar_menu.height();subtract.each(function(){wh100_mod-=this.offsetHeight-1;});var whCoverMod=(wh100_mod/9)*16;css+=".avia-section.av-minimum-height .container{opacity: 1; }\n";css+=".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";css+=".av-minimum-height-75 .container, .av-cell-min-height-75 > .flex_cell {height:"+wh75+"px;}\n";css+=".av-minimum-height-50 .container, .av-cell-min-height-50 > .flex_cell {height:"+wh50+"px;}\n";css+=".av-minimum-height-25 .container, .av-cell-min-height-25 > .flex_cell {height:"+wh25+"px;}\n";css+=".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";css+="#top .av-solo-full .avia-slideshow {min-height:"+solo+"px;}\n";if(ww100/wh100<16/9)

{css+="#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";}

else

{css+="#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";}

if(ww100/wh100_mod<16/9)

{css+="#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";}

else

{css+="#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";}

try{css_block.text(css);}

catch(err){css_block.remove();css_block=$("<style type='text/css' id='av-browser-height'>"+css+"</style>").appendTo('head:first');}

setTimeout(function(){win.trigger('av-height-change');},100);};win.on('debouncedresize',calc_height);calc_height();}

$.fn.avia_video_section=function()

{if(!this.length)return;var elements=this.length,content="",win=$(window),css_block=$("<style type='text/css' id='av-section-height'></style>").appendTo('head:first'),calc_height=function(section,counter)

{if(counter===0){content="";}

var css="",the_id='#'+section.attr('id'),wh100=section.height(),ww100=section.width(),aspect=section.data('sectionVideoRatio').split(':'),video_w=aspect[0],video_h=aspect[1],whCover=(wh100/video_h)*video_w,wwCover=(ww100/video_w)*video_h;if(ww100/wh100<video_w/video_h)

{css+="#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";}

else

{css+="#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";}

content=content+css;if(elements==counter+1)

{try{css_block.text(content);}

catch(err){css_block.remove();css_block=$("<style type='text/css' id='av-section-height'>"+content+"</style>").appendTo('head:first');}}};return this.each(function(i)

{var self=$(this);win.on('debouncedresize',function(){calc_height(self,i);});calc_height(self,i);});}

$.fn.avia_sc_gallery=function(options)

{return this.each(function()

{var gallery=$(this),images=gallery.find('img'),big_prev=gallery.find('.avia-gallery-big');gallery.on('avia_start_animation',function()

{images.each(function(i)

{var image=$(this);setTimeout(function(){image.addClass('avia_start_animation')},(i*110));});});if(gallery.hasClass('deactivate_avia_lazyload'))gallery.trigger('avia_start_animation');if(big_prev.length)

{gallery.on('mouseenter','.avia-gallery-thumb a',function()

{var _self=this;big_prev.attr('data-onclick',_self.getAttribute("data-onclick"));big_prev.height(big_prev.height());big_prev.attr('href',_self.href)

var newImg=_self.getAttribute("data-prev-img"),oldImg=big_prev.find('img'),oldImgSrc=oldImg.attr('src');if(newImg!=oldImgSrc)

{var next_img=new Image();next_img.src=newImg;var $next=$(next_img);if(big_prev.hasClass('avia-gallery-big-no-crop-thumb'))

{$next.css({'height':big_prev.height(),'width':'auto'});}

big_prev.stop().animate({opacity:0},function()

{$next.insertAfter(oldImg);oldImg.remove();big_prev.animate({opacity:1});big_prev.attr('title',$(_self).attr('title'));});}});big_prev.on('click',function()

{var imagelink=gallery.find('.avia-gallery-thumb a').eq(this.getAttribute("data-onclick")-1);if(imagelink&&!imagelink.hasClass('aviaopeninbrowser'))

{imagelink.trigger('click');}

else if(imagelink)

{var imgurl=imagelink.attr("href");if(imagelink.hasClass('aviablank')&&imgurl!='')

{window.open(imgurl,'_blank');}

else if(imgurl!='')

{window.open(imgurl,'_self');}}

return false;});$(window).on("debouncedresize",function()

{big_prev.height('auto');});}});}

$.fn.avia_sc_toggle=function(options)

{var defaults={single:'.single_toggle',heading:'.toggler',content:'.toggle_wrap',sortContainer:'.taglist'};var win=$(window),options=$.extend(defaults,options);return this.each(function()

{var container=$(this).addClass('enable_toggles'),toggles=$(options.single,container),heading=$(options.heading,container),allContent=$(options.content,container),sortLinks=$(options.sortContainer+" a",container);heading.each(function(i)

{var thisheading=$(this),content=thisheading.next(options.content,container);function scroll_to_viewport()

{var el_offset=content.offset().top,scoll_target=el_offset-50-parseInt($('html').css('margin-top'),10);if(win.scrollTop()>el_offset)

{$('html:not(:animated),body:not(:animated)').animate({scrollTop:scoll_target},200);}}

if(content.css('visibility')!="hidden")

{thisheading.addClass('activeTitle');}

thisheading.on('click',function()

{if(content.css('visibility')!="hidden")

{content.slideUp(200,function()

{content.removeClass('active_tc').attr({style:''});win.trigger('av-height-change');});thisheading.removeClass('activeTitle');}

else

{if(container.is('.toggle_close_all'))

{allContent.not(content).slideUp(200,function()

{$(this).removeClass('active_tc').attr({style:''});scroll_to_viewport();});heading.removeClass('activeTitle');}

content.addClass('active_tc').slideDown(200,function()

{if(!container.is('.toggle_close_all'))

{scroll_to_viewport();}

win.trigger('av-height-change');});thisheading.addClass('activeTitle');location.replace(thisheading.data('fake-id'));}});});sortLinks.click(function(e){e.preventDefault();var show=toggles.filter('[data-tags~="'+$(this).data('tag')+'"]'),hide=toggles.not('[data-tags~="'+$(this).data('tag')+'"]');sortLinks.removeClass('activeFilter');$(this).addClass('activeFilter');heading.filter('.activeTitle').trigger('click');show.slideDown();hide.slideUp();});function trigger_default_open(hash)

{if(!hash&&window.location.hash)hash=window.location.hash;if(!hash)return;var open=heading.filter('[data-fake-id="'+hash+'"]');if(open.length)

{if(!open.is('.activeTitle'))open.trigger('click');window.scrollTo(0,container.offset().top-70);}}

trigger_default_open(false);$('a').on('click',function(){var hash=$(this).attr('href');if(typeof hash!="undefined"&&hash)

{hash=hash.replace(/^.*?#/,'');trigger_default_open('#'+hash);}});});};$.fn.avia_sc_tabs=function(options)

{var defaults={heading:'.tab',content:'.tab_content',active:'active_tab',sidebar:false};var win=$(window)

options=$.extend(defaults,options);return this.each(function()

{var container=$(this),tab_titles=$('<div class="tab_titles"></div>').prependTo(container),tabs=$(options.heading,container),content=$(options.content,container),newtabs=false,oldtabs=false;newtabs=tabs.clone();oldtabs=tabs.addClass('fullsize-tab');tabs=newtabs;tabs.prependTo(tab_titles).each(function(i)

{var tab=$(this),the_oldtab=false;if(newtabs)the_oldtab=oldtabs.filter(':eq('+i+')');tab.addClass('tab_counter_'+i).bind('click',function()

{open_content(tab,i,the_oldtab);return false;});if(newtabs)

{the_oldtab.bind('click',function()

{open_content(the_oldtab,i,tab);return false;});}});set_size();trigger_default_open(false);win.on("debouncedresize",set_size);$('a').on('click',function(){var hash=$(this).attr('href');if(typeof hash!="undefined"&&hash)

{hash=hash.replace(/^.*?#/,'');trigger_default_open('#'+hash);}});function set_size()

{if(!options.sidebar)return;content.css({'min-height':tab_titles.outerHeight()+1});}

function open_content(tab,i,alternate_tab)

{if(!tab.is('.'+options.active))

{$('.'+options.active,container).removeClass(options.active);$('.'+options.active+'_content',container).removeClass(options.active+'_content');tab.addClass(options.active);var new_loc=tab.data('fake-id');if(typeof new_loc=='string')location.replace(new_loc);if(alternate_tab)alternate_tab.addClass(options.active);var active_c=content.filter(':eq('+i+')').addClass(options.active+'_content');if(typeof click_container!='undefined'&&click_container.length)

{sidebar_shadow.height(active_c.outerHeight());}

var el_offset=active_c.offset().top,scoll_target=el_offset-50-parseInt($('html').css('margin-top'),10);if(win.scrollTop()>el_offset)

{$('html:not(:animated),body:not(:animated)').scrollTop(scoll_target);}}}

function trigger_default_open(hash)

{if(!hash&&window.location.hash)hash=window.location.hash;if(!hash)return;var open=tabs.filter('[data-fake-id="'+hash+'"]');if(open.length)

{if(!open.is('.active_tab'))open.trigger('click');window.scrollTo(0,container.offset().top-70);}}});};(function($)

{$.fn.avia_sc_animated_number=function(options)

{var skipStep=false,start_count=function(element,countTo,increment,current,fakeCountTo)

{var newCount=current+increment;if(newCount>=fakeCountTo)

{element.text(countTo);}

else

{var prepend="",addZeros=countTo.toString().length-newCount.toString().length

for(var i=addZeros;i>0;i--){prepend+="0";}

element.text(prepend+newCount);window.requestAnimationFrame(function(){start_count(element,countTo,increment,newCount,fakeCountTo)});}};return this.each(function()

{var number_container=$(this),elements=number_container.find('.avia-single-number'),countTimer=number_container.data('timer')||3000;elements.each(function(i)

{var element=$(this),text=element.text();if(window.addEventListener)element.text(text.replace(/./g,"0"));});number_container.addClass('number_prepared').on('avia_start_animation',function()

{if(number_container.is('.avia_animation_done'))return;number_container.addClass('avia_animation_done');elements.each(function(i)

{var element=$(this),countTo=element.data('number'),fakeCountTo=countTo,current=parseInt(element.text(),10),zeroOnly=/^0+$/.test(countTo),increment=0;if(zeroOnly&&countTo!==0)fakeCountTo=countTo.replace(/0/g,'9');increment=Math.round(fakeCountTo*32/countTimer);if(increment==0||increment%10==0)increment+=1;setTimeout(function(){start_count(element,countTo,increment,current,fakeCountTo);},300);});});});}})(jQuery);(function($)

{$.fn.avia_ajax_form=function(variables)

{var defaults={sendPath:'send.php',responseContainer:'.ajaxresponse'};var options=$.extend(defaults,variables);return this.each(function()

{var form=$(this),form_sent=false,send={formElements:form.find('textarea, select, input[type=text], input[type=checkbox], input[type=hidden]'),validationError:false,button:form.find('input:submit'),dataObj:{}},responseContainer=form.next(options.responseContainer+":eq(0)");send.button.bind('click',checkElements);if($.avia_utilities.isMobile)

{send.formElements.each(function(i)

{var currentElement=$(this),is_email=currentElement.hasClass('is_email');if(is_email)currentElement.attr('type','email');});}

function checkElements(e)

{send.validationError=false;send.datastring='ajax=true';send.formElements.each(function(i)

{var currentElement=$(this),surroundingElement=currentElement.parent(),value=currentElement.val(),name=currentElement.attr('name'),classes=currentElement.attr('class'),nomatch=true;if(currentElement.is(':checkbox'))

{if(currentElement.is(':checked')){value=true}else{value=''}}

send.dataObj[name]=encodeURIComponent(value);if(classes&&classes.match(/is_empty/))

{if(value==''||value==null)

{surroundingElement.removeClass("valid error ajax_alert").addClass("error");send.validationError=true;}

else

{surroundingElement.removeClass("valid error ajax_alert").addClass("valid");}

nomatch=false;}

if(classes&&classes.match(/is_email/))

{if(!value.match(/^[\w|\.|\-]+@\w[\w|\.|\-]*\.[a-zA-Z]{2,20}$/))

{surroundingElement.removeClass("valid error ajax_alert").addClass("error");send.validationError=true;}

else

{surroundingElement.removeClass("valid error ajax_alert").addClass("valid");}

nomatch=false;}

if(classes&&classes.match(/is_phone/))

{if(!value.match(/^(\d|\s|\-|\/|\(|\)|\[|\]|e|x|t|ension|\.|\+|\_|\,|\:|\;){3,}$/))

{surroundingElement.removeClass("valid error ajax_alert").addClass("error");send.validationError=true;}

else

{surroundingElement.removeClass("valid error ajax_alert").addClass("valid");}

nomatch=false;}

if(classes&&classes.match(/is_number/))

{if(!($.isNumeric(value))||value=="")

{surroundingElement.removeClass("valid error ajax_alert").addClass("error");send.validationError=true;}

else

{surroundingElement.removeClass("valid error ajax_alert").addClass("valid");}

nomatch=false;}

if(classes&&classes.match(/captcha/))

{var verifier=form.find("#"+name+"_verifier").val(),lastVer=verifier.charAt(verifier.length-1),finalVer=verifier.charAt(lastVer);if(value!=finalVer)

{surroundingElement.removeClass("valid error ajax_alert").addClass("error");send.validationError=true;}

else

{surroundingElement.removeClass("valid error ajax_alert").addClass("valid");}

nomatch=false;}

if(nomatch&&value!='')

{surroundingElement.removeClass("valid error ajax_alert").addClass("valid");}});if(send.validationError==false)

{if(form.data('av-custom-send'))

{mailchimp_send();}

else

{send_ajax_form();}}

return false;}

function send_ajax_form()

{if(form_sent){return false;}

form_sent=true;send.button.addClass('av-sending-button');send.button.val(send.button.data('sending-label'));var redirect_to=form.data('avia-redirect')|| false,action=form.attr('action');responseContainer.load(action+' '+options.responseContainer,send.dataObj,function()

{if(redirect_to&&action!=redirect_to)

{form.attr('action',redirect_to);location.href=redirect_to;}

else

{responseContainer.removeClass('hidden').css({display:"block"});form.slideUp(400,function(){responseContainer.slideDown(400,function(){$('body').trigger('av_resize_finished');});send.formElements.val('');});}});}

function mailchimp_send()

{if(form_sent){return false;}

form_sent=true;var original_label=send.button.val();send.button.addClass('av-sending-button');send.button.val(send.button.data('sending-label'));send.dataObj.ajax_mailchimp=true;var redirect_to=form.data('avia-redirect')|| false,action=form.attr('action'),error_msg_container=form.find('.av-form-error-container'),form_id=form.data('avia-form-id');$.ajax({url:action,type:"POST",data:send.dataObj,beforeSend:function()

{if(error_msg_container.length)

{error_msg_container.slideUp(400,function()

{error_msg_container.remove();$('body').trigger('av_resize_finished');});}},success:function(responseText)

{var response=jQuery("<div>").append(jQuery.parseHTML(responseText)),error=response.find('.av-form-error-container');if(error.length)

{form_sent=false;form.prepend(error);error.css({display:"none"}).slideDown(400,function()

{$('body').trigger('av_resize_finished');});send.button.removeClass('av-sending-button');send.button.val(original_label);}

else

{if(redirect_to&&action!=redirect_to)

{form.attr('action',redirect_to);location.href=redirect_to;}

else

{var success_text=response.find(options.responseContainer+"_"+form_id);responseContainer.html(success_text).removeClass('hidden').css({display:"block"});form.slideUp(400,function()

{responseContainer.slideDown(400,function()

{$('body').trigger('av_resize_finished');});send.formElements.val('');});}}},error:function()

{},complete:function()

{}});}});};})(jQuery);$.AviaccordionSlider=function(options,slider)

{this.$slider=$(slider);this.$inner=this.$slider.find('.aviaccordion-inner');this.$slides=this.$inner.find('.aviaccordion-slide');this.$images=this.$inner.find('.aviaccordion-image');this.$last=this.$slides.filter(':last');this.$titles=this.$slider.find('.aviaccordion-preview');this.$titlePos=this.$slider.find('.aviaccordion-preview-title-pos');this.$titleWrap=this.$slider.find('.aviaccordion-preview-title-wrap');this.$win=$(window);if($.avia_utilities.supported.transition===undefined)

{$.avia_utilities.supported.transition=$.avia_utilities.supports('transition');}

this.browserPrefix=$.avia_utilities.supported.transition;this.cssActive=this.browserPrefix!==false?true:false;this.transform3d=document.documentElement.className.indexOf('avia_transform3d')!==-1?true:false;this.isMobile=$.avia_utilities.isMobile;this.property=this.browserPrefix+'transform',this.count=this.$slides.length;this.open=false;this.autoplay=false;this.increaseTitle=this.$slider.is(".aviaccordion-title-on-hover");this._init(options);}

$.AviaccordionSlider.prototype={_init:function(options)

{var _self=this;_self.options=$.extend({},options,this.$slider.data());$.avia_utilities.preload({container:this.$slider,single_callback:function(){_self._kickOff();}});},_kickOff:function()

{var _self=this;_self._calcMovement();_self._bindEvents();_self._showImages();_self._autoplay();},_autoplay:function()

{var _self=this;if(_self.options.autoplay)

{_self.autoplay=setInterval(function()

{_self.open=_self.open===false?0:_self.open+1;if(_self.open>=_self.count)_self.open=0;_self._move({},_self.open);},_self.options.interval*1000)}},_showImages:function()

{var _self=this,counter=0,delay=300,title_delay=this.count*delay;if(this.cssActive)

{setTimeout(function(){_self.$slider.addClass('av-animation-active');},10);}

this.$images.each(function(i)

{var current=$(this),timer=delay*(i+1);setTimeout(function()

{current.avia_animate({opacity:1},400,function()

{current.css($.avia_utilities.supported.transition+"transform","none");});},timer);});if(_self.increaseTitle)title_delay=0;this.$titlePos.each(function(i)

{var current=$(this),new_timer=title_delay+100*(i+1);setTimeout(function()

{current.avia_animate({opacity:1},200,function()

{current.css($.avia_utilities.supported.transition+"transform","none");});},new_timer);});},_bindEvents:function()

{var trigger=this.isMobile?"click":"mouseenter";this.$slider.on(trigger,'.aviaccordion-slide',$.proxy(this._move,this));this.$slider.on('mouseleave','.aviaccordion-inner',$.proxy(this._move,this));this.$win.on('debouncedresize',$.proxy(this._calcMovement,this));this.$slider.on('av-prev av-next',$.proxy(this._moveTo,this));if(this.isMobile)

{this.$slider.avia_swipe_trigger({next:this.$slider,prev:this.$slider,event:{prev:'av-prev',next:'av-next'}});}},_titleHeight:function()

{var th=0;this.$titleWrap.css({'height':'auto'}).each(function()

{var new_h=$(this).outerHeight();if(new_h>th)th=new_h;}).css({'height':th+2});},_calcMovement:function(event,allow_repeat)

{var _self=this,containerWidth=this.$slider.width(),defaultPos=this.$last.data('av-left'),imgWidth=this.$images.filter(':last').width()||containerWidth,imgWidthPercent=Math.floor((100/containerWidth)*imgWidth),allImageWidth=imgWidthPercent*_self.count,modifier=3,tempMinLeft=100-imgWidthPercent,minLeft=tempMinLeft>defaultPos/modifier?tempMinLeft:0,oneLeft=minLeft/(_self.count-1),titleWidth=imgWidth;if(allImageWidth<110&&allow_repeat!==false)

{var slideHeight=this.$slider.height(),maxHeight=(slideHeight/allImageWidth)*110;this.$slider.css({'max-height':maxHeight});_self._calcMovement(event,false);return;}

if(oneLeft<2)minLeft=0;this.$slides.each(function(i)

{var current=$(this),newLeft=0,newRight=0,defaultLeft=current.data('av-left');if(minLeft!==0)

{newLeft=oneLeft*i;newRight=imgWidthPercent+newLeft-oneLeft;}

else

{newLeft=defaultLeft/Math.abs(modifier);newRight=100-((newLeft/i)*(_self.count-i));}

if(i==1&&_self.increaseTitle){titleWidth=newRight+1;}

if(_self.cssActive)

{newLeft=newLeft-defaultLeft;newRight=newRight-defaultLeft;defaultLeft=0;}

current.data('av-calc-default',defaultLeft);current.data('av-calc-left',newLeft);current.data('av-calc-right',newRight);});if(_self.increaseTitle){_self.$titles.css({width:titleWidth+"%"});}},_moveTo:function(event)

{var direction=event.type=="av-next"?1:-1,nextSlide=this.open===false?0:this.open+direction;if(nextSlide>=0&&nextSlide<this.$slides.length)this._move(event,nextSlide);},_move:function(event,direct_open)

{var _self=this,slide=event.currentTarget,itemNo=typeof direct_open!="undefined"?direct_open:this.$slides.index(slide);this.open=itemNo;if(_self.autoplay&&typeof slide!="undefined"){clearInterval(_self.autoplay);_self.autoplay=false;}

this.$slides.removeClass('aviaccordion-active-slide').each(function(i)

{var current=$(this),dataSet=current.data(),trans_val=i<=itemNo?dataSet.avCalcLeft:dataSet.avCalcRight,transition={},reset=event.type=='mouseleave'?1:0,active=itemNo===i?_self.$titleWrap.eq(i):false;if(active)current.addClass('aviaccordion-active-slide');if(reset)

{trans_val=dataSet.avCalcDefault;this.open=false;}

if(_self.cssActive)

{transition[_self.property]=_self.transform3d?"translate3d("+trans_val+"%, 0, 0)":"translate("+trans_val+"%,0)";current.css(transition);}

else

{transition.left=trans_val+"%";current.stop().animate(transition,700,'easeOutQuint');}});}};$.fn.aviaccordion=function(options)

{return this.each(function()

{var active=$.data(this,'AviaccordionSlider');if(!active)

{$.data(this,'AviaccordionSlider',1);new $.AviaccordionSlider(options,this);}});}

$.AviaTextRotator=function(options,slider)

{this.$win=$(window);this.$slider=$(slider);this.$inner=this.$slider.find('.av-rotator-text');this.$slides=this.$inner.find('.av-rotator-text-single');this.$current=this.$slides.eq(0);this.open=0;this.count=this.$slides.length;if($.avia_utilities.supported.transition===undefined)

{$.avia_utilities.supported.transition=$.avia_utilities.supports('transition');}

this.browserPrefix=$.avia_utilities.supported.transition;this.cssActive=this.browserPrefix!==false?true:false;this.property=this.browserPrefix+'transform',this._init(options);}

$.AviaTextRotator.prototype={_init:function(options)

{var _self=this;if(this.count<=1)return;_self.options=$.extend({},options,this.$slider.data());_self.$inner.addClass('av-rotation-active');if(_self.options.fixwidth==1)this.$inner.width(this.$current.width());_self._autoplay();},_autoplay:function()

{var _self=this;_self.autoplay=setInterval(function()

{_self.open=_self.open===false?0:_self.open+1;if(_self.open>=_self.count)_self.open=0;_self._move({},_self.open);},_self.options.interval*1000)},_move:function(event)

{var _self=this,modifier=30*_self.options.animation,fade_out={opacity:0},fade_start={display:'inline-block',opacity:0},fade_in={opacity:1};this.$next=_self.$slides.eq(this.open);if(this.cssActive)

{fade_out[_self.property]="translate(0px,"+modifier+"px)";fade_start[_self.property]="translate(0px,"+(modifier*-1)+"px)";fade_in[_self.property]="translate(0px,0px)";}

else

{fade_out['top']=modifier;fade_start['top']=(modifier*-1);fade_in['top']=0;}

_self.$current.avia_animate(fade_out,function()

{_self.$current.css({display:'none'});_self.$next.css(fade_start).avia_animate(fade_in,function()

{_self.$current=_self.$slides.eq(_self.open);});});}};$.fn.avia_textrotator=function(options)

{return this.each(function()

{var active=$.data(this,'AviaTextRotator');if(!active)

{$.data(this,'AviaTextRotator',1);new $.AviaTextRotator(options,this);}});}

$.fn.avia_waypoints=function(options_passed)

{if(!$('html').is('.avia_transform'))return;var defaults={offset:'bottom-in-view',triggerOnce:true},options=$.extend({},defaults,options_passed),isMobile=$.avia_utilities.isMobile;return this.each(function()

{var element=$(this);setTimeout(function()

{if(isMobile)

{element.addClass('avia_start_animation').trigger('avia_start_animation');}

else

{element.waypoint(function(direction)

{$(this.element).addClass('avia_start_animation').trigger('avia_start_animation');},options);}},100)});};var $event=$.event,$special,resizeTimeout;$special=$event.special.debouncedresize={setup:function(){$(this).on("resize",$special.handler);},teardown:function(){$(this).off("resize",$special.handler);},handler:function(event,execAsap){var context=this,args=arguments,dispatch=function(){event.type="debouncedresize";$event.dispatch.apply(context,args);};if(resizeTimeout){clearTimeout(resizeTimeout);}

execAsap?dispatch():resizeTimeout=setTimeout(dispatch,$special.threshold);},threshold:150};$.easing['jswing']=$.easing['swing'];$.extend($.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return $.easing[$.easing.def](x,t,b,c,d);},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}

else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}

else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}

else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});})(jQuery);(function($)

{"use strict";$.avia_utilities=$.avia_utilities||{};$.avia_utilities.loading=function(attach_to,delay){var loader={active:false,show:function()

{if(loader.active===false)

{loader.active=true;loader.loading_item.css({display:'block',opacity:0});}

loader.loading_item.stop().animate({opacity:0.7});},hide:function()

{if(typeof delay==='undefined'){delay=600;}

loader.loading_item.stop().delay(delay).animate({opacity:0},function()

{loader.loading_item.css({display:'none'});loader.active=false;});},attach:function()

{if(typeof attach_to==='undefined'){attach_to='body';}

loader.loading_item=$('<div class="avia_loading_icon"></div>').css({display:"none"}).appendTo(attach_to);}}

loader.attach();return loader;};$.avia_utilities.playpause=function(attach_to,delay){var pp={active:false,to1:"",to2:"",set:function(status)

{pp.loading_item.removeClass('av-play av-pause');pp.to1=setTimeout(function(){pp.loading_item.addClass('av-'+status);},10);pp.to2=setTimeout(function(){pp.loading_item.removeClass('av-'+status);},1500);},attach:function()

{if(typeof attach_to==='undefined'){attach_to='body';}

pp.loading_item=$('<div class="avia_playpause_icon"></div>').css({display:"none"}).appendTo(attach_to);}}

pp.attach();return pp;};$.avia_utilities.preload=function(options_passed)

{new $.AviaPreloader(options_passed);}

$.AviaPreloader=function(options)

{this.win=$(window);this.defaults={container:'body',maxLoops:10,trigger_single:true,single_callback:function(){},global_callback:function(){}};this.options=$.extend({},this.defaults,options);this.preload_images=0;this.load_images();}

$.AviaPreloader.prototype={load_images:function()

{var _self=this;if(typeof _self.options.container==='string'){_self.options.container=$(_self.options.container);}

_self.options.container.each(function()

{var container=$(this);container.images=container.find('img');container.allImages=container.images;_self.preload_images+=container.images.length;setTimeout(function(){_self.checkImage(container);},10);});},checkImage:function(container)

{var _self=this;container.images.each(function()

{if(this.complete===true)

{container.images=container.images.not(this);_self.preload_images-=1;}});if(container.images.length&&_self.options.maxLoops>=0)

{_self.options.maxLoops-=1;setTimeout(function(){_self.checkImage(container);},500);}

else

{_self.preload_images=_self.preload_images-container.images.length;_self.trigger_loaded(container);}},trigger_loaded:function(container)

{var _self=this;if(_self.options.trigger_single!==false)

{_self.win.trigger('avia_images_loaded_single',[container]);_self.options.single_callback.call(container);}

if(_self.preload_images===0)

{_self.win.trigger('avia_images_loaded');_self.options.global_callback.call();}}}

$.avia_utilities.css_easings={linear:'linear',swing:'ease-in-out',bounce:'cubic-bezier(0.0, 0.35, .5, 1.3)',easeInQuad:'cubic-bezier(0.550, 0.085, 0.680, 0.530)',easeInCubic:'cubic-bezier(0.550, 0.055, 0.675, 0.190)',easeInQuart:'cubic-bezier(0.895, 0.030, 0.685, 0.220)',easeInQuint:'cubic-bezier(0.755, 0.050, 0.855, 0.060)',easeInSine:'cubic-bezier(0.470, 0.000, 0.745, 0.715)',easeInExpo:'cubic-bezier(0.950, 0.050, 0.795, 0.035)',easeInCirc:'cubic-bezier(0.600, 0.040, 0.980, 0.335)',easeInBack:'cubic-bezier(0.600, -0.280, 0.735, 0.04)',easeOutQuad:'cubic-bezier(0.250, 0.460, 0.450, 0.940)',easeOutCubic:'cubic-bezier(0.215, 0.610, 0.355, 1.000)',easeOutQuart:'cubic-bezier(0.165, 0.840, 0.440, 1.000)',easeOutQuint:'cubic-bezier(0.230, 1.000, 0.320, 1.000)',easeOutSine:'cubic-bezier(0.390, 0.575, 0.565, 1.000)',easeOutExpo:'cubic-bezier(0.190, 1.000, 0.220, 1.000)',easeOutCirc:'cubic-bezier(0.075, 0.820, 0.165, 1.000)',easeOutBack:'cubic-bezier(0.175, 0.885, 0.320, 1.275)',easeInOutQuad:'cubic-bezier(0.455, 0.030, 0.515, 0.955)',easeInOutCubic:'cubic-bezier(0.645, 0.045, 0.355, 1.000)',easeInOutQuart:'cubic-bezier(0.770, 0.000, 0.175, 1.000)',easeInOutQuint:'cubic-bezier(0.860, 0.000, 0.070, 1.000)',easeInOutSine:'cubic-bezier(0.445, 0.050, 0.550, 0.950)',easeInOutExpo:'cubic-bezier(1.000, 0.000, 0.000, 1.000)',easeInOutCirc:'cubic-bezier(0.785, 0.135, 0.150, 0.860)',easeInOutBack:'cubic-bezier(0.680, -0.550, 0.265, 1.55)',easeInOutBounce:'cubic-bezier(0.580, -0.365, 0.490, 1.365)',easeOutBounce:'cubic-bezier(0.760, 0.085, 0.490, 1.365)'};$.avia_utilities.supported={};$.avia_utilities.supports=(function()

{var div=document.createElement('div'),vendors=['Khtml','Ms','Moz','Webkit'];return function(prop,vendor_overwrite)

{if(div.style[prop]!==undefined){return"";}

if(vendor_overwrite!==undefined){vendors=vendor_overwrite;}

prop=prop.replace(/^[a-z]/,function(val)

{return val.toUpperCase();});var len=vendors.length;while(len--)

{if(div.style[vendors[len]+prop]!==undefined)

{return"-"+vendors[len].toLowerCase()+"-";}}

return false;};}());$.fn.avia_animate=function(prop,speed,easing,callback)

{if(typeof speed==='function'){callback=speed;speed=false;}

if(typeof easing==='function'){callback=easing;easing=false;}

if(typeof speed==='string'){easing=speed;speed=false;}

if(callback===undefined||callback===false){callback=function(){};}

if(easing===undefined||easing===false){easing='easeInQuad';}

if(speed===undefined||speed===false){speed=400;}

if($.avia_utilities.supported.transition===undefined)

{$.avia_utilities.supported.transition=$.avia_utilities.supports('transition');}

if($.avia_utilities.supported.transition!==false)

{var prefix=$.avia_utilities.supported.transition+'transition',cssRule={},cssProp={},thisStyle=document.body.style,end=(thisStyle.WebkitTransition!==undefined)?'webkitTransitionEnd':(thisStyle.OTransition!==undefined)?'oTransitionEnd':'transitionend';easing=$.avia_utilities.css_easings[easing];cssRule[prefix]='all '+(speed/1000)+'s '+easing;end=end+".avia_animate";for(var rule in prop)

{if(prop.hasOwnProperty(rule)){cssProp[rule]=prop[rule];}}

prop=cssProp;this.each(function()

{var element=$(this),css_difference=false,rule,current_css;for(rule in prop)

{if(prop.hasOwnProperty(rule))

{current_css=element.css(rule);if(prop[rule]!=current_css&&prop[rule]!=current_css.replace(/px|%/g,""))

{css_difference=true;break;}}}

if(css_difference)

{if(!($.avia_utilities.supported.transition+"transform"in prop))

{prop[$.avia_utilities.supported.transition+"transform"]="translateZ(0)";}

var endTriggered=false;element.on(end,function(event)

{if(event.target!=event.currentTarget)return false;if(endTriggered==true)return false;endTriggered=true;cssRule[prefix]="none";element.off(end);element.css(cssRule);setTimeout(function(){callback.call(element);});});setTimeout(function(){if(!endTriggered&&!avia_is_mobile&&$('html').is('.avia-safari')){element.trigger(end);$.avia_utilities.log('Safari Fallback '+end+' trigger');}},speed+100);setTimeout(function(){element.css(cssRule);},10);setTimeout(function(){element.css(prop);},20);}

else

{setTimeout(function(){callback.call(element);});}});}

else

{this.animate(prop,speed,easing,callback);}

return this;};})(jQuery);(function($)

{"use strict";$.AviaSlider=function(options,slider)

{var self=this;this.$win=$(window);this.$slider=$(slider);this.isMobile=$.avia_utilities.isMobile;this._prepareSlides(options);$.avia_utilities.preload({container:this.$slider,single_callback:function(){self._init(options);}});}

$.AviaSlider.defaults={interval:5,autoplay:false,stopinfiniteloop:false,animation:'slide',transitionSpeed:900,easing:'easeInOutQuart',wrapElement:'>ul',slideElement:'>li',hoverpause:false,bg_slider:false,show_slide_delay:0,fullfade:false};$.AviaSlider.prototype={_init:function(options)

{this.options=this._setOptions(options);this.$sliderUl=this.$slider.find(this.options.wrapElement);this.$slides=this.$sliderUl.find(this.options.slideElement);this.gotoButtons=this.$slider.find('.avia-slideshow-dots a');this.permaCaption=this.$slider.find('>.av-slideshow-caption');this.itemsCount=this.$slides.length;this.current=0;this.loopCount=0;this.isAnimating=false;this.browserPrefix=$.avia_utilities.supports('transition');this.cssActive=this.browserPrefix!==false?true:false;this.css3DActive=document.documentElement.className.indexOf('avia_transform3d')!==-1?true:false;this.video=false;if(this.options.bg_slider==true)

{this.imageUrls=[];this.loader=$.avia_utilities.loading(this.$slider);this._bgPreloadImages();}

else

{this._kickOff();}},_setOptions:function(options)

{var newOptions=$.extend(true,{},$.AviaSlider.defaults,options),htmlData=this.$slider.data(),i="";for(i in htmlData)

{if(htmlData.hasOwnProperty(i))

{if(typeof htmlData[i]==="string"||typeof htmlData[i]==="number"||typeof htmlData[i]==="boolean")

{newOptions[i]=htmlData[i];}}}

return newOptions;},_prepareSlides:function(options)

{if(this.isMobile)

{var alter=this.$slider.find('.av-mobile-fallback-image');alter.each(function()

{var current=$(this).removeClass('av-video-slide').data({'avia_video_events':true,'video-ratio':0}),fallback=current.data('mobile-img');current.find('.av-click-overlay, .mejs-mediaelement, .mejs-container').remove();if(!fallback)

{var appendTo=current.find('.avia-slide-wrap');$('<p class="av-fallback-message"><span>Please set a mobile device fallback image for this video in your wordpress backend</span></p>').appendTo(appendTo);}

if(options&&options.bg_slider)

{current.data('img-url',fallback);}

else

{var image=$('<img src="'+fallback+'" alt="" title="" />');current.find('.avia-slide-wrap').append(image);}});}},_bgPreloadImages:function(callback)

{this._getImageURLS();this._preloadSingle(0,function()

{this._kickOff();this._preloadNext(1);});},_getImageURLS:function()

{var _self=this;this.$slides.each(function(i)

{_self.imageUrls[i]=[];_self.imageUrls[i]['url']=$(this).data("img-url");if(typeof _self.imageUrls[i]['url']=='string')

{_self.imageUrls[i]['status']=false;}

else

{_self.imageUrls[i]['status']=true;}});},_preloadSingle:function(key,callback)

{var _self=this,objImage=new Image();if(typeof _self.imageUrls[key]['url']=='string')

{$(objImage).bind('load error',function()

{_self.imageUrls[key]['status']=true;_self.$slides.eq(key).css('background-image','url('+_self.imageUrls[key]['url']+')');if(typeof callback=='function')callback.apply(_self,[objImage,key]);});if(_self.imageUrls[key]['url']!="")

{objImage.src=_self.imageUrls[key]['url'];}

else

{$(objImage).trigger('error');}}

else

{if(typeof callback=='function')callback.apply(_self,[objImage,key]);}},_preloadNext:function(key)

{if(typeof this.imageUrls[key]!="undefined")

{this._preloadSingle(key,function()

{this._preloadNext(key+1);});}},_bindEvents:function()

{var self=this,win=$(window);this.$slider.on('click','.next-slide',$.proxy(this.next,this));this.$slider.on('click','.prev-slide',$.proxy(this.previous,this));this.$slider.on('click','.goto-slide',$.proxy(this.go2,this));if(this.options.hoverpause)

{this.$slider.on('mouseenter',$.proxy(this.pause,this));this.$slider.on('mouseleave',$.proxy(this.resume,this));}

if(this.options.stopinfiniteloop&&this.options.autoplay)

{if(this.options.stopinfiniteloop=='last')

{this.$slider.on('avia_slider_last_slide',$.proxy(this._stopSlideshow,this));}

else if(this.options.stopinfiniteloop=='first')

{this.$slider.on('avia_slider_first_slide',$.proxy(this._stopSlideshow,this));}}

win.on('debouncedresize.aviaSlider',$.proxy(this._setSize,this));if(!this.isMobile)

{this.$slider.avia_keyboard_controls();}

else

{this.$slider.avia_swipe_trigger();}

self._attach_video_events();},_kickOff:function()

{var self=this,first_slide=self.$slides.eq(0),video=first_slide.data('video-ratio');self._bindEvents();this.$slider.removeClass('av-default-height-applied');if(video)

{self._setSize(true);}

else

{if(this.options.keep_pading!=true)

{self.$sliderUl.css('padding',0);self.$win.trigger('av-height-change');}}

self._setCenter();first_slide.css({visibility:'visible',opacity:0}).avia_animate({opacity:1},function()

{var current=$(this).addClass('active-slide');if(self.permaCaption.length)

{self.permaCaption.addClass('active-slide');}});if(self.options.autoplay)

{self._startSlideshow();}},_navigate:function(dir,pos){if(this.isAnimating||this.itemsCount<2 ||!this.$slider.is(":visible"))

{return false;}

this.isAnimating=true;this.prev=this.current;if(pos!==undefined)

{this.current=pos;dir=this.current>this.prev?'next':'prev';}

else if(dir==='next')

{this.current=this.current<this.itemsCount-1?this.current+1:0;if(this.current===0&&this.options.autoplay_stopper==1&&this.options.autoplay)

{this.isAnimating=false;this.current=this.prev;this._stopSlideshow();return false;}}

else if(dir==='prev')

{this.current=this.current>0?this.current-1:this.itemsCount-1;}

this.gotoButtons.removeClass('active').eq(this.current).addClass('active');this._setSize();if(this.options.bg_slider==true)

{if(this.imageUrls[this.current]['status']==true)

{this['_'+this.options.animation].call(this,dir);}

else

{this.loader.show();this._preloadSingle(this.current,function()

{this['_'+this.options.animation].call(this,dir);this.loader.hide();});}}

else

{this['_'+this.options.animation].call(this,dir);}

if(this.current==0)

{this.loopCount++;this.$slider.trigger('avia_slider_first_slide');}

else if(this.current==this.itemsCount-1)

{this.$slider.trigger('avia_slider_last_slide');}

else

{this.$slider.trigger('avia_slider_navigate_slide');}},_setSize:function(instant)

{if(this.options.bg_slider==true)return;var self=this,slide=this.$slides.eq(this.current),img=slide.find('img'),current=Math.floor(this.$sliderUl.height()),ratio=slide.data('video-ratio'),setTo=ratio?this.$sliderUl.width()/ratio:Math.floor(slide.height()),video_height=slide.data('video-height'),video_toppos=slide.data('video-toppos');this.$sliderUl.height(current).css('padding',0);if(setTo!=current)

{if(instant==true)

{this.$sliderUl.css({height:setTo});this.$win.trigger('av-height-change');}

else

{this.$sliderUl.avia_animate({height:setTo},function()

{self.$win.trigger('av-height-change');});}}

this._setCenter();if(video_height&&video_height!="set")

{slide.find('iframe, embed, video, object, .av_youtube_frame').css({height:video_height+'%',top:video_toppos+'%'});slide.data('video-height','set');}},_setCenter:function()

{var slide=this.$slides.eq(this.current),img=slide.find('img'),min_width=parseInt(img.css('min-width'),10),slide_width=slide.width(),caption=slide.find('.av-slideshow-caption'),css_left=((slide_width-min_width)/2);if(caption.length)

{if(caption.is('.caption_left'))

{css_left=((slide_width-min_width)/1.5);}

else if(caption.is('.caption_right'))

{css_left=((slide_width-min_width)/2.5);}}

if(slide_width>=min_width)

{css_left=0;}

img.css({left:css_left});},_slide:function(dir)

{var dynamic=false,modifier=dynamic==true?2:1,sliderWidth=this.$slider.width(),direction=dir==='next'?-1:1,property=this.browserPrefix+'transform',reset={},transition={},transition2={},trans_val=(sliderWidth*direction*-1),trans_val2=(sliderWidth*direction)/modifier;if(this.cssActive)

{property=this.browserPrefix+'transform';if(this.css3DActive)

{reset[property]="translate3d("+trans_val+"px, 0, 0)";transition[property]="translate3d("+trans_val2+"px, 0, 0)";transition2[property]="translate3d(0,0,0)";}

else

{reset[property]="translate("+trans_val+"px,0)";transition[property]="translate("+trans_val2+"px,0)";transition2[property]="translate(0,0)";}}

else

{reset.left=trans_val;transition.left=trans_val2;transition2.left=0;}

if(dynamic)

{transition['z-index']="1";transition2['z-index']="2";}

this._slide_animate(reset,transition,transition2);},_slide_up:function(dir)

{var dynamic=true,modifier=dynamic==true?2:1,sliderHeight=this.$slider.height(),direction=dir==='next'?-1:1,property=this.browserPrefix+'transform',reset={},transition={},transition2={},trans_val=(sliderHeight*direction*-1),trans_val2=(sliderHeight*direction)/modifier;if(this.cssActive)

{property=this.browserPrefix+'transform';if(this.css3DActive)

{reset[property]="translate3d( 0,"+trans_val+"px, 0)";transition[property]="translate3d( 0,"+trans_val2+"px, 0)";transition2[property]="translate3d(0,0,0)";}

else

{reset[property]="translate( 0,"+trans_val+"px)";transition[property]="translate( 0,"+trans_val2+"px)";transition2[property]="translate(0,0)";}}

else

{reset.top=trans_val;transition.top=trans_val2;transition2.top=0;}

if(dynamic)

{transition['z-index']="1";transition2['z-index']="2";}

this._slide_animate(reset,transition,transition2);},_slide_animate:function(reset,transition,transition2)

{var self=this,displaySlide=this.$slides.eq(this.current),hideSlide=this.$slides.eq(this.prev);hideSlide.trigger('pause');if(!displaySlide.data('disableAutoplay'))displaySlide.trigger('play');displaySlide.css({visibility:'visible',zIndex:4,opacity:1,left:0,top:0});displaySlide.css(reset);hideSlide.avia_animate(transition,this.options.transitionSpeed,this.options.easing);var after_slide=function()

{self.isAnimating=false;displaySlide.addClass('active-slide');hideSlide.css({visibility:'hidden'}).removeClass('active-slide');self.$slider.trigger('avia-transition-done');}

if(self.options.show_slide_delay>0)

{setTimeout(function(){displaySlide.avia_animate(transition2,self.options.transitionSpeed,self.options.easing,after_slide);},self.options.show_slide_delay);}

else

{displaySlide.avia_animate(transition2,self.options.transitionSpeed,self.options.easing,after_slide);}},_fade:function()

{var self=this,displaySlide=this.$slides.eq(this.current),hideSlide=this.$slides.eq(this.prev),properties={visibility:'visible',zIndex:3,opacity:0},fadeCallback=function()

{self.isAnimating=false;displaySlide.addClass('active-slide');hideSlide.css({visibility:'hidden',zIndex:2}).removeClass('active-slide');self.$slider.trigger('avia-transition-done');};hideSlide.trigger('pause');if(!displaySlide.data('disableAutoplay'))displaySlide.trigger('play');if(self.options.fullfade==true)

{hideSlide.avia_animate({opacity:0},200,'linear',function()

{displaySlide.css(properties).avia_animate({opacity:1},self.options.transitionSpeed,'linear',fadeCallback);});}

else

{displaySlide.css(properties).avia_animate({opacity:1},self.options.transitionSpeed/2,'linear',function()

{hideSlide.avia_animate({opacity:0},200,'linear',fadeCallback);});}},_attach_video_events:function()

{var self=this,$html=$('html');self.$slides.each(function(i)

{var currentSlide=$(this),caption=currentSlide.find('.caption_fullwidth, .av-click-overlay'),mejs=currentSlide.find('.mejs-mediaelement');if(currentSlide.data('avia_video_events')!=true)

{currentSlide.data('avia_video_events',true);currentSlide.on('av-video-events-bound',{slide:currentSlide,wrap:mejs,iteration:i,self:self},onReady);currentSlide.on('av-video-ended',{slide:currentSlide,self:self},onFinish);currentSlide.on('av-video-play-executed',function(){setTimeout(function(){self.pause()},100);});caption.on('click',{slide:currentSlide},toggle);if(currentSlide.is('.av-video-events-bound'))currentSlide.trigger('av-video-events-bound');}});function onReady(event)

{if(event.data.iteration===0)

{event.data.wrap.css('opacity',0);if(!event.data.self.isMobile&&!event.data.slide.data('disableAutoplay')){event.data.slide.trigger('play');} 

setTimeout(function(){event.data.wrap.avia_animate({opacity:1},400);},50);}

else if($html.is('.avia-msie')&&!event.data.slide.is('.av-video-service-html5'))

{if(!event.data.slide.data('disableAutoplay'))event.data.slide.trigger('play');}}

function onFinish(event)

{if(!event.data.slide.is('.av-single-slide')&&!event.data.slide.is('.av-loop-video'))

{event.data.slide.trigger('reset');self._navigate('next');self.resume();}

if(event.data.slide.is('.av-loop-video')&&event.data.slide.is('.av-video-service-html5'))

{if($html.is('.avia-safari-8'))

{setTimeout(function(){event.data.slide.trigger('play');},1);}}}

function toggle(event)

{if(event.target.tagName!="A")

{event.data.slide.trigger('toggle');}}},_timer:function(callback,delay,first)

{var self=this,start,remaining=delay;self.timerId=0;this.pause=function(){window.clearTimeout(self.timerId);remaining-=new Date()-start;};this.resume=function(){start=new Date();self.timerId=window.setTimeout(callback,remaining);};this.destroy=function()

{window.clearTimeout(self.timerId);};this.resume(true);},_startSlideshow:function()

{var self=this;this.isPlaying=true;this.slideshow=new this._timer(function()

{self._navigate('next');if(self.options.autoplay)

{self._startSlideshow();}},(this.options.interval*1000));},_stopSlideshow:function()

{if(this.options.autoplay){this.slideshow.destroy();this.isPlaying=false;this.options.autoplay=false;}},next:function(e)

{e.preventDefault();this._stopSlideshow();this._navigate('next');},previous:function(e)

{e.preventDefault();this._stopSlideshow();this._navigate('prev');},go2:function(pos)

{if(isNaN(pos))

{pos.preventDefault();pos=pos.currentTarget.hash.replace('#','');}

pos-=1;if(pos===this.current||pos>=this.itemsCount||pos<0)

{return false;}

this._stopSlideshow();this._navigate(false,pos);},play:function()

{if(!this.isPlaying)

{this.isPlaying=true;this._navigate('next');this.options.autoplay=true;this._startSlideshow();}},pause:function()

{if(this.isPlaying)

{this.slideshow.pause();}},resume:function()

{if(this.isPlaying)

{this.slideshow.resume();}},destroy:function(callback)

{this.slideshow.destroy(callback);}}

$.fn.aviaSlider=function(options)

{return this.each(function()

{var self=$.data(this,'aviaSlider');if(!self)

{self=$.data(this,'aviaSlider',new $.AviaSlider(options,this));}});}})(jQuery);(function($)

{"use strict";$.fn.avia_keyboard_controls=function(options_passed)

{var defaults={37:'.prev-slide',39:'.next-slide'},methods={mousebind:function(slider)

{slider.hover(function(){slider.mouseover=true;},function(){slider.mouseover=false;});},keybind:function(slider)

{$(document).keydown(function(e)

{if(slider.mouseover&&typeof slider.options[e.keyCode]!=='undefined')

{var item;if(typeof slider.options[e.keyCode]==='string')

{item=slider.find(slider.options[e.keyCode]);}

else

{item=slider.options[e.keyCode];}

if(item.length)

{item.trigger('click',['keypress']);return false;}}});}};return this.each(function()

{var slider=$(this);slider.options=$.extend({},defaults,options_passed);slider.mouseover=false;methods.mousebind(slider);methods.keybind(slider);});};$.fn.avia_swipe_trigger=function(passed_options)

{var win=$(window),isMobile=$.avia_utilities.isMobile,defaults={prev:'.prev-slide',next:'.next-slide',event:{prev:'click',next:'click'}},methods={activate_touch_control:function(slider)

{var i,differenceX,differenceY;slider.touchPos={};slider.hasMoved=false;slider.on('touchstart',function(event)

{slider.touchPos.X=event.originalEvent.touches[0].clientX;slider.touchPos.Y=event.originalEvent.touches[0].clientY;});slider.on('touchend',function(event)

{slider.touchPos={};if(slider.hasMoved){event.preventDefault();}

slider.hasMoved=false;});slider.on('touchmove',function(event)

{if(!slider.touchPos.X)

{slider.touchPos.X=event.originalEvent.touches[0].clientX;slider.touchPos.Y=event.originalEvent.touches[0].clientY;}

else

{differenceX=event.originalEvent.touches[0].clientX-slider.touchPos.X;differenceY=event.originalEvent.touches[0].clientY-slider.touchPos.Y;if(Math.abs(differenceX)>Math.abs(differenceY))

{event.preventDefault();if(slider.touchPos!==event.originalEvent.touches[0].clientX)

{if(Math.abs(differenceX)>50)

{i=differenceX>0?'prev':'next';if(typeof slider.options[i]==='string')

{slider.find(slider.options[i]).trigger(slider.options.event[i],['swipe']);}

else

{slider.options[i].trigger(slider.options.event[i],['swipe']);}

slider.hasMoved=true;slider.touchPos={};return false;}}}}});}};return this.each(function()

{if(isMobile)

{var slider=$(this);slider.options=$.extend({},defaults,passed_options);methods.activate_touch_control(slider);}});};}(jQuery));

;/*! Magnific Popup - v0.9.9 - 2013-12-27

* http://dimsemenov.com/plugins/magnific-popup/

* Copyright (c) 2013 Dmitry Semenov; */

(function(e){var t,n,i,o,r,a,s,l="Close",c="BeforeClose",d="AfterClose",u="BeforeAppend",p="MarkupParse",f="Open",m="Change",g="mfp",h="."+g,v="mfp-ready",C="mfp-removing",y="mfp-prevent-close",w=function(){},b=!!window.jQuery,I=e(window),x=function(e,n){t.ev.on(g+e+h,n)},k=function(t,n,i,o){var r=document.createElement("div");return r.className="mfp-"+t,i&&(r.innerHTML=i),o?n&&n.appendChild(r):(r=e(r),n&&r.appendTo(n)),r},T=function(n,i){t.ev.triggerHandler(g+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},E=function(n){return n===s&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),s=n),t.currTemplate.closeBtn},_=function(){e.magnificPopup.instance||(t=new w,t.init(),e.magnificPopup.instance=t)},S=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};w.prototype={constructor:w,init:function(){var n=navigator.appVersion;t.isIE7=-1!==n.indexOf("MSIE 7."),t.isIE8=-1!==n.indexOf("MSIE 8."),t.isLowIE=t.isIE7||t.isIE8,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=S(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),o=e(document),t.popupsCache={}},open:function(n){i||(i=e(document.body));var r;if(n.isObj===!1){t.items=n.items.toArray(),t.index=0;var s,l=n.items;for(r=0;l.length>r;r++)if(s=l[r],s.parsed&&(s=s.el[0]),s===n.el[0]){t.index=r;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(t.isOpen)return t.updateItemHTML(),void 0;t.types=[],a="",t.ev=n.mainEl&&n.mainEl.length?n.mainEl.eq(0):o,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),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=k("bg").on("click"+h,function(){t.close()}),t.wrap=k("wrap").attr("tabindex",-1).on("click"+h,function(e){t._checkIfClose(e.target)&&t.close()}),t.container=k("container",t.wrap)),t.contentContainer=k("content"),t.st.preloader&&(t.preloader=k("preloader",t.container,t.st.tLoading));var c=e.magnificPopup.modules;for(r=0;c.length>r;r++){var d=c[r];d=d.charAt(0).toUpperCase()+d.slice(1),t["init"+d].call(t)}T("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(x(p,function(e,t,n,i){n.close_replaceWith=E(i.type)}),a+=" mfp-close-btn-in"):t.wrap.append(E())),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:I.scrollTop(),position:"absolute"}),(t.st.fixedBgPos===!1||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:o.height(),position:"absolute"}),t.st.enableEscapeKey&&o.on("keyup"+h,function(e){27===e.keyCode&&t.close()}),I.on("resize"+h,function(){t.updateSize()}),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var u=t.wH=I.height(),m={};if(t.fixedContentPos&&t._hasScrollBar(u)){var g=t._getScrollbarSize();g&&(m.marginRight=g)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):m.overflow="hidden");var C=t.st.mainClass;return t.isIE7&&(C+=" mfp-ie7"),C&&t._addClassToMFP(C),t.updateItemHTML(),T("BuildControls"),e("html").css(m),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||i),t._lastFocusedEl=document.activeElement,setTimeout(function(){t.content?(t._addClassToMFP(v),t._setFocus()):t.bgOverlay.addClass(v),o.on("focusin"+h,t._onFocusIn)},16),t.isOpen=!0,t.updateSize(u),T(f),n},close:function(){t.isOpen&&(T(c),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(C),setTimeout(function(){t._close()},t.st.removalDelay)):t._close())},_close:function(){T(l);var n=C+" "+v+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var i={marginRight:""};t.isIE7?e("body, html").css("overflow",""):i.overflow="",e("html").css(i)}o.off("keyup"+h+" focusin"+h),t.ev.off(h),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&&t.currTemplate[t.currItem.type]!==!0||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,T(d)},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||I.height();t.fixedContentPos||t.wrap.css("height",t.wH),T("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(T("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var o=t.st[i]?t.st[i].markup:!1;T("FirstMarkupParse",o),t.currTemplate[i]=o?e(o):!0}r&&r!==n.type&&t.container.removeClass("mfp-"+r+"-holder");var a=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(a,i),n.preloaded=!0,T(m,n),r=n.type,t.container.prepend(t.contentContainer),T("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&t.currTemplate[n]===!0?t.content.find(".mfp-close").length||t.content.append(E()):t.content=e:t.content="",T(u),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var r=t.types,a=0;r.length>a;a++)if(o.el.hasClass("mfp-"+r[a])){i=r[a];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,T("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){var r=void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick;if(r||2!==n.which&&!n.ctrlKey&&!n.metaKey){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(a>I.width())return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};T("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",function(e){e.stopImmediatePropagation()}),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(y)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))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?o.height():document.body.scrollHeight)>(e||I.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){return n.target===t.wrap[0]||e.contains(t.wrap[0],n.target)?void 0:(t._setFocus(),!1)},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),T(p,[t,n,i]),e.each(n,function(e,n){if(void 0===n||n===!1)return!0;if(o=e.split("_"),o.length>1){var i=t.find(h+"-"+o[0]);if(i.length>0){var r=o[1];"replaceWith"===r?i[0]!==n[0]&&i.replaceWith(n):"img"===r?i.is("img")?i.attr("src",n):i.replaceWith('<img src="'+n+'" class="'+i.attr("class")+'" />'):i.attr(o[1],n)}}else t.find(h+"-"+e).html(n)})},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.id="mfp-sbm",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:w.prototype,modules:[],open:function(t,n){return _(),t=t?e.extend(!0,{},t):{},t.isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.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">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},e.fn.magnificPopup=function(n){_();var i=e(this);if("string"==typeof n)if("open"===n){var o,r=b?i.data("magnificPopup"):i[0].magnificPopup,a=parseInt(arguments[1],10)||0;r.items?o=r.items[a]:(o=i,r.delegate&&(o=o.find(r.delegate)),o=o.eq(a)),t._openClick({mfpEl:o},i,r)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),b?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var P,O,z,M="inline",B=function(){z&&(O.after(z.addClass(P)).detach(),z=null)};e.magnificPopup.registerModule(M,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(M),x(l+"."+M,function(){B()})},getInline:function(n,i){if(B(),n.src){var o=t.st.inline,r=e(n.src);if(r.length){var a=r[0].parentNode;a&&a.tagName&&(O||(P=o.hiddenClass,O=k(P),P="mfp-"+P),z=r.after(O).detach().removeClass(P)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),r=e("<div>");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var F,H="ajax",L=function(){F&&i.removeClass(F)},A=function(){L(),t.req&&t.req.abort()};e.magnificPopup.registerModule(H,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(H),F=t.st.ajax.cursor,x(l+"."+H,A),x("BeforeChange."+H,A)},getAjax:function(n){F&&i.addClass(F),t.updateStatus("loading");var o=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};T("ParseAjax",a),t.appendContent(e(a.data),H),n.finished=!0,L(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),T("AjaxContentAdded")},error:function(){L(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(o),""}}});var j,N=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.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 e=t.st.image,n=".image";t.types.push("image"),x(f+n,function(){"image"===t.currItem.type&&e.cursor&&i.addClass(e.cursor)}),x(l+n,function(){e.cursor&&i.removeClass(e.cursor),I.off("resize"+h)}),x("Resize"+n,t.resizeImage),t.isLowIE&&x("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,j&&clearInterval(j),e.isCheckingImgSize=!1,T("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){j&&clearInterval(j),j=setInterval(function(){return i.naturalWidth>0?(t._onImageHasSize(e),void 0):(n>200&&clearInterval(j),n++,3===n?o(10):40===n?o(50):100===n&&o(500),void 0)},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,T("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),c=n.img[0],c.naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:N(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(j&&clearInterval(j),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var W,R=function(){return void 0===W&&(W=void 0!==document.createElement("p").style.MozTransform),W};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,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,s=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};x("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return d(),void 0;r=s(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,T("ZoomAnimationEnded")},16)},a)},16)}}),x(c+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=s(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),x(l+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return t.currItem.hasSize?t.currItem.img:!1},_getOffset:function(n){var i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=i.offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(b?i.innerHeight():i[0].offsetHeight)-a-r};return R()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var Z="iframe",q="//about:blank",D=function(e){if(t.currTemplate[Z]){var n=t.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=q),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{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(Z),x("BeforeChange",function(e,t,n){t!==n&&(t===Z?D():n===Z&&D(!0))}),x(l+"."+Z,function(){D()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var K=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},Y=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};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 n=t.st.gallery,i=".mfp-gallery",r=Boolean(e.fn.mfpFastClick);return t.direction=!0,n&&n.enabled?(a+=" mfp-gallery",x(f+i,function(){n.navigateByImgClick&&t.wrap.on("click"+i,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),o.on("keydown"+i,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),x("UpdateStatus"+i,function(e,n){n.text&&(n.text=Y(n.text,t.currItem.index,t.items.length))}),x(p+i,function(e,i,o,r){var a=t.items.length;o.counter=a>1?Y(n.tCounter,r.index,a):""}),x("BuildControls"+i,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y),s=r?"mfpFastClick":"click";o[s](function(){t.prev()}),a[s](function(){t.next()}),t.isIE7&&(k("b",o[0],!1,!0),k("a",o[0],!1,!0),k("b",a[0],!1,!0),k("a",a[0],!1,!0)),t.container.append(o.add(a))}}),x(m+i,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),x(l+i,function(){o.off(i),t.wrap.off("click"+i),t.arrowLeft&&r&&t.arrowLeft.add(t.arrowRight).destroyMfpFastClick(),t.arrowRight=t.arrowLeft=null}),void 0):!1},next:function(){t.direction=!0,t.index=K(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=K(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;(t.direction?o:i)>=e;e++)t._preloadItem(t.index+e);for(e=1;(t.direction?i:o)>=e;e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=K(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),T("LazyLoad",i),"image"===i.type&&(i.img=e('<img class="mfp-img" />').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,T("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{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,n=e.ratio;n=isNaN(n)?n():n,n>1&&(x("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),x("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),function(){var t=1e3,n="ontouchstart"in window,i=function(){I.off("touchmove"+r+" touchend"+r)},o="mfpFastClick",r="."+o;e.fn.mfpFastClick=function(o){return e(this).each(function(){var a,s=e(this);if(n){var l,c,d,u,p,f;s.on("touchstart"+r,function(e){u=!1,f=1,p=e.originalEvent?e.originalEvent.touches[0]:e.touches[0],c=p.clientX,d=p.clientY,I.on("touchmove"+r,function(e){p=e.originalEvent?e.originalEvent.touches:e.touches,f=p.length,p=p[0],(Math.abs(p.clientX-c)>10||Math.abs(p.clientY-d)>10)&&(u=!0,i())}).on("touchend"+r,function(e){i(),u||f>1||(a=!0,e.preventDefault(),clearTimeout(l),l=setTimeout(function(){a=!1},t),o())})})}s.on("click"+r,function(){a||o()})})},e.fn.destroyMfpFastClick=function(){e(this).off("touchstart"+r+" click"+r),n&&I.off("touchmove"+r+" touchend"+r)}}(),_()})(window.jQuery||window.Zepto);

;/*!

 *

 * MediaElement.js

 * HTML5 <video> and <audio> shim and player

 * http://mediaelementjs.com/

 *

 * Creates a JavaScript object that mimics HTML5 MediaElement API

 * for browsers that don't understand HTML5 or can't play the provided codec

 * Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3

 *

 * Copyright 2010-2014, John Dyer (http://j.hn)

 * License: MIT

 *

 */

var mejs=mejs||{};mejs.version="2.22.0",mejs.meIndex=0,mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/dailymotion","video/x-dailymotion","application/x-mpegURL"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo","video/x-vimeo"]}]},mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");return b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>',b.firstChild.href},getScriptPath:function(a){for(var b,c,d,e,f,g,h=0,i="",j="",k=document.getElementsByTagName("script"),l=k.length,m=a.length;l>h;h++){for(e=k[h].src,c=e.lastIndexOf("/"),c>-1?(g=e.substring(c+1),f=e.substring(0,c+1)):(g=e,f=""),b=0;m>b;b++)if(j=a[b],d=g.indexOf(j),d>-1){i=f;break}if(""!==i)break}return i},calculateTimeFormat:function(a,b,c){0>a&&(a=0),"undefined"==typeof c&&(c=25);var d=b.timeFormat,e=d[0],f=d[1]==d[0],g=f?2:1,h=":",i=Math.floor(a/3600)%24,j=Math.floor(a/60)%60,k=Math.floor(a%60),l=Math.floor((a%1*c).toFixed(3)),m=[[l,"f"],[k,"s"],[j,"m"],[i,"h"]];d.length<g&&(h=d[g]);for(var n=!1,o=0,p=m.length;p>o;o++)if(-1!==d.indexOf(m[o][1]))n=!0;else if(n){for(var q=!1,r=o;p>r;r++)if(m[r][0]>0){q=!0;break}if(!q)break;f||(d=e+d),d=m[o][1]+h+d,f&&(d=m[o][1]+d),e=m[o][1]}b.currentTimeFormat=d},twoDigitsString:function(a){return 10>a?"0"+a:String(a)},secondsToTimeCode:function(a,b){if(0>a&&(a=0),"object"!=typeof b){var c="m:ss";c=arguments[1]?"hh:mm:ss":c,c=arguments[2]?c+":ff":c,b={currentTimeFormat:c,framesPerSecond:arguments[3]||25}}var d=b.framesPerSecond;"undefined"==typeof d&&(d=25);var c=b.currentTimeFormat,e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60),h=Math.floor((a%1*d).toFixed(3));lis=[[h,"f"],[g,"s"],[f,"m"],[e,"h"]];var j=c;for(i=0,len=lis.length;i<len;i++)j=j.replace(lis[i][1]+lis[i][1],this.twoDigitsString(lis[i][0])),j=j.replace(lis[i][1],lis[i][0]);return j},timeCodeToSeconds:function(a,b,c,d){"undefined"==typeof c?c=!1:"undefined"==typeof d&&(d=25);var e=a.split(":"),f=parseInt(e[0],10),g=parseInt(e[1],10),h=parseInt(e[2],10),i=0,j=0;return c&&(i=parseInt(e[3])/d),j=3600*f+60*g+h+i},convertSMPTEtoSeconds:function(a){if("string"!=typeof a)return!1;a=a.replace(",",".");var b=0,c=-1!=a.indexOf(".")?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++)d=1,e>0&&(d=Math.pow(60,e)),b+=Number(a[e])*d;return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);b&&/object|embed/i.test(b.nodeName)&&(mejs.MediaFeatures.isIE?(b.style.display="none",function(){4==b.readyState?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))},removeObjectInIE:function(a){var b=document.getElementById(a);if(b){for(var c in b)"function"==typeof b[c]&&(b[c]=null);b.parentNode.removeChild(b)}},determineScheme:function(a){return a&&-1!=a.indexOf("://")?a.substr(0,a.indexOf("://")+3):"//"}},mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];return b[1]=b[1]||0,b[2]=b[2]||0,c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?!0:!1},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e,f,g,h=[0,0,0];if("undefined"!=typeof this.nav.plugins&&"object"==typeof this.nav.plugins[a]){if(e=this.nav.plugins[a].description,e&&("undefined"==typeof this.nav.mimeTypes||!this.nav.mimeTypes[b]||this.nav.mimeTypes[b].enabledPlugin))for(h=e.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split("."),f=0;f<h.length;f++)h[f]=parseInt(h[f].match(/\d+/),10)}else if("undefined"!=typeof window.ActiveXObject)try{g=new ActiveXObject(c),g&&(h=d(g))}catch(i){}return h}},mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[],c=a.GetVariable("$version");return c&&(c=c.split(" ")[1].split(","),b=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]),b}),mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(a,b,c,d){for(;a.isVersionSupported(b[0]+"."+b[1]+"."+b[2]+"."+b[3]);)b[c]+=d;b[c]-=d};return c(a,b,0,1),c(a,b,1,1),c(a,b,2,1e4),c(a,b,2,1e3),c(a,b,2,100),c(a,b,2,10),c(a,b,2,1),c(a,b,3,1),b}),mejs.MediaFeatures={init:function(){var a,b,c=this,d=document,e=mejs.PluginDetector.nav,f=mejs.PluginDetector.ua.toLowerCase(),g=["source","track","audio","video"];c.isiPad=null!==f.match(/ipad/i),c.isiPhone=null!==f.match(/iphone/i),c.isiOS=c.isiPhone||c.isiPad,c.isAndroid=null!==f.match(/android/i),c.isBustedAndroid=null!==f.match(/android 2\.[12]/),c.isBustedNativeHTTPS="https:"===location.protocol&&(null!==f.match(/android [12]\./)||null!==f.match(/macintosh.* version.* safari/)),c.isIE=-1!=e.appName.toLowerCase().indexOf("microsoft")||null!==e.appName.toLowerCase().match(/trident/gi),c.isChrome=null!==f.match(/chrome/gi),c.isChromium=null!==f.match(/chromium/gi),c.isFirefox=null!==f.match(/firefox/gi),c.isWebkit=null!==f.match(/webkit/gi),c.isGecko=null!==f.match(/gecko/gi)&&!c.isWebkit&&!c.isIE,c.isOpera=null!==f.match(/opera/gi),c.hasTouch="ontouchstart"in window,c.svgAsImg=!!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1");for(a=0;a<g.length;a++)b=document.createElement(g[a]);c.supportsMediaTag="undefined"!=typeof b.canPlayType||c.isBustedAndroid;try{b.canPlayType("video/mp4")}catch(h){c.supportsMediaTag=!1}c.supportsPointerEvents=function(){var a,b=document.createElement("x"),c=document.documentElement,d=window.getComputedStyle;return"pointerEvents"in b.style?(b.style.pointerEvents="auto",b.style.pointerEvents="x",c.appendChild(b),a=d&&"auto"===d(b,"").pointerEvents,c.removeChild(b),!!a):!1}(),c.hasFirefoxPluginMovingProblem=!1,c.hasiOSFullScreen="undefined"!=typeof b.webkitEnterFullscreen,c.hasNativeFullscreen="undefined"!=typeof b.requestFullscreen,c.hasWebkitNativeFullScreen="undefined"!=typeof b.webkitRequestFullScreen,c.hasMozNativeFullScreen="undefined"!=typeof b.mozRequestFullScreen,c.hasMsNativeFullScreen="undefined"!=typeof b.msRequestFullscreen,c.hasTrueNativeFullScreen=c.hasWebkitNativeFullScreen||c.hasMozNativeFullScreen||c.hasMsNativeFullScreen,c.nativeFullScreenEnabled=c.hasTrueNativeFullScreen,c.hasMozNativeFullScreen?c.nativeFullScreenEnabled=document.mozFullScreenEnabled:c.hasMsNativeFullScreen&&(c.nativeFullScreenEnabled=document.msFullscreenEnabled),c.isChrome&&(c.hasiOSFullScreen=!1),c.hasTrueNativeFullScreen&&(c.fullScreenEventName="",c.hasWebkitNativeFullScreen?c.fullScreenEventName="webkitfullscreenchange":c.hasMozNativeFullScreen?c.fullScreenEventName="mozfullscreenchange":c.hasMsNativeFullScreen&&(c.fullScreenEventName="MSFullscreenChange"),c.isFullScreen=function(){return c.hasMozNativeFullScreen?d.mozFullScreen:c.hasWebkitNativeFullScreen?d.webkitIsFullScreen:c.hasMsNativeFullScreen?null!==d.msFullscreenElement:void 0},c.requestFullScreen=function(a){c.hasWebkitNativeFullScreen?a.webkitRequestFullScreen():c.hasMozNativeFullScreen?a.mozRequestFullScreen():c.hasMsNativeFullScreen&&a.msRequestFullscreen()},c.cancelFullScreen=function(){c.hasWebkitNativeFullScreen?document.webkitCancelFullScreen():c.hasMozNativeFullScreen?document.mozCancelFullScreen():c.hasMsNativeFullScreen&&document.msExitFullscreen()}),c.hasiOSFullScreen&&f.match(/mac os x 10_5/i)&&(c.hasNativeFullScreen=!1,c.hasiOSFullScreen=!1)}},mejs.MediaFeatures.init(),mejs.HtmlMediaElement={pluginType:"native",isFullScreen:!1,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if("string"==typeof a)this.src=a;else{var c,d;for(c=0;c<a.length;c++)if(d=a[c],this.canPlayType(d.type)){this.src=d.src;break}}},setVideoSize:function(a,b){this.width=a,this.height=b}},mejs.PluginMediaElement=function(a,b,c){this.id=a,this.pluginType=b,this.src=c,this.events={},this.attributes={}},mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:!1,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:!0,ended:!1,seeking:!1,duration:0,error:null,tagName:"",muted:!1,volume:1,currentTime:0,play:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.playVideo():this.pluginApi.playMedia(),this.paused=!1)},load:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType||this.pluginApi.loadMedia(),this.paused=!1)},pause:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?1==this.pluginApi.getPlayerState()&&this.pluginApi.pauseVideo():this.pluginApi.pauseMedia(),this.paused=!0)},stop:function(){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.stopVideo():this.pluginApi.stopMedia(),this.paused=!0)},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++)if(d=e[b],mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably";return""},positionFullscreenButton:function(a,b,c){null!=this.pluginApi&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){null!=this.pluginApi&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if("string"==typeof a)this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a)),this.src=mejs.Utility.absolutizeUrl(a);else{var b,c;for(b=0;b<a.length;b++)if(c=a[b],this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src)),this.src=mejs.Utility.absolutizeUrl(c.src);break}}},setCurrentTime:function(a){null!=this.pluginApi&&("youtube"==this.pluginType||"vimeo"==this.pluginType?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a),this.currentTime=a)},setVolume:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?this.pluginApi.setVolume(100*a):this.pluginApi.setVolume(a),this.volume=a)},setMuted:function(a){null!=this.pluginApi&&("youtube"==this.pluginType?(a?this.pluginApi.mute():this.pluginApi.unMute(),this.muted=a,this.dispatchEvent({type:"volumechange"})):this.pluginApi.setMuted(a),this.muted=a)},setVideoSize:function(a,b){this.pluginElement&&this.pluginElement.style&&(this.pluginElement.style.width=a+"px",this.pluginElement.style.height=b+"px"),null!=this.pluginApi&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!0)},exitFullScreen:function(){null!=this.pluginApi&&this.pluginApi.setFullscreen&&this.setFullscreen(!1)},addEventListener:function(a,b,c){this.events[a]=this.events[a]||[],this.events[a].push(b)},removeEventListener:function(a,b){if(!a)return this.events={},!0;var c=this.events[a];if(!c)return!0;if(!b)return this.events[a]=[],!0;for(var d=0;d<c.length;d++)if(c[d]===b)return this.events[a].splice(d,1),!0;return!1},dispatchEvent:function(a){var b,c=this.events[a.type];if(c)for(b=0;b<c.length;b++)c[b].apply(this,[a])},hasAttribute:function(a){return a in this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){return this.hasAttribute(a)?this.attributes[a]:""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id)}},mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:!1,httpsBasicAuthSite:!1,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",flashScriptAccess:"sameDomain",enablePluginSmoothing:!1,enablePseudoStreaming:!1,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:.8,success:function(){},error:function(){}},mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)},mejs.HtmlMediaElementShim={create:function(a,b){var c,d,e={},f="string"==typeof a?document.getElementById(a):a,g=f.tagName.toLowerCase(),h="audio"===g||"video"===g,i=h?f.getAttribute("src"):f.getAttribute("href"),j=f.getAttribute("poster"),k=f.getAttribute("autoplay"),l=f.getAttribute("preload"),m=f.getAttribute("controls");for(d in mejs.MediaElementDefaults)e[d]=mejs.MediaElementDefaults[d];for(d in b)e[d]=b[d];return i="undefined"==typeof i||null===i||""==i?null:i,j="undefined"==typeof j||null===j?"":j,l="undefined"==typeof l||null===l||"false"===l?"none":l,k=!("undefined"==typeof k||null===k||"false"===k),m=!("undefined"==typeof m||null===m||"false"===m),c=this.determinePlayback(f,e,mejs.MediaFeatures.supportsMediaTag,h,i),c.url=null!==c.url?mejs.Utility.absolutizeUrl(c.url):"",c.scheme=mejs.Utility.determineScheme(c.url),"native"==c.method?(mejs.MediaFeatures.isBustedAndroid&&(f.src=c.url,f.addEventListener("click",function(){f.play()},!1)),this.updateNative(c,e,k,l)):""!==c.method?this.createPlugin(c,e,j,k,l,m):(this.createErrorMessage(c,e,j),this)},determinePlayback:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=[],r={method:"",url:"",htmlMediaElement:a,isVideo:"audio"!=a.tagName.toLowerCase(),scheme:""};if("undefined"!=typeof b.type&&""!==b.type)if("string"==typeof b.type)q.push({type:b.type,url:e});else for(f=0;f<b.type.length;f++)q.push({type:b.type[f],url:e});else if(null!==e)k=this.formatType(e,a.getAttribute("type")),q.push({type:k,url:e});else for(f=0;f<a.childNodes.length;f++)j=a.childNodes[f],1==j.nodeType&&"source"==j.tagName.toLowerCase()&&(e=j.getAttribute("src"),k=this.formatType(e,j.getAttribute("type")),p=j.getAttribute("media"),(!p||!window.matchMedia||window.matchMedia&&window.matchMedia(p).matches)&&q.push({type:k,url:e}));if(!d&&q.length>0&&null!==q[0].url&&this.getTypeFromFile(q[0].url).indexOf("audio")>-1&&(r.isVideo=!1),mejs.MediaFeatures.isBustedAndroid&&(a.canPlayType=function(a){return null!==a.match(/video\/(mp4|m4v)/gi)?"maybe":""}),mejs.MediaFeatures.isChromium&&(a.canPlayType=function(a){return null!==a.match(/video\/(webm|ogv|ogg)/gi)?"maybe":""}),c&&("auto"===b.mode||"auto_plugin"===b.mode||"native"===b.mode)&&(!mejs.MediaFeatures.isBustedNativeHTTPS||b.httpsBasicAuthSite!==!0)){for(d||(o=document.createElement(r.isVideo?"video":"audio"),a.parentNode.insertBefore(o,a),a.style.display="none",r.htmlMediaElement=a=o),f=0;f<q.length;f++)if("video/m3u8"==q[f].type||""!==a.canPlayType(q[f].type).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")||""!==a.canPlayType(q[f].type.replace(/m4a/,"mp4")).replace(/no/,"")){r.method="native",r.url=q[f].url;break}if("native"===r.method&&(null!==r.url&&(a.src=r.url),"auto_plugin"!==b.mode))return r}if("auto"===b.mode||"auto_plugin"===b.mode||"shim"===b.mode)for(f=0;f<q.length;f++)for(k=q[f].type,g=0;g<b.plugins.length;g++)for(l=b.plugins[g],m=mejs.plugins[l],h=0;h<m.length;h++)if(n=m[h],null==n.version||mejs.PluginDetector.hasPluginVersion(l,n.version))for(i=0;i<n.types.length;i++)if(k.toLowerCase()==n.types[i].toLowerCase())return r.method=l,r.url=q[f].url,r;return"auto_plugin"===b.mode&&"native"===r.method?r:(""===r.method&&q.length>0&&(r.url=q[0].url),r)},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.split("?")[0];var b=a.substring(a.lastIndexOf(".")+1).toLowerCase(),c=/(mp4|m4v|ogg|ogv|m3u8|webm|webmv|flv|wmv|mpeg|mov)/gi.test(b)?"video/":"audio/";return this.getTypeFromExtension(b,c)},getTypeFromExtension:function(a,b){switch(b=b||"",a){case"mp4":case"m4v":case"m4a":case"f4v":case"f4a":return b+"mp4";case"flv":return b+"x-flv";case"webm":case"webma":case"webmv":return b+"webm";case"ogg":case"oga":case"ogv":return b+"ogg";case"m3u8":return"application/x-mpegurl";case"ts":return b+"mp2t";default:return b+a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div"),f=b.customError;e.className="me-cannotplay";try{e.style.width=d.width+"px",e.style.height=d.height+"px"}catch(g){}f||(f='<a href="'+a.url+'">',""!==c&&(f+='<img src="'+c+'" width="100%" height="100%" alt="" />'),f+="<span>"+mejs.i18n.t("Download File")+"</span></a>"),e.innerHTML=f,d.parentNode.insertBefore(e,d),d.style.display="none",b.error(d)},createPlugin:function(a,b,c,d,e,f){var g,h,i,j=a.htmlMediaElement,k=1,l=1,m="me_"+a.method+"_"+mejs.meIndex++,n=new mejs.PluginMediaElement(m,a.method,a.url),o=document.createElement("div");n.tagName=j.tagName;for(var p=0;p<j.attributes.length;p++){var q=j.attributes[p];q.specified&&n.setAttribute(q.name,q.value)}for(h=j.parentNode;null!==h&&null!=h.tagName&&"body"!==h.tagName.toLowerCase()&&null!=h.parentNode&&null!=h.parentNode.tagName&&null!=h.parentNode.constructor&&"ShadowRoot"===h.parentNode.constructor.name;){if("p"===h.parentNode.tagName.toLowerCase()){h.parentNode.parentNode.insertBefore(h,h.parentNode);break}h=h.parentNode}switch(a.isVideo?(k=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:null!==j.getAttribute("width")?j.getAttribute("width"):b.defaultVideoWidth,l=b.pluginHeight>0?b.pluginHeight:b.videoHeight>0?b.videoHeight:null!==j.getAttribute("height")?j.getAttribute("height"):b.defaultVideoHeight,k=mejs.Utility.encodeUrl(k),l=mejs.Utility.encodeUrl(l)):b.enablePluginDebug&&(k=320,l=240),n.success=b.success,o.className="me-plugin",o.id=m+"_container",a.isVideo?j.parentNode.insertBefore(o,j):document.body.insertBefore(o,document.body.childNodes[0]),("flash"===a.method||"silverlight"===a.method)&&(i=["id="+m,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+k,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+l,"pseudostreamstart="+b.pseudoStreamingStartQueryParam],null!==a.url&&("flash"==a.method?i.push("file="+mejs.Utility.encodeUrl(a.url)):i.push("file="+a.url)),b.enablePluginDebug&&i.push("debug=true"),b.enablePluginSmoothing&&i.push("smoothing=true"),b.enablePseudoStreaming&&i.push("pseudostreaming=true"),f&&i.push("controls=true"),b.pluginVars&&(i=i.concat(b.pluginVars)),window[m+"_init"]=function(){switch(n.pluginType){case"flash":n.pluginElement=n.pluginApi=document.getElementById(m);break;case"silverlight":n.pluginElement=document.getElementById(n.id),n.pluginApi=n.pluginElement.Content.MediaElementJS}null!=n.pluginApi&&n.success&&n.success(n,j)},window[m+"_event"]=function(a,b){var c,d,e;c={type:a,target:n};for(d in b)n[d]=b[d],c[d]=b[d];e=b.bufferedTime||0,c.target.buffered=c.buffered={start:function(a){return 0},end:function(a){return e},length:1},n.dispatchEvent(c)}),a.method){case"silverlight":o.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+m+'" name="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="initParams" value="'+i.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case"flash":mejs.MediaFeatures.isIE?(g=document.createElement("div"),o.appendChild(g),g.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+m+'" width="'+k+'" height="'+l+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?"+(new Date).getTime()+'" /><param name="flashvars" value="'+i.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+b.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /><param name="scale" value="default" /></object>'):o.innerHTML='<embed id="'+m+'" name="'+m+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="'+b.flashScriptAccess+'" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+i.join("&")+'" width="'+k+'" height="'+l+'" scale="default"class="mejs-shim"></embed>';break;case"youtube":var r;if(-1!=a.url.lastIndexOf("youtu.be"))r=a.url.substr(a.url.lastIndexOf("/")+1),-1!=r.indexOf("?")&&(r=r.substr(0,r.indexOf("?")));else{var s=a.url.match(/[?&]v=([^&#]+)|&|#|$/);s&&(r=s[1])}youtubeSettings={container:o,containerId:o.id,pluginMediaElement:n,pluginId:m,videoId:r,height:l,width:k,scheme:a.scheme},window.postMessage?mejs.YouTubeApi.enqueueIframe(youtubeSettings):mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])&&mejs.YouTubeApi.createFlash(youtubeSettings,b);break;case"vimeo":var t=m+"_player";if(n.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1),o.innerHTML='<iframe src="'+a.scheme+"player.vimeo.com/video/"+n.vimeoid+"?api=1&portrait=0&byline=0&title=0&player_id="+t+'" width="'+k+'" height="'+l+'" frameborder="0" class="mejs-shim" id="'+t+'" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',"function"==typeof $f){var u=$f(o.childNodes[0]),v=-1;u.addEvent("ready",function(){function a(a,b,c,d){var e={type:c,target:b};"timeupdate"==c&&(b.currentTime=e.currentTime=d.seconds,b.duration=e.duration=d.duration),b.dispatchEvent(e)}u.playVideo=function(){u.api("play")},u.stopVideo=function(){u.api("unload")},u.pauseVideo=function(){u.api("pause")},u.seekTo=function(a){u.api("seekTo",a)},u.setVolume=function(a){u.api("setVolume",a)},u.setMuted=function(a){a?(u.lastVolume=u.api("getVolume"),u.api("setVolume",0)):(u.api("setVolume",u.lastVolume),delete u.lastVolume)},u.getPlayerState=function(){return v},u.addEvent("play",function(){v=1,a(u,n,"play"),a(u,n,"playing")}),u.addEvent("pause",function(){v=2,a(u,n,"pause")}),u.addEvent("finish",function(){v=0,a(u,n,"ended")}),u.addEvent("playProgress",function(b){a(u,n,"timeupdate",b)}),u.addEvent("seek",function(b){v=3,a(u,n,"seeked",b)}),u.addEvent("loadProgress",function(b){v=3,a(u,n,"progress",b)}),n.pluginElement=o,n.pluginApi=u,n.success(n,n.pluginElement)})}else console.warn("You need to include froogaloop for vimeo to work")}return j.style.display="none",j.removeAttribute("autoplay"),n},updateNative:function(a,b,c,d){var e,f=a.htmlMediaElement;for(e in mejs.HtmlMediaElement)f[e]=mejs.HtmlMediaElement[e];return b.success(f,f),f}},mejs.YouTubeApi={isIframeStarted:!1,isIframeLoaded:!1,loadIframeApi:function(a){if(!this.isIframeStarted){var b=document.createElement("script");b.src=a.scheme+"www.youtube.com/player_api";var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c),this.isIframeStarted=!0}},iframeQueue:[],enqueueIframe:function(a){this.isLoaded?this.createIframe(a):(this.loadIframeApi(a),this.iframeQueue.push(a))},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0,wmode:"transparent"},events:{onReady:function(){c.setVideoSize=function(a,b){c.setSize(a,b)},a.pluginMediaElement.pluginApi=c,a.pluginMediaElement.pluginElement=document.getElementById(a.containerId),b.success(b,b.pluginElement),setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(a){mejs.YouTubeApi.handleStateChange(a.data,c,b)}}})},createEvent:function(a,b,c){var d={type:c,target:b};if(a&&a.getDuration){b.currentTime=d.currentTime=a.getCurrentTime(),b.duration=d.duration=a.getDuration(),d.paused=b.paused,d.ended=b.ended,d.muted=a.isMuted(),d.volume=a.getVolume()/100,d.bytesTotal=a.getVideoBytesTotal(),d.bufferedBytes=a.getVideoBytesLoaded();var e=d.bufferedBytes/d.bytesTotal*d.duration;d.target.buffered=d.buffered={start:function(a){return 0},end:function(a){return e},length:1}}b.dispatchEvent(d)},iFrameReady:function(){for(this.isLoaded=!0,this.isIframeLoaded=!0;this.iframeQueue.length>0;){var a=this.iframeQueue.pop();this.createIframe(a)}},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=a;var b,c=a.scheme+"www.youtube.com/apiplayer?enablejsapi=1&amp;playerapiid="+a.pluginId+"&amp;version=3&amp;autoplay=0&amp;controls=0&amp;modestbranding=1&loop=0";mejs.MediaFeatures.isIE?(b=document.createElement("div"),a.container.appendChild(b),b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+a.scheme+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="'+options.flashScriptAccess+'" /><param name="allowFullScreen" value="true" /></object>'):a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="'+options.flashScriptAccess+'"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c,b.success(d,d.pluginElement),c.cueVideoById(b.videoId);var e=b.containerId+"_callback";window[e]=function(a){mejs.YouTubeApi.handleStateChange(a,c,d)},c.addEventListener("onStateChange",e),setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250),mejs.YouTubeApi.createEvent(c,d,"canplay")},handleStateChange:function(a,b,c){switch(a){case-1:c.paused=!0,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=!1,c.ended=!0,mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=!1,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"play"),mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=!0,c.ended=!1,mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress");break;case 5:}}},window.onYouTubePlayerAPIReady=function(){mejs.YouTubeApi.iFrameReady()},window.onYouTubePlayerReady=function(a){mejs.YouTubeApi.flashReady(a)},window.mejs=mejs,window.MediaElement=mejs.MediaElement,function(a,b,c){"use strict";var d={locale:{language:b.i18n&&b.i18n.locale.language||"",strings:b.i18n&&b.i18n.locale.strings||{}},ietf_lang_regex:/^(x\-)?[a-z]{2,}(\-\w{2,})?(\-\w{2,})?$/,methods:{}};d.getLanguage=function(){var a=d.locale.language||window.navigator.userLanguage||window.navigator.language;return d.ietf_lang_regex.exec(a)?a:null},"undefined"!=typeof mejsL10n&&(d.locale.language=mejsL10n.language),d.methods.checkPlain=function(a){var b,c,d={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"};a=String(a);for(b in d)d.hasOwnProperty(b)&&(c=new RegExp(b,"g"),a=a.replace(c,d[b]));return a},d.methods.t=function(a,b){return d.locale.strings&&d.locale.strings[b.context]&&d.locale.strings[b.context][a]&&(a=d.locale.strings[b.context][a]),d.methods.checkPlain(a)},d.t=function(a,b){if("string"==typeof a&&a.length>0){var c=d.getLanguage();return b=b||{context:c},d.methods.t(a,b)}throw{name:"InvalidArgumentException",message:"First argument is either not a string or empty."}},b.i18n=d}(document,mejs),function(a,b){"use strict";"undefined"!=typeof mejsL10n&&(a[mejsL10n.language]=mejsL10n.strings)}(mejs.i18n.locale.strings),/*!

 *

 * MediaElementPlayer

 * http://mediaelementjs.com/

 *

 * Creates a controller bar for HTML5 <video> add <audio> tags

 * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)

 *

 * Copyright 2010-2013, John Dyer (http://j.hn/)

 * License: MIT

 *

 */

"undefined"!=typeof jQuery?mejs.$=jQuery:"undefined"!=typeof Zepto?(mejs.$=Zepto,Zepto.fn.outerWidth=function(a){var b=$(this).width();return a&&(b+=parseInt($(this).css("margin-right"),10),b+=parseInt($(this).css("margin-left"),10)),b}):"undefined"!=typeof ender&&(mejs.$=ender),function(a){mejs.MepDefaults={poster:"",showPosterWhenEnded:!1,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return.05*a.duration},defaultSeekForwardInterval:function(a){return.05*a.duration},setDimensions:!0,audioWidth:-1,audioHeight:-1,startVolume:.8,loop:!1,autoRewind:!0,enableAutosize:!0,timeFormat:"",alwaysShowHours:!1,showTimecodeFrameCount:!1,framesPerSecond:25,autosizeProgress:!0,alwaysShowControls:!1,hideVideoControlsOnLoad:!1,clickToPlayPause:!0,iPadUseNativeControls:!1,iPhoneUseNativeControls:!1,AndroidUseNativeControls:!1,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:!0,stretching:"auto",enableKeyboard:!0,pauseOtherPlayers:!0,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.min(b.volume+.1,1);b.setVolume(c)}},{keys:[40],action:function(a,b){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.max(b.volume-.1,0);b.setVolume(c)}},{keys:[37,227],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){a.isVideo&&(a.showControls(),a.startControlsTimer());var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a,b){"undefined"!=typeof a.enterFullScreen&&(a.isFullScreen?a.exitFullScreen():a.enterFullScreen())}},{keys:[77],action:function(a,b){a.container.find(".mejs-volume-slider").css("display","block"),a.isVideo&&(a.showControls(),a.startControlsTimer()),a.media.muted?a.setMuted(!1):a.setMuted(!0)}}]},mejs.mepIndex=0,mejs.players={},mejs.MediaElementPlayer=function(b,c){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(b,c);var d=this;return d.$media=d.$node=a(b),d.node=d.media=d.$media[0],d.node?"undefined"!=typeof d.node.player?d.node.player:("undefined"==typeof c&&(c=d.$node.data("mejsoptions")),d.options=a.extend({},mejs.MepDefaults,c),d.options.timeFormat||(d.options.timeFormat="mm:ss",d.options.alwaysShowHours&&(d.options.timeFormat="hh:mm:ss"),d.options.showTimecodeFrameCount&&(d.options.timeFormat+=":ff")),mejs.Utility.calculateTimeFormat(0,d.options,d.options.framesPerSecond||25),d.id="mep_"+mejs.mepIndex++,mejs.players[d.id]=d,d.init(),d):void 0},mejs.MediaElementPlayer.prototype={hasFocus:!1,controlsAreVisible:!0,init:function(){var b=this,c=mejs.MediaFeatures,d=a.extend(!0,{},b.options,{success:function(a,c){b.meReady(a,c)},error:function(a){b.handleError(a)}}),e=b.media.tagName.toLowerCase();if(b.isDynamic="audio"!==e&&"video"!==e,b.isDynamic?b.isVideo=b.options.isVideo:b.isVideo="audio"!==e&&b.options.isVideo,c.isiPad&&b.options.iPadUseNativeControls||c.isiPhone&&b.options.iPhoneUseNativeControls)b.$media.attr("controls","controls"),c.isiPad&&null!==b.media.getAttribute("autoplay")&&b.play();else if(c.isAndroid&&b.options.AndroidUseNativeControls);else{b.$media.removeAttr("controls");var f=b.isVideo?mejs.i18n.t("Video Player"):mejs.i18n.t("Audio Player");a('<span class="mejs-offscreen">'+f+"</span>").insertBefore(b.$media),b.container=a('<div id="'+b.id+'" class="mejs-container '+(mejs.MediaFeatures.svgAsImg?"svg":"no-svg")+'" tabindex="0" role="application" aria-label="'+f+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(b.$media[0].className).insertBefore(b.$media).focus(function(a){if(!b.controlsAreVisible&&!b.hasFocus&&(b.showControls(!0),!b.hasMsNativeFullScreen)){var c=b.container.find(".mejs-playpause-button > button");c.focus()}}),"fill"!==b.options.stretching||b.container.parent("mejs-fill-container").length||(b.outerContainer=b.$media.parent(),b.container.wrap('<div class="mejs-fill-container"/>')),b.container.addClass((c.isAndroid?"mejs-android ":"")+(c.isiOS?"mejs-ios ":"")+(c.isiPad?"mejs-ipad ":"")+(c.isiPhone?"mejs-iphone ":"")+(b.isVideo?"mejs-video ":"mejs-audio ")),b.container.find(".mejs-mediaelement").append(b.$media),b.node.player=b,b.controls=b.container.find(".mejs-controls"),b.layers=b.container.find(".mejs-layers");var g=b.isVideo?"video":"audio",h=g.substring(0,1).toUpperCase()+g.substring(1);b.options[g+"Width"]>0||b.options[g+"Width"].toString().indexOf("%")>-1?b.width=b.options[g+"Width"]:""!==b.media.style.width&&null!==b.media.style.width?b.width=b.media.style.width:null!==b.media.getAttribute("width")?b.width=b.$media.attr("width"):b.width=b.options["default"+h+"Width"],b.options[g+"Height"]>0||b.options[g+"Height"].toString().indexOf("%")>-1?b.height=b.options[g+"Height"]:""!==b.media.style.height&&null!==b.media.style.height?b.height=b.media.style.height:null!==b.$media[0].getAttribute("height")?b.height=b.$media.attr("height"):b.height=b.options["default"+h+"Height"],b.setPlayerSize(b.width,b.height),d.pluginWidth=b.width,d.pluginHeight=b.height}mejs.MediaElement(b.$media[0],d),"undefined"!=typeof b.container&&b.controlsAreVisible&&b.container.trigger("controlsshown")},showControls:function(a){var b=this;a="undefined"==typeof a||a,b.controlsAreVisible||(a?(b.controls.removeClass("mejs-offscreen").stop(!0,!0).fadeIn(200,function(){b.controlsAreVisible=!0,b.container.trigger("controlsshown")}),b.container.find(".mejs-control").removeClass("mejs-offscreen").stop(!0,!0).fadeIn(200,function(){b.controlsAreVisible=!0})):(b.controls.removeClass("mejs-offscreen").css("display","block"),b.container.find(".mejs-control").removeClass("mejs-offscreen").css("display","block"),b.controlsAreVisible=!0,b.container.trigger("controlsshown")),b.setControlsSize())},hideControls:function(b){var c=this;b="undefined"==typeof b||b,!c.controlsAreVisible||c.options.alwaysShowControls||c.keyboardAction||(b?(c.controls.stop(!0,!0).fadeOut(200,function(){a(this).addClass("mejs-offscreen").css("display","block"),c.controlsAreVisible=!1,c.container.trigger("controlshidden")}),c.container.find(".mejs-control").stop(!0,!0).fadeOut(200,function(){a(this).addClass("mejs-offscreen").css("display","block")})):(c.controls.addClass("mejs-offscreen").css("display","block"),c.container.find(".mejs-control").addClass("mejs-offscreen").css("display","block"),c.controlsAreVisible=!1,c.container.trigger("controlshidden")))},controlsTimer:null,startControlsTimer:function(a){var b=this;a="undefined"!=typeof a?a:1500,b.killControlsTimer("start"),b.controlsTimer=setTimeout(function(){b.hideControls(),b.killControlsTimer("hide")},a)},killControlsTimer:function(a){var b=this;null!==b.controlsTimer&&(clearTimeout(b.controlsTimer),delete b.controlsTimer,b.controlsTimer=null)},controlsEnabled:!0,disableControls:function(){var a=this;a.killControlsTimer(),a.hideControls(!1),this.controlsEnabled=!1},enableControls:function(){var a=this;a.showControls(!1),a.controlsEnabled=!0},meReady:function(b,c){var d,e,f=this,g=mejs.MediaFeatures,h=c.getAttribute("autoplay"),i=!("undefined"==typeof h||null===h||"false"===h);if(!f.created){if(f.created=!0,f.media=b,f.domNode=c,!(g.isAndroid&&f.options.AndroidUseNativeControls||g.isiPad&&f.options.iPadUseNativeControls||g.isiPhone&&f.options.iPhoneUseNativeControls)){f.buildposter(f,f.controls,f.layers,f.media),f.buildkeyboard(f,f.controls,f.layers,f.media),f.buildoverlays(f,f.controls,f.layers,f.media),f.findTracks();for(d in f.options.features)if(e=f.options.features[d],f["build"+e])try{f["build"+e](f,f.controls,f.layers,f.media)}catch(j){}f.container.trigger("controlsready"),f.setPlayerSize(f.width,f.height),f.setControlsSize(),f.isVideo&&(mejs.MediaFeatures.hasTouch?f.$media.bind("touchstart",function(){f.controlsAreVisible?f.hideControls(!1):f.controlsEnabled&&f.showControls(!1)}):(f.clickToPlayPauseCallback=function(){f.options.clickToPlayPause&&(f.media.paused?f.play():f.pause())},f.media.addEventListener("click",f.clickToPlayPauseCallback,!1),f.container.bind("mouseenter",function(){f.controlsEnabled&&(f.options.alwaysShowControls||(f.killControlsTimer("enter"),f.showControls(),f.startControlsTimer(2500)))}).bind("mousemove",function(){f.controlsEnabled&&(f.controlsAreVisible||f.showControls(),f.options.alwaysShowControls||f.startControlsTimer(2500))}).bind("mouseleave",function(){f.controlsEnabled&&(f.media.paused||f.options.alwaysShowControls||f.startControlsTimer(1e3))})),f.options.hideVideoControlsOnLoad&&f.hideControls(!1),i&&!f.options.alwaysShowControls&&f.hideControls(),f.options.enableAutosize&&f.media.addEventListener("loadedmetadata",function(a){f.options.videoHeight<=0&&null===f.domNode.getAttribute("height")&&!isNaN(a.target.videoHeight)&&(f.setPlayerSize(a.target.videoWidth,a.target.videoHeight),f.setControlsSize(),f.media.setVideoSize(a.target.videoWidth,a.target.videoHeight))},!1)),f.media.addEventListener("play",function(){var a;for(a in mejs.players){var b=mejs.players[a];b.id==f.id||!f.options.pauseOtherPlayers||b.paused||b.ended||b.pause(),b.hasFocus=!1}f.hasFocus=!0},!1),f.media.addEventListener("ended",function(b){if(f.options.autoRewind)try{f.media.setCurrentTime(0),window.setTimeout(function(){a(f.container).find(".mejs-overlay-loading").parent().hide()},20)}catch(c){}f.media.pause(),f.setProgressRail&&f.setProgressRail(),f.setCurrentRail&&f.setCurrentRail(),f.options.loop?f.play():!f.options.alwaysShowControls&&f.controlsEnabled&&f.showControls()},!1),f.media.addEventListener("loadedmetadata",function(a){f.updateDuration&&f.updateDuration(),f.updateCurrent&&f.updateCurrent(),f.isFullScreen||(f.setPlayerSize(f.width,f.height),f.setControlsSize())},!1);var k=null;f.media.addEventListener("timeupdate",function(){k!==this.duration&&(k=this.duration,mejs.Utility.calculateTimeFormat(k,f.options,f.options.framesPerSecond||25),f.updateDuration&&f.updateDuration(),f.updateCurrent&&f.updateCurrent(),f.setControlsSize())},!1),f.container.focusout(function(b){if(b.relatedTarget){var c=a(b.relatedTarget);f.keyboardAction&&0===c.parents(".mejs-container").length&&(f.keyboardAction=!1,f.hideControls(!0))}}),setTimeout(function(){f.setPlayerSize(f.width,f.height),f.setControlsSize()},50),f.globalBind("resize",function(){f.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||f.setPlayerSize(f.width,f.height),f.setControlsSize()}),"youtube"==f.media.pluginType&&(g.isiOS||g.isAndroid)&&(f.container.find(".mejs-overlay-play").hide(),f.container.find(".mejs-poster").hide())}i&&"native"==b.pluginType&&f.play(),f.options.success&&("string"==typeof f.options.success?window[f.options.success](f.media,f.domNode,f):f.options.success(f.media,f.domNode,f))}},handleError:function(a){var b=this;b.controls&&b.controls.hide(),b.options.error&&b.options.error(a)},setPlayerSize:function(a,b){var c=this;if(!c.options.setDimensions)return!1;switch("undefined"!=typeof a&&(c.width=a),"undefined"!=typeof b&&(c.height=b),c.options.stretching){case"fill":c.isVideo?this.setFillMode():this.setDimensions(c.width,c.height);break;case"responsive":this.setResponsiveMode();break;case"none":this.setDimensions(c.width,c.height);break;default:this.hasFluidMode()===!0?this.setResponsiveMode():this.setDimensions(c.width,c.height)}},hasFluidMode:function(){var a=this;return a.height.toString().indexOf("%")>0||"none"!==a.$node.css("max-width")&&"t.width"!==a.$node.css("max-width")||a.$node[0].currentStyle&&"100%"===a.$node[0].currentStyle.maxWidth},setResponsiveMode:function(){var b=this,c=function(){return b.isVideo?b.media.videoWidth&&b.media.videoWidth>0?b.media.videoWidth:null!==b.media.getAttribute("width")?b.media.getAttribute("width"):b.options.defaultVideoWidth:b.options.defaultAudioWidth}(),d=function(){return b.isVideo?b.media.videoHeight&&b.media.videoHeight>0?b.media.videoHeight:null!==b.media.getAttribute("height")?b.media.getAttribute("height"):b.options.defaultVideoHeight:b.options.defaultAudioHeight}(),e=b.container.parent().closest(":visible").width(),f=b.container.parent().closest(":visible").height(),g=b.isVideo||!b.options.autosizeProgress?parseInt(e*d/c,10):d;(isNaN(g)||0!==f&&g>f&&f>d)&&(g=f),b.container.parent().length>0&&"body"===b.container.parent()[0].tagName.toLowerCase()&&(e=a(window).width(),g=a(window).height()),g&&e&&(b.container.width(e).height(g),b.$media.add(b.container.find(".mejs-shim")).width("100%").height("100%"),b.isVideo&&b.media.setVideoSize&&b.media.setVideoSize(e,g),b.layers.children(".mejs-layer").width("100%").height("100%"))},setFillMode:function(){var a=this,b=a.outerContainer;b.width()||b.height(a.$media.width()),b.height()||b.height(a.$media.height());var c=b.width(),d=b.height();a.setDimensions("100%","100%"),a.container.find(".mejs-poster img").css("display","block"),targetElement=a.container.find("object, embed, iframe, video");var e=a.height,f=a.width,g=c,h=e*c/f,i=f*d/e,j=d,k=!(i>c),l=k?Math.floor(g):Math.floor(i),m=k?Math.floor(h):Math.floor(j);k?(targetElement.height(m).width(c),a.media.setVideoSize&&a.media.setVideoSize(c,m)):(targetElement.height(d).width(l),a.media.setVideoSize&&a.media.setVideoSize(l,d)),targetElement.css({"margin-left":Math.floor((c-l)/2),"margin-top":0})},setDimensions:function(a,b){var c=this;c.container.width(a).height(b),c.layers.children(".mejs-layer").width(a).height(b)},setControlsSize:function(){var b=this,c=0,d=0,e=b.controls.find(".mejs-time-rail"),f=b.controls.find(".mejs-time-total"),g=e.siblings(),h=g.last(),i=null;if(b.container.is(":visible")&&e.length&&e.is(":visible")){b.options&&!b.options.autosizeProgress&&(d=parseInt(e.css("width"),10)),0!==d&&d||(g.each(function(){var b=a(this);"absolute"!=b.css("position")&&b.is(":visible")&&(c+=a(this).outerWidth(!0))}),d=b.controls.width()-c-(e.outerWidth(!0)-e.width()));do e.width(d),f.width(d-(f.outerWidth(!0)-f.width())),"absolute"!=h.css("position")&&(i=h.length?h.position():null,d--);while(null!==i&&i.top.toFixed(2)>0&&d>0);b.container.trigger("controlsresize")}},buildposter:function(b,c,d,e){var f=this,g=a('<div class="mejs-poster mejs-layer"></div>').appendTo(d),h=b.$media.attr("poster");""!==b.options.poster&&(h=b.options.poster),h?f.setPoster(h):g.hide(),e.addEventListener("play",function(){g.hide()},!1),b.options.showPosterWhenEnded&&b.options.autoRewind&&e.addEventListener("ended",function(){g.show()},!1)},setPoster:function(b){var c=this,d=c.container.find(".mejs-poster"),e=d.find("img");0===e.length&&(e=a('<img width="100%" height="100%" alt="" />').appendTo(d)),e.attr("src",b),d.css({"background-image":"url("+b+")"})},buildoverlays:function(b,c,d,e){var f=this;if(b.isVideo){var g=a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(d),h=a('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(d),i=a('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(d).bind("click",function(){f.options.clickToPlayPause&&e.paused&&e.play()});e.addEventListener("play",function(){i.hide(),g.hide(),c.find(".mejs-time-buffering").hide(),h.hide()},!1),e.addEventListener("playing",function(){i.hide(),g.hide(),c.find(".mejs-time-buffering").hide(),h.hide()},!1),e.addEventListener("seeking",function(){g.show(),c.find(".mejs-time-buffering").show()},!1),e.addEventListener("seeked",function(){g.hide(),c.find(".mejs-time-buffering").hide()},!1),e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||i.show()},!1),e.addEventListener("waiting",function(){g.show(),c.find(".mejs-time-buffering").show()},!1),e.addEventListener("loadeddata",function(){g.show(),c.find(".mejs-time-buffering").show(),mejs.MediaFeatures.isAndroid&&(e.canplayTimeout=window.setTimeout(function(){if(document.createEvent){var a=document.createEvent("HTMLEvents");return a.initEvent("canplay",!0,!0),e.dispatchEvent(a)}},300))},!1),e.addEventListener("canplay",function(){g.hide(),c.find(".mejs-time-buffering").hide(),clearTimeout(e.canplayTimeout)},!1),e.addEventListener("error",function(a){f.handleError(a),g.hide(),i.hide(),h.show(),h.find(".mejs-overlay-error").html("Error loading this resource")},!1),e.addEventListener("keydown",function(a){f.onkeydown(b,e,a)},!1)}},buildkeyboard:function(b,c,d,e){var f=this;f.container.keydown(function(){f.keyboardAction=!0}),f.globalBind("keydown",function(c){return b.hasFocus=0!==a(c.target).closest(".mejs-container").length&&a(c.target).closest(".mejs-container").attr("id")===b.$media.closest(".mejs-container").attr("id"),f.onkeydown(b,e,c)}),f.globalBind("click",function(c){b.hasFocus=0!==a(c.target).closest(".mejs-container").length})},onkeydown:function(a,b,c){if(a.hasFocus&&a.options.enableKeyboard)for(var d=0,e=a.options.keyActions.length;e>d;d++)for(var f=a.options.keyActions[d],g=0,h=f.keys.length;h>g;g++)if(c.keyCode==f.keys[g])return"function"==typeof c.preventDefault&&c.preventDefault(),f.action(a,b,c.keyCode,c),!1;return!0},findTracks:function(){var b=this,c=b.$media.find("track");b.tracks=[],c.each(function(c,d){d=a(d),b.tracks.push({srclang:d.attr("srclang")?d.attr("srclang").toLowerCase():"",src:d.attr("src"),kind:d.attr("kind"),label:d.attr("label")||"",entries:[],isLoaded:!1})})},changeSkin:function(a){this.container[0].className="mejs-container "+a,this.setPlayerSize(this.width,this.height),this.setControlsSize()},play:function(){this.load(),this.media.play()},pause:function(){try{this.media.pause()}catch(a){}},load:function(){this.isLoaded||this.media.load(),this.isLoaded=!0},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b,c=this;c.container.prev(".mejs-offscreen").remove();for(a in c.options.features)if(b=c.options.features[a],c["clean"+b])try{c["clean"+b](c)}catch(d){}c.isDynamic?c.$node.insertBefore(c.container):(c.$media.prop("controls",!0),c.$node.clone().insertBefore(c.container).show(),c.$node.remove()),"native"!==c.media.pluginType&&c.media.remove(),delete mejs.players[c.id],"object"==typeof c.container&&c.container.remove(),c.globalUnbind(),delete c.node.player},rebuildtracks:function(){var a=this;a.findTracks(),a.buildtracks(a,a.controls,a.layers,a.media)},resetSize:function(){var a=this;setTimeout(function(){a.setPlayerSize(a.width,a.height),a.setControlsSize()},50)}},function(){function b(b,d){var e={d:[],w:[]};return a.each((b||"").split(" "),function(a,b){var f=b+"."+d;0===f.indexOf(".")?(e.d.push(f),e.w.push(f)):e[c.test(b)?"w":"d"].push(f)}),e.d=e.d.join(" "),e.w=e.w.join(" "),e}var c=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,d,e){var f=this,g=f.node?f.node.ownerDocument:document;c=b(c,f.id),c.d&&a(g).bind(c.d,d,e),c.w&&a(window).bind(c.w,d,e)},mejs.MediaElementPlayer.prototype.globalUnbind=function(c,d){var e=this,f=e.node?e.node.ownerDocument:document;c=b(c,e.id),c.d&&a(f).unbind(c.d,d),c.w&&a(window).unbind(c.w,d)}}(),"undefined"!=typeof a&&(a.fn.mediaelementplayer=function(b){return b===!1?this.each(function(){var b=a(this).data("mediaelementplayer");b&&b.remove(),a(this).removeData("mediaelementplayer")}):this.each(function(){a(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,b))}),this},a(document).ready(function(){a(".mejs-player").mediaelementplayer()})),window.MediaElementPlayer=mejs.MediaElementPlayer}(mejs.$),function(a){a.extend(mejs.MepDefaults,{playText:mejs.i18n.t("Play"),pauseText:mejs.i18n.t("Pause")}),a.extend(MediaElementPlayer.prototype,{buildplaypause:function(b,c,d,e){function f(a){"play"===a?(i.removeClass("mejs-play").addClass("mejs-pause"),j.attr({title:h.pauseText,"aria-label":h.pauseText})):(i.removeClass("mejs-pause").addClass("mejs-play"),j.attr({title:h.playText,"aria-label":h.playText}))}var g=this,h=g.options,i=a('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+g.id+'" title="'+h.playText+'" aria-label="'+h.playText+'"></button></div>').appendTo(c).click(function(a){return a.preventDefault(),e.paused?e.play():e.pause(),!1}),j=i.find("button");f("pse"),e.addEventListener("play",function(){f("play")},!1),e.addEventListener("playing",function(){f("play")},!1),e.addEventListener("pause",function(){f("pse")},!1),e.addEventListener("paused",function(){f("pse")},!1)}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{stopText:"Stop"}),a.extend(MediaElementPlayer.prototype,{buildstop:function(b,c,d,e){var f=this;a('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+f.id+'" title="'+f.options.stopText+'" aria-label="'+f.options.stopText+'"></button></div>').appendTo(c).click(function(){e.paused||e.pause(),e.currentTime>0&&(e.setCurrentTime(0),e.pause(),c.find(".mejs-time-current").width("0px"),c.find(".mejs-time-handle").css("left","0px"),c.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0,b.options)),c.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0,b.options)),d.find(".mejs-poster").show())})}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{progessHelpText:mejs.i18n.t("Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.")}),a.extend(MediaElementPlayer.prototype,{buildprogress:function(b,c,d,e){a('<div class="mejs-time-rail"><span  class="mejs-time-total mejs-time-slider"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(c),c.find(".mejs-time-buffering").hide();var f=this,g=c.find(".mejs-time-total"),h=c.find(".mejs-time-loaded"),i=c.find(".mejs-time-current"),j=c.find(".mejs-time-handle"),k=c.find(".mejs-time-float"),l=c.find(".mejs-time-float-current"),m=c.find(".mejs-time-slider"),n=function(a){var c,d=g.offset(),f=g.width(),h=0,i=0,j=0;c=a.originalEvent&&a.originalEvent.changedTouches?a.originalEvent.changedTouches[0].pageX:a.changedTouches?a.changedTouches[0].pageX:a.pageX,e.duration&&(c<d.left?c=d.left:c>f+d.left&&(c=f+d.left),j=c-d.left,h=j/f,i=.02>=h?0:h*e.duration,o&&i!==e.currentTime&&e.setCurrentTime(i),mejs.MediaFeatures.hasTouch||(k.css("left",j),l.html(mejs.Utility.secondsToTimeCode(i,b.options)),k.show()))},o=!1,p=!1,q=0,r=!1,s=b.options.autoRewind,t=function(a){var c=e.currentTime,d=mejs.i18n.t("Time Slider"),f=mejs.Utility.secondsToTimeCode(c,b.options),g=e.duration;m.attr({"aria-label":d,"aria-valuemin":0,"aria-valuemax":g,"aria-valuenow":c,"aria-valuetext":f,role:"slider",tabindex:0})},u=function(){var a=new Date;a-q>=1e3&&e.play()};m.bind("focus",function(a){b.options.autoRewind=!1}),m.bind("blur",function(a){b.options.autoRewind=s}),m.bind("keydown",function(a){new Date-q>=1e3&&(r=e.paused);var c=a.keyCode,d=e.duration,f=e.currentTime,g=b.options.defaultSeekForwardInterval(d),h=b.options.defaultSeekBackwardInterval(d);switch(c){case 37:case 40:f-=h;break;case 39:case 38:f+=g;break;case 36:f=0;break;case 35:f=d;break;case 32:case 13:return void(e.paused?e.play():e.pause());default:return}return f=0>f?0:f>=d?d:Math.floor(f),q=new Date,r||e.pause(),f<e.duration&&!r&&setTimeout(u,1100),e.setCurrentTime(f),a.preventDefault(),a.stopPropagation(),!1}),g.bind("mousedown touchstart",function(a){(1===a.which||0===a.which)&&(o=!0,n(a),f.globalBind("mousemove.dur touchmove.dur",function(a){n(a)}),f.globalBind("mouseup.dur touchend.dur",function(a){o=!1,k.hide(),f.globalUnbind(".dur")}))}).bind("mouseenter",function(a){p=!0,f.globalBind("mousemove.dur",function(a){n(a)}),mejs.MediaFeatures.hasTouch||k.show()}).bind("mouseleave",function(a){p=!1,o||(f.globalUnbind(".dur"),k.hide())}),e.addEventListener("progress",function(a){b.setProgressRail(a),b.setCurrentRail(a)},!1),e.addEventListener("timeupdate",function(a){b.setProgressRail(a),b.setCurrentRail(a),t(a)},!1),f.container.on("controlsresize",function(){b.setProgressRail(),b.setCurrentRail()}),f.loaded=h,f.total=g,f.current=i,f.handle=j},setProgressRail:function(a){var b=this,c=void 0!==a?a.target:b.media,d=null;c&&c.buffered&&c.buffered.length>0&&c.buffered.end&&c.duration?d=c.buffered.end(c.buffered.length-1)/c.duration:c&&void 0!==c.bytesTotal&&c.bytesTotal>0&&void 0!==c.bufferedBytes?d=c.bufferedBytes/c.bytesTotal:a&&a.lengthComputable&&0!==a.total&&(d=a.loaded/a.total),null!==d&&(d=Math.min(1,Math.max(0,d)),b.loaded&&b.total&&b.loaded.width(b.total.width()*d))},setCurrentRail:function(){var a=this;if(void 0!==a.media.currentTime&&a.media.duration&&a.total&&a.handle){var b=Math.round(a.total.width()*a.media.currentTime/a.media.duration),c=b-Math.round(a.handle.outerWidth(!0)/2);a.current.width(b),a.handle.css("left",c)}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"<span> | </span>"}),a.extend(MediaElementPlayer.prototype,{buildcurrent:function(b,c,d,e){var f=this;a('<div class="mejs-time" role="timer" aria-live="off"><span class="mejs-currenttime">'+mejs.Utility.secondsToTimeCode(0,b.options)+"</span></div>").appendTo(c),f.currenttime=f.controls.find(".mejs-currenttime"),e.addEventListener("timeupdate",function(){b.updateCurrent()},!1)},buildduration:function(b,c,d,e){var f=this;c.children().last().find(".mejs-currenttime").length>0?a(f.options.timeAndDurationSeparator+'<span class="mejs-duration">'+mejs.Utility.secondsToTimeCode(f.options.duration,f.options)+"</span>").appendTo(c.find(".mejs-time")):(c.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container"),a('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+mejs.Utility.secondsToTimeCode(f.options.duration,f.options)+"</span></div>").appendTo(c)),f.durationD=f.controls.find(".mejs-duration"),e.addEventListener("timeupdate",function(){b.updateDuration()},!1)},updateCurrent:function(){var a=this,b=a.media.currentTime;isNaN(b)&&(b=0),a.currenttime&&a.currenttime.html(mejs.Utility.secondsToTimeCode(b,a.options))},updateDuration:function(){var a=this,b=a.media.duration;a.options.duration>0&&(b=a.options.duration),isNaN(b)&&(b=0),a.container.toggleClass("mejs-long-video",b>3600),a.durationD&&b>0&&a.durationD.html(mejs.Utility.secondsToTimeCode(b,a.options))}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),allyVolumeControlText:mejs.i18n.t("Use Up/Down Arrow keys to increase or decrease volume."),hideVolumeOnTouchDevices:!0,audioVolume:"horizontal",videoVolume:"vertical"}),a.extend(MediaElementPlayer.prototype,{buildvolume:function(b,c,d,e){if(!mejs.MediaFeatures.isAndroid&&!mejs.MediaFeatures.isiOS||!this.options.hideVolumeOnTouchDevices){var f=this,g=f.isVideo?f.options.videoVolume:f.options.audioVolume,h="horizontal"==g?a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+f.id+'" title="'+f.options.muteText+'" aria-label="'+f.options.muteText+'"></button></div><a href="javascript:void(0);" class="mejs-horizontal-volume-slider"><span class="mejs-offscreen">'+f.options.allyVolumeControlText+'</span><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></a>').appendTo(c):a('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+f.id+'" title="'+f.options.muteText+'" aria-label="'+f.options.muteText+'"></button><a href="javascript:void(0);" class="mejs-volume-slider"><span class="mejs-offscreen">'+f.options.allyVolumeControlText+'</span><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></a></div>').appendTo(c),i=f.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),j=f.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),k=f.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),l=f.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),m=function(a,b){if(!i.is(":visible")&&"undefined"==typeof b)return i.show(),m(a,!0),void i.hide();a=Math.max(0,a),a=Math.min(a,1),0===a?(h.removeClass("mejs-mute").addClass("mejs-unmute"),h.children("button").attr("title",mejs.i18n.t("Unmute")).attr("aria-label",mejs.i18n.t("Unmute"))):(h.removeClass("mejs-unmute").addClass("mejs-mute"),h.children("button").attr("title",mejs.i18n.t("Mute")).attr("aria-label",mejs.i18n.t("Mute")));var c=j.position();if("vertical"==g){var d=j.height(),e=d-d*a;l.css("top",Math.round(c.top+e-l.height()/2)),k.height(d-e),k.css("top",c.top+e)}else{var f=j.width(),n=f*a;l.css("left",Math.round(c.left+n-l.width()/2)),k.width(Math.round(n))}},n=function(a){var b=null,c=j.offset();if("vertical"===g){var d=j.height(),f=a.pageY-c.top;if(b=(d-f)/d,0===c.top||0===c.left)return}else{var h=j.width(),i=a.pageX-c.left;b=i/h}b=Math.max(0,b),b=Math.min(b,1),m(b),0===b?e.setMuted(!0):e.setMuted(!1),e.setVolume(b)},o=!1,p=!1;h.hover(function(){i.show(),p=!0},function(){p=!1,o||"vertical"!=g||i.hide()});var q=function(a){var b=Math.floor(100*e.volume);i.attr({"aria-label":mejs.i18n.t("Volume Slider"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":b,"aria-valuetext":b+"%",role:"slider",tabindex:0})};i.bind("mouseover",function(){p=!0}).bind("mousedown",function(a){return n(a),f.globalBind("mousemove.vol",function(a){n(a)}),f.globalBind("mouseup.vol",function(){o=!1,f.globalUnbind(".vol"),p||"vertical"!=g||i.hide()}),o=!0,!1}).bind("keydown",function(a){var b=a.keyCode,c=e.volume;switch(b){case 38:c=Math.min(c+.1,1);break;case 40:c=Math.max(0,c-.1);break;default:return!0}return o=!1,m(c),e.setVolume(c),!1}),h.find("button").click(function(){e.setMuted(!e.muted)}),h.find("button").bind("focus",function(){i.show()}),e.addEventListener("volumechange",function(a){o||(e.muted?(m(0),h.removeClass("mejs-mute").addClass("mejs-unmute")):(m(e.volume),h.removeClass("mejs-unmute").addClass("mejs-mute"))),q(a)},!1),0===b.options.startVolume&&e.setMuted(!0),"native"===e.pluginType&&e.setVolume(b.options.startVolume),f.container.on("controlsresize",function(){m(e.volume)})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{usePluginFullScreen:!0,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")}),a.extend(MediaElementPlayer.prototype,{isFullScreen:!1,isNativeFullScreen:!1,isInIframe:!1,fullscreenMode:"",buildfullscreen:function(b,c,d,e){if(b.isVideo){b.isInIframe=window.location!=window.parent.location,e.addEventListener("play",function(){b.detectFullscreenMode()});var f=this,g=null,h=a('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+f.id+'" title="'+f.options.fullscreenText+'" aria-label="'+f.options.fullscreenText+'"></button></div>').appendTo(c).on("click",function(){var a=mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||b.isFullScreen;a?b.exitFullScreen():b.enterFullScreen()}).on("mouseover",function(){if("plugin-hover"==f.fullscreenMode){null!==g&&(clearTimeout(g),delete g);var a=h.offset(),c=b.container.offset();e.positionFullscreenButton(a.left-c.left,a.top-c.top,!0);

}}).on("mouseout",function(){"plugin-hover"==f.fullscreenMode&&(null!==g&&(clearTimeout(g),delete g),g=setTimeout(function(){e.hideFullscreenButton()},1500))});if(b.fullscreenBtn=h,f.globalBind("keydown",function(a){27==a.keyCode&&(mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||f.isFullScreen)&&b.exitFullScreen()}),f.normalHeight=0,f.normalWidth=0,mejs.MediaFeatures.hasTrueNativeFullScreen){var i=function(a){b.isFullScreen&&(mejs.MediaFeatures.isFullScreen()?(b.isNativeFullScreen=!0,b.setControlsSize()):(b.isNativeFullScreen=!1,b.exitFullScreen()))};b.globalBind(mejs.MediaFeatures.fullScreenEventName,i)}}},detectFullscreenMode:function(){var a=this,b="",c=mejs.MediaFeatures;return c.hasTrueNativeFullScreen&&"native"===a.media.pluginType?b="native-native":c.hasTrueNativeFullScreen&&"native"!==a.media.pluginType&&!c.hasFirefoxPluginMovingProblem?b="plugin-native":a.usePluginFullScreen?mejs.MediaFeatures.supportsPointerEvents?(b="plugin-click",a.createPluginClickThrough()):b="plugin-hover":b="fullwindow",a.fullscreenMode=b,b},isPluginClickThroughCreated:!1,createPluginClickThrough:function(){var b=this;if(!b.isPluginClickThroughCreated){var c,d,e=!1,f=function(){if(e){for(var a in g)g[a].hide();b.fullscreenBtn.css("pointer-events",""),b.controls.css("pointer-events",""),b.media.removeEventListener("click",b.clickToPlayPauseCallback),e=!1}},g={},h=["top","left","right","bottom"],i=function(){var a=fullscreenBtn.offset().left-b.container.offset().left,d=fullscreenBtn.offset().top-b.container.offset().top,e=fullscreenBtn.outerWidth(!0),f=fullscreenBtn.outerHeight(!0),h=b.container.width(),i=b.container.height();for(c in g)g[c].css({position:"absolute",top:0,left:0});g.top.width(h).height(d),g.left.width(a).height(f).css({top:d}),g.right.width(h-a-e).height(f).css({top:d,left:a+e}),g.bottom.width(h).height(i-f-d).css({top:d+f})};for(b.globalBind("resize",function(){i()}),c=0,d=h.length;d>c;c++)g[h[c]]=a('<div class="mejs-fullscreen-hover" />').appendTo(b.container).mouseover(f).hide();fullscreenBtn.on("mouseover",function(){if(!b.isFullScreen){var a=fullscreenBtn.offset(),d=player.container.offset();media.positionFullscreenButton(a.left-d.left,a.top-d.top,!1),b.fullscreenBtn.css("pointer-events","none"),b.controls.css("pointer-events","none"),b.media.addEventListener("click",b.clickToPlayPauseCallback);for(c in g)g[c].show();i(),e=!0}}),media.addEventListener("fullscreenchange",function(a){b.isFullScreen=!b.isFullScreen,b.isFullScreen?b.media.removeEventListener("click",b.clickToPlayPauseCallback):b.media.addEventListener("click",b.clickToPlayPauseCallback),f()}),b.globalBind("mousemove",function(a){if(e){var c=fullscreenBtn.offset();(a.pageY<c.top||a.pageY>c.top+fullscreenBtn.outerHeight(!0)||a.pageX<c.left||a.pageX>c.left+fullscreenBtn.outerWidth(!0))&&(fullscreenBtn.css("pointer-events",""),b.controls.css("pointer-events",""),e=!1)}}),b.isPluginClickThroughCreated=!0}},cleanfullscreen:function(a){a.exitFullScreen()},containerSizeTimeout:null,enterFullScreen:function(){var b=this;return mejs.MediaFeatures.hasiOSFullScreen?void b.media.webkitEnterFullscreen():(a(document.documentElement).addClass("mejs-fullscreen"),b.normalHeight=b.container.height(),b.normalWidth=b.container.width(),"native-native"===b.fullscreenMode||"plugin-native"===b.fullscreenMode?(mejs.MediaFeatures.requestFullScreen(b.container[0]),b.isInIframe&&setTimeout(function c(){if(b.isNativeFullScreen){var d=.002,e=a(window).width(),f=screen.width,g=Math.abs(f-e),h=f*d;g>h?b.exitFullScreen():setTimeout(c,500)}},1e3)):"fullwindow"==b.fullscreeMode,b.container.addClass("mejs-container-fullscreen").width("100%").height("100%"),b.containerSizeTimeout=setTimeout(function(){b.container.css({width:"100%",height:"100%"}),b.setControlsSize()},500),"native"===b.media.pluginType?b.$media.width("100%").height("100%"):(b.container.find(".mejs-shim").width("100%").height("100%"),setTimeout(function(){var c=a(window),d=c.width(),e=c.height();b.media.setVideoSize(d,e)},500)),b.layers.children("div").width("100%").height("100%"),b.fullscreenBtn&&b.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen"),b.setControlsSize(),b.isFullScreen=!0,b.container.find(".mejs-captions-text").css("font-size",screen.width/b.width*1*100+"%"),b.container.find(".mejs-captions-position").css("bottom","45px"),void b.container.trigger("enteredfullscreen"))},exitFullScreen:function(){var b=this;clearTimeout(b.containerSizeTimeout),mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||b.isFullScreen)&&mejs.MediaFeatures.cancelFullScreen(),a(document.documentElement).removeClass("mejs-fullscreen"),b.container.removeClass("mejs-container-fullscreen").width(b.normalWidth).height(b.normalHeight),"native"===b.media.pluginType?b.$media.width(b.normalWidth).height(b.normalHeight):(b.container.find(".mejs-shim").width(b.normalWidth).height(b.normalHeight),b.media.setVideoSize(b.normalWidth,b.normalHeight)),b.layers.children("div").width(b.normalWidth).height(b.normalHeight),b.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen"),b.setControlsSize(),b.isFullScreen=!1,b.container.find(".mejs-captions-text").css("font-size",""),b.container.find(".mejs-captions-position").css("bottom",""),b.container.trigger("exitedfullscreen")}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{speeds:["2.00","1.50","1.25","1.00","0.75"],defaultSpeed:"1.00",speedChar:"x"}),a.extend(MediaElementPlayer.prototype,{buildspeed:function(b,c,d,e){var f=this;if("native"==f.media.pluginType){for(var g=null,h=null,i=null,j=null,k=[],l=!1,m=0,n=f.options.speeds.length;n>m;m++){var o=f.options.speeds[m];"string"==typeof o?(k.push({name:o+f.options.speedChar,value:o}),o===f.options.defaultSpeed&&(l=!0)):(k.push(o),o.value===f.options.defaultSpeed&&(l=!0))}l||k.push({name:f.options.defaultSpeed+f.options.speedChar,value:f.options.defaultSpeed}),k.sort(function(a,b){return parseFloat(b.value)-parseFloat(a.value)});var p=function(a){for(m=0,n=k.length;n>m;m++)if(k[m].value===a)return k[m].name},q='<div class="mejs-button mejs-speed-button"><button type="button">'+p(f.options.defaultSpeed)+'</button><div class="mejs-speed-selector"><ul>';for(m=0,il=k.length;m<il;m++)j=f.id+"-speed-"+k[m].value,q+='<li><input type="radio" name="speed" value="'+k[m].value+'" id="'+j+'" '+(k[m].value===f.options.defaultSpeed?" checked":"")+' /><label for="'+j+'" '+(k[m].value===f.options.defaultSpeed?' class="mejs-speed-selected"':"")+">"+k[m].name+"</label></li>";q+="</ul></div></div>",g=a(q).appendTo(c),h=g.find(".mejs-speed-selector"),i=f.options.defaultSpeed,e.addEventListener("loadedmetadata",function(a){i&&(e.playbackRate=parseFloat(i))},!0),h.on("click",'input[type="radio"]',function(){var b=a(this).attr("value");i=b,e.playbackRate=parseFloat(b),g.find("button").html(p(b)),g.find(".mejs-speed-selected").removeClass("mejs-speed-selected"),g.find('input[type="radio"]:checked').next().addClass("mejs-speed-selected")}),g.one("mouseenter focusin",function(){h.height(g.find(".mejs-speed-selector ul").outerHeight(!0)+g.find(".mejs-speed-translations").outerHeight(!0)).css("top",-1*h.height()+"px")})}}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),tracksAriaLive:!1,hideCaptionsButtonWhenEmpty:!0,toggleCaptionsButtonWhenOnlyOne:!1,slidesSelector:""}),a.extend(MediaElementPlayer.prototype,{hasChapters:!1,cleartracks:function(a,b,c,d){a&&(a.captions&&a.captions.remove(),a.chapters&&a.chapters.remove(),a.captionsText&&a.captionsText.remove(),a.captionsButton&&a.captionsButton.remove())},buildtracks:function(b,c,d,e){if(0!==b.tracks.length){var f,g=this,h=g.options.tracksAriaLive?'role="log" aria-live="assertive" aria-atomic="false"':"";if(g.domNode.textTracks)for(f=g.domNode.textTracks.length-1;f>=0;f--)g.domNode.textTracks[f].mode="hidden";g.cleartracks(b,c,d,e),b.chapters=a('<div class="mejs-chapters mejs-layer"></div>').prependTo(d).hide(),b.captions=a('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover" '+h+'><span class="mejs-captions-text"></span></div></div>').prependTo(d).hide(),b.captionsText=b.captions.find(".mejs-captions-text"),b.captionsButton=a('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+g.id+'" title="'+g.options.tracksText+'" aria-label="'+g.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+b.id+'_captions" id="'+b.id+'_captions_none" value="none" checked="checked" /><label for="'+b.id+'_captions_none">'+mejs.i18n.t("None")+"</label></li></ul></div></div>").appendTo(c);var i=0;for(f=0;f<b.tracks.length;f++)"subtitles"==b.tracks[f].kind&&i++;for(g.options.toggleCaptionsButtonWhenOnlyOne&&1==i?b.captionsButton.on("click",function(){null===b.selectedTrack?lang=b.tracks[0].srclang:lang="none",b.setTrack(lang)}):(b.captionsButton.on("mouseenter focusin",function(){a(this).find(".mejs-captions-selector").removeClass("mejs-offscreen")}).on("click","input[type=radio]",function(){lang=this.value,b.setTrack(lang)}),b.captionsButton.on("mouseleave focusout",function(){a(this).find(".mejs-captions-selector").addClass("mejs-offscreen")})),b.options.alwaysShowControls?b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):b.container.bind("controlsshown",function(){b.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||b.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")}),b.trackToLoad=-1,b.selectedTrack=null,b.isLoadingTrack=!1,f=0;f<b.tracks.length;f++)"subtitles"==b.tracks[f].kind&&b.addTrackButton(b.tracks[f].srclang,b.tracks[f].label);b.loadNextTrack(),e.addEventListener("timeupdate",function(a){b.displayCaptions()},!1),""!==b.options.slidesSelector&&(b.slidesContainer=a(b.options.slidesSelector),e.addEventListener("timeupdate",function(a){b.displaySlides()},!1)),e.addEventListener("loadedmetadata",function(a){b.displayChapters()},!1),b.container.hover(function(){b.hasChapters&&(b.chapters.removeClass("mejs-offscreen"),b.chapters.fadeIn(200).height(b.chapters.find(".mejs-chapter").outerHeight()))},function(){b.hasChapters&&!e.paused&&b.chapters.fadeOut(200,function(){a(this).addClass("mejs-offscreen"),a(this).css("display","block")})}),g.container.on("controlsresize",function(){g.adjustLanguageBox()}),null!==b.node.getAttribute("autoplay")&&b.chapters.addClass("mejs-offscreen")}},setTrack:function(a){var b,c=this;if("none"==a)c.selectedTrack=null,c.captionsButton.removeClass("mejs-captions-enabled");else for(b=0;b<c.tracks.length;b++)if(c.tracks[b].srclang==a){null===c.selectedTrack&&c.captionsButton.addClass("mejs-captions-enabled"),c.selectedTrack=c.tracks[b],c.captions.attr("lang",c.selectedTrack.srclang),c.displayCaptions();break}},loadNextTrack:function(){var a=this;a.trackToLoad++,a.trackToLoad<a.tracks.length?(a.isLoadingTrack=!0,a.loadTrack(a.trackToLoad)):(a.isLoadingTrack=!1,a.checkForTracks())},loadTrack:function(b){var c=this,d=c.tracks[b],e=function(){d.isLoaded=!0,c.enableTrackButton(d.srclang,d.label),c.loadNextTrack()};a.ajax({url:d.src,dataType:"text",success:function(a){"string"==typeof a&&/<tt\s+xml/gi.exec(a)?d.entries=mejs.TrackFormatParser.dfxp.parse(a):d.entries=mejs.TrackFormatParser.webvtt.parse(a),e(),"chapters"==d.kind&&c.media.addEventListener("play",function(a){c.media.duration>0&&c.displayChapters(d)},!1),"slides"==d.kind&&c.setupSlides(d)},error:function(){c.removeTrackButton(d.srclang),c.loadNextTrack()}})},enableTrackButton:function(b,c){var d=this;""===c&&(c=mejs.language.codes[b]||b),d.captionsButton.find("input[value="+b+"]").prop("disabled",!1).siblings("label").html(c),d.options.startLanguage==b&&a("#"+d.id+"_captions_"+b).prop("checked",!0).trigger("click"),d.adjustLanguageBox()},removeTrackButton:function(a){var b=this;b.captionsButton.find("input[value="+a+"]").closest("li").remove(),b.adjustLanguageBox()},addTrackButton:function(b,c){var d=this;""===c&&(c=mejs.language.codes[b]||b),d.captionsButton.find("ul").append(a('<li><input type="radio" name="'+d.id+'_captions" id="'+d.id+"_captions_"+b+'" value="'+b+'" disabled="disabled" /><label for="'+d.id+"_captions_"+b+'">'+c+" (loading)</label></li>")),d.adjustLanguageBox(),d.container.find(".mejs-captions-translations option[value="+b+"]").remove()},adjustLanguageBox:function(){var a=this;a.captionsButton.find(".mejs-captions-selector").height(a.captionsButton.find(".mejs-captions-selector ul").outerHeight(!0)+a.captionsButton.find(".mejs-captions-translations").outerHeight(!0))},checkForTracks:function(){var a=this,b=!1;if(a.options.hideCaptionsButtonWhenEmpty){for(i=0;i<a.tracks.length;i++)if("subtitles"==a.tracks[i].kind&&a.tracks[i].isLoaded){b=!0;break}b||(a.captionsButton.hide(),a.setControlsSize())}},displayCaptions:function(){if("undefined"!=typeof this.tracks){var a,b=this,c=b.selectedTrack;if(null!==c&&c.isLoaded){for(a=0;a<c.entries.times.length;a++)if(b.media.currentTime>=c.entries.times[a].start&&b.media.currentTime<=c.entries.times[a].stop)return b.captionsText.html(c.entries.text[a]).attr("class","mejs-captions-text "+(c.entries.times[a].identifier||"")),void b.captions.show().height(0);b.captions.hide()}else b.captions.hide()}},setupSlides:function(a){var b=this;b.slides=a,b.slides.entries.imgs=[b.slides.entries.text.length],b.showSlide(0)},showSlide:function(b){if("undefined"!=typeof this.tracks&&"undefined"!=typeof this.slidesContainer){var c=this,d=c.slides.entries.text[b],e=c.slides.entries.imgs[b];"undefined"==typeof e||"undefined"==typeof e.fadeIn?c.slides.entries.imgs[b]=e=a('<img src="'+d+'">').on("load",function(){e.appendTo(c.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()}):e.is(":visible")||e.is(":animated")||e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if("undefined"!=typeof this.slides){var a,b=this,c=b.slides;for(a=0;a<c.entries.times.length;a++)if(b.media.currentTime>=c.entries.times[a].start&&b.media.currentTime<=c.entries.times[a].stop)return void b.showSlide(a)}},displayChapters:function(){var a,b=this;for(a=0;a<b.tracks.length;a++)if("chapters"==b.tracks[a].kind&&b.tracks[a].isLoaded){b.drawChapters(b.tracks[a]),b.hasChapters=!0;break}},drawChapters:function(b){var c,d,e=this,f=0,g=0;for(e.chapters.empty(),c=0;c<b.entries.times.length;c++)d=b.entries.times[c].stop-b.entries.times[c].start,f=Math.floor(d/e.media.duration*100),(f+g>100||c==b.entries.times.length-1&&100>f+g)&&(f=100-g),e.chapters.append(a('<div class="mejs-chapter" rel="'+b.entries.times[c].start+'" style="left: '+g.toString()+"%;width: "+f.toString()+'%;"><div class="mejs-chapter-block'+(c==b.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+b.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(b.entries.times[c].start,e.options)+"&ndash;"+mejs.Utility.secondsToTimeCode(b.entries.times[c].stop,e.options)+"</span></div></div>")),g+=f;e.chapters.find("div.mejs-chapter").click(function(){e.media.setCurrentTime(parseFloat(a(this).attr("rel"))),e.media.paused&&e.media.play()}),e.chapters.show()}}),mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",fl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}},mejs.TrackFormatParser={webvtt:{pattern_timecode:/^((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ((?:[0-9]{1,2}:)?[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,parse:function(b){for(var c,d,e,f=0,g=mejs.TrackFormatParser.split2(b,/\r?\n/),h={text:[],times:[]};f<g.length;f++){if(c=this.pattern_timecode.exec(g[f]),c&&f<g.length){for(f-1>=0&&""!==g[f-1]&&(e=g[f-1]),f++,d=g[f],f++;""!==g[f]&&f<g.length;)d=d+"\n"+g[f],f++;d=a.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),h.text.push(d),h.times.push({identifier:e,start:0===mejs.Utility.convertSMPTEtoSeconds(c[1])?.2:mejs.Utility.convertSMPTEtoSeconds(c[1]),stop:mejs.Utility.convertSMPTEtoSeconds(c[3]),settings:c[5]})}e=""}return h}},dfxp:{parse:function(b){b=a(b).filter("tt");var c,d,e=0,f=b.children("div").eq(0),g=f.find("p"),h=b.find("#"+f.attr("style")),i={text:[],times:[]};if(h.length){var j=h.removeAttr("id").get(0).attributes;if(j.length)for(c={},e=0;e<j.length;e++)c[j[e].name.split(":")[1]]=j[e].value}for(e=0;e<g.length;e++){var k,l={start:null,stop:null,style:null};if(g.eq(e).attr("begin")&&(l.start=mejs.Utility.convertSMPTEtoSeconds(g.eq(e).attr("begin"))),!l.start&&g.eq(e-1).attr("end")&&(l.start=mejs.Utility.convertSMPTEtoSeconds(g.eq(e-1).attr("end"))),g.eq(e).attr("end")&&(l.stop=mejs.Utility.convertSMPTEtoSeconds(g.eq(e).attr("end"))),!l.stop&&g.eq(e+1).attr("begin")&&(l.stop=mejs.Utility.convertSMPTEtoSeconds(g.eq(e+1).attr("begin"))),c){k="";for(var m in c)k+=m+":"+c[m]+";"}k&&(l.style=k),0===l.start&&(l.start=.2),i.times.push(l),d=a.trim(g.eq(e).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,"<a href='$1' target='_blank'>$1</a>"),i.text.push(d),0===i.times.start&&(i.times.start=2)}return i}},split2:function(a,b){return a.split(b)}},3!="x\n\ny".split(/\n/gi).length&&(mejs.TrackFormatParser.split2=function(a,b){var c,d=[],e="";for(c=0;c<a.length;c++)e+=a.substring(c,c+1),b.test(e)&&(d.push(e.replace(b,"")),e="");return d.push(e),d})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){return"undefined"==typeof a.enterFullScreen?null:a.isFullScreen?mejs.i18n.t("Turn off Fullscreen"):mejs.i18n.t("Go Fullscreen")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?mejs.i18n.t("Unmute"):mejs.i18n.t("Mute")},click:function(a){a.media.muted?a.setMuted(!1):a.setMuted(!0)}},{isSeparator:!0},{render:function(a){return mejs.i18n.t("Download Video")},click:function(a){window.location.href=a.media.currentSrc}}]}),a.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(b,c,d,e){b.contextMenu=a('<div class="mejs-contextmenu"></div>').appendTo(a("body")).hide(),b.container.bind("contextmenu",function(a){return b.isContextMenuEnabled?(a.preventDefault(),b.renderContextMenu(a.clientX-1,a.clientY-1),!1):void 0}),b.container.bind("click",function(){b.contextMenu.hide()}),b.contextMenu.bind("mouseleave",function(){b.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},isContextMenuEnabled:!0,enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer(),a.contextMenuTimer=setTimeout(function(){a.hideContextMenu(),a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;null!=a&&(clearTimeout(a),delete a,a=null)},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(b,c){for(var d=this,e="",f=d.options.contextMenuItems,g=0,h=f.length;h>g;g++)if(f[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var i=f[g].render(d);null!=i&&(e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+1e6*Math.random()+'">'+i+"</div>")}d.contextMenu.empty().append(a(e)).css({top:c,left:b}).show(),d.contextMenu.find(".mejs-contextmenu-item").each(function(){var b=a(this),c=parseInt(b.data("itemindex"),10),e=d.options.contextMenuItems[c];"undefined"!=typeof e.show&&e.show(b,d),b.click(function(){"undefined"!=typeof e.click&&e.click(d),d.contextMenu.hide()})}),setTimeout(function(){d.killControlsTimer("rev3")},100)}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{skipBackInterval:30,skipBackText:mejs.i18n.t("Skip back %1 seconds")}),a.extend(MediaElementPlayer.prototype,{buildskipback:function(b,c,d,e){var f=this,g=f.options.skipBackText.replace("%1",f.options.skipBackInterval);a('<div class="mejs-button mejs-skip-back-button"><button type="button" aria-controls="'+f.id+'" title="'+g+'" aria-label="'+g+'">'+f.options.skipBackInterval+"</button></div>").appendTo(c).click(function(){e.setCurrentTime(Math.max(e.currentTime-f.options.skipBackInterval,0)),a(this).find("button").blur()})}})}(mejs.$),function(a){a.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")}),a.extend(MediaElementPlayer.prototype,{buildpostroll:function(b,c,d,e){var f=this,g=f.container.find('link[rel="postroll"]').attr("href");"undefined"!=typeof g&&(b.postroll=a('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+f.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(d).hide(),f.media.addEventListener("ended",function(c){a.ajax({dataType:"html",url:g,success:function(a,b){d.find(".mejs-postroll-layer-content").html(a)}}),b.postroll.show()},!1))}})}(mejs.$);

;!function(a,b){function c(){function a(){"undefined"!=typeof _wpmejsSettings&&(c=b.extend(!0,{},_wpmejsSettings)),c.success=c.success||function(a){var b,c;"flash"===a.pluginType&&(b=a.attributes.autoplay&&"false"!==a.attributes.autoplay,c=a.attributes.loop&&"false"!==a.attributes.loop,b&&a.addEventListener("canplay",function(){a.play()},!1),c&&a.addEventListener("ended",function(){a.play()},!1))},b(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").filter(function(){return!b(this).parent().hasClass(".mejs-mediaelement")}).mediaelementplayer(c)}var c={};return{initialize:a}}a.wp=a.wp||{},mejs.plugins.silverlight[0].types.push("video/x-ms-wmv"),mejs.plugins.silverlight[0].types.push("audio/x-ms-wma"),a.wp.mediaelement=new c,b(a.wp.mediaelement.initialize)}(window,jQuery);

;var addComment={moveForm:function(a,b,c,d){var e,f,g,h,i=this,j=i.I(a),k=i.I(c),l=i.I("cancel-comment-reply-link"),m=i.I("comment_parent"),n=i.I("comment_post_ID"),o=k.getElementsByTagName("form")[0];if(j&&k&&l&&m&&o){i.respondId=c,d=d||!1,i.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",k.parentNode.insertBefore(e,k)),j.parentNode.insertBefore(k,j.nextSibling),n&&d&&(n.value=d),m.value=b,l.style.display="",l.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{for(var p=0;p<o.elements.length;p++)if(f=o.elements[p],h=!1,"getComputedStyle"in window?g=window.getComputedStyle(f):document.documentElement.currentStyle&&(g=f.currentStyle),(f.offsetWidth<=0&&f.offsetHeight<=0||"hidden"===g.visibility)&&(h=!0),"hidden"!==f.type&&!f.disabled&&!h){f.focus();break}}catch(q){}return!1}},I:function(a){return document.getElementById(a)}};

;!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c<i.length;c++){if(d=i[c],!d.getAttribute("data-secret"))f=Math.random().toString(36).substr(2,10),d.src+="#?secret="+f,d.setAttribute("data-secret",f);if(g||h)a=d.cloneNode(!0),a.removeAttribute("security"),d.parentNode.replaceChild(a,d)}}}var d=!1,e=!1;if(b.querySelector)if(a.addEventListener)d=!0;if(a.wp=a.wp||{},!a.wp.receiveEmbedMessage)if(a.wp.receiveEmbedMessage=function(c){var d=c.data;if(d.secret||d.message||d.value)if(!/[^a-zA-Z0-9]/.test(d.secret)){var e,f,g,h,i,j=b.querySelectorAll('iframe[data-secret="'+d.secret+'"]'),k=b.querySelectorAll('blockquote[data-secret="'+d.secret+'"]');for(e=0;e<k.length;e++)k[e].style.display="none";for(e=0;e<j.length;e++)if(f=j[e],c.source===f.contentWindow){if(f.removeAttribute("style"),"height"===d.message){if(g=parseInt(d.value,10),g>1e3)g=1e3;else if(~~g<200)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);