(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":3393,"name":"rag & bone","cookie_name":"bounceClientVisit3393","domain":"rag-bone.com","ct":"bind_to_domain","ally":0,"ei":0,"tcjs":"","cjs":"// enable.feature.PERSISTENT_COUPONS","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-18456029-1","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":"/* ---------------------------- SHARED VARIABLES ---------------------------- */\n\nvar CART_COOKIE_KEY = 'dwanonymous_401042b81ab76065abf562c66e900eb2',\n SALE_CART_COOKIE_KEY = 'dwanonymous_c50d4d2e6b5972475607dec538b45607';\n\n/* --------------------------------- HELPERS -------------------------------- */\n\nfunction getUrl() {\n return bouncex.utils.url.allowParams(['q']);\n}\n\nfunction setVarAndCookie(varName, value) {\n bouncex.setVar(varName, value);\n bouncex.setBounceCookie();\n}\n\nfunction formatItemCategory() {\n var $breadcrumbs = jQuery('.b-breadcrumbs-item');\n\n return $breadcrumbs.eq($breadcrumbs.length - 2).text().trim() || \"global\";\n}\n\nfunction getItemGroupId(itemId) {\n var id = itemId ? itemId : jQuery('.l-pdp-main').attr('data-master-pid') || '',\n idSplit = id.split('_');\n \n return idSplit.length > 1 ? idSplit.slice(0, idSplit.length -1 ).join('_') : id;\n}\n\nfunction getItemColor() {\n var params = window.location.search.replace('?', '').split('&'),\n color;\n\n for (var i = 0; i < params.length; i++) {\n var pair = params[i].split('='),\n key = pair[0],\n val = pair[1];\n\n if (key.indexOf('_color') > -1) {\n color = val;\n }\n }\n \n if (!color){\n color = jQuery('.b-variation_swatch.m-swatch[aria-checked=\"true\"] span').attr('data-attr-value');\n }\n\n return color || '';\n}\n\nfunction formatItemId(id) {\n var color = getItemColor();\n\n return color ? id + '_' + color : id;\n}\n\nfunction isSaleSite() {\n return getUrl().indexOf('sale.rag-bone.com') > -1;\n}\n\nfunction getCartCookie() {\n return isSaleSite() ? SALE_CART_COOKIE_KEY : CART_COOKIE_KEY;\n}\n\n/* ------------------------------ ITEM TRACKING ----------------------------- */\n\nfunction getItem() {\n return {\n id: getItemGroupId(),\n copy: jQuery('.b-product_details-name').eq(0).text().trim().toUpperCase(),\n category: isSaleSite() ? 'sale items' : formatItemCategory(),\n url: getUrl(),\n imageurl: jQuery('meta[property=\"og:image\"]').attr('content') || jQuery('img.b-product_image-img').attr('src') || '',\n instock: jQuery('.customSelect.m-disabled').length > 0 ? false : jQuery('[data-id=\"addToCart\"]').is(':visible')\n };\n}\n\nfunction fireViewItem(item) {\n var pushItem = {\n 'item:id': item.id,\n };\n\n if (item.groupId) {\n pushItem['item:itemgroupid'] = item.groupId.split('_')[0];\n }\n\n pushItem['sale:issalesite'] = isSaleSite();\n\n bouncex.push(['view item', pushItem]);\n} \n\nfunction isExcluded(item) {\n return item.url.indexOf('gift-card') > -1;\n}\n\nfunction initializeItemEvents() {\n var item;\n\n bouncex.et.onTrue(function() {\n item = getItem();\n return !!item.id &&\n !!item.copy &&\n !!item.category &&\n !!item.url &&\n !!item.imageurl;\n }, function() {\n if (isExcluded(item)) {\n return;\n }\n\n bouncex.push(['item', item]);\n initializeSkuEvents(item);\n fireViewItem(item);\n\n initializeATCClickTracking(item.id);\n initializeQuickATCEvents();\n }, 10);\n}\n\n/* ------------------------------ SKU TRACKING ------------------------------ */\n\nfunction initializeSkuEvents(item) {\n var skuObj = {\n id: item.id,\n groupId: item.id,\n skuId: '',\n },\n skuId = '';\n\n bouncex.et.onVarChange('sku', function(oldVal, newVal) {\n var size = jQuery('#size').val() || '';\n \n if (!size || size.toLowerCase().indexOf('select your size') > -1) {\n return;\n }\n \n newVal = '' + newVal;\n if (newVal.indexOf(skuObj.groupId) > -1) {\n return;\n }\n\n skuId = newVal || skuId;\n\n if (skuObj.skuId === skuId) {\n return;\n }\n\n skuObj.skuId = skuId;\n bouncex.push(['select_sku', {\n 'item:id': skuObj.id,\n 'item:itemgroupid': skuObj.groupId,\n 'item:feedid': skuObj.skuId,\n 'sale:issalesite': isSaleSite()\n }]);\n }, 10);\n}\n\n/* ---------------------------- CATEGORY TRACKING --------------------------- */\n\nfunction getItemIdsCat() {\n var ids = [],\n $tiles = jQuery('.b-product_tile');\n\n for (var i = 0; i < $tiles.length; i++) {\n var id = jQuery($tiles[i]).attr('data-product-id')|| '';\n \n if (!id){ return }\n \n id = getItemGroupId(id);\n\n if (!id || ids.indexOf(id) > -1) {\n continue;\n }\n\n ids.push(id);\n }\n\n return ids.join(',');\n}\n\nfunction getCategoryObject() {\n return {\n 'page:url': getUrl(),\n 'items:ids': getItemIdsCat(),\n 'sale:issalesite': isSaleSite()\n };\n}\n\nfunction initializeCategoryEvents() {\n var categoryObj;\n\n bouncex.et.onTrue(function() {\n categoryObj = getCategoryObject();\n return !!categoryObj['items:ids'].length && !!categoryObj['page:url'];\n }, function() {\n bouncex.push(['view category', categoryObj]);\n initializeQuickATCEvents();\n initializeHoverEvents();\n }, 10);\n}\n\nfunction initializeHoverEvents() {\n var id,\n groupId;\n bouncex.et.onHover('.b-product_tile', function(e) {\n id = jQuery(e).attr('data-product-id'),\n groupId = getItemGroupId(id);\n \n if (id && groupId) {\n bouncex.push(['view item', {\n 'item:id': groupId,\n 'item:itemgroupid': groupId\n }]);\n }\n });\n}\n\n/* ------------------------------- CART EVENTS ------------------------------ */\n\nfunction initializeQuickATCEvents() {\n bouncex.et.on(jQuery(document), 'click.bxatc', function() {\n var itemId = jQuery(this).parents().attr('data-pid') || '',\n groupId = itemId ? getItemGroupId(itemId) : '',\n replenItem = {\n 'pid': jQuery(this).attr('data-pid') || '',\n 'quantity': 1,\n 'actionType': 'quickbuy',\n 'options': '',\n 'childProducts': ''\n },\n pushItem = {\n id: groupId,\n groupId: groupId\n };\n\n if (!groupId) {\n return;\n }\n\n fireAddToCart(groupId, replenItem);\n fireViewItem(pushItem);\n }, 'button[name=quickViewAddToCart]');\n}\n\nfunction fireAddToCart(itemId, replenItem) {\n bouncex.push(['add to cart', {\n 'item:id': itemId, \n 'cart:item': bouncex.stringify(replenItem),\n 'sale:issalesite': isSaleSite()\n }]);\n \n setVarAndCookie('cart', true);\n}\n\nfunction initializeATCClickTracking(itemId) {\n var $atcButton = jQuery('.b-product_details-add_btn');\n replenItem = {\n 'pid': '',\n 'quantity': 1,\n 'actionType': 'regular',\n 'options': [],\n 'childProducts': []\n };\n\n bouncex.off(jQuery(document), 'click.bxatc');\n bouncex.et.on(jQuery(document), 'click.bxatc', function() {\n if ($atcButton.is('[disabled]')) {\n return;\n }\n \n replenItem.pid = jQuery('.l-pdp-main').attr('data-pid') || '';\n \n if (!replenItem.pid) {\n return;\n }\n\n fireAddToCart(itemId, replenItem);\n }, '.b-product_details-add_btn');\n}\n\nfunction emptyCart() {\n bouncex.et.onVarChange('cart_qty', function(oldVal, newVal) {\n if (bouncex.vars.cart && newVal === 0 && oldVal > 0) {\n bouncex.push(['empty_cart']);\n setVarAndCookie('cart', false);\n }\n });\n}\n\nfunction initializeCartEvents() {\n bouncex.et.cart.init({\n replenishmentType: 'ajax',\n replenish: function (cart) {\n var $deferreds = [];\n \n cart.items.forEach(function(item) {\n $deferreds.push(makeAjaxATCFunc(item));\n });\n \n $deferreds.reduce(function(promise, func) {\n return promise.then(function() {\n return func();\n });\n }, jQuery.Deferred().resolve([])).then(replenComplete);\n }\n });\n\n function makeAjaxATCFunc(replenItem) {\n replenItem['csrf_token'] = document.getElementById('csrf-token-element').getAttribute('data-token-value') || '';\n \n var dataStr = bouncex.utils.url.generateQuerystring(replenItem);\n \n return function() {\n return jQuery.ajax({\n type: 'POST',\n url: 'https://www.rag-bone.com/on/demandware.store/Sites-ragandbone-Site/en_US/Cart-AddProduct?ajax=true',\n data: dataStr\n });\n };\n }\n\n function replenComplete() {\n window.location.href = window.location.origin + window.location.pathname + '?bx_replen=true';\n }\n\n emptyCart();\n}\n\n/* ------------------------------ USER TRACKING ----------------------------- */\n\nfunction getUserEmail() {\n return jQuery('[data-tau=account_profileInfo] li').eq(1).text().trim() || '';\n}\n\nfunction initializeUserTracking() {\n var userEmail;\n\n\n bouncex.et.onTrue(function() {\n userEmail = getUserEmail();\n\n return bouncex.utils.validate.email(userEmail) && !bouncex.vars.logged_in_identified;\n }, function() {\n bouncex.push(['user', {\n 'email': userEmail,\n 'source': 'LoggedIn'\n }]);\n \n setVarAndCookie('logged_in_identified', true);\n }, 10);\n}\n\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\n\nfunction isValidDomain() {\n return getUrl().indexOf('www.rag-bone.com') > -1 || isSaleSite(); \n}\n\nfunction isEn() {\n return jQuery('html').attr('lang') === 'en';\n}\n\nfunction isValidForTracking() {\n return isValidDomain() && isEn();\n}\n\nfunction init() {\n if (!isValidForTracking()) {\n return;\n }\n\n initializeUserTracking();\n initializeCartEvents();\n \n switch(bouncex.website.pts) {\n case 'home':\n initializeQuickATCEvents();\n break;\n case 'category':\n case 'search':\n initializeCategoryEvents();\n break;\n case 'product':\n initializeItemEvents();\n break;\n default:\n break;\n }\n}\n\ninit();\nbouncex.utils.segments.useDLWatcher();","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":"development"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"staging"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.l-search').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/search"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"development"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('#pd_homepage').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"development"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.l-pdp').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"gift-card"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search?q="}]]}},"els":{"CART - Checkout Button":"a.mini-cart-link-checkout","CART - Promo Code Apply Button":"button#add-coupon","CART - Promo Code Box":"div.coupon-code","CAT - Product Grid Image":"div.product-item","CAT - Quickview Box":"","CAT-AddtoCartButton":"","CAT-QuickviewAddtoCart":"","Footer":"div#footer","Navigation bar":"section#header-container","PDP - Add to Cart Button":"","PDP - Color Option":"ul.swatches.color","PDP - Hero Image":"img.primary-image","PDP - Product Name":"h1.product-name","PDP - Product Price":"div.product-price","PDP - Quantity Option":"div.quantity","PDP - Review Stars":"","PDP - Size Option":"ul.sizes","PDP - Thumbnail Image":"img[itemprop=\"thumbnail\"]:not(.primary-image)","SEARCH - Product Grid Image":"div.product-item"},"vars":[{"name":"logged_in","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (bouncex.website.pts === 'checkout') {\n return null;\n }\n \n return jQuery('#dialog-account .account-logout, a[aria-label=\"Log Out\"]').length > 0;\n})();","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 if (bouncex.website.pts === 'checkout') {\n return null;\n }\n \n return Number(jQuery('.b-minicart_icon-qty').text().replace(/[^0-9]/g, ''));\n})();\n","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function() {\n if (bouncex.website.pts === 'checkout') {\n return jQuery('td[data-tau=summary_subtotal_value]').text().trim().replace(/[^0-9.]/g, '') || null;\n }\n\n if (jQuery('.b-minicart-empty, .b-cart_empty').length > 0) {\n return 0;\n }\n\n return jQuery('.b-payment_total-value').eq(0).text().replace(/[^0-9.]/g, '') || null;\n })();","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('.b-newsletters-message_success').text().toLowerCase().indexOf('thanks') > -1 || null;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search","product"],"testmode":false,"default":"false","code":"bouncex.utils.url.allowParams(['q']);","trigger":""},{"name":"page_title","polling":"none","persist":"no","page_types":["category"],"testmode":false,"default":"false","code":"jQuery('.b-header_category h1').text().trim();","trigger":""},{"name":"logged_in_identified","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"coupon_code","polling":"vars","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n return jQuery('.coupon').length && jQuery('.coupon').text();\n})();","trigger":"pageload"},{"name":"tracked_coupon","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"ibx_promo_code","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var code = bouncex.utils.getParam('cpn');\n if (code.indexOf('nil') > -1 || code === '') { return null; }\n return code;\n})();","trigger":"pageload"},{"name":"cart_plurality","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.cart_qty > 1 ? 'items' : 'item';","trigger":"pageload"},{"name":"cart_plurality_are","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.cart_qty > 1 ? 'are' : 'is';","trigger":"pageload"},{"name":"page_type","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts;","trigger":"pageload"},{"name":"sku","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.l-pdp-main').attr('data-pid') || '';","trigger":"pageload"},{"name":"cookie_bar_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#consent-dialog').is('.m-visible');","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":{"et_rid":"espemailid"},"cus":"","miw_exclude":"#gc_email,#gc_confirm_email,input[name*=dwfrm_cart_sendToEmail]","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":1,"spatm":1,"preinit_cjs":"var segments = {\n /* PROPERTIES */\n testMode: false,\n interceptEnabled: true,\n mirrorEnabled: true,\n dlWatcherEnabled: true,\n /* METHODS */\n /* Intercept Events */\n useIntercept: function () {\n if (this.interceptEnabled) {\n bouncex.utils.shqInterceptEvent = {\n // true blocks event, defined functions run in place of default\n 'productView': true,\n 'cartAdd': true\n\n };\n }\n },\n useMirror: function () {\n if (this.mirrorEnabled){\n bouncex.utils.shqMirrorEvent = {\n pageview: function(){\n var urlArr = ['womens', 'mens', 'new', 'sale'];\n var catCode = bouncex.utils.getNestedProp('location.href','',window);\n var newCatCode = catCode.split('/').filter(Boolean).pop();\n if (catCode && catCode.indexOf('sale.rag-bone.com') >-1){\n _shq.push([ 'pageView', \n {\n 'pageType': 'category',\n 'catName': 'sale.rag-bone.com',\n 'catId': 'sale.rag-bone.com'\n }]); \n }\n if(newCatCode && urlArr && urlArr.indexOf(newCatCode)>-1){\n _shq.push(['onCategory', {\n 'catId': newCatCode,\n 'catName': newCatCode\n }]);\n }\n },\n };\n }\n },\n dlFuncs: function (e) {\n var sEvent = bouncex.utils.getNestedProp('event','',e);\n\n if(sEvent === 'pageview'){\n this.captureAccountEmail(e);\n }\n //Category\n if(sEvent === 'view_item_list'){\n this.captureCategory(e);\n }\n if (sEvent === 'eec_detail'){\n this.capturePDP(e);\n }\n if (sEvent === 'add_to_cart'){\n this.captureATC(e);\n }\n if (sEvent === 'eec_remove'){\n this.removeCart(e);\n }\n if (sEvent === 'pageLoad'){\n this.captureCart(e);\n }\n if (sEvent === 'purchase'){\n this.capturePurchase(e);\n }\n\n },\n useDLWatcher: function () {\n if (!!this.dlWatcherEnabled) {\n window.bouncex.et.onTrue(function () {\n return window.bouncex.utils.getNestedProp('window._shq.loaded') && !!window.dataLayer && !!bouncex.et.setInterval;\n }, function () {\n // instantiate DataLayerHandler Object\n var dlWatcher = new _shq.DataLayerHandler(window.dataLayer);\n // invoke watch method\n dlWatcher.watch(function (e) {\n segments.dlFuncs(e);\n }, {});\n });\n }\n },\n captureAccountEmail: function (obj){\n //Collect account email for SSO login option\n var acctEmail = bouncex.utils.getNestedProp('user.actual_email','',obj);\n if (bouncex.website.pts === 'checkout' && bouncex.utils.getParam('step') === 'shipping' ){\n if(acctEmail){\n _shq.push(['onEmail', {\n email: acctEmail,\n type: 'account'\n }]);\n }\n }\n },\n captureMrktEmail: function(){\n //Capture Marketing Footer Email\n var btnSignUp = document.querySelector('.b-newsletters_group-wrapper button'),\n footerEmail = document.querySelector(\"input[id='dwfrm_emailsubscribe_email']\");\n if (footerEmail && btnSignUp) {\n btnSignUp.addEventListener('click', function(){\n if (bouncex.utils.validate.email(footerEmail.value)){\n _shq.push(['onEmail', {\n email: footerEmail.value,\n type: 'marketing'\n }]);\n }\n });\n }\n },\n capturePDP: function (obj){\n if(bouncex.website.pts === 'product'){\n var prodID = bouncex.utils.getNestedProp('ecommerce.detail.products[0].id', '',obj);\n if (prodID){\n _shq.push([ 'pageView', \n {\n 'pageType': 'product',\n 'productId': prodID\n }]); \n }\n }\n },\n captureCategory: function (obj){\n if(bouncex.website.pts === 'category'){\n var catCode = bouncex.utils.getNestedProp('location.pathname','',window).split('/').filter(function(e){return e; });\n catCode = catCode && catCode.length > 1 ? catCode.join('-') : catCode[0].trim();\n \n if (catCode){\n _shq.push([ 'pageView', \n {\n 'pageType': 'category',\n 'catName': catCode,\n 'catId': catCode\n }]); \n }\n }\n },\n\n captureCart: function(obj){\n if(bouncex.website.pts !== 'cart') {\n return;\n }\n var arrItems = bouncex.utils.getNestedProp('ecommerce.impressions',[],obj);\n var numItems = arrItems.length;\n if (arrItems && numItems > 0) {\n var cartTotal = 0.00;\n var cartItems = arrItems.map(function (ea) {\n return { ProductId: ea.id, UnitPrice: Number(ea.price), Quantity: Number(1) };\n });\n \n for (var i=0; i < numItems; i++){\n if(cartItems && cartItems[i] && cartItems[i].UnitPrice && cartItems[i].Quantity){\n cartTotal += Number(cartItems[i].UnitPrice) * Number(cartItems[i].Quantity);\n }\n }\n if (cartItems && cartTotal > 0) {\n _shq.push([ 'onCartView', { \n \"Items\": cartItems,\n \"Total\": cartTotal\n }]);\n }\n }else{\n _shq.push(['onCartEmpty']);\n }\n \n },\n captureATC: function(obj){\n \tvar prodId = bouncex.utils.getNestedProp('ecommerce.items[0].item_id','',obj);\n \tvar price = bouncex.utils.getNestedProp('ecommerce.items[0].price','',obj);\n \tvar qty = bouncex.utils.getNestedProp('ecommerce.items[0].quantity','',obj);\n \tvar atcArray = [];\n \n if(prodId && qty && price){\n atcArray.push({\n 'ProductId': prodId,\n 'UnitPrice': price,\n 'Quantity': qty\n });\n if (atcArray){\n \t_shq.push(['onCartAdd', {'Items': atcArray }]);\n }\n }\n },\n removeCart: function(obj){\n var prodId = bouncex.utils.getNestedProp('ecommerce.remove.products[0].id','',obj); \n var qty = Number(bouncex.utils.getNestedProp('ecommerce.remove.products[0].quantity','',obj)); \n if(prodId){\n _shq.push([ 'onCartRemove', { \n Items: [{\n 'ProductId': prodId,\n 'Quantity': qty\n }], \n }]);\n }\n },\n capturePurchase: function(obj){\n var prodErr = false;\n var orderId = bouncex.utils.getNestedProp('ecommerce.transaction_id', '', obj);\n var purchTotal = bouncex.utils.getNestedProp('ecommerce.value', 0, obj);\n var orderInfo = bouncex.utils.getNestedProp('ecommerce.items', null, obj);\n var orderArray = orderInfo && orderInfo.map(function (ea) {\n return { productId: ea.item_id, price: ea.price, qty: ea.quantity };\n });\n \n \tif (orderArray.length < 1) {\n prodErr = true;\n }\n \n if (!prodErr && orderId){\n _shq.push(['pageView', \n {\n 'pageType': 'purchase', \n \t'orderItems' : orderArray,\n \t'orderId': orderId,\n \t'total': purchTotal\n }]);\n \n }else{\n \t\t_shq.push(['pageView', \n {\n 'pageType': 'purchase', \n 'orderId' : orderId || 'NoOrderId-' + randomNumber(),\n 'usebasket': true\n }]);\n }\n },\n /* Initialize Segments Tracking */\n init: function () {\n // test mode\n if (this.testMode && !bouncex.testmode.bxdev) return;\n // attach object to window & bouncex.utils\n if (bouncex.utils) bouncex.utils.segments = this;\n\n // initialize intercept and mirror, comment out if not needed\n this.useIntercept();\n this.useMirror();\n this.captureMrktEmail();\n }\n}\n\nsegments.init();\n\n\n\nSinglePageApp.setCustomParams({\n currentPageIdentifier: function() {\n var params = window.location.search.replace('?', '').split('&');\n \n for (var i = 0; i < params.length; i++) {\n var pair = params[i].split('='),\n key = pair[0],\n val = pair[1];\n \n if (key.indexOf('color') > -1) {\n return val;\n }\n }\n \n return false;\n }\n});\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 rag & bone mktg txts (like cart reminders) to this #, per terms.","eventSharing":true,"shqId":"9ex3hw93a9-1","enabled":1},"pde":true,"fmc":["US","CA"],"fme":true,"fmx":"#gc_email,#gc_confirm_email,input[name*=dwfrm_cart_sendToEmail],#dwfrm_onlineGiftCard_recepientsEmail","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":"","ga4_measurement_id":""} ; 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: 0 }; bouncex.assets = {"ads":"f6ef5f3573bdc7473184a65f6e98703e","creativesBaseStyles":"a53944a2","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.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_d49d982a8e116dabad949c3944ed85a3.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(); }})();