(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":3810,"name":"Nunn Bush","cookie_name":"bounceClientVisit3810","domain":"nunnbush.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-2008304-2","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"10000","local_storage":"1"},"cmp":{"gdpr":1,"gmp":0,"whitelist_check":0},"burls":[],"ple":false,"fbe":true,"ffs":"","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/* |----------- VARIABLES -----------------------| */\nvar listPageTileSelector = '#products .product';\nvar listPageTileLinkSelector = 'a';\nvar COOKIE_NAME = 'customer';\n\n/* |----------- HELPER FUNCTIONS ----------------| */\n\n\nfunction getIdFromUrl(url) {\n\tvar urlArray = url.split('/');\n\tvar itemId = urlArray[urlArray.length - 1].slice(0, -5);\n\treturn itemId;\n}\n\nfunction getItemIdOnListpage($el) {\n\treturn getIdFromUrl($el.find(listPageTileLinkSelector).attr('href'));\n}\n\nfunction getAllItemIdsOnListpage() {\n\tvar items = jQuery(listPageTileSelector);\n\tvar itemIds = [];\n\tfor (var i = 0; i < items.length; i++) {\n\t\tvar id = getItemIdOnListpage(items.eq(i));\n\t\tif (id && itemIds.indexOf(id) === -1 && id.indexOf('GCFL') === -1) {\n\t\t\titemIds.push(id);\n\t\t}\n\t}\n\treturn itemIds.join(',');\n}\n\nfunction productPageLoaded() {\n\treturn (\n\t\tbouncex.vars.item_category !== false && bouncex.vars.item_image_url !== false\n\t);\n}\n\nfunction categoryPageLoaded() {\n\treturn (\n\t\tbouncex.vars.category_link !== false &&\n\t\tbouncex.vars.category_title !== false &&\n\t\tjQuery(listPageTileSelector).length > 0\n\t);\n}\n\nfunction isGiftcard() {\n\treturn window.location.href.indexOf('/style/GCNB') > -1 ||\n\twindow.location.href.indexOf('giftCard') > -1 ||\n\twindow.location.href.indexOf('netreo') > -1;\n}\n\nfunction isIncludedHostname() {\n\treturn window.location.hostname === 'www.nunnbush.com';\n}\n\nfunction fireATC() {\n\tvar cookie;\n\tbouncex.et.onTrue(function() {\n\t\tcookie = bouncex.getBounceCookie(COOKIE_NAME);\n\t\treturn cookie;\n\t}, function() {\n\t\tvar id = getIdFromUrl(bouncex.utils.url.allowParams());\n\t\tif (id) {\n\t\t\tbouncex.push(['add to cart', {\n\t\t\t\t'item:id': id,\n\t\t\t\t'cart:token': cookie\n\t\t\t}]);\n\t\t\tbouncex.setv('cart_set', true);\n\t\t}\n\t}, 5);\n}\n\nfunction skuTrack() {\n\tvar lastFired;\n bouncex.et.onVarChange('sku', function(oldVal, newVal) {\n if (newVal && newVal !== lastFired) {\n bouncex.push([\n 'select_sku',\n {\n 'item:id': bouncex.vars.prod_id,\n\t\t\t\t\t'item:itemgroupid': bouncex.vars.prod_id.split('-')[0],\n 'item:feedid': newVal\n }\n ]);\n lastFired = newVal;\n }\n });\n}\n\n\n/* |----------- EVENT TRACKING ------------------| */\n\nif (isIncludedHostname() === true) {\n\tinitiateEventTracking();\n\tinitiateCartTracking();\n}\n\nfunction initiateEventTracking() {\n\tif (bouncex.website.pts === 'product') {\n\t\tbouncex.et.onTrue(productPageLoaded, trackItem, 100);\n\t\tbouncex.et.setInterval(skuTrack(bouncex.vars.prod_id), 1500);\n\t}\n\tif (bouncex.website.pts === 'category' || bouncex.website.pts === 'search') {\n\t\tbouncex.et.onTrue(categoryPageLoaded, function() {\n\t\t\tbouncex.push([\n\t\t\t\t'view category',\n\t\t\t\t{\n\t\t\t\t\t'items:ids': getAllItemIdsOnListpage(),\n\t\t\t\t\t'page:url': bouncex.vars.category_link,\n\t\t\t\t\t'page:title': bouncex.vars.category_title\n\t\t\t\t}\n\t\t\t]);\n\t\t});\n\t}\n}\n\nfunction trackItem() {\n\tif (isGiftcard()) { return; }\n\tvar url = bouncex.utils.url.allowParams();\n\tvar id = getIdFromUrl(url);\n\tbouncex.push([\n\t\t'item',\n\t\t{\n\t\t\tid: id,\n\t\t\tcopy: bouncex.vars.prod_name,\n\t\t\timageurl: bouncex.vars.item_image_url,\n\t\t\tcategory: bouncex.vars.item_category,\n\t\t\turl: url,\n\t\t\tprice: bouncex.vars.prod_price,\n\t\t\tinstock: true,\n\t\t\tsubname: bouncex.vars.prod_subname\n\t\t}\n\t]);\n\n\tbouncex.push(['view item', {\n\t\t'item:id' : id,\n\t\t'item:itemgroupid': id.split('-')[0]\n\t}]);\n\n\tbouncex.on(jQuery(document), 'click.bx', fireATC, 'a[id*=\"btnSkuIsAvailable\"]');\n}\n\nfunction replenish(cart) {\n\tbouncex.utils.cookies.create({ name: COOKIE_NAME, value: cart.token });\n\twindow.location.href = window.location.pathname + 'bx_replen=true';\n}\n\nfunction initiateCartTracking() {\n\n\t/* |----------- CART SETTINGS ------------------| */\n\tbouncex.et.cart.init({\n\t\treplenishmentType: 'cookie',\n\t\treplenish: replenish\n });\n\n\t/* |----------- CART TRACKING ------------------| */\n function trackEmptyCart() {\n if (bouncex.vars.cart_set === true && bouncex.vars.cart_qty === 0) {\n bouncex.push(['empty_cart', {}]);\n bouncex.setv('cart_set', false);\n }\n }\n\n\tbouncex.et.onVarChange('cart_qty', trackEmptyCart);\n\n}\n","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/shoppingCart"}]]},"category":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"?pt_asset="},{"activation":"js","prop":"","prop2":"","prop3":"","val":"jQuery('.titleCategory2').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/technology"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/styleGridSearch.html"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/checkoutLogin.html"}]]},"home":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/index.html"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('meta[property=\"og:type\"][content=\"product\"]').length > 0;"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/styleGridSearch.html"}]]}},"els":{"CART - Checkout Button":"","CART - Promo Code Apply Button":"","CART - Promo Code Box":"","CAT - Product Grid Image":"","CAT - Quickview Box":"","CAT-AddtoCartButton":"","CAT-QuickviewAddtoCart":"","Footer":"","Navigation bar":"","PDP - Add to Cart Button":"","PDP - Color Option":"","PDP - Hero Image":"","PDP - Product Name":"","PDP - Product Price":"","PDP - Quantity Option":"","PDP - Review Stars":"","PDP - Size Option":"","PDP - Thumbnail Image":"","SEARCH - Product Grid Image":"","wknd_sms_placement":".wunderkind-loyalty-sms-"},"vars":[{"name":"logged_in","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('[id*=accountBTN2]').length > 0;","trigger":""},{"name":"ever_logged_in","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":""},{"name":"cart_qty","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"jQuery(\".cart-item\").length;","trigger":""},{"name":"cart_value","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"0","code":"jQuery('#dropCheckout .text-right').text().replace(/[^0-9.]/g, '');","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('[id*=\"OptinSuccessMessage\"]:contains(signed up)').length > 0 || null;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"cart","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"item_category","polling":"vars","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"document.getElementById('style:hdnStyleCategory').getAttribute('value');","trigger":"pageload"},{"name":"item_image_url","polling":"vars","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"document.querySelector('meta[property=\\\"og:image\\\"]').getAttribute('content');","trigger":"pageload"},{"name":"category_link","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"document.querySelector('link[rel=\"canonical\"]').getAttribute('href');","trigger":"pageload"},{"name":"category_title","polling":"vars","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('h1[class*=\"titleCategory\"]').text().trim() || null;","trigger":"pageload"},{"name":"prod_id","polling":"vars","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"document.getElementById('style:lblSkuCode').innerHTML;","trigger":"pageload"},{"name":"prod_name","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product' ? jQuery('[id*=\"lblName\"]').text().trim() : null;","trigger":"pageload"},{"name":"prod_price","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"(function() {if (bouncex.website.pts === 'product') {return jQuery('[id*=\"detailRight\"] .price .salePrice').length > 0 ? jQuery('[id*=\"detailRight\"] .price .salePrice').text().replace(/[^0-9.]/g, '') : jQuery('[id*=\"detailRight\"] .price').text().replace(/[^0-9.]/g, '');}return null;})();","trigger":"pageload"},{"name":"cart_set","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"prod_subname","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product' ? jQuery('[id*=\"lblLongName\"]').text().trim() : null;","trigger":"pageload"},{"name":"sku","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('#UPC').val() || false;","trigger":"pageload"},{"name":"br_email_submit","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"!!document.querySelector('body > div:first-child') && !!document.querySelector('body > div:first-child').shadowRoot && document.querySelector('body > div:first-child').shadowRoot.querySelectorAll('.inner.step-two[style*=\"display: block\"]').length > 0 || 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":"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":0,"spatm":1,"preinit_cjs":"/** \n * Segments - Cartridge Boilerplate\n */\n\nvar segments = {\n /* PROPERTIES */\n testMode: false,\n interceptEnabled: true,\n mirrorEnabled: true,\n dlWatcherEnabled: false,\n /* METHODS */\n /* Intercept Events */\n useIntercept: function () {\n if (this.interceptEnabled) {\n bouncex.utils.shqInterceptEvent = {\n // true blocks event, defined functions run in place of default\n 'cartAdd': function(wkData) {\n if (wkData && wkData.params) {\n var prodId = wkData.params['item:id'],\n price = bouncex.vars.prod_price;\n if (prodId && price) {\n _shq.push(['onCartAdd', {\n Items: [{\n ProductId: prodId,\n UnitPrice: price,\n Quantity: 1\n }]\n }]);\n } \n }\n },\n 'purchase': function (wkData) { // change value to false for cartridge default\n var oid = bouncex.utils.getNestedProp('obj.order_id', null, wkData) || Math.floor(Math.random() * 100000000);\n _shq.push(['pageView',\n {\n 'pageType': 'purchase',\n 'orderId': oid,\n 'usebasket': true\n }\n ]);\n }\n };\n }\n },\n /* Mirror Events */\n useMirror: function () {\n if (this.mirrorEnabled) {\n bouncex.utils.shqMirrorEvent = {\n // defined functions run after designated shq_wknd_event to process event or source names\n 'reloadcampaigns': false,\n 'pageview': function() {\n if (window.location.href.indexOf('search') > -1) {\n var sp = bouncex.utils.url.getParam('text');\n if (sp) {\n _shq.push(['pageView', {\n pageType: 'search',\n searchPhrase: sp\n }])\n }\n }\n },\n };\n }\n },\n dlFuncs: function (e) {\n // Write handle methods here:\n //PDP\n if (e.PageType && e.PageType === 'ProductPage') {\n //do PDP event\n }\n },\n useDLWatcher: function () {\n if (!!this.dlWatcherEnabled) {\n window.bouncex.et.onTrue(function () {\n return window.bouncex.utils.getNestedProp('window._shq.loaded') && !!window.dataLayer && !!bouncex.et.setInterval;\n }, function () {\n // instantiate DataLayerHandler Object\n var dlWatcher = new _shq.DataLayerHandler(window.dataLayer);\n // invoke watch method\n dlWatcher.watch(function (e) {\n segments.dlFuncs(e);\n }, {});\n });\n }\n },\n /* Initialize Segments Tracking */\n init: function () {\n // test mode\n if (this.testMode && !bouncex.testmode.bxdev) return;\n // attach object to window & bouncex.utils\n if (window.bouncex.utils) bouncex.utils.segments = this;\n\n // initialize intercept and mirror, comment out if not needed\n this.useIntercept();\n this.useMirror();\n }\n}\n\nsegments.init();\n\n\n// Native Ecap listner\njQuery(document).on('click.bx', '.weblayer-popup-content .button[type=\"submit\"]:visible:contains(\"Take\")', function(e){\n var email = jQuery(this).parent().find('#email').val()\n if(bouncex.utils.validate.email(email)){\n bouncex.setVar('br_email_submit', true);\n }\n})","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"Hit 'Send' to sign-up for automated, recurring Nunn Bush mktg txts (like cart reminders) to this #, per terms.","eventSharing":true,"shqId":"mwszbntiud-1","enabled":1},"pde":true,"fmc":["US","CA"],"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":"320161914","ga4_measurement_id":"G-95TZ1SNZYK","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":"0834ab10058954fe44c26b31f2e1ce30"}; 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_ebe451a946893ac92b8458b147333165.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-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() {}; }; runtime.onload = bouncex.initializeTag; 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(); }})();