Y.use("node","squarespace-image-loader",function(a){a.on("domready",function(){function f(){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?(d=!0,e=!1):"Fill"==b&&(d=!1,e=!0);g="true"===a.Squarespace.Template.getTweakValue("gallery-auto-play")+"";galleryTransition=a.Squarespace.Template.getTweakValue("gallery-transition").toLowerCase(); gallerySpeed=a.Squarespace.Template.getTweakValue("@gallerySpeed");c=new a.Squarespace.Gallery2({container:a.one("#slideshow"),elements:{next:".next-slide",previous:".prev-slide",currentIndex:".currentIndex",totalSlides:".totalSlides"},loop:!0,autoplay:g,design:"stacked",designOptions:{autoHeight:!1,speed:gallerySpeed,transition:galleryTransition},loaderOptions:{fill:e,fit:d}})}}a.all("#topNav .subnav").each(function(a){a.setStyle("marginLeft",-(parseInt(a.getComputedStyle("width"),10)/2)+"px")}); if(a.one("body").hasClass("collection-type-gallery")){f();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"))})});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(){f();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 h=a.one("#sidebarWrapper");a.one("#page").setStyle("minHeight",h.get("offsetHeight"))}var c,d,e,g})});