(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":2791,"name":"Kendra Scott","cookie_name":"bounceClientVisit2791","domain":"kendrascott.com","ct":"fp_local_storage","ally":1,"ei":0,"tcjs":"","cjs":"setTimeout(function(){\n var item_in_stock = jQuery('button#add-to-cart').attr('disabled') === undefined ? true : null;\n if (item_in_stock){\n bouncex.setv('in_stock', true);\n bouncex.setBounceCookie();\n bouncex.reload_campaigns();\n } \n}, 1000);\n\n(function () {\n\twindow.bouncex = window.bouncex || {};\n\n\twindow.bouncex.bxISR = {\n\t\t/* --- INITIALIZATION --- */\n\t\tversion: 'Version 8.2 | 10/25/17',\n\t\tstartTime: Date.now(),\n\t\tsettings: {\n\t\t\tcurrentProduct: {},\n\t\t\tgeneral: {\n\t\t\t\tproductPageIdentifier: bouncex.vars.pagetype === 'product' && jQuery('link[rel=\"canonical\"]').attr('href').indexOf('/customize') === -1 && jQuery('.low-stock-msg:visible').length === 0,\n\t\t\t\tmaxProducts: 20,\n\t\t\t\t//categoryHistory: JSON.parse(window.localStorage.getItem('bxCatHist')) || [],\n\t\t\t\tproductHistory: JSON.parse(window.localStorage.getItem('bxProdHist')) || [],\n\t\t\t\tcategoryHistoryLength: 0,\n\t\t\t\tproductHistoryLength: 0\n\t\t\t}\n\t\t},\n\n\t\tinit: function () {\n\t\t\tthis.productMap();\n\t\t\tthis.setItemHistoryLengths();\n\t\t\tthis.trackProductHistory();\n\t\t\t//this.trackCategoryHistory();\n\t\t\tthis.maxProducts();\n\t\t// \tconsole.log(Date.now() - window.bouncex.bxISR.startTime, 'bxISR start');\n\t\t},\n\n\t\tproductMap: function () {\n\t\t\tif (!this.settings.general.productPageIdentifier) { return; }\n\n\t\t\tvar productValues = {\n\t\t\t\turl: window.location.href,\n\t\t\t\tname: bouncex.vars.prod_name,\n\t\t\t\t//sku: (/* product sku */),\n\t\t\t\t//category: [{ categoryName: (/* product category name */), categoryUrl: (/* product category url */) }],\n\t\t\t\t//description: (/* product description */),\n\t\t\t\t//price: (/* product price */),\n\t\t\t\tmainImgUrl: bouncex.vars.imageurl,\n\t\t\t\ttimeStamp: Date.now(),\n\t\t\t\tviewCount: 1,\n\t\t\t\tsessionId: window.bouncex.cookie.vid\n\t\t\t};\n\n\t\t\tthis.settings.currentProduct = productValues;\n\t\t},\n\n\t\t/* --- END OF INITIALIZATION --- */\n\t\t/* --- HELPER FUNCTIONS --- */\n\n\t\taddProductToHistory: function (product) {\n\t\t\tvar productHistory = this.settings.general.productHistory;\n\t\t\tproductHistory.unshift(product);\n\t\t\tthis.setProductHistory(productHistory);\n\t\t},\n\n\t\taddCategoryToHistory: function (currentCategory) {\n\t\t\tvar categoryHistory = this.settings.general.categoryHistory;\n\t\t\tvar newCategory = {\n\t\t\t\tcategory: currentCategory,\n\t\t\t\tviewCount: 1,\n\t\t\t\ttimeStamp: Date.now()\n\t\t\t};\n\n\t\t\tcategoryHistory.unshift(newCategory);\n\t\t\twindow.bouncex.bxISR.setCategoryHistory(categoryHistory);\n\t\t},\n\n\t\tcompareProducts: function (productA, productB) {\n\t\t\tif (productA.mainImgUrl === productB.mainImgUrl) { return true; }\n\t\t\t//if (productA.sku === productB.sku) { return true; }\n\t\t\tif (productA.name === productB.name) { return true; }\n\t\t\tif (productA.url === productB.url) { return true; }\n\t\t\treturn false;\n\t\t},\n\n\t\ttrackProductHistory: function () {\n\t\t\tvar productHistory = this.settings.general.productHistory;\n\t\t\tif (!this.settings.general.productPageIdentifier) { return; }\n\n\t\t\tif (this.settings.general.productHistoryLength > 0) {\n\t\t\t\tvar historyUpdated = false;\n\n\t\t\t\tfor (var i = 0; i < this.settings.general.productHistoryLength; i++) {\n\t\t\t\t\tif (this.compareProducts(productHistory[i], this.settings.currentProduct)) {\n\t\t\t\t\t\tproductHistory[i].viewCount++;\n\t\t\t\t\t\tproductHistory[i].timeStamp = Date.now();\n\t\t\t\t\t\tproductHistory.unshift(productHistory[i]);\n\n\t\t\t\t\t\tproductHistory.splice(i + 1, 1);\n\t\t\t\t\t\thistoryUpdated = true;\n\t\t\t\t\t\tthis.setProductHistory(productHistory);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!historyUpdated) {\n\t\t\t\t\tthis.addProductToHistory(this.settings.currentProduct);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.addProductToHistory(this.settings.currentProduct);\n\t\t\t}\n\t\t},\n\n\t\ttrackCategoryHistory: function () {\n\t\t\tvar categoryHistory = this.settings.general.categoryHistory;\n\t\t\tif (!this.settings.general.productPageIdentifier) { return; }\n\n\t\t\tvar currentCategoriesLength = this.settings.currentProduct.category.length;\n\t\t\tfor (var i = 0; i < currentCategoriesLength; i++) {\n\t\t\t\tvar currentCategory = this.settings.currentProduct.category[i];\n\n\t\t\t\tif (this.settings.general.categoryHistoryLength > 0) {\n\t\t\t\t\tvar historyUpdated = false;\n\t\t\t\t\tfor (var j = 0; j < this.settings.general.categoryHistoryLength; j++) {\n\t\t\t\t\t\tif (categoryHistory[j].category.categoryName === currentCategory.categoryName) {\n\t\t\t\t\t\t\tcategoryHistory[j].viewCount++;\n\t\t\t\t\t\t\tcategoryHistory[j].timeStamp = Date.now();\n\t\t\t\t\t\t\thistoryUpdated = true;\n\t\t\t\t\t\t\tthis.setCategoryHistory(categoryHistory);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!historyUpdated) {\n\t\t\t\t\t\tthis.addCategoryToHistory(currentCategory);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis.addCategoryToHistory(currentCategory);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/* --- END OF HELPER FUNCTIONS --- */\n\t\t/* --- GETTER FUNCTIONS --- */\n\n\t\tgetTopCategories: function (criteria, number) {\n\t\t\tvar categories = this.settings.general.categoryHistory;\n\t\t\tif (!number) { number = categories.length; }\n\n\t\t\tif (criteria === 'views') {\n\t\t\t\treturn categories.sort(function (a, b) { return b.viewCount - a.viewCount; }).slice(0, number);\n\t\t\t} else if (criteria === 'time') {\n\t\t\t\treturn categories.sort(function (a, b) { return b.timeStamp - a.timeStamp; }).slice(0, number);\n\t\t\t} else if (criteria === 'recency') {\n\t\t\t\treturn categories.sort(function (a, b) { return b.viewCount - a.viewCount; }).slice(0, number).sort(function (c, d) { return d.timeStamp - c.timeStamp; });\n\t\t\t}\n\t\t},\n\n\t\tgetTopProducts: function (criteria, number) {\n\t\t\tvar products = this.settings.general.productHistory;\n\t\t\tif (!number) { number = products.length; }\n\t\t\tif (criteria === 'views') {\n\t\t\t\treturn products.sort(function (a, b) { return b.viewCount - a.viewCount; }).slice(0, number);\n\t\t\t} else if (criteria === 'time') {\n\t\t\t\treturn products.sort(function (a, b) { return b.timeStamp - a.timeStamp; }).slice(0, number);\n\t\t\t} else if (criteria === 'recency') {\n\t\t\t\treturn products.sort(function (a, b) { return b.viewCount - a.viewCount; }).slice(0, number).sort(function (c, d) { return d.timeStamp - c.timeStamp; });\n\t\t\t}\n\t\t},\n\n\t\tmaxProducts: function () {\n\t\t\tvar maxProducts = this.settings.general.maxProducts;\n\t\t\tif (this.settings.general.productHistoryLength > maxProducts) {\n\t\t\t\tvar topProducts = this.getTopProducts('time', maxProducts);\n\t\t\t\tthis.setProductHistory(topProducts);\n\t\t\t}\n\t\t},\n\n\t\t/* --- END GETTER FUNCTIONS --- */\n\t\t/* --- SETTER FUNCTIONS --- */\n\n\t\tsetItemHistoryLengths: function () {\n\t\t//\tthis.settings.general.categoryHistoryLength = this.settings.general.categoryHistory.length;\n\t\t\tthis.settings.general.productHistoryLength = this.settings.general.productHistory.length;\n\t\t},\n\n\t\tsetProductHistory: function (productHistory) {\n\t\t\twindow.localStorage.setItem('bxProdHist', JSON.stringify(productHistory));\n\t\t\tthis.settings.general.productHistory = productHistory;\n\t\t\tthis.settings.general.productHistoryLength = productHistory.length;\n\t\t},\n\n\t\tsetCategoryHistory: function (categoryHistory) {\n\t\t\twindow.localStorage.setItem('bxCatHist', JSON.stringify(categoryHistory));\n\t\t\tthis.settings.general.categoryHistory = categoryHistory;\n\t\t\tthis.settings.general.categoryHistoryLength = categoryHistory.length;\n\t\t},\n\n\t\t/* --- END SETTER FUNCTIONS --- */\n\t\t/* --- CAMPAIGN TEMPLATING --- */\n\t\tpopulateCampaignProductsV2: function (params) {\n\t\t\tif (!params || !params.campaignId || !params.numberProducts) { return false; }\n\t\t\tif (!params.sortBy) { params.sortBy = 'time'; }\n\t\t\tif (!params.productAction) { params.productAction = 'link'; }\n\t\t\tif (!params.linkAction) { params.linkAction = 'new'; }\n\n\t\t\tvar campaign = jQuery('#bx-campaign-' + params.campaignId);\n\t\t\tvar campaignProductArray = [];\n\n\t\t\tcampaignProductElements = {};\n\t\t\tjQuery.each(params.campaignSteps, function (x, y) {\n\n\t\t\t\tcampaignStepProductElements = [];\n\t\t\t\tfor ( var i = 0; i < params.numberProducts; i++ ) {\n\t\t\t\t\tvar campaignStepProductObject = {};\n\t\t\t\t\tif (y.productImages) {\n\t\t\t\t\t\tcampaignStepProductObject.img = campaign.find('#bx-form-' + params.campaignId + '-step-' + y.stepNumber + ' .bx-row-line-custom .bx-lineshape:eq(' + i +')');\n\t\t\t\t\t\t\n\t\t\t\t\t\tcampaignStepProductObject.imgAda = campaign.find('#bx-form-' + params.campaignId + '-step-' + y.stepNumber + ' .bx-row-image-custom img:eq(' + i +')');\n\t\t\t\t\t}\n\t\t\t\t\tif (y.productLinkElems) {\n\t\t\t\t\t\tcampaignStepProductObject.link = campaign.find('#bx-form-' + params.campaignId + '-step-' + y.stepNumber + ' .bx-group .bx-row-submit:eq('+i+')').find('button');\n\t\t\t\t\t}\n\t\t\t\t\tif (y.productHoverStates) {\n\t\t\t\t\t\tcampaignStepProductObject.hoverTitle = campaign.find('#bx-form-' + params.campaignId + '-step-' + y.stepNumber + ' .bx-group .bx-row-line-custom:eq(' + i +')').siblings('.bx-row-text').find('div');\n\t\t\t\t\t}\n\t\t\t\t\tcampaignStepProductElements.push(campaignStepProductObject);\n\t\t\t\t}\n\n\t\t\t\tcampaignProductElements['step-' +x] = campaignStepProductElements;\n\t\t\t});\n\n\t\t\tvar productArray = window.bouncex.bxISR.getTopProducts(params.sortBy, params.numberProducts);\n\n\t\t\tvar self = this;\n\t\t\tjQuery.each(campaignProductElements, function (x, y) {\n\t\t\t\tvar productAction = function () {};\n\n\t\t\t\tfor ( var i = 0; i < y.length; i++ ) {\n\t\t\t\t\tif (params.campaignSteps[(x.split('-')[1])].productsLink) {\n\t\t\t\t\t\tvar productLink = (productArray[i].url.indexOf('http') > -1) ? productArray[i].url : window.top.location.origin + productArray[i].url;\n\t\t\t\t\t\tproductAction = self.makeProductAction(productLink, params);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (y[i].img.length > 0) {\n\t\t\t\t\t\tvar imgSrc = productArray[i].mainImgUrl,\n\t\t\t\t\t\t\tproductImageElem = jQuery(y[i].img);\n\n\t\t\t\t\t\tproductImageElem.css('background-image', 'url(' + imgSrc + ')').addClass('isr-image isr' + x + '').bind('click.bx_' + params.campaignId + '_isr_' + i, productAction);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (y[i].imgAda.length > 0) {\n\t\t\t\t\t y[i].imgAda.attr('src', productArray[i].mainImgUrl);\n\t\t\t\t\t y[i].imgAda.attr('alt', productArray[i].name);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (y[i].link) {\n\t\t\t\t\t\tvar productLink = (productArray[i].url.indexOf('http') > -1) ? productArray[i].url : window.top.location.origin + productArray[i].url,\n\t\t\t\t\t\t\tproductLinkElem = jQuery(y[i].link);\n\n\t\t\t\t\t\tproductLinkElem.attr('bx-href', productLink).bind('click.bx_' + params.campaignId + '_isr_' + i, productAction);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (y[i].hoverTitle) {\n\t\t\t\t\t\tvar productTitle = productArray[i].name,\n\t\t\t\t\t\t\tproductHoverTitleElem = jQuery(y[i].hoverTitle);\n\n\t\t\t\t\t\tproductHoverTitleElem.text(productTitle).bind('click.bx_' + params.campaignId + '_isr_' + i, productAction);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t});\n\t\t},\n\n\t\tmakeProductAction: function (productLink, campaignParams) {\n\t\t\tvar productAction = function () {};\n\n\t\t\t\tif (campaignParams.productAction === 'link') {\n\t\t\t\t\tif (campaignParams.linkAction === 'new') {\n\t\t\t\t\t\tif (campaignParams.reportClicks) {\n\t\t\t\t\t\t\tproductAction = function () {\n\t\t\t\t\t\t\t\twindow.bouncex.report(campaignParams.campaignId, 'click');\n\t\t\t\t\t\t\t\twindow.top.open(productLink);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tproductAction = function () {\n\t\t\t\t\t\t\t\twindow.top.open(productLink);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (campaignParams.linkAction === 'current') {\n\t\t\t\t\t\tif (campaignParams.reportClicks) {\n\t\t\t\t\t\t\tproductAction = function () {\n\t\t\t\t\t\t\t\twindow.bouncex.report(campaignParams.campaignId, 'click');\n\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\twindow.top.location.replace(productLink);\n\t\t\t\t\t\t\t\t}, 100);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tproductAction = function () {\n\t\t\t\t\t\t\t\twindow.top.location.replace(productLink);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\treturn productAction;\n\t\t}\n\t};\n\n\twindow.bouncex.bxISR.init();\n})();","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-5905514-9","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":1,"gmp":0,"whitelist_check":1},"burls":[{"prop":"contains","val":"?bx=off"}],"ple":false,"fbe":true,"mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/* --------------------------------- HELPERS -------------------------------- */\n\nfunction getUrl() {\n\treturn bouncex.utils.url.allowParams('q');\n}\n\nfunction contains(arr, str) {\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tif (str.indexOf(arr[i]) > -1) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction isFineJewelry(itemCopy, itemUrl) {\n\titemCopy ? itemCopy = itemCopy.toLowerCase() : itemCopy = '';\n\titemUrl = itemUrl || '';\n\n\tvar colorOptions = getColorOptions(),\n\t\tfineJewelryOptions = [\n\t\t\t'14Y', '14W', '14R', '18Y', '18W', '18R', 'SLV', '14k', '18k'\n\t\t],\n\t\tselectedOption = jQuery('img.selectable.selected').attr('alt') || '';\n\n\tif (\n\t\titemCopy.indexOf('14k') > -1 ||\n\t\titemCopy.indexOf('18k') > -1 ||\n\t\tfineJewelryOptions.indexOf(itemCopy) > -1 ||\n\t\tfineJewelryOptions.indexOf(selectedOption) > -1 ||\n\t\tcontains(fineJewelryOptions, itemCopy) ||\n\t\tcontains(fineJewelryOptions, colorOptions) ||\n\t\titemUrl.indexOf('/fine-jewelry') > -1\n\t) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nfunction isExcludedItem(itemId) {\n\tvar uniqueItems = ['196088027852', '196088026268', '196088024714', '9608858458', '9608858815', '9608858461', '9608862872', '9608863466', '9608863321',\n\t'4217719444', '4217719445', '4217719633', '9608858332', '9608858105'],\n\t\twatches = ['196088024714', '196088016368', '196088020563', '196088020587', '196088016412', '196088016429', '196088016467', '196088016443', '196088016450', '196088016498', '196088016504', '196088016290', '196088016320', '196088016306', '196088016313', '196088016351', '196088016375', '196088016474', '196088016481', '196088016344', '196088016382', '196088016405', '196088016399', '196088020211', '196088020181', '196088020532', '196088020594', '196088020624', '196088020617', '196088020600', '196088020556', '196088020549'],\n\t\tshopForGood = ['196088024868', '196088024844', '196088024813', '196088024820', '196088024639', '196088015750', '842177191309', '196088001821', '842177179352', '196088020853', '842177003565', '196088015651', '196088015699', '196088015675', '196088018065', '842177003312', '842177013670', '842177029169'],\n\t\tfineJewelry = ['196088032214', '196088032238', '196088032269', '196088025926', '196088025940', '196088025964', '196088025995', '196088028651', '196088028682', '196088026084', '196088026107', '196088026237', '196088026213', '196088026190', '196088026275', '196088026305', '196088026169', '196088026121', '196088026268', '196088027852', '842177033302', '842177137598', '842177190517', '196088019727', '842177044254', '842177044292', '196088019796', '842177160916', '196088019437', '842177043417', '196088008103', '842177190616', '842177058725', '842177108598', '842177192849', '842177186732'],\n\t\tdemiFineJewelry = ['196088012377', '842177189894', '842177193686', '196088025254', '196088025292', '842177196823', '196088030753', '196088030746', '196088030784', '196088030814', '196088031088', '196088031095', '196088031101', '196088030821', '196088030869', '196088030883', '196088030890', '196088030906', '196088030920', '196088030944', '196088030968', '196088031019', '196088031118', '196088025438', '842177188934', '842177189184', '842177189658', '842177193761', '842177036730', '842177189283', '842177193778', '842177191996', '842177037003', '842177185124', '842177183069', '196088003177'],\n\t\tjewelry = ['196088562551'],\n\t\tmens = ['196088025650', '196088025612', '196088025773', '196088025551', '196088025452', '196088024639', '196088021041', '196088005843', '196088021287', '196088020853', '196088021140', '196088007052', '196088007168', '196088005256', '196088007243', '196088020549', '196088006048', '196088015699', '196088020587', '196088007205', '196088006154', '196088020594', '842177193181', '196088015675', '196088020624', '196088005324', '196088021102', '196088020532', '196088007267', '196088016115', '196088016092', '196088006987', '196088006147', '196088005249', '196088007182', '196088005379'],\n\t\tgiftSets = ['196088028286', '196088028439', '196088017396', '842177199404', '842177182956', '842177199435', '842177178638', '842177178652', '842177178645', '842177178607', '842177178614', '842177182949', '842177199428'],\n\t\tlayeredSets = ['196088038735', '196088038711', '196088031170', '196088038728', '196088038780', '196088038797', '196088038766', '196088038759', '196088038773', '196088032702', '196088032689', '196088032665', '196088032719', '196088032696'],\n\t\tengagementRings = ['196088026701', '196088026855', '196088026404', '196088026558', '196088027005', '196088027159', '196088027753', '196088027609', '196088030234', '196088027456', '196088027302'],\n\t\tbarbieKendraScott = ['196088503929', '196088500096', '196088502366', '196088509600', '196088506180', '196088506067'],\n\t\texcludedItems = uniqueItems.concat(watches, shopForGood, fineJewelry, demiFineJewelry, mens, giftSets, layeredSets, engagementRings, barbieKendraScott, jewelry);\n\n\treturn excludedItems.indexOf(itemId) > -1;\n}\n\nfunction isSitewidePromotionExcluded() {\n\treturn jQuery('.excluded-from-sw-promotions').length > 0;\n}\n\nfunction getColorOptions() {\n\tvar $options = jQuery('button.color-attribute[data-color]'),\n\t\tcolorArray = [];\n\n\tfor (var i = 0; i < $options.length; i++) {\n\t\tif ($options.eq(i)) {\n\t\t\tcolorArray.push($options.eq(i));\n\t\t}\n\t}\n\n\treturn colorArray.join();\n}\n\nfunction getStarsAndRatings() {\n\tvar fullRatingText = jQuery('.product-number-rating .star-clickable').first().text().trim(),\n\t\tratingValueString = fullRatingText.match(/(\\d+(\\.\\d+)?)/),\n\t\trating = ratingValueString ? parseFloat(ratingValueString[0]) : 0,\n\t\treviewsValueString = fullRatingText.match(/(\\d+)\\s+Review(s)?/),\n\t\treviews = reviewsValueString ? parseInt(reviewsValueString[1]) : 0;\n\n\tif (!rating) {\n\t\treturn {\n\t\t\tstars: 0,\n\t\t\treviews: reviews\n\t\t};\n\t}\n\n\treturn {\n\t\tstars: rating,\n\t\treviews: reviews\n\t};\n}\n\nfunction excludeFromBIS(itemId) {\n return ['196088562551', '196088533988', '196088653587'].indexOf(itemId) > -1;\n}\n\n/* ------------------------------ ITEM TRACKING ----------------------------- */\n\nfunction getItem() {\n\tvar itemId = getItemId(),\n\t\titemCopy = getItemCopy(),\n\t\turl = getUrl(),\n\t\tratings = getStarsAndRatings(),\n\t\titem = {\n\t\t\tid: itemId,\n\t\t\tcopy: itemCopy,\n\t\t\tcategory: getItemCategory(url),\n\t\t\turl: url,\n\t\t\timageurl: jQuery('.primary-image img').attr('src') || bouncex.vars.imageurl,\n\t\t\tprice: jQuery('.product-detail span.sales > span').attr('content'),\n\t\t\tinstock: !jQuery('.oos-text').is(':visible'),\n\t\t\texcludedfromdiscount: isSitewidePromotionExcluded() || excludeFromBIS(itemId),\n\t\t\texcluded: isExcludedItem(itemId),\n\t\t\tstars: ratings.stars,\n\t\t\treviews: ratings.reviews\n\t\t};\n\n\treturn item;\n}\n\nfunction getItemId(replenItem) {\n\tif (replenItem) {\n\t\tif (bouncex.website.pts === 'category') {\n\t\t\tvar catItem = !!jQuery('.product[data-pid=\"' + replenItem.pid + '\"]').length > 0 &&\n\t\t\t\tjQuery('.product[data-pid=\"' + replenItem.pid + '\"]').parents('.product-tile-container');\n\n\t\t\tif (catItem) {\n\t\t\t\treturn replenItem.pid;\n\t\t\t}\n\t\t}\n\n\t\tif (bouncex.website.pts === 'product') {\n\t\t\tvar isRec = !!jQuery('.mt_slide__inner[data-pid=\"' + replenItem.pid + '\"]').length > 0 &&\n\t\t\t\tjQuery('.mt_slide__inner[data-pid=\"' + replenItem.pid + '\"]'),\n\t\t\t\titemName;\n\n\t\t\tif (isRec) {\n\t\t\t\titemName = isRec.find('.mt_slide__title').text().trim();\n\t\t\t\treturn itemName.split(' in ')[0].toLowerCase().replaceAll(' ', '-');\n\t\t\t}\n\n\t\t\tif (getUrl().indexOf('customize') > -1) {\n\t\t\t\treturn getItemCopy().toLowerCase().replaceAll(' ', '-');\n\t\t\t}\n\t\t}\n\t}\n\n\treturn jQuery('input[name=\"productId\"]').val() ||\n\t\tbouncex.utils.getNestedProp('yotpo.analytics.pageSku', '') ||\n\t\tbouncex.utils.getNestedProp('starDistribution.main_widget.settings.pid', '') ||\n\t\tgetItemCopy().toLowerCase().replaceAll(' ', '-');\n}\n\nfunction getItemCopy() {\n\tvar copy = jQuery('h1.product-name').first().text().trim() ||\n\t\tjQuery('.product-detail.mobile h1.product-name').first().text().trim() ||\n\t\tjQuery('.fc-product-name').first().text().trim();\n\n\tif (copy.indexOf(' In ') > -1) {\n\t\treturn copy.split(' In ')[0];\n\t}\n\treturn copy.split(' in ')[0];\n}\n\nfunction getItemCategory(url) {\n\tif (url.indexOf('customize') > -1) {\n\t\treturn 'custom';\n\t} else if (bouncex.website.pts === 'category') {\n\t\treturn jQuery('.slot-category-heading h1').text().trim() || 'general';\n\t} else if (!!jQuery('div.product-detail').attr('data-category') &&\n\t\tjQuery('div.product-detail').attr('data-category').length > 0) {\n\t\tif (jQuery('div.product-detail').attr('data-category') === 'null') {\n\t\t\treturn 'general';\n\t\t} else {\n\t\t\treturn jQuery('div.product-detail').attr('data-category') || 'general';\n\t\t}\n\t} else if (\n\t\tjQuery('div.product-detail').attr('data-category').length > 0 &&\n\t\t(\n\t\t\tjQuery('div.product-detail').attr('data-category').indexOf('categories') > -1 ||\n\t\t\tjQuery('div.product-detail').attr('data-category').indexOf('collections') > -1\n\t\t)\n\t) {\n\t\tvar data = jQuery('div.product-detail').attr('data-category');\n\n\t\tif (data.indexOf('categories') > -1) {\n\t\t\treturn data.split('/categories/')[1];\n\t\t} else if (data.indexOf('collections') > -1) {\n\t\t\tvar collection = data.split('/collections/')[1];\n\t\t\treturn collection.indexOf('diamonds') > -1 ? 'diamonds' : collection;\n\t\t}\n\t}\n}\n\nfunction fireViewItem(item) {\n\tvar pushItem = {\n\t\t'item:id': item.id,\n\t};\n\n\tif (item.groupId) {\n\t\tpushItem['item:itemgroupid'] = item.groupId;\n\t}\n\tbouncex.push(['view item', pushItem]);\n}\n\nfunction isExcluded(itemUrl) {\n\treturn itemUrl.indexOf('gift-card') > -1 && itemUrl.indexOf('giftcertpurchase') > -1;\n}\n\nfunction initializeItemEvents() {\n\tvar item;\n\n\tbouncex.et.onTrue(\n\t\tfunction () {\n\t\t\titem = getItem();\n\t\t\treturn !!item.id &&\n\t\t\t\t!!item.copy &&\n\t\t\t\t!!item.category &&\n\t\t\t\t!!item.price &&\n\t\t\t\t!!item.url &&\n\t\t\t\t!!item.imageurl;\n\t\t},\n\t\tfunction () {\n\t\t\tif (isExcluded(item.url)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tbouncex.push(['item', item]);\n\t\t\tvar groupId = jQuery('.prices-add-to-cart-actions + .bfx-wishlist button.add-to-wish-list:visible, .wishlist-button button').attr('data-mpid')|| '';\n\n\t\t\tinitializeSkuEvents(item.id, groupId);\n\t\t\titem.groupId = groupId;\n\t\t\tfireViewItem(item);\n\t\t\ttrackNotifyMePDP(item.id);\n\t\t},\n\t\t10\n\t);\n}\n\nfunction trackNotifyMePDP(id) {\n bouncex.et.onVisible('.content p:contains(\"Please check your email\")', function(){\n bouncex.push(['notifyme', {\n 'item:id': id\n }]);\n });\n}\n\n/* ------------------------------ SKU TRACKING ------------------------------ */\n\nfunction initializeSkuEvents(itemId, groupId) {\n\tvar previousSku = bouncex.utils.getNestedProp('yotpo.pageSku', '') || getSkuFromPdpUrl(getUrl());\n\n\tif (jQuery('button.color-attribute, button.size-options').length === 1) {\n\t\tif (previousSku) {\n\t\t\tfireSelectSku(itemId, groupId, previousSku);\n\t\t}\n\t\treturn;\n\t}\n\n\tbouncex.setInterval2(function () {\n\t\tvar newSku = getSkuFromPdpUrl(getUrl());\n\t\tif (newSku && newSku !== previousSku) {\n\t\t\tpreviousSku = newSku;\n\t\t\tvar item = getItem();\n\t\t\titem.groupId = groupId;\n\n\t\t\tfireSelectSku(item.id, groupId, previousSku);\n\t\t\tbouncex.push(['item', item]);\n\t\t\tfireViewItem(item);\n\t\t}\n\t}, 1000);\n}\n\nfunction getSkuFromPdpUrl(url) {\n\tvar noParams = url ? bouncex.utils.url.allowParams([], url) : '',\n\t\tsku = noParams.split('/').pop().split('.')[0];\n\treturn sku.match(/\\d{10,}/g) ? sku : '';\n}\n\nfunction fireSelectSku(itemId, groupId, skuId) {\n\tbouncex.push([\n\t\t'select_sku',\n\t\t{\n\t\t\t'item:id': itemId,\n\t\t\t'item:itemgroupid': groupId,\n\t\t\t'item:feedid': skuId\n\t\t}\n\t]);\n}\n\n/* ---------------------------- CATEGORY TRACKING --------------------------- */\n\nfunction getItemIdsCat() {\n\tvar ids = [],\n\t\t$tiles = jQuery('.product-tile-container'),\n\t\ti = 0,\n\t\tid = '';\n\n\tfor (i; i < $tiles.length; i++) {\n\t\tvar itemCopy = $tiles.eq(i).find('.pdp-link').text();\n\n\t\tid = $tiles.eq(i).find('.product').attr('data-pid');\n\n\t\tif (!id || ids.indexOf(id) > -1 || isFineJewelry(itemCopy)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tids[ids.length] = id;\n\t}\n\n\treturn ids.join(',');\n}\n\nfunction getCategoryObject() {\n\treturn {\n\t\t'page:url': getUrl(),\n\t\t'items:ids': getItemIdsCat()\n\t};\n}\n\nfunction initializeCategoryEvents() {\n\tvar categoryObj;\n\n\tbouncex.et.onTrue(\n\t\tfunction () {\n\t\t\tcategoryObj = getCategoryObject();\n\t\t\treturn !!categoryObj['items:ids'].length &&\n\t\t\t\t!!categoryObj['page:url'];\n\t\t},\n\t\tfunction () {\n\t\t\tif (getUrl().indexOf('fine-jewelry') === -1 && getUrl().indexOf('wishlist') == -1) {\n\t\t\t\tbouncex.push(['view category', categoryObj]);\n\t\t\t}\n\t\t},\n\t\t10\n\t);\n}\n\n/* ---------------------------- QUICK VIEW TRACKING --------------------------- */\n\n// COMMENTED OUT SINCE QUICKVIEW EVENTS SEEM AS IF THEY ARE DISABLED\n// function initializeQuickViewEvents() {\n// var quickviewId;\n// jQuery(document).on('click', 'a.btn.quickview', function(){\n// quickviewId = jQuery(this).closest('.product-tile').attr('data-itemid');\n// });\n// bouncex.et.onVisible(QV_SELECTOR, function(){\n// bouncex.push(['view item', { 'item:id' : quickviewId }]);\n// });\n// return;\n// }\n\n/* ------------------------------- CART EVENTS ------------------------------ */\n\nfunction fireAddToCart(itemId, replenItem) {\n\tvar url = getUrl();\n\n\tif (isExcluded(url)) {\n\t\treturn;\n\t}\n\n\tbouncex.push([\n\t\t'add to cart',\n\t\t{\n\t\t\t'item:id': itemId,\n\t\t\t'cart:item': bouncex.stringify(replenItem)\n\t\t}\n\t]);\n}\n\nfunction trackAJAXCart(e, xhr, settings) {\n\t// Add more checks to this conditional logic if needed\n\tif (\n\t\t(settings.url.indexOf('/Cart-AddProduct') > -1 ||\n\t\t\tsettings.url.indexOf('/Wishlist-Add') > -1 ||\n\t\t\tsettings.url.indexOf('/Cart-AddPDPProduct') > -1) &&\n\t\t!bouncex.utils.url.getParam('bx_cart')\n\t) {\n\t\tvar data = settings.data,\n\t\t\treplenItem = {\n\t\t\t\t'pid': bouncex.utils.getParam('pid', data) || bouncex.utils.getParam('pid', settings.url),\n\t\t\t\t'qty': bouncex.utils.getParam('quantity', data) || bouncex.utils.getParam('Quantity', settings.url),\n\t\t\t\t'isengraved': bouncex.utils.getParam('isEngraved', data) || bouncex.utils.getParam('isEngraved', settings.url),\n\t\t\t\t'catpath': bouncex.utils.getParam('categoryPath', data) || bouncex.utils.getParam('categoryPath', settings.url),\n\t\t\t\t'recomm': bouncex.utils.getParam('recomm', data) || bouncex.utils.getParam('recomm', settings.url)\n\t\t\t},\n\t\t\tid = getItemId(replenItem);\n\n\t\tif (!id || !replenItem.pid || replenItem.pid === 'colorbar') {\n\t\t\treturn;\n\t\t}\n\n\t\tfireAddToCart(id, replenItem);\n\t}\n}\n\nfunction emptyCart() {\n\tbouncex.et.onVarChange('cart_qty', function (oldVal, newVal) {\n\t\tif (newVal === 0 && oldVal > 0) {\n\t\t\tbouncex.push(['empty_cart']);\n\t\t}\n\t});\n}\n\nfunction initializeCartEvents() {\n\tbouncex.et.cart.init({\n\t\treplenishmentType: 'ajax',\n\t\treplenish: function (cart) {\n\t\t\tvar $deferreds = [];\n\n\t\t\tcart.items.forEach(function (item) {\n\t\t\t\t$deferreds.push(makeAjaxATCFunc(item));\n\t\t\t});\n\n\t\t\t$deferreds\n\t\t\t\t.reduce(\n\t\t\t\t\tfunction (promise, func) {\n\t\t\t\t\t\treturn promise.then(function () {\n\t\t\t\t\t\t\treturn func();\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t\tjQuery.Deferred().resolve([])\n\t\t\t\t)\n\t\t\t\t.then(replenComplete);\n\t\t}\n\t});\n\n\tfunction makeAjaxATCFunc(replenItem) {\n\t\treturn function () {\n\t\t\treturn jQuery.ajax({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: 'https://www.kendrascott.com/on/demandware.store/Sites-KendraScott-Site/en_US/Cart-AddProduct?format=ajax',\n\t\t\t\tdata: 'cartAction=add&pid=' +\n\t\t\t\t\treplenItem.pid +\n\t\t\t\t\t'&quantity=' +\n\t\t\t\t\treplenItem.qty +\n\t\t\t\t\t'&isEngraved=' +\n\t\t\t\t\treplenItem.isengraved +\n\t\t\t\t\t'&categoryPath=' +\n\t\t\t\t\treplenItem.catpath +\n\t\t\t\t\t'&recomm=' +\n\t\t\t\t\treplenItem.recomm\n\t\t\t});\n\t\t};\n\t}\n\n\tfunction replenComplete() {\n\t\twindow.location.href = window.location.origin +\n\t\t\twindow.location.pathname +\n\t\t\t'?bx_replen=true';\n\t}\n\n\tbouncex.et.on(jQuery(document), 'ajaxComplete.bx', trackAJAXCart);\n\temptyCart();\n}\n\n/* ------------------------------ USER TRACKING ----------------------------- */\n\nfunction initializeUserTracking() {\n if (!bouncex.vars.logged_in || !!bouncex.vars.logged_in_identified) {\n return;\n }\n\n var userEmail;\n\n bouncex.et.onTrue(\n function () {\n userEmail = bouncex.utils.getNestedProp('globalData.email1') || bouncex.utils.getNestedProp('idzCustomData.cust_email');\n return bouncex.utils.validate.email(userEmail);\n },\n function () {\n bouncex.push([\n 'user',\n {\n 'email': userEmail,\n 'source': 'LoggedIn'\n }\n ]);\n bouncex.setVar('logged_in_identified', true);\n },\n 5\n );\n}\n\nfunction initializeWishlistAbandonment(){\n\tvar onWishListPage = getUrl().indexOf('wishlist') > -1;\n\n if(onWishListPage){\n bouncex.et.onTrue(function () {\n return jQuery('.empty-wishlist').length > 0;\n }, function () {\n bouncex.push(['wishlist_empty', {}]);\n },5);\n }\n\n if(!onWishListPage){\n jQuery('.wishlistTile, .wishlist-button').on('click.bx', function(){\n var id = jQuery(this).parents('.product-tile, div[data-wishlistcategory]').attr('data-pid');\n\n bouncex.push(['wishlist_item', {\n 'item:id': id\n }]);\n });\n }\n}\n\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\n\nfunction init() {\n\tif (!bouncex.vars.valid_domain) {\n\t\treturn;\n\t}\n\n\tinitializeCartEvents();\n\tinitializeUserTracking();\n\tinitializeWishlistAbandonment();\n\n\tswitch (bouncex.website.pts) {\n\t\tcase 'category':\n\t\tcase 'search':\n\t\t\t// initializeQuickViewEvents();\n\t\t\tinitializeCategoryEvents();\n\t\t\tbreak;\n\t\tcase 'product':\n\t\t\tinitializeItemEvents();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n}\n\ninit();","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('div[data-action=\"Cart-Show\"]').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"staging"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"sandbox"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"jQuery('.product-tile-container').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"search?q="}]]},"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"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname === '/';"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"staging"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"development"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"sandbox"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('div[data-action=\"Product-Show\"]').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"giftcert"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"design-your-own"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"search?q="}],[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('div[data-action=\"Search-Show\"]').length > 0;"}]]}},"els":{"PDPAddtoCartButton":"#add-to-cart"},"vars":[{"name":"logged_in","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"!!bouncex.utils.getNestedProp('globalData.email1');","trigger":""},{"name":"ever_logged_in","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in ? true : 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 return jQuery('span.minicart-quantity').text().trim().length > 0 ? parseInt(jQuery('span.minicart-quantity').text().trim()) : 0;\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function(){\n if(bouncex.vars.cart_qty === 0){\n return 0;\n } else if (jQuery('div.minicart p.sub-total').text().length > 0){\n return parseFloat(jQuery('div.minicart p.sub-total').text().replace(/[^0-9\\.]/g,''));\n } else if(jQuery('.bfx-total-subtotal').text().length > 0 ){\n return parseFloat(jQuery('.bfx-total-subtotal').text().replace(/[^0-9\\.]/g,''));\n } else if(!!globalData && !!globalData.cartTotalValue){\n return globalData.cartTotalValue\n }\n return null;\n})();","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('h1.product-name').text().trim() || jQuery('.product-detail.mobile h1.product-name').text().trim();","trigger":""},{"name":"in_stock","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('button#add-to-cart:enabled').length > 0 ? true : false;","trigger":""},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":""},{"name":"imageurl","polling":"none","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('meta[property=\"og:image\"]').attr('content').replace(/\\s/g, '%20') || '';\n","trigger":""},{"name":"cart_plurality","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.cart_qty > 1 ? 'items' : 'item';","trigger":""},{"name":"pagetype","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts;","trigger":""},{"name":"ibx_test","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf('ibx_test') > -1 || null;","trigger":""},{"name":"native_email_submitted","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.native_email_submitted || jQuery('#successEmailModal').find('.content, .confirm').is(':visible');","trigger":""},{"name":"custom_data_tracking","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":""},{"name":"products_tracked","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.parseJSON(localStorage.bxProdHist).length || null;","trigger":""},{"name":"items_in_cart","polling":"vars","persist":"no","page_types":[],"testmode":true,"default":"false","code":"jQuery('.mini-cart-content .mini-cart-product').length;","trigger":""},{"name":"user_identified","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"!!(bouncex.cookie.uid || bouncex.getBounceCookie('__ibxu'));","trigger":"pageload"},{"name":"gc_incart","polling":"all","persist":"visit","page_types":[],"testmode":true,"default":"false","code":"(function(){\n var miniCart = jQuery('.mini-cart-product');\n for(var i =0; i < miniCart.length; i++){\n if(miniCart.eq(i).find('.mini-cart-name').text().indexOf('E-Gift Card') > -1){\n return true;\n } \n }\n return false;\n})();","trigger":"pageload"},{"name":"customized_prod_name","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"","code":"jQuery('.fc-model-product-name').text().trim();","trigger":"pageload"},{"name":"borderfree","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"jQuery('#bfx-cc-flag-link').length === 0 ? false : jQuery('#bfx-cc-flag-link').text().indexOf('United States') === -1;","trigger":"pageload"},{"name":"valid_domain","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"['www.kendrascott.com'].indexOf(window.location.hostname) > -1;","trigger":"pageload"},{"name":"last_selected_sku","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"wishlist_qty","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"jQuery('.wishlist-quantity').text() ? parseInt(jQuery('.wishlist-quantity').text()) : 0;","trigger":"pageload"},{"name":"wishlist_set","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"fine_sterling_in_cart","polling":"all","persist":"permanent","page_types":[],"testmode":true,"default":"false","code":"/*(function() {\n var emptyCart = jQuery('.cart-empty:visible:contains(\"Bag is Empty\")'); \n var inCart = jQuery('.cart-row.bfx-product:visible');\n var len = inCart.length;\n var json = cartJson;\n \n if (json.length === 0 || emptyCart.length > 0) {\n return false;\n }\n if (bouncex.website.pts === 'cart') {\n for (var i = 0; i < len; i++) {\n var cartCat = inCart.eq(i).attr('data-category');\n if (cartCat.indexOf('fine jewelry') > -1 || cartCat.indexOf('sterling silver') > -1) {\n return true;\n }\n }\n if (len > 0) {\n return false;\n }\n }\n \n if (json.length > 0) {\n for (var j = 0; j < json.length; j++) {\n var item = json[j];\n var cat = item.category;\n if (cat.indexOf('fine jewelry') > -1 || cat.indexOf('sterling silver') > -1) {\n return true;\n }\n }\n return false;\n }\n return null;\n})();*/","trigger":"pageload"},{"name":"excluded_prods_in_cart_percentage","polling":"all","persist":"permanent","page_types":[],"testmode":true,"default":"false","code":"/*(function() {\n var cart = cartJson;\n var exTotal = 0;\n var cartTotal = 0;\n\n for (var key of cart) {\n var category = key.category !== undefined && key.category;\n var name = key.name !== undefined && key.name.toLowerCase();\n var price = key.price !== undefined && key.price;\n if (category.indexOf('fine jewelry') > -1 || category.indexOf('sterling silver') > -1 || name.indexOf('fine jewelry') > -1 || name.indexOf('sterling silver') > -1) {\n exTotal += price;\n }\n cartTotal += price;\n }\n \n return Number((exTotal/cartTotal).toFixed(2) * 100) || null;\n})();*/","trigger":"pageload"},{"name":"attv_modal_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('iframe#attentive_creative').first()[0] ? jQuery('iframe#attentive_creative').first()[0].style.position === 'fixed' : false;","trigger":"pageload"},{"name":"cart_value_excluding_fine_jewelry","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function () {\n if (bouncex.website.pts !== 'cart') {\n return null;\n }\n\n var total = 0,\n excludedCopies = ['14Y', '14W', '14R', '18Y', '18W', '18R', 'SLV', '14K', '18K', 'WATCH', 'STERLING', 'GIFT'];\n\n jQuery('.product-info-details').each(function () {\n var $item = jQuery(this),\n excluded = false;\n for (var i = 0; i < excludedCopies.length; i++) {\n if ($item.find('.bfx-product-name,.gift-font').text().toUpperCase().indexOf(excludedCopies[i]) > -1) {\n excluded = true;\n break;\n }\n }\n if (!excluded) {\n total += Number($item.find('.bfx-product-subtotal').first().text().replace(/[^0-9.]/g, ''));\n }\n });\n return total;\n}());","trigger":"pageload"},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.product-detail span.sales > span').attr('content');","trigger":"pageload"},{"name":"fine_jewelry_in_cart","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function () {\n if (bouncex.website.pts === 'cart') {\n return null;\n }\n\n var total = 0,\n excludedCopies = ['14Y', '14W', '14R', '18Y', '18W', '18R', 'SLV', '14K', 'WATCH', 'GIFT'],\n cartQty = Number(jQuery('.minicart-quantity').text()),\n cartItems = jQuery('.mini-cart-wrap .card').length;\n \n if (cartQty > 0 && cartItems === 0) {\n bouncex.log(\"Activating cart to check for fine jewelry\");\n jQuery('.popover.popover-bottom').mouseenter().mouseleave();\n }\n\n jQuery('.mini-cart-wrap .card').each(function () {\n var $item = jQuery(this);\n for (var i = 0; i < excludedCopies.length; i++) {\n if ($item.find('.line-item-name span').text().toUpperCase().indexOf(excludedCopies[i]) > -1) {\n total += 1;\n }\n }\n });\n return total > 0;\n}());","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","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":"#birthday-form .email-field.valid","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":0,"spatm":1,"preinit_cjs":"","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"","eventSharing":false,"shqId":"","enabled":0},"pde":true,"fmc":["US","CA"],"fme":true,"fmx":"#birthday-form .email-field.valid","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":"315572702","ga4_measurement_id":"G-6RDWFCH6ZG"} ; 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); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();