(function() { function bxBootstrap() { var re = /bot|crawl|slurp|spider|mediapartners|headlesschrome|snap-prefetch|remotasks|woorank|uptime\.com|facebookexternalhit|facebookcatalog/i; if (re.test(navigator.userAgent) || navigator.userAgent == '') { return; } if (!(window.bouncex&&bouncex.website)) { var pushedData = []; if(window.bouncex && bouncex.push && bouncex.length){ pushedData = bouncex; } window.bouncex = {}; bouncex.pushedData = pushedData; bouncex.website = {"id":4315,"name":"Z Gallerie","cookie_name":"bounceClientVisit4315","domain":"zgallerie.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"/*Setting logged_in RTV*/\nif(bouncex.website.pts === 'checkout'){\n\t\tsetTimeout(\n \tfunction() {\n \t\tvar $logIn = jQuery('#signInCheckout');\n\t\t\t\tvar $guest = jQuery('#continueAsGuest');\n\n\t\t\t\tif(jQuery('#loginModal').length > 0 ){\n\t\t\t\t console.log('inside login');\n\t\t\t\t\tbouncex.on($logIn, 'click.bx', function() {\n\t\t\t\t\t\tbouncex.setv('logged_in', true);\n\t\t\t\t\t\tbouncex.off($logIn, 'click.bx');\n\t\t\t\t });\n\n\t\t\t\t bouncex.on($guest, 'click.bx', function() {\n\t\t\t\t\t\tbouncex.setv('logged_in', false);\n\t\t\t\t\t\tbouncex.off($guest, 'click.bx');\n\t\t\t\t });\n\t\t\t\t} else {\n\t\t\t\t\tbouncex.setv('logged_in', jQuery('.footerActions').text().toLowerCase().indexOf('log in') === -1);\n\t\t\t\t}\n \t\n \t}\n ,5000);\n} else {\n\tbouncex.setv('logged_in', (jQuery('.logoutButton').length > 0 || jQuery('#topNav-signOut').length > 0 || jQuery('#topNav-signOut').length > 0));\n}\n\n/*https://www.wrike.com/open.htm?id=882304981*/\nbouncex.infoStore = {\n sessionStorageIdentifier: 'bxInfoStore',\n set: function(data) {\n var hashedData = bouncex.lz.compressToURI(JSON.stringify(data));\n try {\n sessionStorage.setItem(this.sessionStorageIdentifier, hashedData);\n } catch(e) {\n bouncex.err('session storage failure');\n }\n },\n \n get: function() {\n var info = sessionStorage.getItem(this.sessionStorageIdentifier);\n return info ? JSON.parse(bouncex.lz.decompressFromURI(info)) : '';\n },\n \n infoIsStored: function() {\n return !!sessionStorage.getItem(this.sessionStorageIdentifier);\n },\n \n populateFields: function(fields) {\n if (!this.infoIsStored()) return;\n \n var data = this.get();\n for (var field in fields) {\n if (fields.hasOwnProperty(field)) {\n fields[field].val(data[field]);\n }\n }\n }\n};\n\n// if (bouncex.website.pts === 'checkout') {\n// var $iframe = jQuery('#checkoutV2'),\n// $iframeDoc = $iframe[0] ? bouncex.utils.getNestedProp('contentWindow.document', false, $iframe[0]) : false,\n// $checkboxTwenty = $iframeDoc && $iframeDoc.querySelector('#newsletterCheckout'),\n// $isChecked,\n// $checkoutModal = $iframeDoc && $iframeDoc.querySelector('#loginModal-signInCheckout'),\n// lastTimeout;\n\n// $checkoutModal.addEventListener('click', setCheckoutOptInVars);\n \n// function setCheckoutOptInVars() {\n// clearTimeout(lastTimeout);\n \n// lastTimeout = setTimeout(function(){\n// $checkboxTwenty && $checkboxTwenty.checked && !bouncex.vars.invalid_checkout && bouncex.setv('opt_in_checkout', true);\n// }, 1000)\n// }\n// }\n \n","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-3580289-6","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":0,"gmp":0,"whitelist_check":0},"burls":[],"ple":false,"fbe":true,"mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"var Z_GALLERIE_DOMAINS = {\n true: ['www.zgallerie.com', 'csc-generation-zgallerie-ssr-next-dolphins.layer0.link', 'csc-generation-zgallerie-ssr-next-sharks-rc.layer0.link', 'staging-shop.zgallerie.com'],\n false: ['www.zgallerie.com']\n}[!!bouncex.testmode.bxdev],\n GIFT_CARD_PATH = 't-giftcard',\n\tQUICKVIEW_SELECTOR = '.modal-body.quickView',\n\tATC_SELECTOR = '#form-action-addToCart, #pdp-atc-sticky, #add-to-cart-form #availableStores button:visible, #availableStores button:visible',\n\tACCOUNT_PATH = 'my-account';\n\n/************* HELPERS **************/\nfunction getUrl(){\n\treturn bouncex.utils.url.allowParams();\n}\n \nfunction isEn(){\n\treturn jQuery('html').attr('lang') === 'en';\n}\n\nfunction isValidDomain(){\n\tvar currentUrl = getUrl(); \n for (var i = 0; i < Z_GALLERIE_DOMAINS.length; i++) {\n if (currentUrl.indexOf(Z_GALLERIE_DOMAINS[i]) > -1) {\n return currentUrl.indexOf(GIFT_CARD_PATH) === -1;\n }\n }\n return false;\n}\n\nfunction getItemIdFromUrl(url){\n\tif (!url){return;}\n\tvar urlArr = url.split('/');\n\treturn urlArr[urlArr.length - 1]; \n}\n\nfunction isAccountPage(){\n return getUrl().indexOf(ACCOUNT_PATH) > -1; \n}\n\nfunction inQuickview(){\n return jQuery('#modal:visible').length > 0;\n}\n\n/************* ITEM **************/\nfunction getItemId(){\n return getItemIdFromUrl(getUrl()); \n}\n\nfunction getItem(){\n\treturn {\n\t\tid : getItemId(),\n\t\tcopy: bouncex.vars.prod_name,\n\t\tcategory : jQuery('.breadcrumbs li:nth-last-child(2) a').text().trim(),\n\t\turl : getUrl(),\n\t\timageurl : jQuery('#pdp-main-product-image').attr('src'),\n\t\tprice : bouncex.vars.prod_price,\n\t\tinstock : bouncex.vars.in_stock,\n /*custom item metadata to be able to filter out converted items from cart*/\n\t\tconversionid: getProductSku(),\n\t\tsubcategory: jQuery('.breadcrumbs li:nth-last-child(3) a').text().trim()\n\t};\n\n}\n\nfunction isValidItem(item){\n\treturn item.id && item.copy && item.category && item.imageurl && item.id.match(/^p-/);\n}\n\nfunction viewItem(itemId){\n bouncex.push(['view item', {\n 'item:id': itemId,\n 'item:itemgroupid': getProductSku() || itemId\n }]);\n}\n\nfunction firePdpEvents(item){\n\tbouncex.push(['item', item]);\n\tviewItem(item.id);\n}\n\nfunction fireWhenStableData(getDataFunc) {\n\tthis.dataCache = {};\n\tvar dataInterval = setInterval(function() {\n\t\tvar url = getDataFunc();\n\t\tvar dataString = JSON.stringify(url);\n\t\tthis.dataCache[dataString] ? this.dataCache[dataString]++ : this.dataCache[dataString] = 1;\n\n\t\tif (this.dataCache[dataString] > 2) {\n\n initializePdpEvents();\n\t\t\tclearInterval(dataInterval);\n\t\t}\n\n\t}.bind(this), 800);\n}\n\n/************* CATEGORY **************/\nfunction getItemIdFromCatPage(url){\n\tvar trimmedUrl = url.split('?')[0];\n\treturn trimmedUrl.replace('/','');\n}\n\nfunction getCatPageTitle(){\n\treturn jQuery('h1.page-heading').text();\n}\n\nfunction getCategoryIds(){\n \treturn jQuery('.product-name').map(function(){\n var prodUrl = jQuery(this).attr('href');\n return getItemIdFromCatPage(prodUrl);\n }).toArray().join(',');\n}\n\nfunction getCategoryObj(){\n\treturn {\n 'page:title' : getCatPageTitle(),\n 'page:url': getUrl(),\n 'items:ids': getCategoryIds()\n };\n}\n\n/************* COLLECTION PAGE **************/\n// function trackAtcCollectionPg(){\n\n// var windowData = bouncex.utils.getNestedProp('__NEXT_DATA__.props.pageProps.product');\n// jQuery('.button.button--primary.atc-btn').click(function(event){\n// debugger;\n// var itemId = getItemId(),\n// quantity = jQuery(this).closest('form').find('.form-input.form-input--incrementTotal').val(),\n// product_id = windowData && windowData.id ? windowData.id : jQuery(\".image.current-image img\").attr('src').split('products/')[1].split('/image')[0],\n// product_name = jQuery(this).closest('.collection-variant').find('.variant-name div:first').text(),\n// product_attr,\n// product_val,\n// lineItem;\n// bouncex.log('prod name', product_name)\n// if (__NEXT_DATA__.props.pageProps.product){\n// product_attr = __NEXT_DATA__.props.pageProps.product.options[0].id;\n// product_val = __NEXT_DATA__.props.pageProps.product.options[0].option_values.filter(function(obj){\n// return obj.label.indexOf(product_name) > -1;\n// })[0].id;\n// }\n// var lineItem = buildStaticLineItem(product_id, quantity, product_attr, product_val);\n// fireAddToCart(itemId, lineItem);\n// });\n// }\n\nfunction trackAtcCollectionPg(){\n jQuery('.button.button--primary.atc-btn').click(function(event){\n bouncex.log('adding to cart')\n var itemId = getItemId();\n \n bouncex.et.onTrue(function(){\n return wunderkind && wunderkind.addToCartFormData && wunderkind.addToCartFormData[\"qty[]\"]\n }, function(){\n bouncex.log('form data ready')\n var itemId = bouncex.website.pts === \"product\" ? getItemId() : jQuery('.quickView-link a').attr('href').replace('/', '');\n var formData = wunderkind.addToCartFormData;\n fireAddToCart(itemId, formData);\n }, 100);\n \n })\n}\n\n/************* CART **************/\nfunction emptyCart(){\n\tif (bouncex.vars.cart_qty === 0){\n\t\tbouncex.push(['empty_cart', {}]);\n }\n}\n\nfunction fireAddToCart(itemId, lineItem){\n if (lineItem){\n bouncex.push(['add to cart', {\n\t\t\t'item:id': itemId,\n\t\t\t'cart:item': JSON.stringify(lineItem)\n\t\t}]);\n } else {\n bouncex.push(['add to cart', {\n\t\t\t'item:id': itemId\n\t\t}]);\n }\n}\n/************* REPLENISHMENT **************/\nfunction replenish(cart) {\n var $deferreds = [];\n\n cart.items.forEach(function(item) {\n $deferreds.push(makeReplenItem(item));\n });\n\n $deferreds.reduce(function(promise, func) {\n return promise.then(function() {\n return func();\n });\n }, jQuery.Deferred().resolve([]))\n .then(replenComplete);\n}\n\nfunction makeReplenItem(item) {\n var replenUrl = \"https://www.zgallerie.com/remote/v1/cart/add\";\n return function() {\n return jQuery.ajax({\n method: \"POST\",\n url: replenUrl,\n data: item\n });\n };\n}\n\nfunction replenComplete() {\n bouncex.setTimeout2(function() {\n window.location.href = window.location.pathname + '?bx_replen=true';\n }, 2000);\n}\n \n/************* CART TRACKING **************/\nfunction getAjaxProductId(){\n var prodUrl = jQuery('.productView-thumbnail img:first').attr('src') ||\n jQuery('.standardPdpImages img:first').attr('src') ||\n jQuery('.slick-current img:first').attr('src');\n return prodUrl.length && \n !!prodUrl.split('products/')[1] && \n !!prodUrl.split('products/')[1].split('/images')[0] ?\n prodUrl.split('products/')[1].split('/images')[0] :\n prodUrl;\n}\n\nfunction buildProductAttributes(){\n var attr = jQuery('#add-to-cart-form input'),\n attrMap = {};\n \n for (var i = 0; i < attr.length; i++){\n var currAttr = jQuery(attr[i]).attr('name');\n var currVal = jQuery(attr[i]).val();\n if (currAttr && currVal){\n attrMap[currAttr] = currVal\n }\n }\n return attrMap;\n}\n\nfunction buildStaticLineItem(product_id, quantity, product_attr, product_val){\n var lineItem = {\n qty: quantity,\n product_id: product_id,\n action: 'add'\n };\n \n if (!product_attr || !product_val){\n return lineItem; \n }\n \n var variationAttr = \"attribute[\" + product_attr + \"]\";\n lineItem[variationAttr] = product_val\n\n return lineItem;\n}\n\n\n/************* LOGGED IN USER TRACKING **************/\nfunction fireUserLoggedIn(userEmail){\n\tbouncex.push([\n\t\t'user',\n\t\t{\n\t\t\t'email': userEmail,\n\t\t\t'source': 'LoggedIn'\n\t\t}\n\t]);\n\tbouncex.setv('logged_in_identified', true);\n setBounceCookie();\n}\n\n/************* CATALOG EVENTS **************/\nfunction fireSelectSku(itemId, sku){\n bouncex.push([\n 'select_sku', \n {\n 'item:id': itemId,\n 'item:itemgroupid': sku,\n 'item:feedid': sku\n }\n ]);\n}\n\nfunction getProductSku(){\n var skuString = bouncex.utils.getParam('sku') || jQuery('[data-testid=\"product-detail-value-sku\"]').text();\n\n return skuString || '';\n}\n\n/************* INITIALIZE EVENTS **************/\nfunction initializePdpEvents(){\n\tvar item; \n\tbouncex.et.onTrue(function(){\n\t\titem = getItem();\n\t\treturn isValidItem(item);\n\t}, function(){\n\t\tfirePdpEvents(item);\n\t}, 30);\n}\n\nfunction initializeCartEvents(){\n bouncex.et.onVarChange('cart_qty', emptyCart);\n \n if (jQuery('.collection-variant').length > 0){\n trackAtcCollectionPg();\n return;\n }\n \n bouncex.off(jQuery(document), 'click.bx', ATC_SELECTOR);\n bouncex.on(jQuery(document), 'click.bx', function(){\n var itemId = bouncex.website.pts === \"product\" ? getItemId() : jQuery('.quickView-link a').attr('href').replace('/', '');\n var quantity = jQuery('#QTY input[type=\"number\"]').val();\n var product_id = getAjaxProductId();\n var productAttributes = buildProductAttributes();\n \n if (itemId && product_id){\n productAttributes[\"qty\"] = quantity || \"1\"\n productAttributes[\"product_id\"] = product_id\n productAttributes[\"action\"] = 'add'\n fireAddToCart(itemId, productAttributes)\n }\n \n }, ATC_SELECTOR);\n}\n\nfunction initializeCategoryEvents(){\n\tvar categoryObj = getCategoryObj();\n\tif (categoryObj['items:ids'].length){\n\t\tbouncex.push(['view category', categoryObj]);\n\t}\n}\n\nfunction initializeQuickviewEvents() {\n bouncex.et.onVisible(QUICKVIEW_SELECTOR, function () {\n var itemId = (jQuery('.quickView-link a').attr('href') || '').replace('/', ''),\n groupId = jQuery('.quickView-itemSelection [data-product-sku]').attr('data-product-sku') || itemId.split('-').pop();\n if (itemId && groupId) {\n bouncex.push(['view item', {\n 'item:id': itemId,\n 'item:itemgroupid': groupId\n }]);\n fireSelectSku(itemId, groupId);\n }\n bouncex.off(jQuery('#form-action-addToCart'), 'click.bxQuickAdd');\n bouncex.on(jQuery('#form-action-addToCart'), 'click.bxQuickAdd', function () {\n var quantity = jQuery('[id*=\"qty\"][class*=\"incrementTotal\"]').val(),\n product_id = jQuery('.quickView-cartForm [name=\"product_id\"]').val();\n if (itemId && product_id && quantity) {\n var replenItem = {\n 'qty': quantity,\n 'product_id': product_id,\n 'action': 'add'\n };\n\n fireAddToCart(itemId, replenItem);\n }\n\n });\n });\n}\n\nfunction initializeLoggedInUser(){\n if (!bouncex.vars.logged_in_identified){\n if (isAccountPage() && bouncex.vars.logged_in){\n var userEmail = jQuery('input[name=\"email\"]').val();\n if (bouncex.utils.validate.email(userEmail)){\n \t\t\tfireUserLoggedIn(userEmail);\n \t\t}\n }\n }\n}\n\nfunction initializeCatalogTracking(){\n bouncex.et.onVarChange('product_sku', function(){\n if (bouncex.website.pts === \"product\") { \n itemId = getItemId(); \n } else if (jQuery('.quickView-link a').length > 0) {\n itemId = jQuery('.quickView-link a').attr('href').replace('/', '');\n }\n if (bouncex.vars.product_sku && itemId){\n fireSelectSku(itemId, getProductSku());\n }\n });\n}\n\n// This functioon will be used once the wunderkind window object is deployed \n// function fireNewATCTracking(){\n// bouncex.off(jQuery(document), 'click.bx', '.button.button--primary.atc-btn, #form-action-addToCart, #pdp-atc-sticky, #add-to-cart-form #availableStores button:visible, #availableStores button:visible');\n// bouncex.on(jQuery(document), 'click.bx', function(){\n// bouncex.log('clicking atc')\n// bouncex.et.onTrue(function(){\n// return wunderkind && wunderkind.addToCartFormData && wunderkind.addToCartFormData[\"qty[]\"]\n// }, function(){\n// bouncex.log('form data ready')\n// var itemId = bouncex.website.pts === \"product\" ? getItemId() : jQuery('.quickView-link a').attr('href').replace('/', '');\n// var formData = wunderkind.addToCartFormData;\n// fireAddToCart(itemId, formData);\n// }, 10);\n// }, '.button.button--primary.atc-btn, #form-action-addToCart, #pdp-atc-sticky, #add-to-cart-form #availableStores button:visible, #availableStores button:visible');\n// }\n\nfunction init() {\n if (isValidDomain() && isEn()) {\n bouncex.et.cart.init({\n replenishmentType : 'ajax',\n replenish : replenish,\n });\n // if (bouncex.testmode.bxdev){\n // fireNewATCTracking()\n // }\n initializeCartEvents();\n initializeLoggedInUser();\n initializeCatalogTracking();\n initializeQuickviewEvents();\n switch(bouncex.website.pts) {\n case 'product':\n bouncex.setTimeout2(function() { \n fireWhenStableData(getUrl);\n }, 2000);\n \n break;\n case 'category':\n initializeCategoryEvents();\n break;\n default:\n break;\n } \n }\n return;\n}\n\ninit();\n","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/cart"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"staging-shop.zgallerie.com"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"shop.zgallerie.com"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('#product-listing-container').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/search.php?search_query="}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"staging-shop.zgallerie.com"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('[data-crl8-container-id=\"homepage\"]').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"staging-shop.zgallerie.com"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"shop.zgallerie.com"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('#pdp-productView').length > 0;"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search.php"}]]}},"els":{"blank_site_element":""},"vars":[{"name":"logged_in","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"","trigger":""},{"name":"ever_logged_in","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":""},{"name":"cart_qty","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function() {\n\tvar cart_qty = 0;\n\n\tif(bouncex.website.pts === 'cart'){\n\t\tfor(i = 0; i < jQuery('.qtyChange-CartPage.cart-item-qty-input').length; i++){\n\t\t\tcart_qty += Number(jQuery('.qtyChange-CartPage.cart-item-qty-input').eq(i).prop('value') || 0);\n\t\t}\n\t\treturn cart_qty;\n\t} else if(jQuery('.dropdown-menu.f-open-dropdown.is-open').length > 0){\n\t\treturn jQuery('.previewCart-emptyBody').length > 0 ? 0 : Number(jQuery('.cart-quantity').text() || 0);\n\t} else {\n\t\treturn Number(jQuery('.cart-quantity').text() || 0) || null;\n\t}\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function(){\n\tif (bouncex.website.pts === 'cart'){\n\t\treturn jQuery('.empty-cart').length > 0 ? 0 : Number(jQuery('.cart-total-value.cart-total-grandTotal').text().replace(/[^0-9.]/g, '') || 0);\n\t} else if (bouncex.website.pts === 'checkout'){\n\t\treturn Number(jQuery('.orderSummary-orderTotal').text().replace(/[^0-9.]/g, '') || 0);\n\t} else if (jQuery('.dropdown-menu.f-open-dropdown.is-open').length > 0) {\n\t\treturn jQuery('.previewCart-emptyBody').length > 0 ? 0 : Number(jQuery('.cart-total-value').eq(0).text().replace(/[^0-9.]/g, '') || 0);\n\t}else if(jQuery('#pdp-previewcart-modal').length > 0){\n\t\treturn Number(jQuery('.previewCartCheckout-price').text().replace(/[^0-9.]/g, '') || 0);\n\t} else {\n\t return null;\n\t}\n})();","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(function (){\n\tvar price = jQuery('span[data-product-price-without-tax=\"true\"],.price.price--withoutTax').eq(0).text().split('-');\n\n\treturn price.length > 0 ? Number(price[0].replace(/[^0-9.]/g, '') || 0) : false;\n\t\n})();","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('h1[itemprop=\"name\"]').text();","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('#form-action-addToCart').length > 0 || jQuery('.button.button--primary.atc-btn').length > 0;","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('#subscribeModal[style=\"display: block;\"]').length > 0 || null;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"cart_token","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_items","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cookie_modal_present","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"product_sku","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n return bouncex.utils.getParam('sku');\n})();","trigger":"pageload"},{"name":"sale_items","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.productInformation .price-color').length > 0;","trigger":"pageload"},{"name":"cart_plurality","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n\tvar qty = 0;\n\n\tswitch (true){\n\t\tcase bouncex.website.pts === 'cart':\n\t\t\tjQuery('.qtyChange-CartPage.cart-item-qty-input').each(function() {\n\t\t\t\tqty += Number((jQuery(this).val() || 0).replace(/[^0-9.]/g, ''));\n\t\t\t});\n\t\t\tbreak;\n\t\tcase bouncex.website.pts === 'checkout':\n\t\t\tjQuery('.itemSummary-title-quantity').each(function() {\n\t\t\t\tqty += Number(jQuery(this).text().replace(/[^0-9.]/g, '') || 1);\n\t\t\t});\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tqty = Number(jQuery('.cart-quantity').text().replace(/[^0-9.]/g, ''));\n\t\t\tbreak;\n\t}\n\n\treturn qty > 1 ? 'items' : 'item';\n})();","trigger":"pageload"},{"name":"cart_plurality_are","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n\tvar qty = 0;\n\n\tswitch (true){\n\t\tcase bouncex.website.pts === 'cart':\n\t\t\tjQuery('.qtyChange-CartPage.cart-item-qty-input').each(function() {\n\t\t\t\tqty += Number((jQuery(this).val() || 0).replace(/[^0-9.]/g, ''));\n\t\t\t});\n\t\t\tbreak;\n\t\tcase bouncex.website.pts === 'checkout':\n\t\t\tjQuery('.itemSummary-title-quantity').each(function() {\n\t\t\t\tqty += Number(jQuery(this).text().replace(/[^0-9.]/g, '') || 1);\n\t\t\t});\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tqty = Number(jQuery('.cart-quantity').text().replace(/[^0-9.]/g, ''));\n\t\t\tbreak;\n\t}\n\n\treturn qty > 1 ? 'are' : 'is';\n})();","trigger":"pageload"},{"name":"listrak_overlay_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#ltkpopup-overlay:visible').length > 0;","trigger":"pageload"},{"name":"opt_in_checkout","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"checkout_visible","polling":"all","persist":"no","page_types":["checkout"],"testmode":false,"default":"false","code":"(function(){\n var $iframe = jQuery('#checkoutV2'),\n $iframeDoc = $iframe[0] ? bouncex.utils.getNestedProp('contentWindow.document', false, $iframe[0]) : false,\n $checkout = $iframeDoc && $iframeDoc.querySelector('#loginModal-guestCheckout'),\n $checkoutVisible = $checkout && $checkout.offsetWidth > 0 && $checkout.offsetHeight > 0; \n return $checkoutVisible || false;\n}())","trigger":"pageload"},{"name":"invalid_checkout","polling":"all","persist":"no","page_types":["checkout"],"testmode":false,"default":"false","code":"(function(){\n var $iframe = jQuery('#checkoutV2'),\n $iframeDoc = $iframe[0] ? bouncex.utils.getNestedProp('contentWindow.document', false, $iframe[0]) : false,\n $invalidCreds = $iframeDoc && $iframeDoc.querySelector('#loginModal-email-required, #loginModal-password-required'),\n $invalidCredsVisible = $invalidCreds && $invalidCreds.offsetWidth > 0 && $invalidCreds.offsetHeight > 0; \n return $invalidCredsVisible || false;\n}())","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":1,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"bxid":"espemailid"},"cus":"","miw_exclude":"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":1,"spatm":0,"preinit_cjs":"//Helper Function\nfunction getLastEventObj(dlEvents) {\n return dlEvents[dlEvents.length - 1];\n}\n\nfunction getDlObjEvent(eventKey, eventName) {\n var dlArry = bouncex.utils.getNestedProp('dataLayer', []).filter(function(dl) {\n return dl[eventKey] === eventName;\n }),\n obj = getLastEventObj(dlArry);\n\n return bouncex.utils.getNestedProp('ecommerce',{},obj);\n}\n\nlet segments = {\n /* PROPERTIES */\n testMode: false,\n interceptEnabled: true,\n mirrorEnabled: true,\n arrayObserverEnabled: false,\n /* METHODS */\n /* Intercept Events */\n useIntercept() {\n if (!this.interceptEnabled) {\n return;\n }\n bouncex.utils.shqInterceptEvent = {\n // true blocks event, defined functions run in place of default\n productView: function() {\n // PageView - PDP\n var prodId = bouncex.utils.getParam('sku');\n\n if (!!prodId) {\n _shq.push(['onProductView', {\n productId: prodId \n }]);\n }\n },\n cartAdd: true\n };\n },\n /* Mirror Events */\n useMirror() {\n if (!this.mirrorEnabled) {\n return;\n }\n bouncex.utils.shqMirrorEvent = {\n pageview: function() {\n // Search PageView\n var sp = bouncex.utils.getParam('search_query').replace(/\\+/gi, ' ');\n\n if (bouncex.website.pts === 'search' && !!sp) {\n _shq.push(['onSearch', { \n searchPhrase: sp \n }]);\n }\n },\n 'add to cart': function() {\n // AddToCart - PDP & QuickView\n var dl = bouncex.utils.getNestedProp('dataLayer', []),\n oldDlLength = dl.length,\n newDlLength;\n\n bouncex.et.onTrue(function() {\n // dataLayer delay so checking for changes after atc event is triggered\n newDlLength = dl.length;\n return oldDlLength !== newDlLength;\n }, function() {\n var atcObj = getDlObjEvent('event','addToCart'),\n prodId = bouncex.utils.getNestedProp('add.products[0].id', '', atcObj),\n prodQty = +jQuery('input[type=\"number\"]:visible').val() || bouncex.utils.getNestedProp('add.products[0].quantity','',atcObj),\n prodPrice = +bouncex.utils.getNestedProp('add.products[0].salePrice', '', atcObj);\n\n if (!!prodId && !!prodQty && !!prodPrice) {\n _shq.push(['onCartAdd', {\n Items: [{ \n ProductId: prodId, \n UnitPrice: prodPrice, \n Quantity: prodQty \n }], \n Total: prodPrice * prodQty \n }]);\n }\n \n }, 25);\n }\n };\n },\n processObserver(e) {\n // Write handle methods here:\n while (e.length) {\n let event = e.shift();\n //event variable will contain the object to process.\n }\n },\n arrayObserver() {\n if (!this.arrayObserverEnabled) {\n return;\n }\n bouncex.et.onTrue(\n () => {\n return bouncex.utils.getNestedProp('window._shq.loaded');\n },\n () => {\n _shq.ArrayObserver(window.dataLayer, (e) => {\n this.processObserver(e);\n });\n }\n );\n },\n /* Initialize Segments Tracking */\n init() {\n // test mode\n if (this.testMode && !bouncex.testmode.bxdev) return;\n // attach object to window & bouncex.utils\n if (!bouncex.utils) {\n return;\n }\n bouncex.utils.segments = this;\n // initialize intercept and mirror, comment out if not needed\n this.useIntercept();\n this.useMirror();\n //this.arrayObserver();\n },\n};\n\nsegments.init();\n","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"Hit 'Send' to sign-up for automated, recurring Z Gallerie mktg txts (like cart reminders) to this #, per terms.","eventSharing":true,"shqId":"qezyd31qmd-1","enabled":1},"pde":true,"fmc":["US","CA"],"fme":true,"fmx":"","sdk":{"android":{"enabled":false,"enabledVersions":[],"eventModifications":null},"ios":{"enabled":false,"enabledVersions":[],"eventModifications":null}},"onsite":{"enabled":1},"ads":{"enabled":0},"pubs":{"enabled":0},"websdk":{"enabled":0},"ga4_property_id":"317917563","ga4_measurement_id":"G-XH6Z5GG2WH"} ; bouncex.tag = 'tag3'; bouncex.$ = window.jQuery; bouncex.env = 'production'; bouncex.restrictedTlds = {"casl":{"ca":1},"gdpr":{"ad":1,"al":1,"at":1,"ax":1,"ba":1,"be":1,"bg":1,"by":1,"xn--90ais":1,"ch":1,"cy":1,"cz":1,"de":1,"dk":1,"ee":1,"es":1,"eu":1,"fi":1,"fo":1,"fr":1,"uk":1,"gb":1,"gg":1,"gi":1,"gr":1,"hr":1,"hu":1,"ie":1,"im":1,"is":1,"it":1,"je":1,"li":1,"lt":1,"lu":1,"lv":1,"mc":1,"md":1,"me":1,"mk":1,"xn--d1al":1,"mt":1,"nl":1,"no":1,"pl":1,"pt":1,"ro":1,"rs":1,"xn--90a3ac":1,"ru":1,"su":1,"xn--p1ai":1,"se":1,"si":1,"sj":1,"sk":1,"sm":1,"ua":1,"xn--j1amh":1,"va":1,"tr":1}}; bouncex.client = { supportsBrotli: 1 }; bouncex.assets = {"ads":"e2e1dbb7c70b701b3c197204872400a0","creativesBaseStyles":"a53944a2","gpsAuction":"1375a7b38c31e98d14fe7f396b72da14","inbox":"02aca5df0e176b8810a86da97ac05424","onsite":"0e56ab6ba004ee080ce3deb3edae35e9","sms":"e39203556bab2366e56296ce42e974a7","websdk":"0704dae1eb637cbeb4a847506058402d"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_6459738026535cda4232dc813c61447d.br.js'); runtime.setAttribute('async', 'async'); runtime.setAttribute('onload', 'bouncex.initializeTag()'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_1247731b761376f768004922730ab4f3.br.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); var deviceGraphScript = document.createElement('script'); deviceGraphScript.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/cjs_min_3a843477d8e318f67237a66d0a58c542.js'); deviceGraphScript.setAttribute('async', 'async'); var dgAttrs = [{"Key":"id","Value":"c.js"},{"Key":"async","Value":"true"},{"Key":"data-apikey","Value":"2^HIykD"},{"Key":"data-cb","Value":"bouncex.dg.initPostDeviceGraph"},{"Key":"data-bx","Value":"1"},{"Key":"data-gm","Value":"1"},{"Key":"data-fire","Value":"1"}]; if (dgAttrs) { for (var i = 0; i < dgAttrs.length; i++) { deviceGraphScript.setAttribute(dgAttrs[i].Key, dgAttrs[i].Value); } } document.body.appendChild(deviceGraphScript); bouncex.initializeTag = function() {}; }; document.body.appendChild(runtime); } window._shq = window._shq || []; var eventSharingCartridge = document.createElement('script'); eventSharingCartridge.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/wknd_audiences_2648fa8509e4b3a98a2790bb8171ddc1.js'); eventSharingCartridge.setAttribute('async', 'async'); document.body.appendChild(eventSharingCartridge); } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();