!function(t){"use strict";var i={slide:0,delay:5e3,loop:!0,preload:!1,preloadImage:!1,preloadVideo:!1,timer:!0,overlay:!1,autoplay:!0,shuffle:!1,cover:!0,color:null,align:"center",valign:"center",firstTransition:null,firstTransitionDuration:null,transition:"fade",transitionDuration:1e3,transitionRegister:[],animation:null,animationDuration:"auto",animationRegister:[],slidesToKeep:1,init:function(){},play:function(){},pause:function(){},walk:function(){},slides:[]},s={},e=function(s,e){this.elmt=s,this.settings=t.extend({},i,t.vegas.defaults,e),this.slide=this.settings.slide,this.total=this.settings.slides.length,this.noshow=this.total<2,this.paused=!this.settings.autoplay||this.noshow,this.ended=!1,this.$elmt=t(s),this.$timer=null,this.$overlay=null,this.$slide=null,this.timeout=null,this.first=!0,this.transitions=["fade","fade2","blur","blur2","flash","flash2","negative","negative2","burn","burn2","slideLeft","slideLeft2","slideRight","slideRight2","slideUp","slideUp2","slideDown","slideDown2","zoomIn","zoomIn2","zoomOut","zoomOut2","swirlLeft","swirlLeft2","swirlRight","swirlRight2"],this.animations=["kenburns","kenburnsLeft","kenburnsRight","kenburnsUp","kenburnsUpLeft","kenburnsUpRight","kenburnsDown","kenburnsDownLeft","kenburnsDownRight"],this.settings.transitionRegister instanceof Array==0&&(this.settings.transitionRegister=[this.settings.transitionRegister]),this.settings.animationRegister instanceof Array==0&&(this.settings.animationRegister=[this.settings.animationRegister]),this.transitions=this.transitions.concat(this.settings.transitionRegister),this.animations=this.animations.concat(this.settings.animationRegister),this.support={objectFit:"objectFit"in document.body.style,transition:"transition"in document.body.style||"WebkitTransition"in document.body.style,video:t.vegas.isVideoCompatible()},!0===this.settings.shuffle&&this.shuffle(),this._init()};e.prototype={_init:function(){var i,s,e,n="BODY"===this.elmt.tagName,o=this.settings.timer,a=this.settings.overlay,r=this;this._preload(),n||(this.$elmt.css("height",this.$elmt.css("height")),i=t('
').css("overflow",this.$elmt.css("overflow")).css("padding",this.$elmt.css("padding")),this.$elmt.css("padding")||i.css("padding-top",this.$elmt.css("padding-top")).css("padding-bottom",this.$elmt.css("padding-bottom")).css("padding-left",this.$elmt.css("padding-left")).css("padding-right",this.$elmt.css("padding-right")),this.$elmt.clone(!0).children().appendTo(i),this.elmt.innerHTML=""),o&&this.support.transition&&(e=t('
'),this.$timer=e,this.$elmt.prepend(e)),a&&(s=t('
'),"string"==typeof a&&s.css("background-image","url("+a+")"),this.$overlay=s,this.$elmt.prepend(s)),this.$elmt.addClass("vegas-container"),n||this.$elmt.append(i),setTimeout(function(){r.trigger("init"),r._goto(r.slide),r.settings.autoplay&&r.trigger("play")},1)},_preload:function(){var t;for(t=0;t
'),this.support.transition&&v&&s.addClass("vegas-transition-"+v),this.support.video&&h?((o=h instanceof Array?this._video(h):this._video(h.src)).loop=void 0===h.loop||h.loop,o.muted=void 0===h.mute||h.mute,!1===o.muted?(o.volume=0,this._fadeInSound(o,y)):o.pause(),n=t(o).addClass("vegas-video").css("background-color",p),this.support.objectFit?n.css("object-position",c+" "+g).css("object-fit",u).css("width","100%").css("height","100%"):"contain"===u&&n.css("width","100%").css("height","100%"),s.append(n)):(a=new Image,e=t('
').css("background-image",'url("'+l+'")').css("background-color",p).css("background-position",c+" "+g),"repeat"===u?e.css("background-repeat","repeat"):e.css("background-size",u),this.support.transition&&w&&e.addClass("vegas-animation-"+w).css("animation-duration",$+"ms"),s.append(e)),this.support.transition||s.css("display","none"),m?r.eq(m-1).after(s):this.$elmt.prepend(s),r.css("transition","all 0ms").each(function(){this.className="vegas-slide","VIDEO"===this.tagName&&(this.className+=" vegas-video"),v&&(this.className+=" vegas-transition-"+v,this.className+=" vegas-transition-"+v+"-in")}),f._timer(!1),o?(4===o.readyState&&(o.currentTime=0),o.play(),_()):(a.src=l,a.complete?_():a.onload=_)},_end:function(){this.settings.autoplay?this.ended=!1:this.ended=!0,this._timer(!1),this.trigger("end")},shuffle:function(){for(var t,i,s=this.total-1;0this.total-1||t===this.slide||(this.slide=t,this._goto(this.slide))},next:function(){if(this.slide++,this.slide>=this.total){if(!this.settings.loop)return this._end();this.slide=0}this._goto(this.slide)},previous:function(){if(this.slide--,this.slide<0){if(!this.settings.loop)return void this.slide++;this.slide=this.total-1}this._goto(this.slide)},trigger:function(t){var i;i="init"===t?[this.settings]:[this.slide,this.settings.slides[this.slide]],this.$elmt.trigger("vegas"+t,i),"function"==typeof this.settings[t]&&this.settings[t].apply(this.$elmt,i)},options:function(s,e){var n=this.settings.slides.slice();if("object"==typeof s)this.settings=t.extend({},i,t.vegas.defaults,s);else{if("string"!=typeof s)return this.settings;if(void 0===e)return this.settings[s];this.settings[s]=e}this.settings.slides!==n&&(this.total=this.settings.slides.length,this.noshow=this.total<2,this._preload())},destroy:function(){clearTimeout(this.timeout),this.$elmt.removeClass("vegas-container"),this.$elmt.find("> .vegas-slide").remove(),this.$elmt.find("> .vegas-wrapper").clone(!0).children().appendTo(this.$elmt),this.$elmt.find("> .vegas-wrapper").remove(),this.settings.timer&&this.$timer.remove(),this.settings.overlay&&this.$overlay.remove(),this.elmt._vegas=null}},t.fn.vegas=function(t){var i,s=arguments,n=!1;if(void 0===t||"object"==typeof t)return this.each(function(){this._vegas||(this._vegas=new e(this,t))});if("string"==typeof t){if(this.each(function(){var e=this._vegas;if(!e)throw new Error("No Vegas applied to this element.");"function"==typeof e[t]&&"_"!==t[0]?i=e[t].apply(e,[].slice.call(s,1)):n=!0}),n)throw new Error('No method "'+t+'" in Vegas.');return void 0!==i?i:this}},t.vegas={},t.vegas.defaults=i,t.vegas.isVideoCompatible=function(){return!/(Android|webOS|Phone|iPad|iPod|BlackBerry|Windows Phone)/i.test(navigator.userAgent)}}(window.jQuery||window.Zepto);var oFloatingHeader,oHeroText,oCategoriesWrapper,oPageContainer,oScrollDiv,oTitle,nHeight,nWidth,nLastKnownScrollPosition=0,bScrollTicking=!1,oDocument=$(document);function fOnScroll(){nLastKnownScrollPosition=oDocument.scrollTop(),fRequestScrollTick()}function fOnScrollUpate(){nLastKnownScrollPosition<=nHeight+300&&fApplyHeaderScrollEffects(),bScrollTicking=!1}function fRequestScrollTick(){bScrollTicking||(requestAnimationFrame(fOnScrollUpate),bScrollTicking=!0)}function fApplyHeaderScrollEffects(){var t=fClamp(-fMap(nLastKnownScrollPosition,0,nHeight,0,1),0,1),i=fClamp(-fMap(nLastKnownScrollPosition,0,nHeight/2,0,1),0,1),s=fClamp(-fMap(nLastKnownScrollPosition,0,nHeight/4,0,1),0,1),e=fClamp(-fMap(nLastKnownScrollPosition,0,nHeight/8,0,1),0,1);bIsFullscreenSearchOpen?oFloatingHeader.css("background","rgba(10,10,10,1)"):oFloatingHeader.css("background","rgba(10,10,10,"+(1-t)+")"),oCategoriesWrapper.css("background","rgba(255, 255, 255, 1"-i+")"),oPageContainer.css("opacity",1-s),oScrollDiv.css("opacity",e),nWidth>700?oTitle.css("opacity",t):oTitle.css("opacity",i)}function fMap(t,i,s,e,n){return(t-s)*(n-e)/(s-i)+e}function fClamp(t,i,s){return ts&&(t=s),t}oDocument.ready(function(){nHeight=$("#headerContainer").height(),nWidth=$("#headerContainer").width(),$(window).resize(function(){$(".vegas-container").height($(window).height()),$(".vegas-container").width($(window).width()),nHeight=$("#headerContainer").height(),nWidth=$("#headerContainer").width()}),oFloatingHeader=$("#floatingHeader"),oHeroText=$("#hero-text"),oTitle=$("#title"),oCategoriesWrapper=$("#categories"),oPageContainer=$("#pageContainer"),oScrollDiv=$("#scrollDiv"),oDocument.scroll(function(){fOnScroll()}),$("#sSearch").focus(function(){oScrollDiv.toggle(100)}),$("#sSearch").blur(function(){oScrollDiv.toggle(100)}),fOnSearchFullscreenClose=function(t){nLastKnownScrollPosition=t,fApplyHeaderScrollEffects()},oDocument.scrollTop()>=nHeight+300&&oFloatingHeader.css("background","rgba(10,10,10,1)")});