1(function($2){$2(".collection-sidebar")&&History.Adapter.bind(window,"statechange",function(){var State=History.getState();if(!ella.isSidebarAjaxClick){ella.sidebarParams();var newurl=ella.sidebarCreateUrl();ella.sidebarGetContent(newurl),ella.reActivateSidebar()}ella.isSidebarAjaxClick=!1}),window.use_color_swatch&&($2(".swatch :radio").change(function(){var optionIndex=$2(this).closest(".swatch").attr("data-option-index"),optionValue=$2(this).val();$2(this).closest("form").find(".single-option-selector").eq(optionIndex).val(optionValue).trigger("change")}),Shopify.optionsMap={},Shopify.updateOptionsInSelector=function(selectorIndex){switch(selectorIndex){case 0:var key="root",selector=$2(".single-option-selector:eq(0)");break;case 1:var key=$2(".single-option-selector:eq(0)").val(),selector=$2(".single-option-selector:eq(1)");break;case 2:var key=$2(".single-option-selector:eq(0)").val();key+=" / "+$2(".single-option-selector:eq(1)").val();var selector=$2(".single-option-selector:eq(2)")}var initialValue=selector.val();selector.empty();var availableOptions=Shopify.optionsMap[key];if(availableOptions&&availableOptions.length){for(var i2=0;i2<availableOptions.length;i2++){var option=availableOptions[i2],newOption=$2("<option></option>").val(option).html(option);selector.append(newOption)}$2('.swatch[data-option-index="'+selectorIndex+'"] .swatch-element').each(function(){$2.inArray($2(this).attr("data-value"),availableOptions)!==-1?$2(this).removeClass("soldout").show().find(":radio").removeAttr("disabled","disabled").removeAttr("checked"):$2(this).addClass("soldout").hide().find(":radio").removeAttr("checked").attr("disabled","disabled")}),$2.inArray(initialValue,availableOptions)!==-1&&selector.val(initialValue),selector.trigger("change")}},Shopify.linkOptionSelectors=function(product){for(var i2=0;i2<product.variants.length;i2++){var variant=product.variants[i2];if(variant.available){if(Shopify.optionsMap.root=Shopify.optionsMap.root||[],Shopify.optionsMap.root.push(variant.option1),Shopify.optionsMap.root=Shopify.uniq(Shopify.optionsMap.root),product.options.length>1){var key=variant.option1;Shopify.optionsMap[key]=Shopify.optionsMap[key]||[],Shopify.optionsMap[key].push(variant.option2),Shopify.optionsMap[key]=Shopify.uniq(Shopify.optionsMap[key])}if(product.options.length===3){var key=variant.option1+" / "+variant.option2;Shopify.optionsMap[key]=Shopify.optionsMap[key]||[],Shopify.optionsMap[key].push(variant.option3),Shopify.optionsMap[key]=Shopify.uniq(Shopify.optionsMap[key])}}}Shopify.updateOptionsInSelector(0),product.options.length>1&&Shopify.updateOptionsInSelector(1),product.options.length===3&&Shopify.updateOptionsInSelector(2),$2(".single-option-selector:eq(0)").change(function(){return Shopify.updateOptionsInSelector(1),product.options.length===3&&Shopify.updateOptionsInSelector(2),!0}),$2(".single-option-selector:eq(1)").change(function(){return product.options.length===3&&Shopify.updateOptionsInSelector(2),!0})}),$2(document).ready(function(){ella.init(),$2(".product-grid-image .add_cart_btn").on("click",function(e){var addToCartButton=$2(this);e.preventDefault();var enable=$2(this).attr("data-enable-add"),price=$2(this).attr("data-show-price"),title=$2(this).attr("data-prod-title"),id_variant=$2(this).attr("data-id");if(enable=="true"){var image=addToCartButton.parent().find("img").attr("src");ella.doAjaxAddToCart(id_variant,1,"","",title,image)}else $2.fancybox.close(),sizeChartOpen(".notsale-popup")})}),$2(window).resize(function(){ella.initMobileMenu(),ella.initResizeImage()}),$2(window).scroll(function(){$2(this).scrollTop()>200?$2("#back-top").fadeIn():$2("#back-top").fadeOut()}),$2(".header-mobile").is(":visible")||$2(document).on("click touchstart",function(e){var quickview=$2(".quick-view"),dropdowncart=$2("#dropdown-cart"),cartButton=$2("#cartToggle"),newsletter=$2("#email-modal .modal-window"),searchBar=$2(".nav-search");!quickview.is(e.target)&&quickview.has(e.target).length===0&&!dropdowncart.is(e.target)&&dropdowncart.has(e.target).length===0&&!cartButton.is(e.target)&&cartButton.has(e.target).length===0&&!newsletter.is(e.target)&&newsletter.has(e.target).length===0&&!searchBar.is(e.target)&&searchBar.has(e.target).length===0&&(ella.closeQuickViewPopup(),ella.closeDropdownCart(),ella.closeEmailModalWindow(),ella.closeDropdownSearch())}),$2(document).keyup(function(e){e.keyCode==27&&(ella.closeQuickViewPopup(),ella.closeDropdownCart(),ella.closeDropdownSearch(),clearTimeout(ella.ellaTimeout),$2(".modal").is(":visible")&&$2(".modal").fadeOut(500))});var ella={ellaTimeout:null,isSidebarAjaxClick:!1,init:function(){this.initColorSwatchGrid(),this.initResizeImage(),this.initMobileMenu(),this.initSidebar(),this.initMobileSidebar(),this.initScrollTop(),this.initQuickView(),this.initCloudzoom(),this.initProductMoreview(),this.initAddToCart(),this.initModal(),this.initProductAddToCart(),this.initDropDownCart(),this.initDropdownSearch(),this.initToggleCollectionPanel(),this.initWishlist(),this.initProductWishlist(),this.initRemoveWishlist(),this.initInfiniteScrolling(),this.initQuickViewCollection()},sidebarMapTagEvents:function(){$2('.sidebar-tag a:not(".clear"), .sidebar-tag label').click(function(e){var currentTags=[];if(Shopify.queryParams.constraint&&(currentTags=Shopify.queryParams.constraint.split("+")),!window.enable_sidebar_multiple_choice&&!$2(this).prev().is(":checked")){var otherTag=$2(this).parents(".sidebar-tag").find("input:checked");if(otherTag.length>0){var tagName=otherTag.val();if(tagName){var tagPos=currentTags.indexOf(tagName);tagPos>=0&¤tTags.splice(tagPos,1)}}}var tagName=$2(this).prev().val();if(tagName){var tagPos=currentTags.indexOf(tagName);tagPos>=0?currentTags.splice(tagPos,1):currentTags.push(tagName)}currentTags.length?Shopify.queryParams.constraint=currentTags.join("+"):delete Shopify.queryParams.constraint,ella.sidebarAjaxClick(),e.preventDefault()})},sidebarMapCategories:function(){$2(".sidebar-links a").click(function(e){$2(this).hasClass("active")||(delete Shopify.queryParams.q,ella.sidebarAjaxClick($2(this).attr("href")),$2(".sidebar-links a.active").removeClass("active"),$2(this).addClass("active")),e.preventDefault()})},sidebarMapView:function(){$2(".view-mode a").click(function(e){if(!$2(this).hasClass("active")){var paging=$2(".filter-show > button span").text();$2(this).hasClass("list")?Shopify.queryParams.view="list"+paging:Shopify.queryParams.view=paging,ella.sidebarAjaxClick(),$2(".view-mode a.active").removeClass("active"),$2(this).addClass("active")}e.preventDefault()})},sidebarMapShow:function(){$2(".filter-show a").click(function(e){if(!$2(this).parent().hasClass("active")){var thisPaging=$2(this).attr("href"),view=$2(".view-mode a.active").attr("href");view=="list"?Shopify.queryParams.view="list"+thisPaging:Shopify.queryParams.view=thisPaging,ella.sidebarAjaxClick(),$2(".filter-show > button span").text(thisPaging),$2(".filter-show li.active").removeClass("active"),$2(this).parent().addClass("active")}e.preventDefault()})},sidebarInitToggle:function(){$2(".sidebar-tag").length>0&&$2(".sidebar-tag .widget-title span").click(function(){var $title=$2(this).parents(".widget-title");$title.hasClass("click")?$title.removeClass("click"):$title.addClass("click"),$2(this).parents(".sidebar-tag").find(".widget-content").slideToggle()})},sidebarMapSorting:function(e){$2(".filter-sortby a").click(function(e2){if(!$2(this).parent().hasClass("active")){Shopify.queryParams.sort_by=$2(this).attr("href"),ella.sidebarAjaxClick();var sortbyText=$2(this).text();$2(".filter-sortby > button span").text(sortbyText),$2(".filter-sortby li.active").removeClass("active"),$2(this).parent().addClass("active")}e2.preventDefault()})},sidebarMapPaging:function(){$2(".pagination-page a").click(function(e){var page=$2(this).attr("href").match(/page=\d+/g);if(page&&(Shopify.queryParams.page=parseInt(page[0].match(/\d+/g)),Shopify.queryParams.page)){var newurl=ella.sidebarCreateUrl();ella.isSidebarAjaxClick=!0,History.pushState({param:Shopify.queryParams},newurl,newurl),ella.sidebarGetContent(newurl),$2("body,html").animate({scrollTop:500},600)}e.preventDefault()})},sidebarMapClearAll:function(){$2(".refined-widgets a.clear-all").click(function(e){delete Shopify.queryParams.constraint,delete Shopify.queryParams.q,ella.sidebarAjaxClick(),e.preventDefault()})},sidebarMapClear:function(){$2(".sidebar-tag").each(function(){var sidebarTag=$2(this);sidebarTag.find("input:checked").length>0&&sidebarTag.find(".clear").show().click(function(e){console.log("im
1clicked");var currentTags=[];Shopify.queryParams.constraint&&(currentTags=Shopify.queryParams.constraint.split("+")),sidebarTag.find("input:checked").each(function(){var selectedTag=$2(this),tagName=selectedTag.val();if(tagName){var tagPos=currentTags.indexOf(tagName);tagPos>=0&¤tTags.splice(tagPos,1)}}),currentTags.length?Shopify.queryParams.constraint=currentTags.join("+"):delete Shopify.queryParams.constraint,ella.sidebarAjaxClick(),e.preventDefault()})})},sidebarMapEvents:function(){ella.sidebarMapTagEvents(),ella.sidebarMapCategories(),ella.sidebarMapView(),ella.sidebarMapShow(),ella.sidebarMapSorting()},reActivateSidebar:function(){$2(".sidebar-custom .active, .sidebar-links .active").removeClass("active"),$2(".sidebar-tag input:checked").attr("checked",!1);var cat=location.pathname.match(/\/collections\/(.*)(\?)?/);if(cat&&cat[1]&&$2(".sidebar-links a[href='"+cat[0]+"']").addClass("active"),Shopify.queryParams.view){$2(".view-mode .active").removeClass("active");var view=Shopify.queryParams.view;view.indexOf("list")>=0?($2(".view-mode .list").addClass("active"),view=view.replace("list","")):$2(".view-mode .grid").addClass("active"),$2(".filter-show > button span").text(view),$2(".filter-show li.active").removeClass("active"),$2(".filter-show a[href='"+view+"']").parent().addClass("active")}ella.initSortby()},initSortby:function(){if(Shopify.queryParams.sort_by){var sortby=Shopify.queryParams.sort_by,sortbyText=$2(".filter-sortby a[href='"+sortby+"']").text();$2(".filter-sortby > button span").text(sortbyText),$2(".filter-sortby li.active").removeClass("active"),$2(".filter-sortby a[href='"+sortby+"']").parent().addClass("active")}},sidebarMapData:function(data){var currentList=$2(".col-main .products-grid");currentList.length==0&&(currentList=$2(".col-main .product-list"));var productList=$2(data).find(".col-main .products-grid");productList.length==0&&(productList=$2(data).find(".col-main .product-list")),productList.length>0&&productList.hasClass("products-grid")&&window.product_image_resize&&productList.find("img").fakecrop({fill:window.images_size.is_crop,widthSelector:".products-grid .grid-item .product-image",ratioWrapper:window.images_size}),currentList.replaceWith(productList),ella.checkNeedToConvertCurrency()&&Currency.convertAll(window.shop_currency,jQuery("#currencies").val(),".col-main span.money","money_format"),$2(".padding").length>0?$2(".padding").replaceWith($2(data).find(".padding")):$2(".block-row.col-main").append($2(data).find(".padding"));var currentHeader=$2(".page-header"),dataHeader=$2(data).find(".page-header");if(currentHeader.find("h2").text()!=dataHeader.find("h2").text()&&(currentHeader.find("h2").replaceWith(dataHeader.find("h2")),currentHeader.find(".rte").length?dataHeader.find(".rte").length?currentHeader.find(".rte").replaceWith(dataHeader.find(".rte")):currentHeader.find(".rte").hide():dataHeader.find(".rte").length&¤tHeader.find("h2").after(dataHeader.find(".rte"))),$2(".refined-widgets").replaceWith($2(data).find(".refined-widgets")),$2(".sidebar-block").replaceWith($2(data).find(".sidebar-block")),ella.initColorSwatchGrid(),$2(".spr-badge").length>0)return window.SPR.registerCallbacks(),window.SPR.initRatingHandler(),window.SPR.initDomEls(),window.SPR.loadProducts(),window.SPR.loadBadges()},sidebarCreateUrl:function(baseLink){var newQuery=$2.param(Shopify.queryParams).replace(/%2B/g,"+");return baseLink?newQuery!=""?baseLink+"?"+newQuery:baseLink:location.pathname+"?"+newQuery},sidebarAjaxClick:function(baseLink){delete Shopify.queryParams.page;var newurl=ella.sidebarCreateUrl(baseLink);ella.isSidebarAjaxClick=!0,History.pushState({param:Shopify.queryParams},newurl,newurl),ella.sidebarGetContent(newurl)},sidebarGetContent:function(newurl){$2.ajax({type:"get",url:newurl,beforeSend:function(){ella.showLoading()},success:function(data){ella.sidebarMapData(data),ella.sidebarMapPaging(),ella.translateBlock(".main-content"),ella.sidebarMapTagEvents(),ella.sidebarInitToggle(),ella.sidebarMapClear(),ella.sidebarMapClearAll(),ella.hideLoading(),ella.initQuickView(),ella.initAddToCart(),ella.initWishlist(),ella.initInfiniteScrolling()},error:function(xhr,text){ella.hideLoading(),$2(".loading-modal").hide(),$2(".ajax-error-message").text($2.parseJSON(xhr.responseText).description),ella.showModal(".ajax-error-modal")}})}
1,sidebarParams:function(){if(Shopify.queryParams={},location.search.length)for(var aKeyValue,i2=0,aCouples=location.search.substr(1).split("&");i2<aCouples.length;i2++)aKeyValue=aCouples[i2].split("="),aKeyValue.length>1&&(Shopify.queryParams[decodeURIComponent(aKeyValue[0])]=decodeURIComponent(aKeyValue[1]))},initMobileSidebar:function(){$2("footer").append("<a class='option-sidebar left' id='displayTextLeft' href='javascript:void(0)' title='Show Sidebar'><span>Show Sidebar</span></a>"),$2("#displayTextLeft").click(function(event){event.preventDefault(),$2(".sidebar").is(":hidden")?($2(".sidebar").fadeIn(800),$2("body,html").animate({scrollTop:400},600),$2("#displayTextLeft").toggleClass("hidden-arrow-left"),$2("#displayTextLeft").attr("title","hide-sidebar"),$2("#displayTextLeft").html("<span>Hide Sidebar</span>")):($2(".sidebar").fadeOut(800),$2("#displayTextLeft").removeClass("hidden-arrow-left"),$2("#displayTextLeft").attr("title","show-sidebar"),$2("#displayTextLeft").html("<span>Show Sidebar</span>"))})},initSidebar:function(){$2(".collection-sidebar").length>0&&(ella.sidebarParams(),ella.initSortby(),ella.sidebarMapEvents(),ella.sidebarMapPaging(),ella.sidebarInitToggle(),ella.sidebarMapClear(),ella.sidebarMapClearAll())},initMobileMenu:function(){$2(".menu-block").is(":visible")?($2(".gf-menu-device-container ul.gf-menu li.dropdown").each(function(){$2(this).find("> p.toogleClick").length==0&&$2(this).prepend('<p class="toogleClick">+</p>')}),$2(".menu-block").children().hasClass("gf-menu-device-wrapper")==!1&&$2(".menu-block").children().addClass("gf-menu-device-wrapper"),$2(".gf-menu-device-container").find("ul.gf-menu").size()==0&&($2(".gf-menu-device-container").append($2(".nav-bar .container").html()),$2(".gf-menu-device-container .site-nav").addClass("gf-menu"),$2(".gf-menu-device-container .site-nav").removeClass("nav")),$2("p.toogleClick").click(function(){$2(this).hasClass("mobile-toggle-open")?($2(this).next().next().hide(),$2(this).removeClass("mobile-toggle-open")):($2(this).next().next().show(),$2(this).addClass("mobile-toggle-open"))}),$2("p.toogleClick").show(),$2("div.gf-menu-toggle").hide(),$2(".nav-bar .container").hide(),$2("ul.gf-menu").hasClass("clicked")==!1&&($2(".gf-menu").hide(),$2(".gf-menu li.dropdown ul.site-nav-dropdown").hide()),$2(".col-1 .inner ul.dropdown").parent().each(function(){$2(this).find("> p.toogleClick").length==0&&$2(this).prepend('<p class="toogleClick">+</p>')}),$2(".cbp-spmenu span.icon-dropdown").remove(),$2("ul.gf-menu li.dropdown").each(function(){$2(this).find("> p.toogleClick").length==0&&$2(this).prepend('<p class="toogleClick">+</p>')}),$2("p.toogleClick").click(function(){$2(this).hasClass("mobile-toggle-open")?($2(this).next().next().hide(),$2(this).removeClass("mobile-toggle-open")):($2(this).next().next().show(),$2(this).addClass("mobile-toggle-open"))}),$2(".header-panel-bottom ul.customer-links").prependTo($2(".customer-area .dropdown-menu"))):($2(".nav-bar .container").show(),$2(".gf-menu").hide(),$2(".customer-area ul.customer-links").appendTo($2(".header-panel-bottom")).after($2(".top-header"))),$2(".menu-block").children().hasClass("gf-menu-device-wrapper")==!1&&$2(".menu-block").children().addClass("resized")},initWishlist:function(){$2(".grid-item button.wishlist").click(function(e){e.preventDefault();var form=$2(this).parent(),item=form.parents(".grid-item");$2.ajax({type:"POST",url:"/contact",data:form.serialize(),beforeSend:function(){ella.showLoading()},success:function(data){ella.hideLoading(),form.html('<a class="wishlist" href="/pages/wish-list" title="Go to wishlist"><span class="icon"></span><span>Go to wishlist</span></a>');var title=item.find(".product-title").html(),image=item.find("a > img").attr("src");$2(".ajax-success-modal").find(".ajax-product-title").html(title),$2(".ajax-success-modal").find(".ajax-product-image").attr("src",image),$2(".ajax-success-modal").find(".btn-go-to-wishlist").show(),$2(".ajax-success-modal").find(".btn-go-to-cart").hide(),ella.showModal(".ajax-success-modal")},error:function(xhr,text){ella.hideLoading(),$2(".loading-modal").hide(),$2(".ajax-error-message").text($2.parseJSON(xhr.responseText).description),ella.showModal(".ajax-error-modal")}})})},initProductWishlist:function(){$2(".product button.wishlist").click(function(e){e.preventDefault();var form=$2(this).parent(),item=form.parents(".grid-item");$2.ajax({type:"POST",url:"/contact",data:form.serialize(),beforeSend:function(){ella.showLoading()},success:function(data){ella.hideLoading(),form.html('<a class="wishlist" href="/pages/wish-list" title="Go to wishlist"><span class="icon"></span><span>Go to wishlist</span></a>');var title=$2(".product-title h2").html(),image=$2("#product-featured-image").attr("src");$2(".ajax-success-modal").find(".ajax-product-title").html(title),$2(".ajax-success-modal").find(".ajax-product-image").attr("src",image),$2(".ajax-success-modal").find(".btn-go-to-wishlist").show(),$2(".ajax-success-modal").find(".btn-go-to-cart").hide(),ella.showModal(".ajax-success-modal")},error:function(xhr,text){ella.hideLoading(),$2(".loading-modal").hide(),$2(".ajax-error-message").text($2.parseJSON(xhr.responseText).description),ella.showModal(".ajax-error-modal")}})})},initRemoveWishlist:function(){$2(".btn-remove-wishlist").click(function(e){var row=$2(this).parents("tr"),tagID=row.find(".tag-id").val(),form=jQuery("#remove-wishlist-form");form.find("input[name='contact[tags]']").val("x"+tagID),$2.ajax({type:"POST",url:"/contact",data:form.serialize(),beforeSend:function(){ella.showLoading()},success:function(data){ella.hideLoading(),row.fadeOut(1e3)},error:function(xhr,text){ella.hideLoading(),$2(".loading-modal").hide(),$2(".ajax-error-message").text($2.parseJSON(xhr.responseText).description),ella.showModal(".ajax-error-modal")}})})}
1,initColorSwatchGrid:function(){jQuery(".item-swatch li label").hover(function(){var newImage=jQuery(this).parent().find(".hidden a").attr("href");return jQuery(this).parents(".grid-item").find(".product-grid-image img").attr({src:newImage}),!1})},initResizeImage:function(){window.product_image_resize&&$2(".products-grid .product-image img").fakecrop({fill:window.images_size.is_crop,widthSelector:".products-grid .grid-item .product-image",ratioWrapper:window.images_size})},initInfiniteScrolling:function(){$2(".infinite-scrolling").length>0&&$2(".infinite-scrolling a").click(function(e){e.preventDefault(),$2(this).hasClass("disabled")||ella.doInfiniteScrolling()})},doInfiniteScrolling:function(){var currentList=$2(".block-row .products-grid");if(currentList.length||(currentList=$2(".block-row .product-list")),currentList){var showMoreButton=$2(".infinite-scrolling a").first();$2.ajax({type:"GET",url:showMoreButton.attr("href"),beforeSend:function(){ella.showLoading(),$2(".loading-modal").show()},success:function(data){ella.hideLoading();var products=$2(data).find(".block-row .products-grid");if(products.length||(products=$2(data).find(".block-row .product-list")),products.length&&(products.hasClass("products-grid")&&window.product_image_resize&&products.children().find("img").fakecrop({fill:window.images_size.is_crop,widthSelector:".products-grid .grid-item .product-image",ratioWrapper:window.images_size}),currentList.append(products.children()),ella.translateBlock("."+currentList.attr("class")),ella.initQuickView(),ella.initAddToCart(),ella.initWishlist(),$2(data).find(".infinite-scrolling").length>0?showMoreButton.attr("href",$2(data).find(".infinite-scrolling a").attr("href")):(showMoreButton.hide(),showMoreButton.next().show()),window.show_multiple_currencies&&window.shop_currency!=jQuery("#currencies").val()&&Currency.convertAll(window.shop_currency,jQuery("#currencies").val(),"span.money","money_format"),$2(".spr-badge").length>0))return window.SPR.registerCallbacks(),window.SPR.initRatingHandler(),window.SPR.initDomEls(),window.SPR.loadProducts(),window.SPR.loadBadges()},error:function(xhr,text){ella.hideLoading(),$2(".loading-modal").hide(),$2(".ajax-error-message").text($2.parseJSON(xhr.responseText).description),ella.showModal(".ajax-error-modal")},dataType:"html"})}},closeEmailModalWindow:function(){$2("#email-modal").length>0&&$2("#email-modal").is(":visible")&&$2("#email-modal .modal-window").fadeOut(600,function(){$2("#email-modal .modal-overlay").fadeOut(600,function(){$2("#email-modal").hide(),$2.cookie("emailSubcribeModal","closed",{expires:1,path:"/"})})})},showModal:function(selector){$2(selector).fadeIn(500),ella.ellaTimeout=setTimeout(function(){$2(selector).fadeOut(500)},5e3)},initToggleCollectionPanel:function(){$2(".collection-sharing-btn").length>0&&$2(".collection-sharing-btn").click(function(){$2(".collection-sharing-panel").toggle(),$2(".collection-sharing-panel").is(":visible")?($2(".collection-sharing-btn").addClass("btn-hover"),$2(".collection-filter-panel").hide(),$2(".collection-filter-btn").removeClass("btn-hover")):$2(".collection-sharing-btn").removeClass("btn-hover")}),$2(".collection-filter-btn").length>0&&($2(".collection-filter-btn").click(function(){$2(".collection-filter-panel").toggle(),$2(".collection-filter-panel").is(":visible")?($2(".collection-filter-btn").addClass("btn-hover"),$2(".collection-sharing-panel").hide(),$2(".collection-sharing-btn").removeClass("btn-hover")):$2(".collection-filter-btn").removeClass("btn-hover")}),$2(".collection-filter-panel select").change(function(index){window.location=$2(this).find("option:selected").val()}))},checkItemsInDropdownCart:function(){$2("#dropdown-cart .mini-products-list").children().length>0?($2("#dropdown-cart .no-items").hide(),$2("#dropdown-cart .has-items").show()):($2("#dropdown-cart .has-items").hide(),$2("#dropdown-cart .no-items").show())},initModal:function(){$2(".continue-shopping").click(function(){clearTimeout(ella.ellaTimeout),$2(".ajax-success-modal").fadeOut(500)}),$2(".close-modal, .overlay").click(function(){clearTimeout(ella.ellaTimeout),$2(".ajax-success-modal").fadeOut(500)})},initDropDownCart:function(){window.dropdowncart_type=="click"?$2("#cartToggle").
1click(function(){$2("#dropdown-cart").is(":visible")?$2("#dropdown-cart").slideUp("fast"):$2("#dropdown-cart").slideDown("fast")}):"ontouchstart"in document?$2("#cartToggle").click(function(){$2("#dropdown-cart").is(":visible")?$2("#dropdown-cart").slideUp("fast"):$2("#dropdown-cart").slideDown("fast")}):($2("#cartToggle").hover(function(){$2("#dropdown-cart").is(":visible")||$2("#dropdown-cart").slideDown("fast")}),$2(".wrapper-top-cart").mouseleave(function(){$2("#dropdown-cart").slideUp("fast")})),ella.checkItemsInDropdownCart(),$2("#dropdown-cart .no-items a").click(function(){$2("#dropdown-cart").slideUp("fast")}),$2("#dropdown-cart .btn-remove").click(function(event){event.preventDefault();var productId=$2(this).parents(".item").attr("id");productId=productId.match(/\d+/g),Shopify.removeItem(productId,function(cart){ella.doUpdateDropdownCart(cart)})})},closeDropdownCart:function(){$2("#dropdown-cart").is(":visible")&&$2("#dropdown-cart").slideUp("fast")},initDropdownSearch:function(){$2(".nav-search .icon-search").click(function(){$2(".header-bottom.on .search-bar").is(":visible")?$2(".header-bottom.on .search-bar").slideUp("fast"):$2(".header-bottom.on .search-bar").slideDown("fast")})},closeDropdownSearch:function(){$2(".header-bottom.on .search-bar").is(":visible")&&$2(".header-bottom.on .search-bar").slideUp("fast")},initProductMoreview:function(){$2(".more-view-wrapper-owlslider").length>0?this.initOwlMoreview():$2(".more-view-wrapper-jcarousel").length>0&&this.initJcarouselMoreview()},initOwlMoreview:function(){$2(".more-view-wrapper-owlslider ul").owlCarousel({navigation:!0,items:5,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,3],itemsTabletSmall:[540,3],itemsMobile:[360,3]}).css("visibility","visible")},initJcarouselMoreview:function(){$2(".more-view-wrapper-jcarousel ul").jcarousel({vertical:!0}).css("visibility","visible"),$2(".product-img-box").addClass("has-jcarousel"),$2(".more-view-wrapper").css("visibility","visible")},initCloudzoom:function(){$2("#product-featured-image").length>0&&($2(".visible-phone").is(":visible")?($2("#product-featured-image").elevateZoom({gallery:"more-view-carousel",cursor:"pointer",galleryActiveClass:"active",imageCrossfade:!1,scrollZoom:!1,onImageSwapComplete:function(){$2(".zoomWrapper div").hide()},loadingIcon:window.loading_url}),$2("#product-featured-image").bind("click",function(e){return!1})):($2("#product-featured-image").elevateZoom({gallery:"more-view-carousel",cursor:"pointer",galleryActiveClass:"active",imageCrossfade:!0,scrollZoom:!0,onImageSwapComplete:function(){$2(".zoomWrapper div").hide()},loadingIcon:window.loading_url}),$2("#product-featured-image").bind("click",function(e){var ez=$2("#product-featured-image").data("elevateZoom");return $2.fancybox(ez.getGalleryList()),!1})))},initScrollTop:function(){$2("#back-top").click(function(){return $2("body,html").animate({scrollTop:0},400),!1})},initProductAddToCart:function(){$2("#product-add-to-cart").length>0&&$2("#product-add-to-cart").click(function(event){if(event.preventDefault(),$2(this).attr("disabled")!="disabled")if(!window.ajax_cart)$2(this).closest("form").submit();else{var variant_id=$2("#add-to-cart-form select[name=id]").val(),prop="",pSize="";variant_id||(variant_id=$2("#add-to-cart-form input[name=id]").val());var quantity=$2("#add-to-cart-form input[name=quantity]").val();quantity||(quantity=1),$2("#add-to-cart-form").find(".prodNote").val()!=""&&(prop=$2("#add-to-cart-form").find(".prodNote").val()),$2("#add-to-cart-form").find(".prodSize").val()!=""&&(pSize=$2("#add-to-cart-form").find(".prodSize").val());var title=$2(".product-title h2").html(),image=$2("#product-featured-image").attr("src");ella.doAjaxAddToCart(variant_id,quantity,prop,pSize,title,image)}return!1})},initAddToCart:function(){$2(".add-to-cart-btn").length>0&&$2(".add-to-cart-btn").click(function(event){if(event.preventDefault(),$2(this).attr("disabled")!="disabled"){var productItem=$2(this).parents(".product-item"),productId=$2(productItem).attr("id"),prop="",pSize="";if(productId=productId.match(/\d+/g),!window.ajax_cart)$2("#product-actions-"+productId).submit();else{var variant_id=$2("#product-actions-"+productId+" select[name=id]").val();variant_id||(variant_id=$2("#product-actions-"+productId+" input[name=id]").val());var quantity=$2("#product-actions-"+productId+" input[name=quantity]").val();quantity||(quantity=1),$2("#product-actions-"+productId).find(".prodNote").val()!=""&&(prop=$2("#product-actions-"+productId).find(".prodNote").val()),$2("#product-actions-"+productId).find(".prodSize").val()!=""&&(pSize=$2("#product-actions-"+productId).find(".prodSize").val());var title=$2(productItem).find(".product-title").html(),image=$2(productItem).find(".product-grid-image img").attr("src");ella.doAjaxAddToCart(variant_id,quantity,prop,pSize,title,image)}}return!1})},showLoading:function(){$2(".loading-modal").show()},hideLoading:function(){$2(".loading-modal").hide()},doAjaxAddToCart:function(variant_id,quantity,prop,pSize,title,image){$2.ajax({type:"post",url:"/cart/add.js",data:{id:variant_id,quantity:quantity,properties:{"Product Note/Comment":prop,"Product Size":pSize}},dataType:"json",beforeSend:function(){ella.showLoading()},success:function(msg){ella.hideLoading(),$2(".ajax-success-modal").find(".ajax-product-title").html(ella.translateText(title)),$2(".ajax-success-modal").find(".ajax-product-image").attr("src",image),$2(".ajax-success-modal").find(".btn-go-to-wishlist").hide(),$2(".ajax-success-modal").find(".btn-go-to-cart").show(),ella.showModal(".ajax-success-modal"),ella.updateDropdownCart()},error:function(xhr,text){ella.hideLoading(),$2(".ajax-error-message").text($2.parseJSON(xhr.responseText).description),ella.showModal(".ajax-error-modal")}})},initQuickView:function(){$2(".quickview-button").click(function(){var product_handle=$2(this).attr("id");return Shopify.getProduct(product_handle,function(product){var template=$2("#quickview-template").html();$2(".quick-view").html(template);var quickview=$2(".quick-view");if(quickview.find(".product-title a").html(ella.translateText(product.title)),quickview.find(".product-title a").attr("href",product.url),quickview.find(".product-vendor span").length>0&&quickview.find(".product-vendor span").text(product.vendor),quickview.find(".product-type span").length>0&&quickview.find(".product-type span").text(product.type),quickview.find(".product-inventory span").length>0){var variant=product.variants[0],inventoryInfo=quickview.find(".product-inventory span");variant.available?variant.inventory_management!=null?inventoryInfo.text(variant.inventory_quantity+" "+window.inventory_text.in_stock):inventoryInfo.text(window.inventory_text.many_in_stock):inventoryInfo.text(window.inventory_text.out_of_stock)}if(product.description.indexOf("[countdown]")>0){var countdownTime=product.description.match(/\[countdown\](.*)\[\/countdown\]/);countdownTime&&countdownTime.length>0&&(quickview.find(".countdown").show(),quickview.find(".quickview-clock").countdown(countdownTime[1],function(event){$2(this).html(event.strftime("%Dd %H:%M:%S"))}))}if(quickview.find(".product-description").length>0){var description=product.description.replace(/(<([^>]+)>)/ig,""),description=description.replace(/\[countdown\](.*)\[\/countdown\]/g,"");if(window.multi_lang&&description.indexOf("[lang2]")>0){var descList=description.split("[lang2]");description=descList[translator.current_lang-1]}description=description.split(" ").splice(0,20).join(" ")+"...",quickview.find(".product-description").text(description)}else quickview.find(".product-description").remove();quickview.find(".price").html(Shopify.formatMoney(product.price,window.money_format)),quickview.find(".product-item").attr("id","product-"+product.id),quickview.find(".variants").attr("id","product-actions-"+product.id),quickview.find(".variants select").attr("id","product-select-"+product.id),product.compare_at_price>product.price?(quickview.find(".compare-price").html(Shopify.formatMoney(product.compare_at_price_max,window.money_format)).show(),quickview.find(".price").addClass("on-sale")):(quickview.find(".compare-price").html(""),quickview.find(".price").removeClass("on-sale")),product.available?(quickview.find(".total-price span").html(Shopify.formatMoney(product.price,window.money_format)),window.use_color_swatch?ella.createQuickViewVariantsSwatch(product,quickview):ella.createQuickViewVariants(product,quickview)):(quickview.find("select, input, .total-price, .dec, .inc, .variants label").remove(),quickview.find(".add-to-cart-btn").text(window.inventory_text.unavailable).addClass("disabled").attr("disabled","disabled")),quickview.find(".button").on("click",function(){var oldValue=quickview.find(".quantity").val(),newVal=1;$2(this).text()=="+"?newVal=parseInt(oldValue)+1:oldValue>1&&(newVal=parseInt(oldValue)-1),quickview.find(".quantity").val(newVal),quickview.find(".total-price").length>0&&ella.updatePricingQuickview()}),window.show_multiple_currencies&&Currency.convertAll(window.shop_currency,jQuery("#currencies").val(),"span.money","money_format"),ella.loadQuickViewSlider(product,quickview),ella.initQuickviewAddToCart(),ella.translateBlock(".quick-view"),$2(".quick-view").fadeIn(500),$2(".quick-view .total-price").length>0&&$2(".quick-view input[name=quantity]").on("change",ella.updatePricingQuickview)}),!1}),$2(".quick-view .overlay, .close-window").live("click",function(){return ella.closeQuickViewPopup(),!1})},updatePricingQuickview:function(){var regex=/([0-9]+[.|,][0-9]+[.|,][0-9]+)/g,unitPriceTextMatch=$2(".quick-view .price").text().match(regex);if(unitPriceTextMatch||(regex=/([0-9]+[.|,][0-9]+)/g,unitPriceTextMatch=$2(".quick-view .price").text().match(regex)),unitPriceTextMatch){var unitPriceText=unitPriceTextMatch[0],unitPrice=unitPriceText.replace(/[.|,]/g,""),quantity=parseInt($2(".quick-view input[name=quantity]").val()),totalPrice=unitPrice*quantity,totalPriceText=Shopify.formatMoney(totalPrice,window.money_format);regex=/([0-9]+[.|,][0-9]+[.|,][0-9]+)/g,totalPriceText.match(regex)||(regex=/([0-9]+[.|,][0-9]+)/g),totalPriceText=totalPriceText.match(regex)[0];var regInput=new RegExp(unitPriceText,"g"),totalPriceHtml=$2(".quick-view .price").html().replace(regInput,totalPriceText);$2(".quick-view .total-price span").html(totalPriceHtml)}},initQuickviewAddToCart:function(){$2(".quick-view .add-to-cart-btn").length>0&&$2(".quick-view .add-to-cart-btn").click(function(){var variant_id=$2(".quick-view select[name=id]").val(),prop="",pSize="";variant_id||(variant_id=$2(".quick-view input[name=id]").val());var quantity=$2(".quick-view input[name=quantity]").val();quantity||(quantity=1),$2(".quick-prod-properties").find(".prodNote").val()!=""&&(prop=$2(".quick-prod-properties").find(".prodNote").val()),$2(".quick-prod-properties").find(".prodSize").val()!=""&&(pSize=$2(".quick-prod-properties").find(".prodSize").val());var title=$2(".quick-view .product-title a").html(),image=$2(".quick-view .quickview-featured-image img").attr("src");ella.doAjaxAddToCart(variant_id,quantity,prop,pSize,title,image),ella.closeQuickViewPopup()})},updateDropdownCart:function(){Shopify.getCart(function(cart){ella.doUpdateDropdownCart(cart)})},doUpdateDropdownCart:function(cart){var showPrice=$2("#cartToggle").attr("data-show-price"),template='<li class="item" id="cart-item-{ID}"><a href="{URL}" title="{TITLE}" class="product-image"><img src="{IMAGE}" alt="{TITLE}"></a><div class="product-details"><a href="javascript:void(0)" title="Remove This Item" class="btn-remove">X</a><p class="product-name"><a href="{URL}">{TITLE}</a></p><div class="cart-collateral">Quantity: {QUANTITY} {AND} <span class="price">{PRICE}</span></div></div></li>';if($2("#cartCount").text(cart.item_count),$2("#dropdown-cart .summary .price").html(Shopify.formatMoney(cart.total_price,window.money_format)),$2("#dropdown-cart .mini-products-list").html(""),cart.item_count>0){for(var i2=0;i2<cart.items.length;i2++){var item=template;item=item.replace(/\{ID\}/g,cart.items[i2].id),item=item.replace(/\{URL\}/g,cart.items[i2].url),item=item.replace(/\{TITLE\}/g,ella.translateText(cart.items[i2].title)),item=item.replace(/\{QUANTITY\}/g,cart.items[i2].quantity),item=item.replace(/\{IMAGE\}/g,Shopify.resizeImage(cart.items[i2].image,"small")),showPrice=="true"?(item=item.replace(/\{AN
1D\}/g,"x"),item=item.replace(/\{PRICE\}/g,Shopify.formatMoney(cart.items[i2].price,window.money_format))):(item=item.replace(/\{AND\}/g,""),item=item.replace(/\{PRICE\}/g,"")),$2("#dropdown-cart .mini-products-list").append(item)}$2("#dropdown-cart .btn-remove").click(function(event){event.preventDefault();var productId=$2(this).parents(".item").attr("id");productId=productId.match(/\d+/g),Shopify.removeItem(productId,function(cart2){ella.doUpdateDropdownCart(cart2)})}),ella.checkNeedToConvertCurrency()&&Currency.convertAll(window.shop_currency,jQuery("#currencies").val(),"#dropdown-cart span.money","money_format")}ella.checkItemsInDropdownCart()},checkNeedToConvertCurrency:function(){return window.show_multiple_currencies&&Currency.currentCurrency!=shopCurrency},loadQuickViewSlider:function(product,quickviewTemplate){var featuredImage=Shopify.resizeImage(product.featured_image,"grande");if(quickviewTemplate.find(".quickview-featured-image").append('<a href="'+product.url+'"><img src="'+featuredImage+'" title="'+product.title+'"/><div style="height: 100%; width: 100%; top:0; left:0 z-index: 2000; position: absolute; display: none; background: url('+window.loading_url+') 50% 50% no-repeat;"></div></a>'),product.images.length>2){var quickViewCarousel=quickviewTemplate.find(".more-view-wrapper ul");for(i in product.images){var grande=Shopify.resizeImage(product.images[i],"grande"),compact=Shopify.resizeImage(product.images[i],"compact"),item='<li><a href="javascript:void(0)" data-image="'+grande+'"><img src="'+compact+'" /></a></li>';quickViewCarousel.append(item)}quickViewCarousel.find("a").click(function(){var quickViewFeatureImage=quickviewTemplate.find(".quickview-featured-image img"),quickViewFeatureLoading=quickviewTemplate.find(".quickview-featured-image div");quickViewFeatureImage.attr("src")!=$2(this).attr("data-image")&&(quickViewFeatureImage.attr("src",$2(this).attr("data-image")),quickViewFeatureLoading.show(),quickViewFeatureImage.load(function(e){quickViewFeatureLoading.hide(),$2(this).unbind("load"),quickViewFeatureLoading.hide()}))}),quickViewCarousel.hasClass("quickview-more-views-owlslider")?ella.initQuickViewCarousel(quickViewCarousel):ella.initQuickViewVerticalMoreview(quickViewCarousel)}else quickviewTemplate.find(".quickview-more-views").remove(),quickviewTemplate.find(".quickview-more-view-wrapper-jcarousel").remove()},initQuickViewCarousel:function(quickViewCarousel){quickViewCarousel&&quickViewCarousel.owlCarousel({navigation:!0,items:5,itemsDesktop:[1199,4],itemsDesktopSmall:[979,3],itemsTablet:[768,3],itemsTabletSmall:[540,3],itemsMobile:[360,3]}).css("visibility","visible")},initQuickViewVerticalMoreview:function(quickViewCarousel){quickViewCarousel&&(quickViewCarousel.jcarousel({vertical:!0}),$2(".product-img-box").addClass("has-jcarousel"),$2(".more-view-wrapper").css("visibility","visible"))},convertToSlug:function(text){return text.toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")},createQuickViewVariantsSwatch:function(product,quickviewTemplate){if(product.variants.length>1){for(var i2=0;i2<product.variants.length;i2++){var variant=product.variants[i2],option='<option value="'+variant.id+'">'+variant.title+"</option>";quickviewTemplate.find("form.variants > select").append(option)}new Shopify.OptionSelectors("product-select-"+product.id,{product:product,onVariantSelected:selectCallbackQuickview});for(var filePath=window.file_url.substring(0,window.file_url.lastIndexOf("?")),assetUrl=window.asset_url.substring(0,window.asset_url.lastIndexOf("?")),options="",i2=0;i2<product.options.length;i2++){options+='<div class="swatch clearfix" data-option-index="'+i2+'">',options+='<div class="header">'+product.options[i2].name+"</div>";var is_color=!1;/Color|Colour/i.test(product.options[i2].name)&&(is_color=!0);for(var optionValues=new Array,j=0;j<product.variants.length;j++){var variant=product.variants[j],value=variant.options[i2],valueHandle=this.convertToSlug(value),forText="swatch-"+i2+"-"+valueHandle;optionValues.indexOf(value)<0&&(options+='<div data-value="'+value+'" class="swatch-element '+(is_color?"color":"")+valueHandle+(variant.available?" available ":" soldout ")+'">',is_color&&(options+='<div class="tooltip">'+value+"</div>"),options+='<input id="'+forText+'" type="radio" name="option-'+i2+'" value="'+value+'" '+(j==0?" checked ":"")+(variant.available?"":" disabled")+" />",is_color?options+='<label for="'+forText+'" style="background-color: '+valueHandle+"; background-image: url("+filePath+valueHandle+'.png)"><img class="crossed-out" src="'+assetUrl+'soldout.png" /></label>':options+='<label for="'+forText+'">'+value+'<img class="crossed-out" src="'+assetUrl+'soldout.png" /></label>',options+="</div>",variant.available&&$2('.quick-view .swatch[data-option-index="'+i2+'"] .'+valueHandle).removeClass("soldout").addClass("available").find(":radio").removeAttr("disabled"),optionValues.push(value))}options+="</div>"}quickviewTemplate.find("form.variants > select").after(options),quickviewTemplate.find(".swatch :radio").change(function(){var optionIndex=$2(this).closest(".swatch").attr("data-option-index"),optionValue=$2(this).val();$2(this).closest("form").find(".single-option-selector").eq(optionIndex).val(optionValue).trigger("change")}),product.available&&(Shopify.optionsMap={},Shopify.linkOptionSelectors(product))}else{quickviewTemplate.find("form.variants > select").remove();var variant_field='<input type="hidden" name="id" value="'+product.variants[0].id+'">';quickviewTemplate.find("form.variants").append(variant_field)}},createQuickViewVariants:function(product,quickviewTemplate){if(product.variants.length>1){for(var i2=0;i2<product.variants.length;i2++){var variant=product.variants[i2],option='<option value="'+variant.id+'">'+variant.title+"</option>";quickviewTemplate.find("form.variants > select").append(option)}
1new Shopify.OptionSelectors("product-select-"+product.id,{product:product,onVariantSelected:selectCallbackQuickview}),$2(".quick-view .single-option-selector").selectize(),$2(".quick-view .selectize-input input").attr("disabled","disabled"),product.options.length==1&&$2(".selector-wrapper:eq(0)").prepend("<label>"+product.options[0].name+"</label>"),quickviewTemplate.find("form.variants .selector-wrapper label").each(function(i3,v){$2(this).html(product.options[i3].name)})}else{quickviewTemplate.find("form.variants > select").remove();var variant_field='<input type="hidden" name="id" value="'+product.variants[0].id+'">';quickviewTemplate.find("form.variants").append(variant_field)}},initQuickViewCollection:function(){/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?$2(".quick_shop, .add_cart_btn").remove():$2(".product-grid-image").hover(function(){$2(this).find(".quick_shop, .add_cart_btn").show()},function(){$2(this).find(".quick_shop, .add_cart_btn").hide()})},closeQuickViewPopup:function(){$2(".quick-view").fadeOut(500)},translateText:function(str){if(!window.multi_lang||str.indexOf("|")<0)return str;if(window.multi_lang){var textArr=str.split("|");return translator.isLang2()?textArr[1]:textArr[0]}},translateBlock:function(blockSelector){window.multi_lang&&translator.isLang2()&&translator.doTranslate(blockSelector)}}})(jQuery),$(function(){$(".clear-cart").click(function(){clearWishlist()})});function clearWishlist(){$.ajax({type:"POST",url:"/cart/clear.js",data:"",dataType:"json",success:function(){var url=document.URL;url=="https://grvault.us/cart"?window.location=url:window.location="https://grvault.us"},error:function(XMLHttpRequest,textStatus){console.log(textStatus)}})} 2//# sourceMappingURL=/cdn/shop/t/48/assets/ella.js.map?v=93286845310825919251503973829
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.