(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":2676,"name":"Filters Fast","cookie_name":"bounceClientVisit2676","domain":"filtersfast.com","ct":"bind_to_domain","ally":0,"ei":0,"tcjs":"","cjs":"// DR - code to increment purchase_count_pushdiscount CV\nif (jQuery('#cartcontainer, #BodyContainer').text().toLowerCase().indexOf('thank you for your order') > -1) {\n var count = bouncex.vars.purchase_count_pushdiscount;\n if (count) {\n if (count === 'zero') {\n bouncex.setv('purchase_count_pushdiscount', 1);\n } else {\n bouncex.setv('purchase_count_pushdiscount', count + 1);\n }\n bouncex.setBounceCookie();\n }\n}\n\nfunction bxFindPrice(num){\n return Number(jQuery('.tiBuyBox').eq(num).find('#tiPricebold, .tiPricebold').text().trim().replace(/[^0-9.]/g, '') || 0);\n}\n\nbouncex.et.onVisible('.ti-compare-filters', function() {\n window.bouncex.priceComparisonPage = {\n $elements: jQuery('.tiBuyBox'),\n findPrice: function (num) {\t\t\n return Number(this.$elements.eq(num).find('#tiPricebold, .tiPricebold').text().trim().replace(/[^0-9.]/g, '') || 0);\n },\n smallestElement: function () {\n return bxFindPrice(0) > bxFindPrice(1) ? jQuery('.tiBuyBox').eq(1) : jQuery('.tiBuyBox').eq(0);\n },\n largestElement: function () {\n return bxFindPrice(0) < bxFindPrice(1) ? jQuery('.tiBuyBox').eq(1) : jQuery('.tiBuyBox').eq(0);\n }\n };\n});\n\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: jQuery('.ti-compare-filters').length === 0 && (bouncex.vars.product_page || jQuery('#idProduct').length > 0 || (window.google_tag_params && window.google_tag_params.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\tif (jQuery('div#tiGenStock').text().trim() !== \"in stock\") { return; }\n\n\t\t\tvar productValues = {\n\t\t\t\turl: (jQuery('link[rel=\"canonical\"]').attr('href')),\n\t\t\t\tname: (jQuery('h1[itemprop=\"name\"]').text().trim()),\n\t\t\t\tsku: (jQuery('h2[itemprop=\"sku\"]').text().trim()),\n\t\t\t\tcategory: [{ categoryName: (jQuery('.N-RelatedProductsCats li a').first().text().replace('Category : ', '').trim()), categoryUrl: (window.location.origin +'/' +jQuery('.N-RelatedProductsCats li a').first().attr('href')) }],\n\t\t\t\tdescription: (jQuery('meta[name=\"description\"]').prop('content')),\n\t\t\t\tprice: (jQuery('#tiPricebold').text().trim().replace('$','')),\n\t\t\t\tmainImgUrl: (window.location.origin +jQuery('.tiFilterImage img').attr('src')),\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\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\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 window.bouncex.bxISR.init();\n \n})();\n\n/* enable.feature.DISABLE_RELOAD_CAMPAIGNS_V2 */","force_https":false,"waypoints":false,"content_width":0,"gai":"UA-192354-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,"ffs":"","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/* ---------------------------- SHARED VARIABLES ---------------------------- */\n\nvar CLEAN_URL = bouncex.utils.url.allowParams();\n\n/* ---------------------------- HELPER FUNCTIONS ---------------------------- */\n\nfunction getItemCopy() {\n var itemCopyAttr = jQuery('meta[property=\"og:title\"]').attr('content');\n return itemCopyAttr ? itemCopyAttr.replace(/&[#0-9a-z\"]+;/g, '') : '';\n}\n\nfunction getItemImage(){\n var imageUrl = jQuery('meta[property=\"og:image\"]').attr('content') ? 'https://' + window.location.host + jQuery('meta[property=\"og:image\"]').attr('content').replace(/-sm.jpg$/g, '.jpg') : '';\n \n return encodeURI(imageUrl);\n}\n\n/* ------------------------------ ITEM TRACKING ----------------------------- */\n\nfunction getItem() {\n return {\n id: jQuery('form[name=\"additem\"]').find('[name=\"idProduct\"]').val(),\n copy: getItemCopy(),\n category: jQuery('.N-RelatedProductsCats li a').first().text().replace(/^Category : /, '') ||\n jQuery('#compatible-models .records .row').first().find('span').last().text().trim() ||\n 'global',\n url: bouncex.utils.url.getCanonicalURL() || CLEAN_URL.split('&').shift(),\n imageurl: getItemImage(),\n instock: !jQuery('.out-of-stock-icon').is(':visible')\n };\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 if (item.url.indexOf('gift-card') > -1) {\n return;\n }\n\n bouncex.push(['item', item]);\n bouncex.push(['view item', { 'item:id': item.id }]);\n },\n 10\n );\n}\n\n/* ---------------------------- CATEGORY TRACKING --------------------------- */\n\nfunction getItemIds() {\n var ids = [];\n\n jQuery('[name=\"idProduct\"],[class*=add-to-cart]').each(function(i, e) {\n var id = jQuery(e).val().split('-')[0];\n\n if (!id) {\n var atcBtnOnclickAttr = jQuery(e).attr('onclick');\n id = atcBtnOnclickAttr ? atcBtnOnclickAttr.split('addtocart(')[1].split(',')[0] : '';\n }\n \n if (id && ids.indexOf(id) < 0) {\n ids.push(id);\n }\n });\n return ids.join(',');\n}\n\nfunction getCategoryObject() {\n return {\n 'page:url': bouncex.utils.url.allowParams('w'),\n 'items:ids': getItemIds()\n };\n}\n\nfunction initializeCategoryEvents() {\n var categoryObj;\n\n bouncex.et.onTrue(\n function () {\n categoryObj = getCategoryObject();\n return !!categoryObj['items:ids'].length &&\n !!categoryObj['page:url'];\n },\n function () {\n bouncex.push(['view category', categoryObj]);\n },\n 10\n );\n}\n\n/* ------------------------------- CART EVENTS ------------------------------ */\n\nfunction fireAddToCart(itemId) {\n bouncex.push(['add to cart', { 'item:id': itemId }]);\n\n if (bouncex.vars.cart) {\n return;\n }\n bouncex.setVar('cart', true);\n}\n\nfunction getATCItemId(atcBtn) {\n var itemId = jQuery(atcBtn).siblings('[name=\"idProduct\"]').val();\n\n if (!itemId) {\n var atcBtnOnclickAttr = jQuery(atcBtn).attr('onclick');\n itemId = atcBtnOnclickAttr ? atcBtnOnclickAttr.split('addtocart(')[1].split(',')[0] : '';\n }\n\n if (!itemId && bouncex.website.pts === 'product') {\n itemId = jQuery('form[name=\"additem\"]').find('[name=\"idProduct\"]').val();\n }\n\n return itemId;\n}\n\nfunction initializeATCClickTracking() {\n bouncex.et.on(bouncex.document, 'click.bxatc', function () {\n var itemId = getATCItemId(this);\n if (itemId && !jQuery(this).find('input[value=\"View Options\"]').length) {\n fireAddToCart(itemId);\n }\n }, 'input[value=\"Add to Cart\"], [class*=add-to-cart], input[name=\"add\"], input#continueToCart');\n}\n\nfunction emptyCart() {\n if (bouncex.vars.cart && bouncex.website.pts === 'cart' && bouncex.vars.cart_qty === 0) {\n bouncex.push(['empty_cart']);\n bouncex.setVar('cart', false);\n }\n}\n\nfunction initializeCartEvents() {\n bouncex.et.cart.init({\n replenish: function () { },\n replenishmentType: 'single'\n });\n\n emptyCart();\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 = jQuery('form[action*=update-email] em:contains(\"@\")').first().text() || jQuery('input[name=\"email\"]').val();\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\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\n\nfunction isValidDomain() {\n return CLEAN_URL.indexOf('www.filtersfast.com') > -1;\n}\n\nfunction isEn() {\n return bouncex.html.attr('lang') === 'en-us';\n}\n\nfunction isValidForTracking() {\n return isValidDomain() && isEn();\n}\n\nfunction init() {\n if (!isValidForTracking()) {\n return;\n }\n \n initializeCartEvents();\n initializeATCClickTracking();\n initializeUserTracking();\n\n switch (bouncex.website.pts) {\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();\n","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":true,"pt":{"cart":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"[\"/cart.asp\",\"/mobile/cart.asp\"].indexOf(window.location.pathname) > -1;"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('body[class$=\"-cat\"]').length > 0 && [\"/\",\"/search/go\"].indexOf(window.location.pathname) === -1;"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"location.pathname.indexOf('/listbysize2.asp') > -1 && document.querySelectorAll('.prodlisting, .ti-product-container').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/search"}]]},"checkout":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"[\"/20_customer.asp\",\"/mobile/20_customer.asp\"].indexOf(window.location.pathname) > -1;"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"[\"/\",\"/mobile/\"].indexOf(window.location.pathname) > -1;"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.ti-new-pdp, body.product').length > 0;"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search/go?w="},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search/?query="},{"activation":"js","prop":"","prop2":"","prop3":"","val":" [\"/\",\"/search/go\"].indexOf(window.location.pathname) === -1"}]]}},"els":null,"vars":[{"name":"cart_count","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"","trigger":""},{"name":"logged_in","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var url = window.location.href;\n \n if(url.indexOf('custListOrders.asp')>-1){\n return true;\n }else if(url.toLowerCase().indexOf('logged+out') > -1){\n return false;\n }\n return null;\n})();","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() { \nif (bouncex.website.pts === 'search') { return null }\nreturn Number(jQuery('li.ti-cart, .cart-qty').first().text().replace(/[^0-9.]/g, ''));\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function(){\n var cartTotal = jQuery('#cartSubtotal');\n \n return cartTotal.length > 0 ? parseFloat(jQuery('#cartSubtotal').text().trim()).toFixed(2) : (bouncex.utils.getNestedProp('window.OG') && bouncex.utils.getNestedProp('OG.order.sub_total') || jQuery('#og-subtotal').text().replace('$', '') || null);\n})();","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":true,"default":"false","code":"/\\Default.asp\\?thank-you/.test(window.location.href);","trigger":"pageload"},{"name":"in_stock","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.tiOutStock').length > 0 ? false : true;","trigger":""},{"name":"cart_total","polling":"all","persist":"visit","page_types":[],"testmode":true,"default":"0","code":"(function(){\n var cartTotal = jQuery('#cartSubtotal');\n \n return cartTotal.length > 0 ? parseFloat(jQuery('#cartSubtotal').text().trim()).toFixed(2) : (bouncex.utils.getNestedProp('window.OG') && bouncex.utils.getNestedProp('OG.order.sub_total') || jQuery('#og-subtotal').text().replace('$', '') || null);\n})();","trigger":""},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":""},{"name":"products_tracked","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"JSON.parse(localStorage.bxProdHist).length;","trigger":""},{"name":"onedelivery_pp","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('input[type=radio]').first().is(':checked');","trigger":""},{"name":"onedelivery_checkout","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.deliver_one_time_label').parent().siblings('input').is(':checked');","trigger":""},{"name":"payment_page_visited","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf(\"50_PaySubmit.asp\") > -1 ? true : null;","trigger":""},{"name":"search_visited","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"window.location.href.indexOf('/search') > -1 ? bouncex.vars.search_visited + 1 : null;","trigger":""},{"name":"submitted_ecap","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":""},{"name":"product_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.tiBuyEven').length > 0 ;","trigger":"pageload"},{"name":"using_edge_browser","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.browser.edge","trigger":"pageload"},{"name":"notification_status","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (bouncex.psh){\n bouncex.psh.getCurrentPermission();\n }\n})();","trigger":"pageload"},{"name":"pushdiscount","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"purchase_count_pushdiscount","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"filmore_modal_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.modal-content iframe#fmorefrm').length > 0 || jQuery('body.filmore').length > 0;","trigger":"pageload"},{"name":"disc_codeb_not_visible","polling":"vars","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n function getCookie(name) {\n var value = \"; \" + document.cookie;\n var parts = value.split(\"; \" + name + \"=\");\n if (parts.length == 2) return parts.pop().split(\";\").shift();\n }\n if (getCookie('discCodeb') === undefined) {\n return true;\n }\n return getCookie('discCodeB').indexOf('True') === -1 || null;\n})();","trigger":"pageload"},{"name":"compare_pdp","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var smallestEl = bouncex.utils.getNestedProp('bouncex.priceComparisonPage.smallestElement', ''),\n $firstProd = jQuery('.tiBuyBox').eq(0),\n $firstPrice = Number($firstProd.find('[class*=eachPricePack]').text().replace(/[^0-9.]/g, '')) || Number($firstProd.find('#tiPricebold, .tiPricebold').text().replace(/[^0-9.]/g, '')),\n $firstProdOos = $firstProd.find('div.out-of-stock-icon:visible:contains(\"Out Of Stock\")'),\n $secondProd = jQuery('.tiBuyBox').eq(1),\n $secondPrice = Number($secondProd.find('[class*=eachPricePack]').text().replace(/[^0-9.]/g, '')) ||Number($secondProd.find('#tiPricebold, .tiPricebold').text().replace(/[^0-9.]/g, '')),\n $secondProdOos = $secondProd.find('div.out-of-stock-icon:visible:contains(\"Out Of Stock\")');\n\n if (!smallestEl) {\n return false;\n }\n \n if (($firstProdOos.length > 0 && $firstPrice < $secondPrice) || ($secondProdOos.length > 0 && $secondPrice < $firstPrice) ) {\n return false;\n } \n \n return true;\n})();","trigger":"pageload"},{"name":"lowest_price_title","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var smallestEl = bouncex.utils.getNestedProp('bouncex.priceComparisonPage.smallestElement', ''),\n $firstProd = jQuery('.tiBuyBox').eq(0),\n $firstPrice = Number($firstProd.find('[class*=eachPricePack]').text().replace(/[^0-9.]/g, '')) || Number($firstProd.find('#tiPricebold, .tiPricebold').text().replace(/[^0-9.]/g, '')),\n $firstProdOos = $firstProd.find('div.out-of-stock-icon:visible:contains(\"Out Of Stock\")'),\n $firstTitle = $firstProd.find('.ti-col-title').contents().eq(0).text(),\n $secondProd = jQuery('.tiBuyBox').eq(1),\n $secondPrice = Number($secondProd.find('[class*=eachPricePack]').text().replace(/[^0-9.]/g, '')) ||Number($secondProd.find('#tiPricebold, .tiPricebold').text().replace(/[^0-9.]/g, '')),\n $secondProdOos = $secondProd.find('div.out-of-stock-icon:visible:contains(\"Out Of Stock\")'),\n $secondTitle = $secondProd.find('.ti-col-title').contents().eq(0).text(),\n lowest_title, \n slicedName, \n len;\n\n if (!smallestEl) {\n return false;\n }\n \n if (($firstProdOos.length > 0 && $firstPrice < $secondPrice) || ($secondProdOos.length > 0 && $secondPrice < $firstPrice) ) {\n return false;\n } \n \n lowest_title = $firstPrice < $secondPrice ? $firstTitle : $secondTitle;\n slicedName = lowest_title.slice(0, 18);\n len = slicedName.length;\n\n if(lowest_title[18] === ' '){\n return slicedName;\n }\n\n slicedName[len-1] !== ' ' ? slicedName = slicedName.slice(0, slicedName.lastIndexOf(' ')) : slicedName = slicedName.trim();\n\n return slicedName;\n})();","trigger":"pageload"},{"name":"lowest_price_title_alt","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"(function() {\n var smallestEl = bouncex.utils.getNestedProp('bouncex.priceComparisonPage.smallestElement', '');\n var prodName = smallestEl().find('.ti-col-title').contents().eq(0).text().trim() || '';\n var slicedName = prodName.slice(0, 18);\n var len = slicedName.length;\n \n if (!smallestEl) {\n return false;\n }\n \n for (let i = len-1; i > 0; i--) {\n if (slicedName[i] !== undefined && slicedName[i] === ' ') {\n slicedName = slicedName.trim();\n break;\n }\n }\n return slicedName;\n})();","trigger":"pageload"},{"name":"lowest_price_image","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var smallestEl = bouncex.utils.getNestedProp('bouncex.priceComparisonPage.smallestElement', ''),\n $firstProd = jQuery('.tiBuyBox').eq(0),\n $firstPrice = Number($firstProd.find('[class*=eachPricePack]').text().replace(/[^0-9.]/g, '')) || Number($firstProd.find('#tiPricebold, .tiPricebold').text().replace(/[^0-9.]/g, '')),\n $firstProdOos = $firstProd.find('div.out-of-stock-icon:visible:contains(\"Out Of Stock\")'),\n $firstImg = $firstProd.find('.ti-col-img img').attr('src') || '',\n $secondProd = jQuery('.tiBuyBox').eq(1),\n $secondPrice = Number($secondProd.find('[class*=eachPricePack]').text().replace(/[^0-9.]/g, '')) ||Number($secondProd.find('#tiPricebold, .tiPricebold').text().replace(/[^0-9.]/g, '')),\n $secondProdOos = $secondProd.find('div.out-of-stock-icon:visible:contains(\"Out Of Stock\")'),\n $secondImg = $secondProd.find('.ti-col-img img').attr('src') || '';\n\n if (!smallestEl) {\n return false;\n }\n \n if (($firstProdOos.length > 0 && $firstPrice < $secondPrice) || ($secondProdOos.length > 0 && $secondPrice < $firstPrice) ) {\n return false;\n } \n \n return $firstPrice < $secondPrice ? window.location.hostname + $firstImg : window.location.hostname + $secondImg;\n})();","trigger":"pageload"},{"name":"lowest_price_percentage","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var smallestEl = bouncex.utils.getNestedProp('bouncex.priceComparisonPage.smallestElement', ''),\n $firstProd = jQuery('.tiBuyBox').eq(0),\n $firstPrice = Number($firstProd.find('[class*=eachPricePack]').text().replace(/[^0-9.]/g, '')) || Number($firstProd.find('#tiPricebold, .tiPricebold').text().replace(/[^0-9.]/g, '')),\n $firstProdOos = $firstProd.find('div.out-of-stock-icon:visible:contains(\"Out Of Stock\")'),\n $firstTitle = $firstProd.find('.ti-col-title').contents().eq(0).text(),\n $secondProd = jQuery('.tiBuyBox').eq(1),\n $secondPrice = Number($secondProd.find('[class*=eachPricePack]').text().replace(/[^0-9.]/g, '')) ||Number($secondProd.find('#tiPricebold, .tiPricebold').text().replace(/[^0-9.]/g, '')),\n $secondProdOos = $secondProd.find('div.out-of-stock-icon:visible:contains(\"Out Of Stock\")'),\n $secondTitle = $secondProd.find('.ti-col-title').contents().eq(0).text();\n\n if (!smallestEl) {\n return false;\n }\n \n if (($firstProdOos.length > 0 && $firstPrice < $secondPrice) || ($secondProdOos.length > 0 && $secondPrice < $firstPrice) ) {\n return false;\n } \n \n return $firstPrice < $secondPrice ? Math.round(((1 - ($firstPrice / $secondPrice)) * 100) || 0): Math.round(((1 - ($secondPrice / $firstPrice)) * 100) || 0); \n})();","trigger":"pageload"},{"name":"rz_mask","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var rzMasks = [\"M2 Mesh Black\", \"M2 Mesh Titanium\", \"M2-Mesh Green\"],\n cartItems = window.google_tag_params && window.google_tag_params.prodid;\n \n if (!cartItems) {\n\t\treturn null;\n\t}\n \n if(window.location.href.indexOf('/cart') > -1 && cartItems.length){\n for (var i = 0; i < cartItems.length; i++) {\n if (rzMasks.indexOf(cartItems[i]) > -1) {\n return true;\n }\n }\n return false;\n }\n})();","trigger":"pageload"},{"name":"ff_product_present","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.tiBuyBox .ti-col-title, .tiFilterTitle h1').text().indexOf('FiltersFast') > -1;","trigger":"pageload"},{"name":"page_type","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"bouncex.website.pts;","trigger":"pageload"},{"name":"cookie_modal_present","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"jQuery('.ti-cookie-policy-container[style=\"display: flex;\"]').length > 0;","trigger":"pageload"},{"name":"logged_in_identified","polling":"all","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":1,"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":"var audiences = {\r\n testMode: false,\r\n interceptEnabled: true,\r\n mirrorEnabled: true,\r\n arrayObserverEnabled: true,\r\n\r\n captureCategory: function captureCategory() {\r\n bouncex.setTimeout2(function () {\r\n if (bouncex.website.pts === 'category') {\r\n var catCode = location.href.split('/').pop().replace('.asp', '');\r\n if (catCode) {\r\n _shq.push([\"onCategory\", {\r\n \"catName\": catCode,\r\n \"catId\": catCode\r\n }]);\r\n }\r\n }\r\n }, 1500);\r\n },\r\n\r\n capturePDP: function capturePDP(obj) {\r\n var prodId = bouncex.utils.getNestedProp('items[0].item_id', '', obj[2]);\r\n if (prodId) {\r\n _shq.push(['onProductView', {\r\n productId: prodId\r\n }]);\r\n }\r\n },\r\n\r\n captureSearch: function captureSearch(obj) {\r\n bouncex.setTimeout2(function () {\r\n if (bouncex.website.pts === 'search') {\r\n var url = window.location.href;\r\n var urlParams = new URLSearchParams(url.split('?')[1]);\r\n var searchPhrase = urlParams.get('query');\r\n if (searchPhrase) {\r\n _shq.push(['onSearch', {\r\n 'searchPhrase': searchPhrase\r\n }]);\r\n }\r\n }\r\n }, 1500);\r\n },\r\n\r\n processObserver: function processObserver(aoItems) {\r\n // aoItems will be an array of objects\r\n while (aoItems.length) {\r\n var item = aoItems.shift();\r\n var event = bouncex.utils.getNestedProp('event', '', item);\r\n // event = item.event;\r\n var actionType = item && item[1] ? item[1] : '';\r\n if (actionType === 'view_item') {\r\n this.capturePDP(item);\r\n }\r\n //item variable will contain the object to process.\r\n }\r\n },\r\n\r\n arrayObserver: function arrayObserver() {\r\n var _this = this;\r\n if (!this.arrayObserverEnabled) {\r\n return;\r\n }\r\n bouncex.et.onTrue(function () {\r\n return bouncex.utils.getNestedProp('window._shq.loaded');\r\n }, function () {\r\n _shq.ArrayObserver(window.dataLayer, function (e) {\r\n _this.processObserver(e);\r\n }, { catchUp: true });\r\n });\r\n },\r\n /* Initialize audiences Tracking */\r\n init: function init() {\r\n // test mode\r\n if (this.testMode && !bouncex.testmode.bxdev) return;\r\n // attach object to bouncex.et\r\n if (!bouncex.et) {\r\n return;\r\n }\r\n bouncex.et.audiences = this;\r\n // initialize main functions\r\n this.arrayObserver();\r\n this.captureCategory();\r\n this.captureSearch();\r\n }\r\n};\r\naudiences.init();","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"","eventSharing":true,"shqId":"cfx1tkmm83-1","enabled":1},"pde":true,"fmc":["US","CA"],"fme":true,"fmx":"","sdk":{"android":{"enabled":false,"enabledVersions":[],"eventModifications":null},"ios":{"enabled":false,"enabledVersions":[],"eventModifications":null}},"onsite":{"enabled":1},"ads":{"enabled":0},"pubs":{"enabled":0},"websdk":{"enabled":0},"ga4_property_id":"267352830","ga4_measurement_id":"G-FZP649ZFRR","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":"316b12a95511cf618ef642592cd7c824","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"02aca5df0e176b8810a86da97ac05424","onsite":"0e56ab6ba004ee080ce3deb3edae35e9","sms":"e39203556bab2366e56296ce42e974a7","websdk":"fb3da6ba1a7a78e95cf94d2dc9e22138"}; 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_cbe64330162f40129adcc52cb7219c2e.br.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); var deviceGraphScript = document.createElement('script'); deviceGraphScript.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/cjs_min_3a843477d8e318f67237a66d0a58c542.js'); deviceGraphScript.setAttribute('async', 'async'); var dgAttrs = [{"Key":"id","Value":"c.js"},{"Key":"async","Value":"true"},{"Key":"data-apikey","Value":"2^HIykD"},{"Key":"data-cb","Value":"bouncex.dg.initPostDeviceGraph"},{"Key":"data-bx","Value":"1"},{"Key":"data-gm","Value":"1"},{"Key":"data-fire","Value":"1"}]; if (dgAttrs) { for (var i = 0; i < dgAttrs.length; i++) { deviceGraphScript.setAttribute(dgAttrs[i].Key, dgAttrs[i].Value); } } document.body.appendChild(deviceGraphScript); bouncex.initializeTag = function() {}; }; document.body.appendChild(runtime); } window._shq = window._shq || []; var eventSharingCartridge = document.createElement('script'); eventSharingCartridge.setAttribute('src', '//assets.bounceexchange.com/assets/smart-tag/versioned/wknd_audiences_2648fa8509e4b3a98a2790bb8171ddc1.js'); eventSharingCartridge.setAttribute('async', 'async'); document.body.appendChild(eventSharingCartridge); } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();