jquery(document).ready(function(a){function b(a){a.requestfullscreen?a.requestfullscreen():a.mozrequestfullscreen?a.mozrequestfullscreen():a.webkitrequestfullscreen?a.webkitrequestfullscreen():a.msrequestfullscreen&&a.msrequestfullscreen()}function c(){document.exitfullscreen?document.exitfullscreen():document.mozcancelfullscreen?document.mozcancelfullscreen():document.webkitexitfullscreen&&document.webkitexitfullscreen()}var d=a("body"),e=a(window),f=(a("#main-slideshow"),a("#wpadminbar").height(),a(".masthead:not(.side-header):not(.side-header-v-stroke)").height(),d.hasclass("transparent")),g=a(".floating-navigation-below-slider").exists(),h=a(".masthead");a.fn.exists=function(){return a(this).length>0},a.fn.loaded=function(b,c,d){var e=this.length;return e>0?this.each(function(){var d=this,f=a(d);f.on("load.dt",function(d){a(this).off("load.dt"),"function"==typeof b&&b.call(this),--e<=0&&"function"==typeof c&&c.call(this)}),d.complete&&void 0!==d.complete?f.trigger("load.dt"):d.src=d.src}):d?("function"==typeof c&&c.call(this),this):void 0},a.rscss3easing={easeoutsine:"cubic-bezier(0.390, 0.575, 0.565, 1.000)",easeinoutsine:"cubic-bezier(0.445, 0.050, 0.550, 0.950)"},a.extend(jquery.easing,{easeinoutsine:function(a,b,c,d,e){return-d/2*(math.cos(math.pi*b/e)-1)+c},easeoutsine:function(a,b,c,d,e){return d*math.sin(b/e*(math.pi/2))+c},easeoutcubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c}}),a.thephotoslider=function(b,c){var d=a(b).data("thephotoslider");d?d.update():this._init(b,c)},a.thephotoslider.defaults={mode:{type:"slider"},responsive:!0,height:!1,width:!1,sidepaddings:0,storehtml:!1,autoplay:!1,threshold:20,resizeimg:!1,imagescalemode:"none",imagealigncenter:!1,collapsepoint:700,transformenable:!0,calcautoheight:!1,columbasedresize:!1,resizeheight:!1},a.thephotoslider.prototype={_init:function(b,c){var d=this;if(d.st=a.extend({},a.thephotoslider.defaults,c),d.ev=a(d),d.autoplay={enabled:!1,delay:2e3,loop:!0},d.currslide=0,d.noslide=!0,d.lockleft=!0,d.lockright=!0,d.sliderlock=!1,d.locktimeout=!1,d.wrap={},d.wrap.$el=a(b),d.wrap.width=0,d.wrap.height=!1,d.wrap.$el.data("thephotoslider",d),d.viewport=d.wrap.$el.find(".ts-viewport"),d.cont={},d.cont.$el=d.viewport.find(".ts-cont"),d.cont.width=0,d.cont.startx=0,d.cont.instantx=0,d.slides={},d.slides.$items=d.cont.$el.children(),d.slides.number=d.slides.$items.length,d.slides.position=[],d.slides.width=[],d.slides.isloaded=[],d.drag={},d.drag.ismoving=!1,d.drag.startx=0,d.drag.starty=0,d.drag.offsetx=0,d.drag.offsety=0,d.drag.lockx=!1,d.drag.locky=!1,d.features={},d._featuredetection(),d.st.storehtml&&(d.orightml=d.wrap.$el.html()),d._buildhtml(),d._calcslidersize(),d._resizeimage(),d.wrap.height||d.wrap.$el.addclass("ts-autoheight"),d._setsliderwidth(),d._adjustslides(),d._setsliderheight(),d.slideto(0,!0),d.noslide||d._bindevents(),settimeout(function(){d.wrap.$el.addclass("ts-ready"),d.ev.trigger("sliderready")},20),d.st.responsive)if("onorientationchange"in window){var e=window.orientation;a(window).on("orientationchange",function(a){var b=window.orientation;b!==e&&(e=b,d.update())})}else{var f;a(window).on("resize",function(a){cleartimeout(f),f=settimeout(function(){d.update()},200)})}d.st.autoplay.enabled&&d.play()},_featuredetection:function(){var a,b=this,c=document.createelement("div").style,d=["webkit","moz","ms","o"];for(b.features.vendor="",i=0;io||i>p)&&(g="fit"),"fill"===g||"fit"===g?(j=o/h,k=p/i,l="fill"==g?j>k?j:k:"fit"==g?ja.st.collapsepoint?a.wrap.$el.removeclass("ts-collapsed"):a.wrap.$el.addclass("ts-collapsed")},_setsliderheight:function(){var b=this;if("number"==typeof b.wrap.height)b.viewport.css({height:b.wrap.height});else if("scroller"===b.st.mode.type||"centered"===b.st.mode.type||"carousel"===b.st.mode.type){if(b.st.resizeheight){var c=a(b.viewport).find("article").map(function(){return a(this).height()}).get(),d=math.max.apply(null,c);b.viewport.css({height:d}),a(b.slides.$items).css({height:d})}"0px"!==b.viewport.css("height")&&0!=b.viewport.css("height")&&b.viewport.css("height")||b.viewport.css({height:math.max.apply(null,b.slides.height)})}else if(b.slides.isloaded[b.currslide]){var e=a(b.slides.$items[b.currslide]).height();e>0?b.viewport.css({height:e}):b.viewport.css({height:"auto"})}else{var e=a(b.slides.$items[b.currslide]).height();e>0?b.viewport.css({height:e}):b.viewport.css({height:auto})}},_adjustslides:function(){var b=this;if("slider"===b.st.mode.type)b.cont.width=0,b.slides.$items.each(function(c){var d=a(b.slides.$items[c]),e={};b.slides.position[c]=-b.cont.width-b.st.sidepaddings/2,b.cont.width=b.cont.width+b.wrap.width+b.st.sidepaddings,e.left=-b.slides.position[c],b.slides.isloaded[c]||d.find("img").loaded(!1,function(){b.slides.isloaded[c]=!0,d.addclass("ts-loaded")},!0),d.css(e)});else if("centered"===b.st.mode.type){if(b.cont.width=0,b.slides.contratio=[],b.slides.ratio=[],b.st.mode.lsminw||b.st.mode.lsmaxw)var c=b.wrap.width/100*b.st.mode.lsminw,d=b.wrap.width/100*b.st.mode.lsmaxw;if(b.st.mode.ptminw||b.st.mode.ptmaxw)var e=b.wrap.width/100*b.st.mode.ptminw,f=b.wrap.width/100*b.st.mode.ptmaxw;b.slides.$items.each(function(g){var h=a(b.slides.$items[g]),i={},j=h.attr("data-width")?parsefloat(h.attr("data-width")):h.width(),k=h.attr("data-height")?parsefloat(h.attr("data-height")):h.height();b.slides.contratio[g]||(b.slides.contratio[g]=j/k,b.slides.contratio[g]>1?h.addclass("ts-ls"):h.addclass("ts-pt")),b.wrap.width>b.st.collapsepoint?(k=b.wrap.height,j=b.wrap.height*b.slides.contratio[g],(c||d)&&j>k?c===d||j>d?j=d:jf?j=f:jb.slides.contratio[g]?(h.removeclass("ts-narrow"),h.addclass("ts-wide")):(h.removeclass("ts-wide"),h.addclass("ts-narrow")),b.slides.isloaded[g]||h.find("img").loaded(!1,function(){b.slides.isloaded[g]=!0,h.addclass("ts-loaded")},!0),h.css(i)})}else if("scroller"===b.st.mode.type){if(b.cont.width=0,b.slides.ratio=[],"number"!=typeof b.wrap.height&&(b.slides.height=[]),"undefined"!=typeof b.slides.$items.parents(".slider-wrapper").attr("data-max-width"))var g=b.slides.$items.parents(".slider-wrapper").width()*parsefloat(b.slides.$items.parents(".slider-wrapper").attr("data-max-width"))/100;b.slides.$items.each(function(c){var d=a(b.slides.$items[c]),e={},f=d.attr("data-width")?parsefloat(d.attr("data-width")):d.width(),h=d.attr("data-height")?parsefloat(d.attr("data-height")):d.height();if(f>g)var f=g;f>0&&h>0?b.slides.ratio[c]=f/h:b.slides.ratio[c]=1,"number"==typeof b.wrap.height?(b.slides.width[c]=b.wrap.height*b.slides.ratio[c],e.width=b.slides.width[c],e.height=b.slides.width[c]/b.slides.ratio[c]):f>0&&h>0?(b.slides.width[c]||(e.width=b.slides.width[c]=f),b.slides.height[c]||b.st.resizeheight||(e.height="100%"),b.slides.height[c]=h):(d.css("height","auto"),b.slides.width[c]=d.width(),b.slides.height[c]=d.height(),e.height="100%"),b.st.columbasedresize&&(b.slides.width[c]=d.width()),b.slides.position[c]=-b.cont.width,b.cont.width=b.cont.width+b.slides.width[c],c.31;)h--,h<1&&(h=1),j=b.wrap.width/h;b.perview=h,b.slides.$items.each(function(c){var d=a(b.slides.$items[c]),e={};b.slides.position[c]=-b.cont.width,b.cont.width=b.cont.width+j,e.width=j-b.st.sidepaddings,e.left=-b.slides.position[c]+b.st.sidepaddings/2,d.css(e)})}"centered"!==b.st.mode.type&&b.cont.width<=b.wrap.width?(b.noslide=!0,b._transitionstart(0,0,"easeinoutsine",!0),b.cont.$el.css("left",(b.wrap.width-b.cont.width)/2),b.lockleft=!0,b.lockright=!0,b.ev.trigger("updatenav")):"centered"===b.st.mode.type&&b.slides.number<2?(b.noslide=!0,b._transitionstart(0,0,"easeinoutsine",!0),b.cont.$el.css("left",-b.cont.width/2),b.lockleft=!0,b.lockright=!0,b.ev.trigger("updatenav")):(b.noslide=!1,b.cont.$el.css("left",""),b.lockright?(b.lockleft=!1,b.lockright=!0,b.ev.trigger("lockright").trigger("updatenav")):b.currslide<=0?(b.lockleft=!0,b.lockright=!1,b.ev.trigger("lockleft").trigger("updatenav")):b.currslide>0&&(b.lockleft=!1,b.lockright=!1,b.ev.trigger("updatenav")))},_unifiedevent:function(a){return void 0!==a.originalevent.touches&&a.originalevent.touches[0]&&(a.pagex=a.originalevent.touches[0].pagex,a.pagey=a.originalevent.touches[0].pagey),a},_unifiedx:function(){var a=this,b=0,c=a.cont.$el.css("transform");if(c)var d=c.split(", ");return b=a.features.css3d&&"none"!==c&&"matrix(1"===d[0]?parsefloat(d[4]):a.features.css3d&&"none"!==c&&"matrix3d(1"===d[0]?parsefloat(d[12]):parsefloat(a.cont.$el.css("left"))},_bindevents:function(){var b=this;b.st.transformenable&&b.wrap.$el.on("mousedown.theslider touchstart.theslider",function(c){"touchstart"!=c.type&&c.preventdefault(),b._onstart(b._unifiedevent(c)),a(document).on("mousemove.theslider touchmove.theslider",function(a){b._onmove(b._unifiedevent(a))}),a(document).on("mouseup.theslider mouseleave.theslider touchend.theslider touchcancel.theslider",function(c){a(document).off("mousemove.theslider mouseup.theslider mouseleave.theslider touchmove.theslider touchend.theslider touchcancel.theslider"),b._onstop(b._unifiedevent(c))})})},_unbindevents:function(){var b=this;b.wrap.$el.off("mousedown.theslider touchstart.theslider"),a(document).off("mousemove.theslider mouseup.theslider mouseleave.theslider touchmove.theslider touchend.theslider touchcancel.theslider")},_onstart:function(a){var b=this;b.drag.ismoving||b.sliderlock||(b.drag.ismoving=!0,b.drag.startx=a.pagex,b.drag.starty=a.pagey,b.cont.startx=b._unifiedx(),b.drag.offsetx=0,b.drag.offsety=0,b.drag.lockx=!1,b.drag.locky=!1)},_onmove:function(a){var b=this,c=0;b.ev.trigger("psonmove"),b.drag.ismoving&&(b.drag.offsetx=a.pagex-b.drag.startx,b.drag.offsety=a.pagey-b.drag.starty,math.abs(b.drag.offsetx)>=b.st.threshold-1&&math.abs(b.drag.offsetx)>math.abs(b.drag.offsety)&&!b.drag.lockx?(b.drag.lockx=!1,b.drag.locky=!0,"touchmove"==a.type&&(b.drag.offsety=0)):math.abs(b.drag.offsety)>=b.st.threshold-1&&math.abs(b.drag.offsetx)-b.cont.width+b.viewport.width()?b.cont.instantx:b.cont.instantx>=0?b.cont.instantx/4:-b.cont.width+b.viewport.width()+(b.cont.width-b.viewport.width()+b.cont.instantx)/4,b._dodrag(c)),b.st.autoplay.enabled&&b.pause()},_onstop:function(a){var b=this;return b.ev.trigger("psonstop"),b.drag.ismoving&&(b.cont.instantx=b.cont.startx+b.drag.offsetx,math.abs(b.drag.offsetx)>b.st.threshold&&(b.wrap.$el.addclass("ts-interceptclicks"),b.wrap.$el.one("click.preventclick",function(a){a.preventdefault(),a.stopimmediatepropagation(),a.stoppropagation()}),window.settimeout(function(){b.wrap.$el.off("click.preventclick"),b.wrap.$el.removeclass("ts-interceptclicks")},301)),b._autoadjust(),b._setsliderheight(),b.cont.startx=0,b.cont.instantx=0,b.drag.ismoving=!1,b.drag.startx=0,b.drag.starty=0,b.drag.offsetx=0,b.drag.offsety=0,b.drag.lockx=!1,b.drag.locky=!1),b.st.autoplay.enabled&&b.play(),!1},_dodrag:function(a){var b=this;if(b.st.transformenable)if(b.features.css3d){var c={};c[b.features.vendor+"transform"]="translate3d("+a+"px,0,0)",c.transform="translate3d("+a+"px,0,0)",c[b.vendor+"transition"]="",c.transition="",b.cont.$el.css(c)}else b.cont.$el.css({left:a})},_calccurrslide:function(a){var b=this,c=b.slides.number-1;return b.slides.$items.each(function(d){if(a>b.slides.position[d])return c=d-1,!1}),c<0&&(c=0),c},_isrightexceed:function(a){var b=this,c=0;return c="centered"===b.st.mode.type?b.slides.position[b.slides.number-1]:-b.cont.width+b.viewport.width(),a=0)b=a.slides.position[0],a.currslide=0,a.lockleft=!0,a.lockright=!1,a.ev.trigger("lockleft").trigger("updatenav");else if(a._isrightexceed(a.cont.instantx))b="centered"===a.st.mode.type?a.slides.position[a.slides.number-1]:-a.cont.width+a.viewport.width(),a.currslide=a._calccurrslide(b),a.lockleft=!1,a.lockright=!0,a.ev.trigger("lockright").trigger("updatenav");else if(a.drag.offsetx<-a.st.threshold){if(d=a._calccurrslide(a.cont.instantx)+1,a._isrightexceed(a.slides.position[d])){for(b=-a.cont.width+a.viewport.width(),i=d;i>=0;i--)if(!a._isrightexceed(a.slides.position[i])){d=i;break}a.lockleft=!1,a.lockright=!0,a.ev.trigger("lockright").trigger("updatenav")}else b=a.slides.position[d],da.st.threshold?(a.currslide=a._calccurrslide(a.cont.instantx),b=a.slides.position[a.currslide],a.currslide>0?(a.lockleft=!1,a.lockright=!1,a.ev.trigger("updatenav")):(a.lockleft=!0,a.lockright=!1,a.ev.trigger("lockleft").trigger("updatenav"))):b=a.cont.startx;c=10*math.sqrt(math.abs(a.cont.instantx-b))+100,a._transitionstart(b,c,"easeoutsine")},_transitionstart:function(b,c,d,e){var f=this,g={},h=a.rscss3easing[d];return f._transitionend(),f.ev.trigger("beforetransition"),e?(f.st.transformenable&&(f.features.css3d?(g[f.features.vendor+"transform"]="translate3d("+b+"px,0,0)",g.transform="translate3d("+b+"px,0,0)"):g.left=b),f.cont.$el.css(g),!1):(f.ev.trigger("beforetransition"),f.sliderlock=!0,cleartimeout(f.locktimeout),f.locktimeout=settimeout(function(){f.sliderlock=!1,f.ev.trigger("aftertransition")},c),void(f.st.transformenable&&(f.features.css3d?(g[f.features.vendor+"transform"]="translate3d("+b+"px,0,0)",g.transform="translate3d("+b+"px,0,0)",g[f.features.vendor+"transition"]="all "+c+"ms "+h,g.transition="all "+c+"ms "+h,f.cont.$el.css(g),f.cont.$el.one("webkittransitionend otransitionend otransitionend mstransitionend transitionend",function(){})):f.cont.$el.animate({left:b},c,d))))},_transitionend:function(){var a=this;if(a.ev.trigger("pstransitionend"),a.st.transformenable)if(a.features.css3d){var b={};b[a.vendor+"transition"]="",b.transition="",a.cont.$el.css(b)}else a.cont.$el.stop()},_transitioncancel:function(){var a=this,b=a.cont.$el.position().left,c={};if(c[a.vendor+"transition"]="",c.transition="",a.cont.$el.off("webkittransitionend otransitionend otransitionend mstransitionend transitionend"),a.st.transformenable)if(a.features.css3d){var d=a.cont.$el.css("transform"),e=d.split(", ");b=e[4],c[a.features.vendor+"transform"]="translate3d("+b+"px,0,0)",c.transform="translate3d("+b+"px,0,0)",a.cont.$el.css(c)}else a.cont.$el.stop(),a.cont.$el.animate({left:b},duration,easing)},pause:function(){var a=this;a.ev.trigger("autoplaypause"),a._autoplayrunning=!1,a._autoplaytimeout&&(cleartimeout(a._autoplaytimeout),a._autoplaytimeout=null)},slideto:function(a,b){var c=this,d=c.slides.position[a],e=0,f=c.currslide;return c.pause(),c.ev.trigger("psbeforeanimstart"),!c.noslide&&(c._transitionend(),d>=c.slides.position[0]?(c.currslide=0,c.lockleft=!0,c.lockright=!1,c.ev.trigger("lockleft").trigger("updatenav")):c._isrightexceed(d)||a>=c.slides.number-1?("centered"===c.st.mode.type?(d=c.slides.position[a],c.currslide=a):(d=-c.cont.width+c.viewport.width(),c.currslide=c._calccurrslide(d)),c.lockleft=!1,c.lockright=!0,c.ev.trigger("lockright").trigger("updatenav")):(c.currslide=a,c.lockleft=!1,c.lockright=!1,c.ev.trigger("updatenav")),e=10*math.sqrt(math.abs(c.slides.position[f]-d))+100,c._transitionstart(d,e,"easeinoutsine",b),c.st.autoplay.enabled&&c.play(),void(c.st.calcautoheight&&c._setsliderheight()))},startplay:function(){var a=this;a.ev.trigger("autoplayplay"),a.currslide+1<=a.slides.number-1&&!a.lockright?a.slideto(a.currslide+1):a.currslide>=a.slides.number-1&&a.st.autoplay.loop?a.slideto(0):a.lockright&&a.st.autoplay.loop&&a.slideto(0)},play:function(){var a=this;a.ev.trigger("autoplayplay"),a._autoplayrunning=!0,a._autoplaytimeout&&cleartimeout(a._autoplaytimeout),a._autoplaytimeout=settimeout(function(){a.startplay()},a.st.autoplay.delay)},slidenext:function(){var a=this;return a.currslide+1<=a.slides.number-1&&void a.slideto(a.currslide+1)},slideprev:function(){var a=this;if(a.currslide-1>=0)a.slideto(a.currslide-1);else{if(0!=a.currslide||0!=a.lockleft)return!1;a.slideto(a.currslide)}},update:function(){var a=this;a._calcslidersize(),a._resizeimage(),a._setsliderwidth(),a._adjustslides(),a._setsliderheight(),a._dodrag(),a.noslide?(a.slideto(0,!0),a._unbindevents()):(a.slideto(a.currslide,!0),a._bindevents())}},a.fn.thephotoslider=function(b){return this.each(function(){new a.thephotoslider(this,b)})};var j=a(".photo-scroller");j.length>0&&(a.fn.photoslider=function(){function b(a){"37"==a.keycode?f.noslide||f.slideprev():"39"==a.keycode&&(f.noslide||f.slidenext())}var c=a(this),j={},k="";$elparent=c.parents(".photo-scroller"),j.$items=c.children("figure"),j.count=j.$items.length,j.$items.each(function(b){var c=a(this),d=c.children().first().remove(),e=d.attr("href"),f=d.children("img"),g=f.attr("src"),h=f.attr("alt")||"",i=f.attr("data-src"),j=(f.attr("data-srcset"),f.attr("class"));if(f.hasclass("lazy-load"))var l="layzr-bg";else var l="";c.find("figcaption").addclass("caption-"+(b+1));var m=a(this).find("figcaption").clone(!0);if(a(".slide-caption").append(m),parseint($elparent.attr("data-thumb-width"))>0){var n=parseint($elparent.attr("data-thumb-width")),o=parseint($elparent.attr("data-thumb-height"));$elparent.removeclass("proportional-thumbs")}else{var n=parseint(f.attr("width")),o=parseint(f.attr("height"));$elparent.addclass("proportional-thumbs")}k=k+'
'+h+'
',c.prepend('
'+h+'
')}),$elparent.append(''),c.addclass("ts-cont"),c.wrap('
');var l=c.parents(".ts-wrap"),m=e.width(),n=$elparent,o="true"==n.attr("data-autoslide"),p=n.attr("data-delay")&&parseint(n.attr("data-delay"))>999?parseint(n.attr("data-delay")):5e3,q="true"===n.attr("data-loop"),r=n.attr("data-thumb-height")?parseint(n.attr("data-thumb-height"))+10:90,s=n.attr("data-transparency")?n.attr("data-transparency"):.5,t=(a("#wpadminbar").length>0?a("#wpadminbar").height():0,n.attr("data-ls-min")?parseint(n.attr("data-ls-min")):0),u=n.attr("data-ls-max")?parseint(n.attr("data-ls-max")):100,v=n.attr("data-ls-fill-dt")?n.attr("data-ls-fill-dt"):"fill",w=n.attr("data-ls-fill-mob")?n.attr("data-ls-fill-mob"):"fit",x=n.attr("data-pt-min")?parseint(n.attr("data-pt-min")):0,y=n.attr("data-pt-max")?parseint(n.attr("data-pt-max")):100,z=n.attr("data-pt-fill-dt")?n.attr("data-pt-fill-dt"):"fill",a=n.attr("data-pt-fill-mob")?n.attr("data-pt-fill-mob"):"fit",b=n.attr("data-padding-side")?parseint(n.attr("data-padding-side")):0;u<=0&&(u=100),y<=0&&(y=100),u760?n.attr("data-padding-top"):0,d=n.attr("data-padding-bottom")&&m>760?n.attr("data-padding-bottom"):0,e=l.find(".ts-viewport");e.css({"margin-top":c+"px","margin-bottom":d+"px"}),e.on("debouncedresize",function(){c=n.attr("data-padding-top")&&e.width()>760?n.attr("data-padding-top"):0,d=n.attr("data-padding-bottom")&&e.width()>760?n.attr("data-padding-bottom"):0,e.width()>760?e.css({"margin-top":c+"px","margin-bottom":d+"px"}):e.css({"margin-top":"0px","margin-bottom":"0px"})});var f=l.thephotoslider({mode:{type:"centered",lsminw:t,lsmaxw:u,ptminw:x,ptmaxw:y},height:function(){var b=e.height(),c=a("#wpadminbar").height();if(a(".mixed-header").length>0&&!$elparent.hasclass("full-screen"))var f=a(".mixed-header").height();else if($elparent.hasclass("full-screen"))var f=0;else var f=a(".masthead").height();if($elparent.hasclass("full-screen"))var c=0;return d.hasclass("transparent")||l.parents(".photo-scroller").hasclass("full-screen")?window.innerwidth0||l.parents(".photo-scroller").hasclass("full-screen")?window.innerwidth0?b-c-d-f-c:b-c-d-c:a(".side-header").length>0||l.parents(".photo-scroller").hasclass("full-screen")?window.innerwidth
'+k+"
");l.after(g);var h=g.thephotoslider({mode:{type:"scroller"},height:r}).data("thephotoslider");if(a(".prev",j).click(function(){f.noslide||f.slideprev()}),a(".next",j).click(function(){f.noslide||f.slidenext()}),f.ev.on("updatenav sliderready",function(){f.lockright?a(".next",$elparent).addclass("disabled"):a(".next",$elparent).removeclass("disabled"),f.lockleft?a(".prev",$elparent).addclass("disabled"):a(".prev",$elparent).removeclass("disabled")}),navigator.useragent.match(/trident.*rv\:11\./)&&g&&f){var i=h.attr("style");h.attr("style",i+"; top:"+f.wrap.height+"px !important;")}g&&!navigator.useragent.match(/trident.*rv\:11\./)&&(a.isfunction(dtglobals.resetsizes)&&dtglobals.resetsizes(f.wrap.height),a.isfunction(dtglobals.resetmobilesizes)&&dtglobals.resetmobilesizes(f.wrap.height)),window.addeventlistener("keydown",b,!1),f.ev.on("sliderready beforetransition",function(){f.slides.$items.removeclass("act"),f.slides.$items.eq(f.currslide).addclass("act"),h.slides.$items.removeclass("act"),h.slides.$items.eq(f.currslide).addclass("act"),f.slides.$items.eq(f.currslide).hasclass("ts-video")?f.slides.$items.parents(".ts-wrap ").addclass("hide-slider-overlay"):f.slides.$items.eq(f.currslide).find(".ps-link").length>0?f.slides.$items.parents(".ts-wrap ").addclass("hide-slider-overlay"):f.slides.$items.parents(".ts-wrap ").removeclass("hide-slider-overlay");var b=f.slides.$items.eq(f.currslide).find("figcaption").attr("class");a(".slide-caption > figcaption").removeclass("actcaption"),a(".slide-caption > ."+b).addclass("actcaption")}),f.ev.on("aftertransition",function(){var a=-h._unifiedx(),b=a+h.wrap.width,c=-h.slides.position[f.currslide],d=c+h.slides.width[f.currslide];if(c-=50,d+=50,c=0;i--){c+=50,d-=50;var e=-h.slides.position[i],f=e+h.wrap.width;if(d>f){h.slideto(i+1);break}0===i&&h.slideto(0)}else d>b&&h.slideto(f.currslide)}),g.addclass("scroller-thumbnails"),h.slides.$items.each(function(b){a(this).on("click",function(c){var d=a(this);d.parents(".ts-wrap").hasclass("ts-interceptclicks")||f.slideto(b)})}),a(".scroller-thumbnails").layzrinitialisation(),f.slides.$items.each(function(b){a(this).on("click",function(c){var d=a(this);d.parents(".ts-wrap").hasclass("ts-interceptclicks")||f.slideto(b)})});var j=l.parents(".photo-scroller");f.st.autoplay.enabled&&a(".auto-play-btn",j).addclass("paused"),a(".auto-play-btn",j).on("click",function(b){b.preventdefault();var c=a(this);c.hasclass("paused")?(c.removeclass("paused"),f.noslide||f.pause(),f.st.autoplay.enabled=!1):(c.addclass("paused"),f.noslide||f.play(),f.st.autoplay.enabled=!0)})},a(".photoslider:not(.slider-simple)").photoslider(),a(".photoslider").parents(".photo-scroller").css("visibility","visible"),dtglobals.iswindowsphone||(a(".full-screen-btn").each(function(){var b=a(this),c=b.parents(".photo-scroller"),d=c.find(".ts-wrap");document.addeventlistener("fullscreenchange",function(){if(!document.fullscreen){b.removeclass("act"),c.removeclass("full-screen"),a("body, html").css("overflow","");var e=d.data("thephotoslider");"undefined"!=typeof e&&e.update()}},!1),document.addeventlistener("mozfullscreenchange",function(){document.mozfullscreen||(b.removeclass("act"),c.removeclass("full-screen"),a("body, html").css("overflow",""))},!1),document.addeventlistener("webkitfullscreenchange",function(){if(!document.webkitisfullscreen){b.removeclass("act"),c.removeclass("full-screen"),a("body, html").css("overflow","");var e=d.data("thephotoslider");"undefined"!=typeof e&&e.update()}},!1),e.on("debouncedresize",function(){var a=d.data("thephotoslider");"undefined"!=typeof a&&a.update()})}),this.fullscreenmode=document.fullscreen||document.mozfullscreen||document.webkitisfullscreen,a(".full-screen-btn").on("click",function(d){d.preventdefault();var e=a(this),f=e.parents(".photo-scroller"),g=f.find(".ts-wrap");f.find(".scroller-thumbnails").data("thephotoslider"),g.data("thephotoslider");e.parents(".photo-scroller").find("figure").animate({opacity:0},150),e.hasclass("act")?(e.removeclass("act"),c(),f.removeclass("full-screen"),settimeout(function(){e.parents(".photo-scroller").find("figure").delay(600).animate({opacity:1},300)},300)):(e.addclass("act"),f.addclass("full-screen"),b(document.documentelement),a("body, html").css("overflow","hidden"),settimeout(function(){e.parents(".photo-scroller").find("figure").delay(600).animate({opacity:1},300)},300));var h=g.data("thephotoslider");"undefined"!=typeof h&&h.update()})),j.each(function(){var b=a(this);a(".btn-cntr, .slide-caption",b).css({bottom:parseint(b.attr("data-thumb-height"))+15}),b.hasclass("hide-thumbs")&&(b.find(".hide-thumb-btn").addclass("act"),a(".scroller-thumbnails",b).css({bottom:-(parseint(b.attr("data-thumb-height"))+20)}),a(".btn-cntr, .slide-caption",b).css({bottom:"5px"}))}),a(".hide-thumb-btn").on("click",function(b){b.preventdefault();var c=a(this),d=c.parents(".photo-scroller");c.hasclass("act")?(c.removeclass("act"),d.removeclass("hide-thumbs"),a(".scroller-thumbnails",d).css({bottom:0}),a(".btn-cntr, .slide-caption",d).css({bottom:parseint(d.attr("data-thumb-height"))+15})):(c.addclass("act"),d.addclass("hide-thumbs"),a(".scroller-thumbnails",d).css({bottom:-(parseint(d.attr("data-thumb-height"))+20)}),a(".btn-cntr, .slide-caption",d).css({bottom:"5px"}))}));var k=a(".rshomeporthole");if(k.exists()){var l={};l.container=a("#main-slideshow"),l.hendheld=!!(e.width()<740&&dtglobals.ismobile),a("#main-slideshow-content").appendto(l.container),a.fn.portholescroller=function(){var b=a(this),c={},d="";c.$items=b.children("li"),c.count=c.$items.length,c.$items.each(function(b){var c=a(this),e=c,f=e.children("img"),g=f.attr("data-rstmb"),h=f.attr("alt")||"",i=(f.attr("data-src"),f.attr("data-srcset"),f.attr("class"));if(f.hasclass("lazy-load"))var j="layzr-bg";else var j="";d=d+'
'+h+'
'}),b.addclass("ts-cont"),b.wrap('
');var i=b.parents(".ts-wrap"),j=b.parents("#main-slideshow"),k=(e.width(),j.attr("data-padding-side")?parseint(j.attr("data-padding-side")):0,!("true"==j.attr("data-paused")||"undefined"==typeof j.attr("data-autoslide")||e.width()<740&&dtglobals.ismobile)),l=j.attr("data-autoslide")&&parseint(j.attr("data-autoslide"))>999?parseint(j.attr("data-autoslide")):5e3,m="undefined"!=typeof j.attr("data-autoslide"),n=j.attr("data-width")?parseint(j.attr("data-width")):800,o=j.attr("data-height")?parseint(j.attr("data-height")):400,p=j.attr("data-scale")?j.attr("data-scale"):"none",q=i.thephotoslider({mode:{type:"slider"},height:o,width:n,resizeimg:!0,imagescalemode:p,imagealigncenter:!0,autoplay:{enabled:k,delay:l,loop:m}}).data("thephotoslider"),r=a('
'+d+"
");i.append(r);var s=a(".ps-thumb-img ");s.each(function(b){a(this).on("click",function(c){a(this);q.slideto(b)})}),a(".psthumbscontainer").after('
'),$progresswrap=a(".psthumbscontainer").next(),$progresshtml='
',q.st.autoplay.enabled&&$progresswrap.find(".progress-mask").length<1&&$progresswrap.prepend($progresshtml),q.ev.on("autoplayplay",function(){$progresswrap.find(".progress-mask").length<1&&$progresswrap.prepend($progresshtml),$progresswrap.removeclass("paused")}),q.ev.on("autoplaypause",function(){$progresswrap.find(".progress-mask").remove(),k||$progresswrap.addclass("paused")}),q.ev.on("sliderready beforetransition",function(){var b=40*-q.currslide;0==b&&(b=20),s.removeclass("psnavselected psnavprev psnavnext psnavvis"),s.eq(q.currslide).addclass("psnavselected"),s.eq(q.currslide).prev().addclass("psnavprev"),s.eq(q.currslide).next().addclass("psnavnext"),s.eq(q.currslide).prev().prev().addclass("psnavvis"),s.eq(q.currslide).next().next().addclass("psnavvis"),a(".psthumbscontainer").css({transform:"translatey("+b+"px)"})}),q.ev.on("sliderready beforetransition",function(){$progresswrap.addclass("blurred")}),q.ev.on("sliderready aftertransition",function(){$progresswrap.removeclass("blurred")});var t;if(e.on("resize",function(){cleartimeout(t),t=settimeout(function(){$progresswrap.removeclass("blurred"); },200)}),navigator.useragent.match(/trident.*rv\:11\./)&&g&&f){var u=h.attr("style");h.attr("style",u+"; top:"+q.wrap.height+"px !important;")}g&&!navigator.useragent.match(/trident.*rv\:11\./)&&(a.isfunction(dtglobals.resetsizes)&&dtglobals.resetsizes(q.wrap.height),a.isfunction(dtglobals.resetmobilesizes)&&dtglobals.resetmobilesizes(q.wrap.height)),a('
').insertafter(b),a(".leftarrow",i).click(function(){q.noslide||q.slideprev()}),a(".rightarrow",i).click(function(){q.noslide||q.slidenext()}),q.ev.on("updatenav sliderready",function(){q.lockright?a(".rightarrow",i).addclass("disabled"):a(".rightarrow",i).removeclass("disabled"),q.lockleft?a(".leftarrow",i).addclass("disabled"):a(".leftarrow",i).removeclass("disabled"),q.lockright&&q.lockleft&&j.addclass("hide-arrows")}),"true"===j.attr("data-paused")&&$progresswrap.addclass("paused"),$progresswrap.on("click",function(b){b.preventdefault();var c=a(this);c.hasclass("paused")?(c.removeclass("paused"),$progresswrap.find(".progress-mask").length<1&&$progresswrap.prepend($progresshtml),q.noslide||q.play(),q.st.autoplay.enabled=!0):(c.addclass("paused"),q.noslide||q.pause(),q.st.autoplay.enabled=!1,$progresswrap.find(".progress-mask").remove())})},k.portholescroller(),k.css("visibility","visible"),a(".ts-wrap .dt-pswp-item").each(function(){var b=a(this);b.parents().removeclass("photoswipe-wrapper").parents("li").addclass("photoswipe-wrapper")})}});