1jQuery.fn.setAllToMaxHeight=function(){return this.height(Math.max.apply(this,jQuery.map(this,function(e){return jQuery(e).height()})))},window.is_ie=/MSIE|Trident/i.test(navigator.userAgent),Sunrise.Sections=function(){this.constructors={},this.instances=[],$(document).on("shopify:section:load",this._onSectionLoad.bind(this)).on("shopify:section:unload",this._onSectionUnload.bind(this)).on("shopify:section:select",this._onSelect.bind(this)).on("shopify:section:deselect",this._onDeselect.bind(this)).on("shopify:block:select",this._onBlockSelect.bind(this)).on("shopify:block:deselect",this._onBlockDeselect.bind(this))},Sunrise.Sections.prototype=_.assignIn({},Sunrise.Sections.prototype,{_createInstance:function(container,constructor){var $container=$(container),id=$container.attr("data-section-id"),type=$container.attr("data-section-type");if(constructor=constructor||this.constructors[type],!_.isUndefined(constructor)){var instance=_.assignIn(new constructor(container),{id:id,type:type,container:container});this.instances.push(instance)}},_onSectionLoad:function(evt){var container=$("[data-section-id]",evt.target)[0];container&&this._createInstance(container)},_onSectionUnload:function(evt){this.instances=_.filter(this.instances,function(instance){var isEventInstance=instance.id===evt.detail.sectionId;return isEventInstance&&_.isFunction(instance.onUnload)&&instance.onUnload(evt),!isEventInstance})},_onSelect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onSelect)&&instance.onSelect(evt)},_onDeselect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onDeselect)&&instance.onDeselect(evt)},_onBlockSelect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onBlockSelect)&&instance.onBlockSelect(evt)},_onBlockDeselect:function(evt){var instance=_.find(this.instances,function(instance2){return instance2.id===evt.detail.sectionId});!_.isUndefined(instance)&&_.isFunction(instance.onBlockDeselect)&&instance.onBlockDeselect(evt)},register:function(type,constructor){this.constructors[type]=constructor,$("[data-section-type="+type+"]").each(function(index,container){this._createInstance(container,constructor)}.bind(this))}}),Sunrise.customerTemplates=(function(){function initEventListeners(){$("#recover-password").on("click",function(evt){evt.preventDefault(),toggleRecoverPasswordForm()}),$("#hide-password-form").on("click",function(evt){evt.preventDefault(),toggleRecoverPasswordForm()})}function toggleRecoverPasswordForm(){$("#recover-password-form").toggleClass("hide"),$("#customer-login-form").toggleClass("hide")}function resetPasswordSuccess(){var $formState=$(".reset-password-success");$formState.length&&$("#reset-success").removeClass("hide")}function customerAddressForm(){var $newAddressForm=$("#AddressNewForm");$newAddressForm.length&&(Shopify&&new Shopify.CountryProvinceSelector("address_country_new","address_province_new",{hideElement:"address_province_container_new"}),$(".address-country-option").each(function(){var formId=$(this).data("form-id"),countrySelector="address_country_"+formId,provinceSelector="address_province_"+formId,containerSelector="address_province_container_"+formId;new Shopify.CountryProvinceSelector(countrySelector,provinceSelector,{hideElement:containerSelector})}),$(".address-new-toggle").on("click",function(e){e.preventDefault(),$newAddressForm.toggleClass("hide")}),$(".address-edit-toggle").on("click",function(e){e.preventDefault();var formId=$(this).data("form-id");$("#edit_address_"+formId).toggleClass("hide")}),$(".address-delete").on("click",function(e){e.preventDefault();var $el=$(this),formId=$el.data("form-id"),confirmMessage=$el.data("confirm-message");confirm(confirmMessage||"Are you sure you wish to delete this address?")&&Shopify.postLink("/account/addresses/"+formId,{parameters:{_method:"delete"}})}))}function checkUrlHash(){var hash=window.location.hash;
1hash==="#recover"&&toggleRecoverPasswordForm()}return{init:function(){checkUrlHash(),initEventListeners(),resetPasswordSuccess(),customerAddressForm()}}})(),Sunrise.Images=(function(){function preload(images,size){typeof images=="string"&&(images=[images]);for(var i=0;i<images.length;i++){var image=images[i];this.loadImage(this.getSizedImageUrl(image,size))}}function loadImage(path){new Image().src=path}function switchImage(image,element,callback){var size=this.imageSize(element.src),imageUrl=this.getSizedImageUrl(image.src,size);callback?callback(imageUrl,image,element):element.src=imageUrl}function imageSize(src){var match=src.match(/.+_((?:pico|icon|thumb|small|compact|medium|large|grande)|\d{1,4}x\d{0,4}|x\d{1,4})[_\.@]/);return match!==null?match[1]:null}function getSizedImageUrl(src,size){if(size==null)return src;if(size==="master")return this.removeProtocol(src);var match=src.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?$/i);if(match!=null){var prefix=src.split(match[0]),suffix=match[0];return this.removeProtocol(prefix[0]+"_"+size+suffix)}return null}function removeProtocol(path){return path.replace(/http(s)?:/,"")}return{preload:preload,loadImage:loadImage,switchImage:switchImage,imageSize:imageSize,getSizedImageUrl:getSizedImageUrl,removeProtocol:removeProtocol}})(),Sunrise.Currency=(function(){var moneyFormat=Sunrise.strings.money_format;function formatMoney(cents,format){typeof cents=="string"&&(cents=cents.replace(".",""));var value="",placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,formatString=format||moneyFormat;function defaultOption(opt,def){return typeof opt=="undefined"?def:opt}function formatWithDelimiters(number,precision,thousands,decimal){if(precision=defaultOption(precision,2),thousands=defaultOption(thousands,","),decimal=defaultOption(decimal,"."),isNaN(number)||number==null)return 0;number=(number/100).toFixed(precision);var parts=number.split("."),dollarsAmount=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),centsAmount=parts[1]?decimal+parts[1]:"";return dollarsAmount+centsAmount}switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break;case"amount_no_decimals_with_space_separator":value=formatWithDelimiters(cents,0," ");break}return formatString.replace(placeholderRegex,value)}return{formatMoney:formatMoney}})(),Sunrise.Variants=(function(){function Variants(options){this.$container=options.$container,this.product=options.product,this.enableHistoryState=options.enableHistoryState,this.singleOptionSelector=options.singleOptionSelector,this.originalSelectorId=options.originalSelectorId,this.currentVariant=this._getVariantFromOptions(),$(this.singleOptionSelector,this.$container).on("change",this._onSelectChange.bind(this))}return Variants.prototype=_.assignIn({},Variants.prototype,{_getCurrentOptions:function(){var currentOptions=_.map($(this.singleOptionSelector,this.$container),function(element){var $element=$(element),currentOption={};return currentOption.value=$element.val(),currentOption.index=$element.data("index"),currentOption});return currentOptions},_getVariantFromOptions:function(){var selectedValues=this._getCurrentOptions(),variants=this.product.variants,found=_.find(variants,function(variant){return selectedValues.every(function(values){return _.isEqual(variant[values.index],values.value)})});return found},_onSelectChange:function(){var options=this._getCurrentOptions(),variant=this._getVariantFromOptions(options);this.$container.trigger({type:"variantChange",variant:variant}),variant&&(this._updateMasterSelect(variant),this._updateImages(variant),this._updatePrice(variant),this._updateSKU(variant),this.currentVariant=variant,this.enableHistoryState&&this._updateHistoryState(variant))},_updateImages:function(variant){var variantImage=variant.featured_image||{},currentVariantImage=this.currentVariant.featured_image||{};!variant.featured_image||variantImage.src===currentVariantImage.src||this.$container.trigger({type:"variantImageChange",variant:variant})},_updateSKU:function(variant){this.$container.trigger({type:"variantSKUChange",variant:variant})},_updatePrice:function(variant){variant.price===this.currentVariant.price&&variant.compare_at_price===this.currentVariant.compare_at_price||this.$container.trigger({type:"variantPriceChange",variant:variant})},_updateHistoryState:function(variant){if(!(!history.pushState||!variant)){var newurl=window.location.protocol+"//"+window.location.host+window.location.pathname+"?variant="+variant.id;window.history.replaceState({path:newurl},"",newurl)}},_updateMasterSelect:function(variant){var $originalSelector=$(this.originalSelectorId);variant&&($originalSelector.find("[selected]").removeAttr("selected"),$originalSelector.find("[value="+variant.id+"]").prop("selected","selected"))}}),Variants})(),Sunrise.Product=(function(){function Product(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id"),self=this;this.$item=$(".item",$container),this.$info=$(".info",$container),this.$images=$(".images",$container),this.$image=$(".images .image",$container),this.$window=$(window),this.$footer=$(".footer"),this.index=0,this.selectors={originalSelectorId:"#productSelect-"+sectionId,addToCart:"#addToCart-"+sectionId,addToCartText:"#addToCartText-"+sectionId,productPrice:"#productPrice-"+sectionId,comparePrice:"#comparePrice-"+sectionId,productSKU:"#productSKU-"+sectionId,productStockMsg:"#stockMsg-"+sectionId,singleOptionSelector:".single-option-selector-"+sectionId,productThumbImages:".product-thumbs-"+sectionId+" .smallimg",productFeaturedImage:".product-sh
1ot-"+sectionId,productImageWrap:".more-images-"+sectionId,smartPayWrap:".extra-button-wrap-"+sectionId},this.settings={sectionId:sectionId,enableHistoryState:$container.data("enable-history-state")||!0,namespace:".product-"+sectionId,showPreOrder:$container.data("show-preorder"),showInventory:$container.data("show-inventory"),zoomEnabled:!1,imageSize:null,imageZoomSize:null},$("#ProductJson-"+sectionId).html()&&(this.productSingleObject=JSON.parse($("#ProductJson-"+sectionId).html()),this.settings.imageSize="1024x1024",this.settings.zoomEnabled=$container.data("zoom-enabled"),this.init())}Product.prototype=_.assignIn({},Product.prototype,{init:function(){this.initVariants(),this.initMoreImages(),this.initImageSwitch(),this.initProductZoom()},initVariants:function(){var options={$container:this.$container,enableHistoryState:this.settings.enableHistoryState,product:this.productSingleObject,singleOptionSelector:this.selectors.singleOptionSelector,originalSelectorId:this.selectors.originalSelectorId};this.variants=new Sunrise.Variants(options),this.$container.on("variantChange"+this.settings.namespace,this.updateAddToCartButton.bind(this)),this.$container.on("variantPriceChange"+this.settings.namespace,this.updatePrices.bind(this)),this.$container.on("variantImageChange"+this.settings.namespace,this.updateImages.bind(this)),this.$container.on("variantSKUChange"+this.settings.namespace,this.updateSKU.bind(this))},initImageSwitch:function(event){if($(this.selectors.productThumbImages).length){var self=this,$thumb=$(this.selectors.productImageWrap+" .active-img");scrolltoActiveImage($(this.selectors.productImageWrap),$thumb.data("image-index"));var $mainImg=$(this.selectors.productFeaturedImage);$(this.selectors.productThumbImages).on("click",function(evt){evt.preventDefault();var $el=$(this),imageSrc=$el.prop("href"),zoomSrc=$el.prop("href"),imageId=$el.data("image-id"),imageRetina=$el.data("image-retina");self.switchImage(imageSrc,zoomSrc,imageRetina,imageId),self.setActiveThumbnail(imageId)})}},switchImage:function(image,zoomImage,retinaImage,imageId){var srcset=image+" 1x,"+retinaImage+" 2x";$(this.selectors.productFeaturedImage).prop("href",zoomImage),$(this.selectors.productFeaturedImage).data("image-id",imageId),$(this.selectors.productFeaturedImage).find("img").prop("src",image),$(this.selectors.productFeaturedImage).find("img").prop("srcset",srcset);var $thisImage=$(this.selectors.productFeaturedImage).find("img");this.initProductZoom()},setActiveThumbnail:function(imageId){var activeClass="active-img",$thumb=$(this.selectors.productImageWrap+' .smallimg[data-image-id="'+imageId+'"]');$(this.selectors.productThumbImages).removeClass(activeClass),$thumb.addClass(activeClass),scrolltoActiveImage($(this.selectors.productImageWrap),$thumb.data("image-index"))},updateImages:function(event){var variant=event.variant;if(variant&&variant.featured_image){var variantImageId=variant.featured_image.id,$thumb=$(this.selectors.productImageWrap+' .smallimg[data-image-id="'+variantImageId+'"]');this.switchImage($thumb.prop("href"),$thumb.prop("href"),$thumb.data("image-retina"),$thumb.data("image-id")),this.setActiveThumbnail(variantImageId)}},updateSKU:function(event){var variant=event.variant,variantSKU=variant.sku||"";$(this.selectors.productSKU).html("").hide(),variantSKU.trim()&&$(this.selectors.productSKU).html("SKU: "+variantSKU).fadeIn(200)},updateAddToCartButton:function(event){var variant=event.variant;if($(this.selectors.smartPayWrap).hide(),$(this.selectors.productStockMsg).html("").hide(),variant)if(variant.available){if($(this.selectors.smartPayWrap).show(),$(this.selectors.addToCart).prop("disabled",!1),$(this.selectors.addToCartText).text(Sunrise.strings.add_to_cart),this.settings.showPreOrder=="yes"&&variant.inventory_management=="shopify"&&variant.inventory_quantity<=0&&variant.inventory_policy=="continue")$(this.selectors.productStockMsg).html("<div class='var-msg'>Available for pre-order</div>").fadeIn(200);else if(this.settings.showInventory=="yes"&&variant.inventory_management=="shopify"){var $originalSelector=$(this.selectors.originalSelectorId),invQty=$originalSelector.find("[value="+variant.id+"]").data("stk");$(this.selectors.productStockMsg).html("<div class='var-msg'>Availability: "+invQty+" in stock</div>").fadeIn(200)}}else $(this.selectors.addToCart).prop("disabled",!0),$(this.selectors.addToCartText).text(Sunrise.strings.sold_out);else $(this.selectors.addToCart).prop("disabled",!0),$(this.selectors.addToCartText).text(Sunrise.strings.unavailable)},updatePrices:function(event){var variant=event.variant;variant?($(this.selectors.productPrice).html("<span class=price-money>"+Sunrise.Currency.formatMoney(variant.price,Sunrise.strings.money_format)+"</span>"),variant.compare_at_price>variant.price?$(this.selectors.comparePrice).html("<span class=price-money>"+Sunrise.Currency.formatMoney(variant.compare_at_price,Sunrise.strings.money_format)+"</span>").show():$(this.selectors.comparePrice).hide()):$(this.selectors.comparePrice).hide(),Sunrise.convertPrices()},initMoreImages:function(){initMoreImages($(this.selectors.productImageWrap))},initProductZoom:function(){var self=this,$mainImage=$(this.selectors.productFeaturedImage);enableLightbox($mainImage),destroyZoom($mainImage),self.settings.zoomEnabled?enquire.register("screen and (min-width: 760px)",{match:function(){enableZoom($mainImage)},unmatch:function(){destroyZoom($mainImage)}}):destroyZoom($mainImage)}});function enableZoom($el){var zoomUrl=$el.prop("href");$el.zoom({url:zoomUrl,callback:function(){}})}function destroyZoom($el){$el.trigger("zoom.destroy")}function initMoreImages($el){var orig=$el.find("a"),cloned=$(orig).clone(),lightboxClass="lightbox-id-"+$el.data("section-id");$el.after("<div class='lightbox-images "+lightboxClass+"'></div>"),$("."+lightboxClass).html(cloned),$("."+lightboxClass+" a").magnificPopup({type:"image",gallery:{enabled:!0,preload:[1,3]}});var owl=$el,leftArrow=$el.data("arrow-left"),rightArrow=$el.data("arrow-right");owl.owlCarousel({itemsCustom:[[0,1],[320,2],[640,3]],items:3,rewindSpeed:400,navigation:!0,navigationText:[leftArrow,rightArrow]})}function scrolltoActiveImage($el,imageIndex){var owl=$el.data("owlCarousel");owl.goTo(imageIndex)}function enableLightbox($el){$el.on("click",function(event){event.preventDefault(),$(".lightbox-images").find('a[data-image-id="'+$el.data("image-id")+'"]').trigger("click")})}function disableLightbox($el){$el.off()}return Product})(),Sunrise.doResize=function(){Modernizr.flexbox&&Modernizr.flexwrap||$("ul.collection-th a,ul.collection-list a").imagesLoaded(function(){$("ul.collection-th").each(function(){$(this).find("a.prod-th").removeAttr("style").setAllToMaxHeight()}),$("ul.collection-list").each(function(){$(this).find("a.prod-th").removeAttr("style").setAllToMaxHeight()})})},Sunrise.sortHandler=function(e){var $sortBy=$("#sort-by"),sortOrder=$sortBy.data("default-sort");if(Shopify.queryParams={},location.search.length)for(var aKeyValue,i=0,aCouples=location.search.substr(1).split("&");i<aCouples.length;i++)aKeyValue=aCouples[i].split("="),aKeyValue.length>1&&(Shopify.queryParams[decodeURIComponent(aKeyValue[0])]=decodeURIComponent(aKeyValue[1]));$sortBy.val(sortOrder),$(document).on("change",$sortBy,function(event){Shopify.queryParams.sort_by=$sortBy.val(),Shopify.queryParams.sort_by!=sortOrder&&(location.search=jQuery.param(Shopify.queryParams))})},Sunrise.initVideos=function(){$("#main").fitVids()},Sunrise.initAccordions=function(){$(".gt-accordion h4").each(function(){var tis=$(this),state=!1,answer=tis.next("div");tis.click(function(){state=!state,answer.slideToggle(state),tis.toggleClass("active",state)})})},Sunrise.Sidebar=function(){var $sideMenu=$("#sidebar"),$topMenu=$("nav.top-menu"),sideMenuHandle=$sideMenu.data("menuchosen"),topMenuHandle=$topMenu.data("menuchosen"),keepMenuOpen=$sideMenu.data("keep-open");if($topMenu.find("li.level-2 .dropdown-toggle").off(),$topMenu.find("li.level-2 .dropdown-toggle").each(function(){var tis=$(this),state=!1,subMenu=tis.parent().next("ul");tis.on("click",function(e){e.preventDefault(),state=tis.closest("li").hasClass("active"),state=!state,subMenu.slideToggle(100),tis.closest("li").toggleClass("active",state),tis.attr("aria-expanded",state)})}),$sideMenu.find("li.from-top-menu").remove(),sideMenuHandle!=topMenuHandle){var children=$topMenu.find("ul:first").children().clone();$sideMenu.find(".side-menu-mobile").html(children)}if($("#side-menu").find(".dropdown-toggle").off(),$("#side-menu").find(".dropdown-toggle").each(function(){var tis=$(this),state=!1,subMenu=tis.parent().next("ul");tis.on("click",function(e){e.preventDefault(),state=tis.closest("li").hasClass("active"),state=!state,subMenu.slideToggle(100),tis.closest("li").toggleClass("active",state),tis.attr("aria-expanded",state)})}),$("#side-menu .shop-by-tag .top-link span").on("click",function(e){e.preventDefault(),e.stopPropagation(),$(this).next(".dropdown-toggle").trigger("click")}),keepMenuOpen){var CurrentUrl=window.location.pathname;CurrentUrl!="/"&&($item=$("#side-menu li.level-1 a").filter(function(){var xpathname=location.pathname+"zzz",xhref=$(this).prop("href")+"zzz";xhref.indexOf(xpathname)!=-1&&$(this).parentsUntil("#side-menu",".has-sub").addClass("active")}),$("#side-menu li.active").each(function(){var tis=$(this);tis.find("ul").eq(0).slideDown()}),$("#side-menu li.active > a").find(".dropdown-toggle").attr("aria-expanded",!0))}},Sunrise.Slideshow=(function(){var $slideshow,$slides,autoPlay;function Slideshow(container){$slideshow=$(container),$slides=$(".
1slides",$slideshow);var slideCount=$slides.find(".slide").length,slideTrans=$slideshow.data("transition"),slideTime=$slideshow.data("speed"),leftArrow=$slideshow.data("arrow-left"),rightArrow=$slideshow.data("arrow-right"),slideDuration=!1;autoPlay=$slideshow.data("autoplay"),autoPlay===!0&&(slideDuration=slideTime),slideCount>1?$slides.owlCarousel({navigation:!0,slideSpeed:300,paginationSpeed:400,singleItem:!0,transitionStyle:slideTrans,autoPlay:slideDuration,pagination:!1,autoHeight:!1,navigationText:[leftArrow,rightArrow]}):slideCount==1&&$slides.removeClass("owl-carousel"),window.is_ie&&setTimeout(function(){$(".owl-carousel").each(function(){$(this).data("owlCarousel").calculateAll()})},300)}return Slideshow.prototype=_.assignIn({},Slideshow.prototype,{onDeselect:function(event){var owl=$slides.data("owlCarousel");autoPlay===!0&&owl.play()},onBlockSelect:function(event){var $target=$(event.target),owl=$slides.data("owlCarousel");owl.stop(),owl.goTo($target.data("index"))},onBlockDeselect:function(event){this.onDeselect(event)}}),Slideshow})(),Sunrise.BrandScroller=(function(){var $scroller,$brands,autoPlay;function BrandScroller(container){$scroller=$(container),$brands=$("#brand-scroller",$scroller),autoPlay=$brands.data("autoplay");var leftArrow=$scroller.data("arrow-left"),rightArrow=$scroller.data("arrow-right");$brands.owlCarousel({lazyLoad:!0,itemsCustom:[[0,1],[320,2],[480,4],[960,5]],responsiveRefreshRate:50,slideSpeed:200,paginationSpeed:500,autoPlay:autoPlay,stopOnHover:!0,rewindNav:!0,rewindSpeed:500,pagination:!1,navigation:!0,navigationText:[leftArrow,rightArrow]})}return BrandScroller.prototype=_.assignIn({},BrandScroller.prototype,{onDeselect:function(event){var owl=$brands.data("owlCarousel");autoPlay===!0&&owl.play},onBlockSelect:function(event){var $target=$(event.target),owl=$brands.data("owlCarousel");owl.stop(),owl.goTo($target.data("index"))},onBlockDeselect:function(event){this.onDeselect(event)}}),BrandScroller})(),Sunrise.FeaturedVideo=(function(){var $container;function FeaturedVideo(container){$container=$(container),$container.fitVids()}return FeaturedVideo.prototype=_.assignIn({},FeaturedVideo.prototype,{onDeselect:function(event){},onBlockSelect:function(event){},onBlockDeselect:function(event){this.onDeselect(event)}}),FeaturedVideo})(),Sunrise.initLayout=function(){var $window=$(window),$currencyBox=$(".curr-switcher");Sunrise.doResize();var showSidebar=function(){$("body").toggleClass("active-nav"),$(".menu-button").removeClass("active-button")};$(document).on("click",".menu-button",function(e){e.preventDefault(),showSidebar()}),$(document).on("click",".menu-currency",function(e){e.preventDefault(),$currencyBox.slideToggle(200)}),$(document).on("click",".close-currency-box",function(e){e.preventDefault(),$currencyBox.slideToggle(200)}),$window.on("resize",_.debounce(function(){var off_canvas_nav_display=$(".off-canvas-navigation").css("display"),menu_button_display=$(".menu-button").css("display");off_canvas_nav_display==="flex"&&$("body").removeClass("two-column").addClass("small-screen"),off_canvas_nav_display==="none"&&$("body").removeClass("active-sidebar active-nav small-screen").addClass("two-column"),Sunrise.doResize()},200)),$window.on("scroll",_.debounce(function(){$(this).scrollTop()>200?$("#xx-scroll-to-top").fadeIn().css("display","inline-block"):$("#xx-scroll-to-top").fadeOut()},200)),$window.trigger("resize"),$window.trigger("scroll"),$(".coll-tags").removeClass("show-tags")},Sunrise.convertPrices=function(){window.Currency&&Currency.convertAll(Sunrise.strings.shop_currency,$("[name=currencies]").val())},Sunrise.Cart=(function(){function Cart(container){var $container=container,$cartform=$("#cartform",$container),$qtyFields=$("#cartform input.quantity",$container),reset_cart=!1;$qtyFields.each(function(){var $this=$(this);if($this.data("managed")=="shopify"&&$this.data("policy")=="deny"){var gt_stock=parseInt($this.data("stk"),10),gt_qty=parseInt($this.val(),10);gt_qty>gt_stock&&($this.val(gt_stock),reset_cart=!0)}}),reset_cart&&(alert("Some quantities have been reduced to match the available stock"),$cartform.submit()),$qtyFields.on("blur",function(){var $this=$(this);if($this.data("managed")=="shopify"&&$this.data("policy")=="deny"){var gt_stock=parseInt($this.data("stk"),10),gt_qty=parseInt($this.val(),10);gt_qty>gt_stock&&(alert("Sorry, available stock is "+gt_stock),$this.val(gt_stock))}}),window.Shopify.Cart&&Shopify.Cart.ShippingCalculator.show({submitButton:"Calculate shipping",submitButtonDisabled:"Calculating...",customerIsLoggedIn:Sunrise.strings.customer_logged_in,moneyFormat:"<span class=price-money>"+Sunrise.strings.money_format_json+"</span>",currentLanguage:Sunrise.strings.locale_json})}return Cart.prototype=_.assignIn({},Cart.prototype,{onUnload:function(){}}),Cart})(),Sunrise.Collection=(function(){function Collection(container){var $container=container;Sunrise.sortHandler(),Sunrise.doResize()}return Collection.prototype=_.assignIn({},Collection.prototype,{onUnload:function(){}}),Collection})(),Sunrise.FeaturedCollection=(function(){function FeaturedCollection(container){var $container=container;Sunrise.doResize()}return FeaturedCollection.prototype=_.assignIn({},FeaturedCollection.prototype,{onUnload:function(){}}),FeaturedCollection})(),Sunrise.Footer=(function(){function Footer(container){}return Footer.prototype=_.assignIn({},Footer.prototype,{onUnload:function(){$(window).trigger("scroll")}}),Footer})(),Sunrise.lazyLoad=function(){$(document).on("lazyloaded",function(e){$(e.target).closest(".thumbnail").find(".card-preloader").hide()})},Sunrise.doCurrency=function(){if(window.Currency){var shopCurrency=Sunrise.strings.shop_currency,$currencySelector=$("#currencies"),$mobileCurrency=$("a.menu-currency span");Currency.format="money_format",Currency.moneyFormats[shopCurrency
1].money_with_currency_format=Sunrise.strings.money_with_currency_format_json,Currency.moneyFormats[shopCurrency].money_format=Sunrise.strings.money_format_json;var defaultCurrency="GBP",cookieCurrency=Currency.cookie.read();$("span.price-money").each(function(){$(this).attr("data-currency-"+shopCurrency,$(this).html())}),cookieCurrency==null?shopCurrency!==defaultCurrency?Currency.convertAll(shopCurrency,defaultCurrency):Currency.currentCurrency=defaultCurrency:$currencySelector.length&&$currencySelector.find("option[value="+cookieCurrency+"]").length===0?(Currency.currentCurrency=shopCurrency,Currency.cookie.write(shopCurrency)):cookieCurrency===shopCurrency?Currency.currentCurrency=shopCurrency:Currency.convertAll(shopCurrency,cookieCurrency),$currencySelector.val(Currency.currentCurrency),$mobileCurrency.html(Currency.currentCurrency),$currencySelector.on("change",function(){var newCurrency=$(this).val();Currency.convertAll(Currency.currentCurrency,newCurrency),$mobileCurrency.html(newCurrency)})}},Sunrise.Maps=(function(){var config={zoom:14},apiStatus=null,mapsToLoad=[];function Map(container){Sunrise.$currentMapContainer=this.$container=$(container);var key=this.$container.data("api-key");if(!(typeof key!="string"||key===""))if(apiStatus==="loaded"){var self=this,$script=$('script[src*="'+key+'&"]');$script.length===0?$.getScript("https://maps.googleapis.com/maps/api/js?key="+key).then(function(){apiStatus="loaded",self.createMap()}):this.createMap()}else mapsToLoad.push(this),apiStatus!=="loading"&&(apiStatus="loading",typeof window.google=="undefined"&&$.getScript("https://maps.googleapis.com/maps/api/js?key="+key).then(function(){apiStatus="loaded",initAllMaps()}))}function initAllMaps(){$.each(mapsToLoad,function(index,instance){instance.createMap()})}function geolocate($map){var deferred=$.Deferred(),geocoder=new google.maps.Geocoder,address=$map.data("address-setting");return geocoder.geocode({address:address},function(results,status2){status2!==google.maps.GeocoderStatus.OK&&deferred.reject(status2),deferred.resolve(results)}),deferred}return Map.prototype=_.assignIn({},Map.prototype,{createMap:function(){var $map=this.$container.find(".map-section-container"),mapImage=this.$container.find(".map-section-image");return mapImage.hide(),geolocate($map).then(function(results){var mapOptions={zoom:config.zoom,styles:config.styles,center:results[0].geometry.location,draggable:!1,clickableIcons:!1,scrollwheel:!1,disableDoubleClickZoom:!0,disableDefaultUI:!0},map=this.map=new google.maps.Map($map[0],mapOptions),center=this.center=map.getCenter(),marker=new google.maps.Marker({map:map,position:center});google.maps.event.addDomListener(window,"resize",function(){google.maps.event.trigger(map,"resize"),map.setCenter(center)})}.bind(this)).fail(function(){var errorMessage;switch(status){case"ZERO_RESULTS":errorMessage=theme.strings.addressNoResults;break;case"OVER_QUERY_LIMIT":errorMessage=theme.strings.addressQueryLimit;break;default:errorMessage=theme.strings.addressError;break}if(Shopify.designMode){var $mapContainer=$map.parents(".map-section");$mapContainer.addClass("page-width map-section--load-error"),$mapContainer.find(".map-section__wrapper").html('<div class="errors text-center">'+errorMessage+"</div>")}})},onUnload:function(){typeof window.google!="undefined"&&google.maps.event.clearListeners(this.map,"resize")}}),Map})();function gm_authFailure(){Shopify.designMode&&(theme.$currentMapContainer.addClass("page-width map-section--load-error"),theme.$currentMapContainer.find(".map-section__wrapper").html('<div class="errors text-center">'+theme.strings.authError+"</div>"))}Sunrise.initSections=function(){var sections=new Sunrise.Sections;sections.register("slideshow",Sunrise.Slideshow),sections.register("product",Sunrise.Product),sections.register("sidebar",Sunrise.Sidebar),sections.register("logo-list",Sunrise.BrandScroller),sections.register("featured-video",Sunrise.FeaturedVideo),sections.register("cart-template",Sunrise.Cart),sections.register("collection-template",Sunrise.Collection),sections.register("featured-collection",Sunrise.FeaturedCollection),sections.register("footer",Sunrise.Footer),sections.register("map-section",Sunrise.Maps)},Sunrise.initListeners=function(){$(document).on("click",'input[name="checkout"], input[name="goto_pp"], input[name="goto_gc"]',function(e){var $agreeTerms=$("#agree-terms");$agreeTerms.length&&$("#agree",$agreeTerms).prop("checked")==!1&&(e.preventDefault(),alert("You must agree with the terms and conditions of sale to check out"),$("#agree-terms").addClass("highlight").focus())}).on("click",".coll-tags .button",function(e){e.preventDefault(),$(".tags").slideToggle(300)}).on("click","a.go-back",function(e){e.preventDefault(),window.location.href=document.referrer}).on("change","#BlogTagFilter",function(e){e.preventDefault(),window.location.href=$(this).val()}).on("click","#xx-scroll-to-top",function(e){e.preventDefault(),$("html, body").animate({scrollTop:0},300)})},$(document).ready(function(){Sunrise.init()}),Sunrise.init=function(){Sunrise.initLayout(),Sunrise.initAccordions(),Sunrise.initVideos(),Sunrise.initListeners(),Sunrise.initSections(),Sunrise.customerTemplates.init(),Sunrise.doCurrency(),Sunrise.lazyLoad()}; 2//# sourceMappingURL=/cdn/shop/t/4/assets/theme.js.map?v=60249496955051882601550870166
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.