(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":1972,"name":"HC - Walmart Checks","cookie_name":"bounceClientVisit1972","domain":"walmartchecks.com","ct":"bind_to_domain","ally":1,"ei":0,"tcjs":"// PD 8/30/2018: Trigger omniture event on post conversion only if bx ad has impressed\n(function() {\n for (var ca_id in bouncex.cookie.campaigns) {\n if (bouncex.cookie.campaigns.hasOwnProperty(ca_id) && bouncex.cookie.campaigns[ca_id].lavid) {\n bouncex.omnitureLinkTrack2('BounceX Conversion - Campaign ' + ca_id, 'event30');\n }\n }\n})();","cjs":"(function () {\n jQuery('#hsmodal').one('click.bx', function () {\n window.bouncex.setv('has_watched_video', true);\n window.bouncex.setBounceCookie();\n window.bouncex.reload_campaigns();\n });\n})();\n\n/* \nGO: Omniture event tracking\nPD 08/29/18 - We are disabling this version and replacing with omnitureLinkTrack2 which is called in Custom Campaign JS. Can't remove the function entirely to maintain backwards compatibility for old campaigns.\n*/\nbouncex.omnitureLinkTrack = function(campaignLabel, eventId) {\n // try{\n // window.s.linkTrackVars = 'eVar34,events';\n // window.s.linkTrackEvents = eventId;\n // window.s.eVar34 = campaignLabel;\n // window.s.events = eventId;\n // window.s.tl(true, 'o', campaignLabel);\n // } catch (e) {\n // console.error('BX Omniture Error: ' + e);\n // }\n};\n\n// omitureLinkTrack2 is called in Custom Campaign JS\nbouncex.omnitureLinkTrack2 = function(campaignLabel, eventId) {\n var parsedLabel = eventId !== 'event30' ? '' : campaignLabel;\n // PD: Post conversion events get unique label formatting sine GA label isn't available\n if (eventId !== 'event30') {\n var campaignNameRegex = /(?:variation|control) - (.*)(?:\\([^)]*\\))/;\n var campaignIDRegex = /[^(]\\d{3,10}[^)]/g;\n var campaignName = campaignNameRegex.exec(campaignLabel)[1] || [];\n var parentId = campaignLabel.match(campaignIDRegex)[0] || [];\n var variationId = campaignLabel.match(campaignIDRegex)[1] || [];\n parsedLabel = parentId + ' ' + variationId + ' : ' + campaignName;\n }\n\n\n try{\n window.s.linkTrackVars = 'eVar34,events';\n window.s.linkTrackEvents = eventId;\n window.s.eVar34 = parsedLabel;\n window.s.events = eventId;\n window.s.tl(true, 'o', parsedLabel);\n } catch (e) {\n console.error('BX Omniture Error: ' + e);\n }\n};\n\n\nif (bouncex.vars.ibx_test){\n // SN: ISR tracking\n (function () {\n \twindow.bouncex = window.bouncex || {};\n \n \twindow.bouncex.bxISR = {\n \t\t/* --- INITIALIZATION --- */\n \t\tversion: 'Version 8.1 | 1/4/17',\n \t\tstartTime: Date.now(),\n \t\tsettings: {\n \t\t\tcurrentProduct: {},\n \t\t\tgeneral: {\n \t\t\t\tproductPageIdentifier: (window.s.pageType === 'product'),\n \t\t\t\tmaxProducts: 20,\n \t\t\t\tcategoryHistory: 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\tthis.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 \t\t\tvar productValues = {\n \t\t\t\turl: (jQuery('link[rel=canonical]').attr('href')),\n \t\t\t\tname: (jQuery('#ctl00_ContentPlaceHolder1_lblProdTitle').text().trim()),\n \t\t\t\tsku: (jQuery('#ctl00_ContentPlaceHolder1_hdnProductID').val()),\n \t\t\t\tcategory: [{ categoryName: (jQuery('span.breadcrumb').text().split(' > ').pop()), categoryUrl: (jQuery('span.breadcrumb a:last').attr('href')) }],\n \t\t\t\tdescription: (jQuery('#ctl00_ContentPlaceHolder1_ProductDesc').contents().filter(function () { return this.nodeType === 3; }).text().trim()),\n \t\t\t\tprice: (jQuery('#pricedollar').text() + '.' + jQuery('#pricecents').text()),\n \t\t\t\tmainImgUrl: ('/' + jQuery('#ctl00_ContentPlaceHolder1_singledisplayimage').attr('src').split('?')[0].replace('.ashx','').replace(/^.+\\.\\//,'')),\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\tif (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 \n \t\tpopulateCampaignProducts: function (params) {\n \t\t\tif (!params || !params.campaignId || !params.numberProducts || !params.campaignType) { 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.hoverState) { params.hoverState = false; }\n \n \n \t\t\tvar campaign = jQuery('#campaign_' + params.campaignId + '_container_' + params.campaignType);\n \t\t\tvar campaignProductArray = [];\n \n \t\t\tfor ( var i = 0; i < params.numberProducts; i++ ) {\n \t\t\t\tvar campaignProductObject = {\n \t\t\t\t\timg: jQuery('#campaign_' + params.campaignId + '_container_' + params.campaignType + ' a[href*=isr_img' + (i + 1) + ']'),\n \t\t\t\t\tlink: jQuery('#campaign_' + params.campaignId + '_container_' + params.campaignType + ' a[href*=isr_url' + (i + 1) + ']')\n \t\t\t\t};\n \n \t\t\t\tcampaignProductArray.push(campaignProductObject);\n \t\t\t}\n \n \t\t\tvar productArray = window.bouncex.bxISR.getTopProducts(params.sortBy, params.numberProducts);\n \t\t\tconsole.log(productArray)\n \t\t\tjQuery.each(productArray, function (x, y) {\n \t\t\t\tvar imgSrc = y.mainImgUrl,\n \t\t\t\t\tproductLink = (y.url.indexOf('http') > -1) ? y.url : window.top.location.origin + y.url,\n \t\t\t\t\tproductImageElem = jQuery(campaignProductArray[x].img),\n \t\t\t\t\tproductLinkElem = jQuery(campaignProductArray[x].link);\n \n \n \t\t\t\tvar css = {\n \t\t\t\t\t'background-image': 'url(\\'' + imgSrc + '\\')',\n \t\t\t\t\t'background-size': 'auto 100%',\n \t\t\t\t\t'background-repeat': 'no-repeat',\n \t\t\t\t\t'background-position': 'center'\n \t\t\t\t};\n \n \t\t\t\tproductImageElem.css(css).addClass('isr-image isr' + x + '');\n \t\t\t\tif (params.productAction === 'link') {\n \t\t\t\t\tif (params.reportClicks) {\n \t\t\t\t\t\tvar productAction = 'javascript:(function () { window.bouncex.report(' + params.campaignId + ', \\'clicks\\'); window.top.open(\\''+ productLink +'\\'); })();';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tvar productAction = 'javascript:(function () { window.top.open(\\''+ productLink +'\\'); })();';\n \t\t\t\t\t}\n \n \t\t\t\t} else if (params.productAction === 'submit') {\n \t\t\t\t\tvar productAction = 'javascript:void(0);';\n \t\t\t\t\tvar msg = JSON.stringify({ source: 'bouncex', action: 'submit' });\n \t\t\t\t\tproductImageElem.on('click', function () {\n \t\t\t\t\t\twindow.bouncex.report(params.campaignId, 'clicks');\n \t\t\t\t\t\tXD.postMessage(msg, campaign);\n \t\t\t\t\t});\n \t\t\t\t}\n \n \t\t\t\tproductImageElem.attr('href', productAction);\n \n \t\t\t\tif (params.reportClicks) {\n \t\t\t\t\tvar linkAction = 'javascript:(function () { window.bouncex.report(' + params.campaignId + ', \\'clicks\\'); setTimeout(function(){window.top.open(\\''+ productLink +'\\');}, 100); })();';\n \t\t\t\t} else {\n \t\t\t\t\tvar linkAction = 'javascript:(function () { window.top.open(\\''+ productLink +'\\'); })();';\n \t\t\t\t}\n \n \t\t\t\tproductLinkElem.attr('href', linkAction);\n \n \t\t\t\tif (params.hoverState) {\n \t\t\t\t\tif (params.reportClicks) {\n \t\t\t\t\t\tvar hoverLinkAction = 'javascript:(function () { window.bouncex.report(' + params.campaignId + ', \\'clicks\\'); setTimeout(function(){window.top.open(\\''+ productLink +'\\');}, 100); })();';\n \t\t\t\t\t} else {\n \t\t\t\t\t\tvar hoverLinkAction = 'javascript:(function () { window.top.open(\\'' + productLink + '\\'); })();';\n \t\t\t\t\t}\n \n \t\t\t\t\tproductImageElem.parent().append('
' + y.name + '
');\n \t\t\t\t}\n \t\t\t});\n \t\t},\n \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}\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) {\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 \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 })();\n}","force_https":false,"waypoints":false,"content_width":0,"gai":"","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":false,"ffs":"","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/* --------------------------------- HELPERS -------------------------------- */\n\nfunction getUrl() {\n return bouncex.utils.url.allowParams();\n}\n\nfunction setVarAndCookie(varName, value) {\n bouncex.setVar(varName, value);\n bouncex.setBounceCookie();\n return;\n}\n\nfunction getItemImage() {\n var productImg = jQuery('[alt=\"thumbnail\"]').prop('src') || jQuery('#divSingleImg img').prop('src') || '';\n if (productImg.indexOf('70') > -1) {\n return productImg.replace('70', '500')\n }\n return productImg;\n}\n\nfunction getItemPrice() {\n return Number(jQuery('#pricedollar').text() + '.' + jQuery('#pricecents').text());\n}\n\n/* ------------------------------ ITEM TRACKING ----------------------------- */\n\nfunction getItem() {\n return {\n id: getUrl().split('/').pop(),\n copy: jQuery('.pdp--h1').text().trim(),\n category: jQuery('[id*=BreadCrumb] a').last().text().trim(),\n url: getUrl(),\n imageurl: getItemImage(),\n price: getItemPrice(),\n instock: jQuery('.customize-button:visible').length > 0\n };\n}\n\nfunction fireViewItem(item) {\n var pushItem = {\n 'item:id': item.id,\n };\n\n bouncex.push(['view item', pushItem]);\n\n return;\n} \n\nfunction initializeItemEvents() {\n var item;\n\n bouncex.et.onTrue(\n function() {\n item = getItem();\n return !!item.id &&\n !!item.copy &&\n !!item.category &&\n !!item.url &&\n !!item.imageurl;\n },\n function() {\n bouncex.push(['item', item]);\n\n fireViewItem(item);\n\n return;\n },\n 10\n );\n\n return;\n}\n\n\n/* ---------------------------- CATEGORY TRACKING --------------------------- */\n\nfunction getItemIdsCat() {\n var ids = [],\n $tiles = jQuery('.productsList a[href], .row .card--shadow a[href]');\n\n $tiles.each(function(){\n // regex here is just splitting on either '/' or '='\n ids.push(jQuery(this).attr('href').split(/\\/|=/).pop());\n });\n\n return ids.join(',');\n}\n\nfunction getCategoryObject() {\n return {\n 'page:url': getUrl(),\n 'items:ids': getItemIdsCat()\n };\n}\n\nfunction initializeCategoryEvents() {\n var categoryObj;\n\n bouncex.et.onTrue(\n function() {\n categoryObj = getCategoryObject();\n return !!categoryObj['items:ids'] && \n !!categoryObj['page:url'];\n },\n function() {\n bouncex.push(['view category', categoryObj]);\n },\n 10\n );\n\n return;\n}\n\n/* ------------------------------- CART EVENTS ------------------------------ */\nfunction addToCart(itemId) {\n setVarAndCookie('cart', true);\n bouncex.push(['add to cart',{'item:id':itemId}]);\n}\n\n// USE FOR INITIALIZING ATC EVENTS USING CLICK LISTENERS ONLY\nfunction initializeATCClickTracking() {\n var itemId = bouncex.utils.getParam('productid') || '',\n eventTarget;\n\n\n bouncex.et.on(jQuery(document), 'click.bx', function(e) {\n eventTarget = jQuery(e.target);\n if ((eventTarget.attr('title') === 'Approve and Continue' || eventTarget.parent().attr('title') === 'Approve and Continue') && jQuery('#ckAgree').is(':checked')) {\n addToCart(itemId);\n }\n\n if (eventTarget.text() === 'Add to Cart') {\n var quickAdd = eventTarget.siblings('span').find('label').text().split('_')[0];\n bouncex.website.pts === 'product' ? itemId = getUrl().split('/').pop() : itemid = quickAdd;\n addToCart(itemId);\n }\n })\n\n bouncex.et.on(jQuery(document), 'submit.bx', function() {\n if(jQuery('input[id*=\"chbIagree\"][type=\"checkbox\"]').is(':checked')) {\n addToCart(itemId);\n }\n }, '#Form1')\n\n return;\n}\n\nfunction emptyCart() {\n if (bouncex.website.pts === 'cart') {\n if (jQuery('h1').text().indexOf('shopping cart is empty') > -1 && bouncex.vars.cart) {\n bouncex.push(['empty_cart']);\n setVarAndCookie('cart', false);\n }\n }\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 return;\n });\n\n return;\n}\n\nfunction initializeCartEvents() {\n\n bouncex.et.cart.init({\n replenish: function() { return; },\n replenishmentType: 'single'\n });\n initializeATCClickTracking();\n emptyCart();\n\n return;\n}\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\n\nfunction isValidDomain() {\n var url = getUrl();\n return url.indexOf('walmartchecks.com') > -1 && ['qa', 'dev', 'drtest'].filter(function(subdomain){\n return url.indexOf(subdomain) > -1;\n }).length === 0; \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 initializeCartEvents();\n \n switch(bouncex.website.pts) {\n case 'category':\n initializeCategoryEvents();\n break;\n case 'product':\n initializeItemEvents();\n break;\n default:\n break;\n }\n\n return;\n}\n\ninit();","dge":true,"bxidLoadFirst":false,"pie":true,"cme":false,"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":"qa."}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.productsList').length > 0 && !(['https://www.walmartchecks.com/index.aspx', 'https://www.walmartchecks.com/'].indexOf(bouncex.utils.url.allowParams()) > -1);\n"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"checkout"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"qa."}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"['https://www.walmartchecks.com/index.aspx', 'https://www.walmartchecks.com/'].indexOf(bouncex.utils.url.allowParams()) > -1;\n"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('[id*=\"ProdTitle\"]').length > 0;\n"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"search"}]]}},"els":null,"vars":[{"name":"dup_checks","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#divDuplicates').length > 0;","trigger":""},{"name":"business_personal_pd_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":0,"code":"(function() {\n var breadCrumb = jQuery('span.breadcrumb').text().split(' > ')[1].toLowerCase();\n \n if (breadCrumb.indexOf('business') > -1 ) {\n \treturn 'business';\n } else if (breadCrumb.indexOf('personal') > -1 ) {\n \treturn 'personal';\n } else if (breadCrumb.indexOf('high security checks') > -1) {\n \treturn 'business';\n } else {\n \treturn 'other';\n }\n})();","trigger":""},{"name":"high_security_pd_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('a#hsmodal').length > 0;","trigger":""},{"name":"fraud_armor_pd_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.fraud-armor').length > 0","trigger":""},{"name":"has_watched_video","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":""},{"name":"items_in_cart","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"0","code":"parseInt(jQuery('span.cart-count-container').text());","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function(){\n var page = bouncex.website.pts,\n total = jQuery('[id*=\"Subtotal\"]');\n if (Number(jQuery('.cart-count-container').first().text().trim()) === 0) {\n return 0;\n }\n if (page === 'cart') {\n return Number(total.last().text().replace(/[^0-9.]/g,'').trim());\n }\n if (page === 'checkout') {\n return Number(total.first().text().replace(/[^0-9.]/g,'').trim());\n }\n return null;\n}());","trigger":"pageload"},{"name":"business_or_personal","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":""},{"name":"add_to_cart_cta_shown","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"","code":"(function(){\n var by_parent_id = window.bouncex.by_parent_id(462240) || window.bouncex.by_parent_id(462234);\n return window.bouncex.campaigns[by_parent_id] \n ? (window.bouncex.campaigns[by_parent_id].ad_shown && window.bouncex.campaigns[by_parent_id].ad_visible) \n : null;\n})();","trigger":""},{"name":"fraud_armor_upsell_shown","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"","code":"(function(){\n var by_parent_id = window.bouncex.by_parent_id(468120) || window.bouncex.by_parent_id(468244);\n return window.bouncex.campaigns[by_parent_id] \n ? (window.bouncex.campaigns[by_parent_id].ad_shown && window.bouncex.campaigns[by_parent_id].ad_visible) \n : null;\n})();","trigger":""},{"name":"high_security_video_shown","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"","code":"(function(){\n var by_parent_id = window.bouncex.by_parent_id(412277) || window.bouncex.by_parent_id(412754);\n return window.bouncex.campaigns[by_parent_id] \n ? (window.bouncex.campaigns[by_parent_id].ad_shown && window.bouncex.campaigns[by_parent_id].ad_visible) \n : null;\n})();","trigger":""},{"name":"business_product_type","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"","code":"(function(){\n\tvar is_business = bouncex.vars.business_personal_pd_page;\n\tif (is_business) {\n\t\treturn jQuery('span.breadcrumb').text().split(' > ')[2].toLowerCase();\n\t}\n})();","trigger":""},{"name":"checkbook_cover_in_cart","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n return jQuery('.cart_item_img_name').text().indexOf('Cover') > -1;\n})();","trigger":""},{"name":"previous_customer","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":""},{"name":"no_recommended","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (window.location.href.indexOf('cart.aspx') > -1) {\n return jQuery('.crossSellItem:contains(Cover)').length > 0 ? false : true;\n }\n})();\n","trigger":""},{"name":"products_tracked","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"","code":"localStorage.getItem('bxProdHist') ? JSON.parse(localStorage.getItem('bxProdHist')).length : 0;","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":"account_tab","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.personalizationPageWrapper #tabs-1').is(':visible');","trigger":"pageload"},{"name":"address_tab","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.personalizationPageWrapper #tabs-2').is(':visible');","trigger":"pageload"},{"name":"customize_tab","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.personalizationPageWrapper #tabs-3').is(':visible');","trigger":"pageload"},{"name":"client_ecap_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('div.Campaign.CampaignType--popup').is(':visible');","trigger":"pageload"},{"name":"fraud_service_checked","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#Quantity_CheckSafe').is(':checked');","trigger":"pageload"},{"name":"cart_qty","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"Number(jQuery('.cart-count-container').first().text().trim());\n","trigger":"pageload"},{"name":"page_type","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts;","trigger":"pageload"},{"name":"cart","polling":"none","persist":"visit","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":0,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":null,"cus":"","miw_exclude":"","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":["AW","AI","AG","AR","BS","BB","BZ","BM","BO","BQ","BR","CA","KY","CL","CO","CR","CU","CW","DM","DO","EC","SV","GF","GL","GD","GT","GP","HT","HN","JM","MQ","MX","MS","NI","PA","PY","PE","PR","PM","MF","BL","KN","LC","VC","SX","SR","TT","US","UM","UY","VE","VG","VI"],"fme":true,"fmx":"","uid2":false,"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,"devMode":0},"ga4_property_id":"","ga4_measurement_id":"","tag_state_domain":"api.bounceexchange.com"} ; 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":"7b352b1295e35e9c90089d9dd48e488f","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"75060a85c1a4aebcc6f779b9e84db722","onsite":"abbdf7a49be9b52b097917b7b527b262","sms":"e39203556bab2366e56296ce42e974a7","websdk":"fd6a81d9d51cda3a3a55d6ab16eb7ac5"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/runtime_c81e76ee00d795b1eebf8d27949f8dc5.br.js'); runtime.setAttribute('async', 'async'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/main-v2_5a114136d61ff5a1340c5ba91977f308.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_6ef1802500d8367a80105e664862d0d7.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-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() {}; }; runtime.onload = bouncex.initializeTag; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();