var fixto=function(t,e,i){var s,o=(s={getAll:function(t){return i.defaultView.getComputedStyle(t)},get:function(t,e){return this.getAll(t)[e]},toFloat:function(t){return parseFloat(t,10)||0},getFloat:function(t,e){return this.toFloat(this.get(t,e))},_getAllCurrentStyle:function(t){return t.currentStyle}},i.documentElement.currentStyle&&(s.getAll=s._getAllCurrentStyle),s),n=function(){function e(t){this.element=t,this.replacer=i.createElement("div"),this.replacer.style.visibility="hidden",this.hide(),t.parentNode.insertBefore(this.replacer,t)}return e.prototype={replace:function(){var t=this.replacer.style,e=o.getAll(this.element);t.width=this._width(),t.height=this._height(),t.marginTop=e.marginTop,t.marginBottom=e.marginBottom,t.marginLeft=e.marginLeft,t.marginRight=e.marginRight,t.cssFloat=e.cssFloat,t.styleFloat=e.styleFloat,t.position=e.position,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.display=e.display},hide:function(){this.replacer.style.display="none"},_width:function(){return this.element.getBoundingClientRect().width+"px"},_widthOffset:function(){return this.element.offsetWidth+"px"},_height:function(){return jQuery(this.element).outerHeight()+"px"},_heightOffset:function(){return this.element.offsetHeight+"px"},destroy:function(){t(this.replacer).remove();for(var e in this)this.hasOwnProperty(e)&&(this[e]=null)}},i.documentElement.getBoundingClientRect().width||(e.prototype._width=e.prototype._widthOffset,e.prototype._height=e.prototype._heightOffset),{MimicNode:e,computedStyle:o}}();function a(){this._vendor=null}a.prototype={_vendors:{webkit:{cssPrefix:"-webkit-",jsPrefix:"Webkit"},moz:{cssPrefix:"-moz-",jsPrefix:"Moz"},ms:{cssPrefix:"-ms-",jsPrefix:"ms"},opera:{cssPrefix:"-o-",jsPrefix:"O"}},_prefixJsProperty:function(t,e){return t.jsPrefix+e[0].toUpperCase()+e.substr(1)},_prefixValue:function(t,e){return t.cssPrefix+e},_valueSupported:function(t,e,i){try{return i.style[t]=e,i.style[t]===e}catch(t){return!1}},propertySupported:function(t){return void 0!==i.documentElement.style[t]},getJsProperty:function(t){if(this.propertySupported(t))return t;if(this._vendor)return this._prefixJsProperty(this._vendor,t);var e;for(var i in this._vendors)if(e=this._prefixJsProperty(this._vendors[i],t),this.propertySupported(e))return this._vendor=this._vendors[i],e;return null},getCssValue:function(t,e){var s,o=i.createElement("div"),n=this.getJsProperty(t);if(this._valueSupported(n,e,o))return e;if(this._vendor&&(s=this._prefixValue(this._vendor,e),this._valueSupported(n,s,o)))return s;for(var a in this._vendors)if(s=this._prefixValue(this._vendors[a],e),this._valueSupported(n,s,o))return this._vendor=this._vendors[a],s;return null}};var r,h=new a,l=h.getJsProperty("transform");var c,d=h.getCssValue("position","sticky"),u=h.getCssValue("position","fixed");function p(e,i,s){this.child=e,this._$child=t(e),this.parent=i,this.options={className:"fixto-fixed",top:0},this._setOptions(s)}function f(t,e,i){p.call(this,t,e,i),this._replacer=new n.MimicNode(t),this._ghostNode=this._replacer.replacer,this._saveStyles(),this._saveViewportHeight(),this._proxied_onscroll=this._bind(this._onscroll,this),this._proxied_onresize=this._bind(this._onresize,this),this.start()}function m(t,e,i){p.call(this,t,e,i),this.start()}"Microsoft Internet Explorer"===navigator.appName&&(c=parseFloat(navigator.appVersion.split("MSIE")[1])),p.prototype={_mindtop:function(){var t=0;if(this._$mind)for(var e,i,s=0,n=this._$mind.length;s=this._fullOffset("offsetTop",this._ghostNode))return void this._unfix()}else if(this._scrollTop>this._parentBottom||this._scrollTop<=this._fullOffset("offsetTop",this._ghostNode)-this.options.top-this._mindtop())return void this._unfix();this._adjust()}else{var t=o.getAll(this.child);(this._scrollTopthis._fullOffset("offsetTop",this.child)-this.options.top-this._mindtop()&&this._viewportHeight>this.child.offsetHeight+o.toFloat(t.marginTop)+o.toFloat(t.marginBottom)||this.options.toBottom)&&(this._fix(),this._adjust())}},_adjust:function(){var e=0,i=this._mindtop(),s=0,n=o.getAll(this.child),a=null;if(r&&(a=this._getContext())&&(e=Math.abs(a.getBoundingClientRect().top)),(s=this._parentBottom-this._scrollTop-(this.child.offsetHeight+o.toFloat(n.marginBottom)+i+this.options.top))>0&&(s=0),this.options.toBottom);else{var h=this.options.top;0===h&&(h=t("body").offset().top),this.child.style.top=Math.round(s+i+e+h-o.toFloat(n.marginTop))+"px"}},_fullOffset:function(t,e,i){for(var s=e[t],o=e.offsetParent;null!==o&&o!==i;)s+=o[t],o=o.offsetParent;return s},_getContext:function(){for(var t,e=this.child,s=null;!s;){if((t=e.parentNode)===i.documentElement)return null;if("none"!==o.getAll(t)[l]){s=t;break}e=t}return s},_fix:function(){var e=this.child,s=e.style,n=o.getAll(e),a=e.getBoundingClientRect().left,h=n.width;if(this.options._original,this._saveStyles(),i.documentElement.currentStyle&&(h=e.offsetWidth,"border-box"!==n.boxSizing&&(h-=o.toFloat(n.paddingLeft)+o.toFloat(n.paddingRight)+o.toFloat(n.borderLeftWidth)+o.toFloat(n.borderRightWidth)),h+="px"),r){this._getContext();a=this._$child.offset().left}if(this._replacer.replace(),s.left=a-o.toFloat(n.marginLeft)+"px",s.width=h,s.position="fixed",this.options.toBottom)s.top="",s.bottom=this.options.top+o.toFloat(n.marginBottom)+"px";else{s.bottom="";var l=this.options.top;0===l&&(l=t("body").offset().top),s.top=this._mindtop()+l-o.toFloat(n.marginTop)+"px"}this._$child.addClass(this.options.className),this.fixed=!0,this._$child.trigger("fixto-added")},_unfix:function(){var t=this.child.style;this._replacer.hide(),t.position=this._childOriginalPosition,t.top=this._childOriginalTop,t.bottom=this._childOriginalBottom,t.width=this._childOriginalWidth,t.left=this._childOriginalLeft,this.options.always||(this._$child.removeClass(this.options.className),this._$child.trigger("fixto-removed")),this.fixed=!1},_saveStyles:function(){var t=this.child.style;this._childOriginalPosition=t.position,this.options.toBottom?(this._childOriginalTop="",this._childOriginalBottom=t.bottom):(this._childOriginalTop=t.top,this._childOriginalBottom=""),this._childOriginalWidth=t.width,this._childOriginalLeft=t.left},_onresize:function(){this.refresh()},_saveViewportHeight:function(){this._viewportHeight=e.innerHeight||i.documentElement.clientHeight},_stop:function(){this._unfix(),t(e).unbind("scroll.fixto mousewheel",this._proxied_onscroll),t(this._toresize).unbind("resize.fixto",this._proxied_onresize)},_start:function(){this._onscroll(),t(e).bind("scroll.fixto mousewheel",this._proxied_onscroll),t(this._toresize).bind("resize.fixto",this._proxied_onresize)},_destroy:function(){this._replacer.destroy()},refresh:function(){this._saveViewportHeight(),this._unfix(),this._onscroll()}}),m.prototype=new p,t.extend(m.prototype,{_start:function(){var t=o.getAll(this.child);this._childOriginalPosition=t.position,this._childOriginalTop=t.top,this.child.style.position=d,this.refresh()},_stop:function(){this.child.style.position=this._childOriginalPosition,this.child.style.top=this._childOriginalTop},refresh:function(){this.child.style.top=this._mindtop()+this.options.top+"px"}});var g=function(t,e,s){return d&&!s||d&&s&&!1!==s.useNativeSticky?new m(t,e,s):u?(void 0===r&&(o=!1,n=i.createElement("div"),a=i.createElement("div"),n.appendChild(a),n.style[l]="translate(0)",n.style.marginTop="10px",n.style.visibility="hidden",a.style.position="fixed",a.style.top=0,i.body.appendChild(n),a.getBoundingClientRect().top>0&&(o=!0),i.body.removeChild(n),r=o),new f(t,e,s)):"Neither fixed nor sticky positioning supported";var o,n,a};return c<8&&(g=function(){return"not supported"}),t.fn.fixTo=function(e,i){var s=t(e),o=0;return this.each(function(){var n=t(this).data("fixto-instance");n?n[e].call(n,i):t(this).data("fixto-instance",g(this,s[o],i));o++})},{FixToContainer:f,fixTo:g,computedStyle:o,mimicNode:n}}(window.jQuery,window,document);!function(t,e,i){"use strict";var s=/^.*(youtu\.be\/|youtube\.com\/v\/|youtube\.com\/embed\/|youtube\.com\/watch\?v=|youtube\.com\/watch\?.*\&v=)([^#\&\?]*).*/i;t.fn.backstretch=function(s,o){var n,a=arguments;return 0===t(e).scrollTop()&&e.scrollTo(0,0),this.each(function(e){var r=t(this),h=r.data("backstretch");if(h){if("string"==typeof a[0]&&"function"==typeof h[a[0]]){var l=h[a[0]].apply(h,Array.prototype.slice.call(a,1));return l===h&&(l=i),void(l!==i&&((n=n||[])[e]=l))}o=t.extend(h.options,o),h.hasOwnProperty("destroy")&&h.destroy(!0)}if(!s||s&&0===s.length){var c=r.css("background-image");c&&"none"!==c?s=[{url:r.css("backgroundImage").replace(/url\(|\)|"|'/g,"")}]:t.error("No images were supplied for Backstretch, or element must have a CSS-defined background image.")}h=new v(this,s,o||{}),r.data("backstretch",h)}),n?1===n.length?n[0]:n:this},t.backstretch=function(e,i){return t("body").backstretch(e,i).data("backstretch")},t.expr[":"].backstretch=function(e){return t(e).data("backstretch")!==i},t.fn.backstretch.defaults={duration:5e3,transition:"fade",transitionDuration:0,animateFirst:!0,alignX:.5,alignY:.5,paused:!1,start:0,preload:2,preloadSize:1,resolutionRefreshRate:2500,resolutionChangeRatioThreshold:.1};var o,n,a,r,h,l,c={wrap:{left:0,top:0,overflow:"hidden",margin:0,padding:0,height:"100%",width:"100%",zIndex:-999999},itemWrapper:{position:"absolute",display:"none",margin:0,padding:0,border:"none",width:"100%",height:"100%",zIndex:-999999},item:{position:"absolute",margin:0,padding:0,border:"none",width:"100%",height:"100%",maxWidth:"none"}},d=(o=function(t){for(var e=1;eparseInt(i.width,10);)t[s]=t[s-1],--s;t[s]=i}return t},n=function(t,i,s){for(var o,n,a=e.devicePixelRatio||1,r=S(),h=(A(),i>t?"portrait":t>i?"landscape":"square"),l=0,c=0;c=o)));c++);return s[Math.min(c,l)]},a=function(t,e){if("string"==typeof t)t=t.replace(/{{(width|height)}}/g,e);else if(t instanceof Array)for(var i=0;i=i.length&&(s=0,o=0),n<0&&(n=o),n=Math.min(n,o);var r=i.slice(s+n,o-n);if(i=i.slice(s,n),o=i.length)for(var c,d=0,p=function(){++d===o&&(l(i,a,!r),e(r,0,0,n,a))},f=0;f=this.images.length&&(this.options.start=this.images.length-1),this.options.start<0&&(this.options.start=0),this.isBody=i===document.body;var n=t(e);this.$container=t(i),this.$root=this.isBody?P?n:t(document):this.$container,this.originalImages=this.images,this.images=d(this.options.alwaysTestWindowResolution?n:this.$root,this.originalImages),p(this.images,this.options.start||0,this.options.preload||1);var a=this.$container.children(".backstretch").first();if(this.$wrap=a.length?a:t('
').css(this.options.bypassCss?{}:c.wrap).appendTo(this.$container),!this.options.bypassCss){if(!this.isBody){var r=this.$container.css("position"),h=this.$container.css("zIndex");this.$container.css({position:"static"===r?"relative":r,zIndex:"auto"===h?0:h}),this.$wrap.css({zIndex:-999998})}this.$wrap.css({position:this.isBody&&P?"fixed":"absolute"})}this.index=this.options.start,this.show(this.index),n.on("resize.backstretch",t.proxy(this.resize,this)).on("orientationchange.backstretch",t.proxy(function(){this.isBody&&0===e.pageYOffset&&(e.scrollTo(0,1),this.resize())},this))};v.prototype={resize:function(){try{var s=this.options.alwaysTestWindowResolution?t(e):this.$root,o=s.width(),n=s.height(),a=o/(this._lastResizeContainerWidth||0),r=n/(this._lastResizeContainerHeight||0),h=this.options.resolutionChangeRatioThreshold||0;if((o!==this._lastResizeContainerWidth||n!==this._lastResizeContainerHeight)&&(Math.abs(a-1)>=h||isNaN(a)||Math.abs(r-1)>=h||isNaN(r))&&(this._lastResizeContainerWidth=o,this._lastResizeContainerHeight=n,this.images=d(s,this.originalImages),this.options.preload&&p(this.images,(this.index+1)%this.images.length,this.options.preload),1===this.images.length&&this._currentImage.url!==this.images[0].url)){var l=this;clearTimeout(l._selectAnotherResolutionTimeout),l._selectAnotherResolutionTimeout=setTimeout(function(){l.show(0)},this.options.resolutionRefreshRate)}var c={left:0,top:0,right:"auto",bottom:"auto"},u=this.isBody?this.$root.width():this.$root.innerWidth(),f=this.isBody?e.innerHeight?e.innerHeight:this.$root.height():this.$root.innerHeight(),m=u,g=m/this.$itemWrapper.data("ratio"),v=t.Event("backstretch.resize",{relatedTarget:this.$container[0]}),y=this._currentImage.alignX===i?this.options.alignX:this._currentImage.alignX,w=this._currentImage.alignY===i?this.options.alignY:this._currentImage.alignY;g>=f?c.top=-(g-f)*w:(((m=(g=f)*this.$itemWrapper.data("ratio"))-u)/2,c.left=-(m-u)*y),this.options.bypassCss||this.$wrap.css({width:u,height:f}).find(">.backstretch-item").not(".deleteable").each(function(){t(this).find("img,video,iframe").css({width:m,height:g}).css(c)}),this.$container.trigger(v,this)}catch(t){}return this},show:function(e,s){if(!(Math.abs(e)>this.images.length-1)){var o=this,n=o.$wrap.find(">.backstretch-item").addClass("deleteable"),a=o.videoWrapper,r={relatedTarget:o.$container[0]};o.$container.trigger(t.Event("backstretch.before",r),[o,e]),this.index=e;var h=o.images[e];clearTimeout(o._cycleTimeout),delete o.videoWrapper;var l=u(h);return l?(o.videoWrapper=new y(h),o.$item=o.videoWrapper.$video.css("pointer-events","none")):o.$item=t(""),o.$itemWrapper=t('
').append(o.$item),this.options.bypassCss?o.$itemWrapper.css({display:"none"}):(o.$itemWrapper.css(c.itemWrapper),o.$item.css(c.item)),o.$item.bind(l?"canplay":"load",function(h){var c=t(this).parent(),d=c.data("options");s&&(d=t.extend({},d,s));var u=this.naturalWidth||this.videoWidth||this.width,p=this.naturalHeight||this.videoHeight||this.height;c.data("ratio",u/p);var f=function(t){return d[t]!==i?d[t]:o.options[t]},m=f("transition"),g=f("transitionEasing"),v=f("transitionDuration"),y=function(){a&&(a.stop(),a.destroy()),n.remove(),!o.paused&&o.images.length>1&&o.cycle(),o.options.bypassCss||o.isBody||o.$container.css("background-image","none"),t(["after","show"]).each(function(){o.$container.trigger(t.Event("backstretch."+this,r),[o,e])}),l&&o.videoWrapper.play()};o.firstShow&&!o.options.animateFirst||!v||!m?(c.show(),y()):function(e){var s=e.transition||"fade";"string"==typeof s&&s.indexOf("|")>-1&&(s=s.split("|")),s instanceof Array&&(s=s[Math.round(Math.random()*(s.length-1))]);var o=e.new,n=e.old?e.old:t([]);switch(s.toString().toLowerCase()){default:case"fade":o.fadeIn({duration:e.duration,complete:e.complete,easing:e.easing||i});break;case"fadeinout":case"fade_in_out":var a=function(){o.fadeIn({duration:e.duration/2,complete:e.complete,easing:e.easing||i})};n.length?n.fadeOut({duration:e.duration/2,complete:a,easing:e.easing||i}):a();break;case"pushleft":case"push_left":case"pushright":case"push_right":case"pushup":case"push_up":case"pushdown":case"push_down":case"coverleft":case"cover_left":case"coverright":case"cover_right":case"coverup":case"cover_up":case"coverdown":case"cover_down":var r=s.match(/^(cover|push)_?(.*)$/),h="left"===r[2]?"right":"right"===r[2]?"left":"down"===r[2]?"top":"up"===r[2]?"bottom":"right",l={display:""},c={};if(l[h]="-100%",c[h]=0,o.css(l).animate(c,{duration:e.duration,complete:function(){o.css(h,""),e.complete.apply(this,arguments)},easing:e.easing||i}),"push"===r[1]&&n.length){var d={};d[h]="100%",n.animate(d,{duration:e.duration,complete:function(){n.css("display","none")},easing:e.easing||i})}}}({new:c,old:n,transition:m,duration:v,easing:g,complete:y}),o.firstShow=!1,o.resize()}),o.$itemWrapper.appendTo(o.$wrap),o.$item.attr("alt",h.alt||""),o.$itemWrapper.data("options",h),l||o.$item.attr("src",h.url),o._currentImage=h,o}},current:function(){return this.index},next:function(){var t=Array.prototype.slice.call(arguments,0);return t.unshift(this.index1){clearTimeout(this._cycleTimeout);var e=this._currentImage&&this._currentImage.duration||this.options.duration,i=u(this._currentImage),s=function(){this.$item.off(".cycle"),this.paused||this.next()};if(i){if(!this._currentImage.loop){var o=0;this.$item.on("playing.cycle",function(){var e=t(this).data("player");clearTimeout(o),o=setTimeout(function(){e.pause(),e.$video.trigger("ended")},1e3*(e.getDuration()-e.getCurrentTime()))}).on("ended.cycle",function(){clearTimeout(o)})}this.$item.on("error.cycle initerror.cycle",t.proxy(s,this))}i&&!this._currentImage.duration?this.$item.on("ended.cycle",t.proxy(s,this)):this._cycleTimeout=setTimeout(t.proxy(s,this),e)}return this},destroy:function(i){t(e).off("resize.backstretch orientationchange.backstretch"),this.videoWrapper&&this.videoWrapper.destroy(),clearTimeout(this._cycleTimeout),i||this.$wrap.remove(),this.$container.removeData("backstretch")}};var y=function(){this.init.apply(this,arguments)};y.prototype.init=function(o){var n,a=this,r=function(){a.$video=n,a.video=n[0]},h="video";if(o.url instanceof Array||!s.test(o.url)||(h="youtube"),a.type=h,"youtube"===h){y.loadYoutubeAPI(),a.ytId=o.url.match(s)[2];var l="https://www.youtube.com/embed/"+a.ytId+"?rel=0&autoplay=0&showinfo=0&controls=0&modestbranding=1&cc_load_policy=0&disablekb=1&iv_load_policy=3&loop=0&enablejsapi=1&origin="+encodeURIComponent(e.location.origin);a.__ytStartMuted=!!o.mute||o.mute===i,n=t("