Y.use("node","squarespace-gallery-ng",function(a){a.on("domready",function(){function j(){if(800>parseInt(a.one("body").getComputedStyle("width"),10)&&a.one("body.mobile-style-available"))a.all(".slide img[data-src]").each(function(a){ImageLoader.load(a,{load:!0})});else if(!c){var b=a.Squarespace.Template.getTweakValue("gallery-style");"Fit"==b?(e=!0,g=!1):"Fill"==b&&(e=!1,g=!0);h="true"===a.Squarespace.Template.getTweakValue("gallery-auto-play")+"";galleryTransition=a.Squarespace.Template.getTweakValue("gallery-transition"); gallerySpeed=a.Squarespace.Template.getTweakValue("gallerySpeed");gallerySpeed=parseFloat(gallerySpeed)||0.1;gallerySpeed=Math.max(gallerySpeed,0.1);autoplaySpeed=1E3*a.Squarespace.Template.getTweakValue("autoplaySpeed");autoplaySpeed=parseFloat(autoplaySpeed)||4E3;autoplaySpeed=Math.max(autoplaySpeed,100);if("string"==typeof galleryTransition)galleryTransition=galleryTransition.toLowerCase();else return!1;"ken burns"==galleryTransition&&(galleryTransition=galleryTransition.replace(" b","B"),h=!0); c=new a.Squarespace.Gallery2({container:a.one("#slideshow"),elements:{next:".next-slide, .gallery-next",previous:".prev-slide, .gallery-prev",currentIndex:".currentIndex",totalSlides:".totalSlides"},loop:!0,autoplay:h,autoplayOptions:{timeout:autoplaySpeed},design:"stacked",designOptions:{autoHeight:!1,speed:gallerySpeed,transition:galleryTransition},historyHash:!0,loaderOptions:{fill:g,fit:e}})}}function k(){if(a.one(".header-alignment-center")&&a.one(".header-navigation-split")){var b=a.one(".secondary-nav.desktop-nav"), d=a.one(".main-nav.desktop-nav"),i=a.one("#logo .logo"),c,e,f=[];d&&(b&&"none"!=d.getComputedStyle("display"))&&(e=d.getX()+d.get("clientWidth"),c=b.getX(),f.push(i.getX()),f.push(i.getX()+i.get("clientWidth")),cf[0]?(d.setStyle("marginBottom","-10px"),b.setStyle("marginBottom","-10px")):(d.setStyle("marginBottom",""),b.setStyle("marginBottom","")))}}navigator.userAgent.match(/Trident.*rv[ :]*11\./)&&a.one("body").addClass("ie11");a.all("#topNav .subnav").each(function(a){a.setStyle("marginLeft", -(parseInt(a.getComputedStyle("width"),10)/2)+"px")});a.one("h1.logo")&&a.one("h1.logo").ancestor("#logo")&&a.all("h1.logo").each(function(b){b.plug(a.Squarespace.TextShrink,{parentEl:b.ancestor("#logo")})});if(a.one("body").hasClass("collection-type-gallery")){j();if(a.Squarespace.Management)a.Squarespace.Management.on("tweak",function(b){"gallery-auto-play"==b.getName()?a.Squarespace.GalleryManager._galleries[0].set("autoplay","true"===a.Squarespace.Template.getTweakValue("gallery-auto-play")+""): "gallery-style"==b.getName()?a.all("#slideshow .slide img").each(function(a){var c=b.getValue();a&&a.loader&&("Fit"==c?a.loader.set("mode","fit"):"Fill"==c&&a.loader.set("mode","fill"))}):"gallerySpeed"==b.getName()?a.Squarespace.GalleryManager._galleries[0].set("designOptions.speed",b.getValue()):"autoplaySpeed"==b.getName()&&a.Squarespace.GalleryManager._galleries[0].set("autoplayOptions.timeout",1E3*b.getValue())});a.Global.on("tweak:reset",function(){c.fire("refresh")});a.Global.on("tweak:close", function(){setTimeout(function(){a.all(".slide img[data-src]").each(function(a){a.fire("refresh")})},2E3)});a.on("windowresize",function(){j();a.all(".slide img[data-src]").each(function(a){a.fire("refresh")})})}a.one("#mobileMenuLink a").on("click",function(){var b=parseInt(a.one("#mobileNav .wrapper").get("offsetHeight"),10);a.one("#mobileNav").hasClass("menu-open")?(new a.Anim({node:a.one("#mobileNav"),to:{height:0},duration:0.5,easing:"easeBoth"})).run():(new a.Anim({node:a.one("#mobileNav"), to:{height:b},duration:0.5,easing:"easeBoth"})).run();a.one("#mobileNav").toggleClass("menu-open")});if(a.one("body").hasClass("collection-type-blog")){var l=a.one("#sidebarWrapper");a.one("#page").setStyle("minHeight",l.get("offsetHeight"))}var c,e,g,h;k();a.on("windowresize",function(){k()})})});