(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":1622,"name":"Harry & David (1800 Flowers)","cookie_name":"bounceClientVisit1622","domain":"harryanddavid.com","ct":"fp_local_storage","ally":0,"ei":1,"tcjs":"// Track conversions across properties to ensure appropriate targeting (wrike 119543805 & 126971663)\nvar hostname = window.location.hostname;\nwindow.bouncex.conversion_hostname = hostname;","cjs":"bouncex.report_ga = function(action, label, bypass){\n bypass = typeof(bypass)!='undefined' && !!bypass;\n if (typeof(action)!='string'||typeof(label)!='string') return;\n var interaction = false;\n // enforce case convention\n if (!bypass) {\n action = action.charAt(0).toUpperCase() + action.slice(1).toLowerCase();\n interaction = action=='Impression';\n action = 'Wunderkind ' + action;\n }\n if (typeof window.ga === 'function') {\n window.ga('fd_mbp.send','event','Wunderkind',action,label,{'nonInteraction':interaction});\n }\n};\n\n/*https://www.wrike.com/open.htm?id=365497491*/\n//code to track cart value since it is not on the page \n//until you hit the cart\n// if(window.location.origin.includes('pwa')){\n// bouncex.on(jQuery('#contAddToCartBtn'), 'touchstart', function(){\n// let cartValue = bouncex.vars.value_in_cart || 0,\n// price = bouncex.vars.prod_price,\n// total = 0;\n// total = cartValue + price;\n// bouncex.setVarAndReload('value_in_cart', total);\n// });\n// }\n\n// BZ: Set custom variable 'submitted_ecap_footer' on submit of email input field on home page\nif (jQuery('#footerEmailOptIn').length > 0) {\n \n jQuery(document).ajaxComplete( function( event, xhr, settings ) {\n\n if (settings.url.indexOf('AjaxEmailOptIn') > -1) {\n var response = JSON.parse(xhr.responseText);\n if( response && response.verifyEmailAddress && response.verifyEmailAddress.length > 0) {\n bouncex.setv( 'submitted_ecap_footer', true );\n bouncex.reload_campaigns();\n bouncex.setBounceCookie();\n }\n }\n });\n}\n\n\n// SSM ISR tracking for Harry and David\n(function () {\n\twindow.bouncex = window.bouncex || {};\n\n\twindow.bouncex.bxISR = {\n\t\t/* --- INITIALIZATION --- */\n\t\tversion: 'Version 8.0 | 12/15/16',\n\t\tstartTime: Date.now(),\n\t\tsettings: {\n\t\t\tcurrentProduct: {},\n\t\t\tgeneral: {\n\t\t\t\tproductPageIdentifier: (jQuery('#CategoryBrandID').data('pagetype') === 'HD' && jQuery('#pagetype').data('pagetype') === 'Product') && !bouncex.vars.is_excluded_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},\n\n\t\tproductMap: function () {\n\t\t\tif (!this.settings.general.productPageIdentifier) { return; }\n\n\t\t\tvar productValues = {\n\t\t\t\turl: (jQuery('link[rel=\"canonical\"]').attr('href')),\n\t\t\t\tname: (jQuery('meta[property=\"og:title\"]').attr('content') !== undefined ? jQuery('meta[property=\"og:title\"]').attr('content').split('|')[0].replace(/from 1-800-FLOWERS.COM/g,'').trim() : false),\n\t\t\t\tsku: (jQuery('#skuPartNumber').val()),\n\t\t\t\tcategory: [{ categoryName: (jQuery('#breadcrumb').find('.topLinks').slice(-2, -1).text().trim()), categoryUrl: (jQuery('#breadcrumb').find('.topLinks').slice(-2, -1).find('a').attr('href')) }],\n\t\t\t\tdescription: (jQuery('meta[name=\"description\"]').attr('content')),\n\t\t\t\tprice: ((typeof window.top.akamaiProdPrice !== 'undefined') ? window.top.akamaiProdPrice.replace('$', '') : jQuery('.productprice').first().text().replace('$', '').trim()),\n\t\t\t\tmainImgUrl: (jQuery('meta[property=\"og:image\"]').attr('content')),\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\t\t\n\t\t/* --- END OF HELPER FUNCTIONS --- */\n\t\t/* --- GETTER FUNCTIONS --- */\n\t\t\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\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\\'); setTimeout(function(){window.top.open(\\''+ productLink +'\\');}, 100); })();'; \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\t\t\t\t\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:eq(' + i +')').find('.bx-lineshape');\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-text-custom:eq('+i+')');\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-text-subheadline:eq(' + i +')').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\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\twindow.top.open(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.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\nif (bouncex.vars.cart_qty === 0) {\n bouncex.setVarAndReload('cart_images', false);\n}\nvar atcSuccess = function() {\n return bouncex.website.pts === 'category' ? !!jQuery('img[alt=\"product\"][data-component=\"itemImage\"]').attr('src') : bouncex.vars.atc_success;\n },\n concatImgUrl = function() {\n var data = !!bouncex.parseJSON(localStorage.getItem('persistPageData'), {'product' : { 'image' : '' }}).product && bouncex.parseJSON(localStorage.getItem('persistPageData'), {'product' : { 'image' : '' }}).product.image,\n URL = data ? 'https:'+ data.path+data.name +'z.jpg' : '',\n quickViewURL = jQuery('img[alt=\"product\"][data-component=\"itemImage\"]').attr('src') || '';\n \n if (URL === '' && quickViewURL !== '') {\n URL = getPathFromUrl(quickViewURL);\n }\n bouncex.log('url', URL);\n if (bouncex.vars.cart_images === false) {\n bouncex.setVarAndReload('cart_images', URL);\n } else {\n bouncex.setVarAndReload('cart_images', bouncex.vars.cart_images + ',' + URL);\n }\n bouncex.log('cartimages', bouncex.vars.cart_images);\n },\n getPathFromUrl = function(url) {\n return url.split(\"?\")[0];\n };\nbouncex.et.onTrue(atcSuccess, concatImgUrl, 60);","force_https":false,"waypoints":false,"content_width":1039,"gai":"UA-43044033-27","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":[{"prop":"regex_match","val":".+miso.saucelabs.com"},{"prop":"regex_match","val":".+tunnels.us-west-4-i3er.saucelabs.com"}],"ple":false,"fbe":false,"ffs":"DISABLE_IOS_ABSOLUTE","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"var PROPERTY_NAME = 'harryanddavid',\n\tVALID_DOMAIN = 'www.harryanddavid.com',\n\tATC_BUTTON_SELECTOR = '#pwaAddToCartBtn,#btn-full-calendar',\n\tBREADCRUMB_SELECTOR = 'div#product_page_container ol li:visible',\n\tCANONICAL_URL = 'link[rel=\"canonical\"]',\n\tLOG_IN_SELECTOR = '#signInDropdown div:contains(\"Sign In\")',\n\tEMAIL_SELECTOR = 'span:contains(\"Email:\"):first',\n\tLISTPAGE_TILE_SELECTOR = 'a[data-test=\"desktop-collection-product\"]',\n\tEMPTY_CART_TEXT = '[data-test=\"shopping-cart-header-text\"]:contains(\"Your shopping cart is currently empty.\"), div[data-component=\"orderSubtotal\"]:contains(\"$0.00\")',\n\tCATEGORY_PAGE_TITLE = 'div[data-testid*=\"-imoc\"] h1',\n QUICKVIEW_SELECTOR = '.MuiPaper-root.MuiCard-root.MuiPaper-outlined.MuiPaper-rounded',\n EXCLUDED_URLS = ['/h/promotions/email-specials', '/h/promotions/email-specials2', '/h/promotions/email-specials3'];\n\n/******** helper functions *********/\nfunction isValidProperty() {\n\tvar currentBrand = bouncex.utils.getNestedProp('window.utag_data.brand_current'),\n\t\tpropertyMap = {\n\t\t\t'18F': '1800flowers',\n\t\t\t'18B': '1800baskets',\n\t\t\t'FB': 'fruitbouquets',\n\t\t\t'CCO': 'cheryls',\n\t\t\t'FM': 'fanniemay',\n\t\t\t'TPF': 'thepopcornfactory',\n\t\t\t'SY': 'stockyards',\n\t\t\t'WM': 'wolfermans',\n\t\t\t'WLF': 'wolfermans',\n\t\t\t'HD': 'harryanddavid',\n\t\t\t'SCH': 'simplychocolate',\n\t\t\t'PZU': 'personalizationuniverse',\n\t\t\t'TMP': 'goodsey',\n\t\t};\n\t\n\tif (currentBrand) {\n\t\treturn propertyMap[currentBrand] === PROPERTY_NAME && window.location.hostname === VALID_DOMAIN;\n\t}\n}\n\nfunction getUrl() {\n\treturn bouncex.utils.url.allowParams();\n}\n\nfunction isEnglish() {\n\treturn jQuery('html').attr('lang') === 'en';\n}\n\nfunction buildImg(itemData) {\n\treturn 'https:' + itemData.image.path + itemData.image.name + 'x.jpg';\n}\n\nfunction isInStock(itemData) {\n\treturn jQuery(ATC_BUTTON_SELECTOR).is(':enabled') || itemData.availability.deliveryMessage.indexOf(\"AVAILABLE TO SHIP\") > -1;\n}\n\nfunction getProductCategory() {\n\tvar category = jQuery(BREADCRUMB_SELECTOR).eq(-2).text().trim(),\n\t\tprevUrl = window.history && window.history.state && window.history.state.state && window.history.state.state.prevUrl;\n\n\tif(category === 'Home' || (prevUrl && prevUrl.indexOf('/searchterm') > -1)) {\n\t\tcategory = 'Global';\n\t}\n\t\n\treturn category || 'Global';\n}\n\nfunction getCategoryPageTitle(eventDetails) {\n\tvar title;\n\n\tif(bouncex.website.pts === 'search') {\n\t\ttitle = eventDetails.searchTerm;\n\t}\n\n\treturn title || eventDetails.title || jQuery(CATEGORY_PAGE_TITLE).text().trim() || '';\n}\n\nfunction isSympathy(eventDetails){\n\tvar sympathyUrl = getUrl().indexOf('sympathy') > -1,\n\t\tbreadCrumbs = jQuery(BREADCRUMB_SELECTOR).text().trim(),\n\t\tpageTitle = eventDetails.title;\n\n\treturn sympathyUrl || (breadCrumbs && breadCrumbs.toLowerCase().indexOf('sympathy') > -1) || (pageTitle && pageTitle.toLowerCase().indexOf('sympathy') > -1);\n}\n\nfunction notEntertainment(){\n\treturn window.location.href.indexOf('entertainment') == -1;\n}\n\nfunction isGiftListPage() {\n return window.location.pathname.indexOf('gifthistory-home-gift-baskets') > -1\n || window.location.pathname.indexOf('/account/gift-list') > -1;\n}\n\nfunction isExcluded(productName) {\n var EXCLUSIONS = ['FUNERAL', 'MEMORIAL', 'SYMPATHY FOR THE HOME', 'LOSS', 'CONDOL', \n 'DEATH', 'SYMPATHY', 'SORROW', 'PASSING', 'PEACE', 'GET WELL', 'SYMP'];\n\n for (var i = 0; i < EXCLUSIONS.length; i++) {\n var excludedWord = EXCLUSIONS[i].toLowerCase();\n if (productName.toLowerCase().includes(excludedWord)) {\n return true;\n }\n }\n \n\treturn bouncex.utils.getNestedProp('utag.data.product_has_wine[0]', '') === 'yes';\n}\n\nfunction replaceSpecialChars(text) {\n\t// changes special characters into corresponding HTML entity to display properly in emails\n \n var encodedStr = text.replace(/[\\u00A0-\\u9999<>]/g, function(i) {\n return '&#'+i.charCodeAt(0)+';';\n });\n\n\treturn encodedStr;\n}\n\n/******** start item tracking *********/\nfunction trackPDP(itemData) {\n\titem = {\n\t\tid: itemData.baseCode || itemData.partNumber,\n\t\tcopy: replaceSpecialChars(itemData.name || ''),\n\t\tcategory: getProductCategory(),\n\t\timageurl: buildImg(itemData),\n\t\turl: window.location.origin + itemData.seo.url,\n\t\tinstock: isInStock(itemData),\n\t\texcluded: isExcluded(replaceSpecialChars(itemData.name || ''))\n\t};\n\tif(item.id){\n\t\tbouncex.push(['item', item]);\n\t\ttrackAddToCart(item.id);\n\n\t\titem.groupId = itemData.partNumber;\n\t\titem.skuid = itemData.selectedSku;\n\t\tfireViewItem(item);\n\t\tinitializeSkuEvents(item);\n\t}\n}\n\n\nfunction fireViewItem(item) {\n var pushItem = {\n 'item:id': item.id,\n };\n\n if (item.groupId) {\n pushItem['item:itemgroupid'] = item.groupId;\n }\n bouncex.push(['view item', pushItem]);\n}\n\n/******** sku tracking *********/\nfunction initializeSkuEvents(item) {\n\tvar skuObj = {\n\t\t\tid: item.id || '',\n\t\t\tgroupId: item.groupId || '',\n\t\t\tskuId: item.skuid || '',\n\t\t};\n\n\t// if only one sku, fire select_sku upon landing on PDP\n\tif(jQuery('div[data-partnumber]').length < 2) {\n\t\tfireSelectSku(skuObj);\n\t\treturn;\n\t}\n\n\tbouncex.et.onVarChange('selected_sku', function(oldVal, newVal){\n\t\tif(newVal) {\n\t\t\tif (skuObj.skuId === newVal) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tskuObj.skuId = newVal;\n\t\t\tfireSelectSku(skuObj);\n\t\t\treturn;\n\t\t}\n\t})\n}\n\nfunction fireSelectSku(skuObj) {\n\tbouncex.push([\n\t\t'select_sku',\n\t\t{\n\t\t\t'item:id': skuObj.id,\n\t\t\t'item:itemgroupid': skuObj.groupId,\n\t\t\t'item:feedid': skuObj.skuId\n\t\t}\n\t]);\n}\n\n/******** category tracking *********/\n\nfunction trimmedItemId(itemId){\n var itemIdArr = itemId.split('-');\n return itemIdArr[itemIdArr.length - 1];\n}\n\nfunction getCategoryItemId(itemUrl) {\n\tvar itemUrlArr = itemUrl.split('/');\n\tvar itemId = itemUrlArr[itemUrlArr.length - 1];\n\tif (itemId.indexOf('-') > -1){\n\t itemId = trimmedItemId(itemId)\n\t}\n\tvar validId = /^\\d+$/.test(itemId);\n\n\treturn validId ? itemId : '';\n}\n\nfunction trackHoverItem() {\n\tbouncex.et.onHover(LISTPAGE_TILE_SELECTOR, function(el){\n\t\tvar itemUrl = jQuery(el).attr('href');\n\t\tvar itemId = getCategoryItemId(itemUrl);\n var itemName = jQuery(el).attr('title');\n\t\tif (itemId && itemName.indexOf('Sympathy') === -1) {\n\t\t\tbouncex.push(['hover item', {\n\t\t\t\t'item:id' : itemId\n\t\t\t}]);\n\t\t}\n\t});\n}\n\nfunction getItemsIds(products) {\n\tvar items = products || jQuery(LISTPAGE_TILE_SELECTOR);\n\tvar itemIds = [];\n\tvar id;\n\n\tfor(var i = 0; i < items.length; i++) {\n\t\tid = products ? items[i].baseCode : getCategoryItemId(jQuery(items[i]).attr('href'));\n\n\t\tif(id && !itemIds.includes(id)){\n\t\t\titemIds.push(id);\n\t\t}\n\t}\n\n\treturn itemIds.join(',');\n}\n\nfunction isValidCategoryPage(){\n var url = getUrl()\n for(var i=0; i < EXCLUDED_URLS.length; i++){\n if(url.indexOf(EXCLUDED_URLS[i]) > -1){\n return false;\n }\n }\n return true;\n}\n\nfunction trackViewCategory(eventDetails){\n\tvar itemIds = getItemsIds(eventDetails.products);\n\n\tif(itemIds && itemIds.length > 0 && isValidCategoryPage()){\n\t\tbouncex.push(['view category', {\n\t\t\t'page:title': getCategoryPageTitle(eventDetails),\n\t\t\t'items:ids': itemIds,\n\t\t\t'page:url': getUrl()\n\t\t}]);\n\t}\n}\n\n/******** quickview tracking *********/\nfunction trackQuickview(){\n bouncex.et.onVisible(QUICKVIEW_SELECTOR, function(elem){\n var itemUrl = elem.find('a:contains(\"See Details\")').attr('href'),\n itemName = elem.find('.MuiGrid-root > span:first').text(),\n itemId;\n if (itemUrl && itemName.indexOf('Sympathy') === -1){\n itemId = getCategoryItemId(itemUrl);\n \t\tbouncex.push(['view item', {\n \t\t\t'item:id': itemId,\n \t\t}]);\n trackAddToCart(itemId);\n }\n });\n}\n\n/******** track Add To Cart *********/\nfunction trackAddToCart(itemId){\n\tif (!itemId) { return; }\n\n\tbouncex.off(jQuery(ATC_BUTTON_SELECTOR), 'click.bxatc');\n\tbouncex.on(jQuery(ATC_BUTTON_SELECTOR), 'click.bxatc', function(){\n\t\tbouncex.push(['add to cart', { 'item:id': itemId }]);\n\t\tif (bouncex.vars.cart_set) { return; }\n\t\tbouncex.setVarAndReload('cart_set', true);\n\t\treturn;\n\t});\n\treturn;\n}\n\n/*************** Empty Cart Tracking ***************/\nfunction trackEmptyCart() {\n\tbouncex.et.onVisible(EMPTY_CART_TEXT, function(){\n\t\tbouncex.push(['empty_cart', {}]);\n\t\tbouncex.setVarAndReload('cart_set', false);\n\t});\n}\n\n/*************** Cart Tracking ***************/\nfunction initCartTracking() {\n\tbouncex.et.cart.init({\n\t\treplenish: function() { return; },\n\t\treplenishmentType: 'single'\n\t});\n\tif(bouncex.website.pts === 'cart' && bouncex.vars.cart_set) {\n\t\ttrackEmptyCart();\n\t}\n}\n\n/******** Track LoggedIn User *********/\nfunction trackLoggedInUser() {\n\tvar isLoggedIn = jQuery(LOG_IN_SELECTOR).length === 0,\n\t\temail;\n\n\tif(!bouncex.vars.logged_in_identified && isLoggedIn){\n\t\temail = window.rtaEmail || jQuery(EMAIL_SELECTOR).next().text().trim() || '';\n\t\n\t\tif (email && bouncex.utils.validate.email(email)) {\n\t\t\tbouncex.push(['user', {\n\t\t\t\temail: email,\n\t\t\t\tsource: 'LoggedIn'\n\t\t\t}]);\n\t\t\tbouncex.setVarAndReload('logged_in_identified', true);\n\t\t}\n\t}\n}\n\n/******** itiniate tracking code *********/\nfunction initiateItemEvents() {\n\tvar eventDetails, products;\n\n\tbouncex.et.onTrue(\n\t\tfunction(){\n\t\t\teventDetails = bouncex.utils.getNestedProp('window.mbpDataLayerView');\n\t\t\tproducts = eventDetails ? eventDetails.products || jQuery(LISTPAGE_TILE_SELECTOR): false;\n\t\t\treturn eventDetails && products;\n\t\t}, \n\t\tfunction(){\n\t\t\tif(!isSympathy(eventDetails) && notEntertainment()){\n\t\t\t\tif(bouncex.website.pts === 'product' || eventDetails.pageType === 'product' ){\n\t\t\t\t\ttrackPDP(products[0]);\n\t\t\t\t}\n\t\t\t\tif(bouncex.website.pts === 'category' || bouncex.website.pts === 'search' || eventDetails.pageType === 'category' || eventDetails.pageType === 'search'){\n\t\t\t\t\ttrackViewCategory(eventDetails);\n\t\t\t\t\ttrackHoverItem();\n\t\t\t\t\ttrackQuickview();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t20);\n}\n\nfunction initializeCancelEvent(){\n if (bouncex.vars.suppress_gift_list && !bouncex.vars.cancel_event_fired) {\n bouncex.push(['cancel_event', { reason: 'gift list campaign'}]);\n bouncex.setv('cancel_event_fired', true);\n }\n}\n\nfunction initPassportTracking() {\n if (bouncex.vars.is_passport_member) {\n bouncex.push(['passport_member']);\n }\n}\n\nfunction initGiftListTracking() {\n if (isGiftListPage()) { bouncex.push(['view_gift_list']); }\n}\n\n/******** itiniate event listeners *********/\nif(isValidProperty() && isEnglish()){\n\tbouncex.setTimeout2(function(){\n\t\tinitCartTracking();\n\t\ttrackLoggedInUser();\n\t\tinitiateItemEvents();\n\t\tinitPassportTracking();\n\t\tinitGiftListTracking();\n\t}, 1000);\n}\n\nif (bouncex.utils.url.allowParams().indexOf('.harryanddavid.com') > -1){\n initializeCancelEvent();\n}\n","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname.indexOf(\"/AjaxCheckoutDisplayView\") > -1 || window.location.pathname.indexOf(\"/cart/\") > -1 || document.querySelectorAll('.ECP-emptycart').length > 0;"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('[data-test=\"collection-select-sort\"], [data-test=\"desktop-collection-product\"]').length > 0;"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.mbpDataLayerView && window.mbpDataLayerView.pageType === 'category';"}],[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('#product_page_container').length === 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/SearchDisplay"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/searchterm/"}],[{"activation":"js","prop":"","prop2":"","prop3":"","val":"[\"/cheryls-home\",\"/\"].indexOf(window.location.pathname)===-1;"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkout"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"/cart"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"uat2-pwa."}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":" [\"/harryanddavid-home\",\"/\",'/pwa/'].indexOf(window.location.pathname) > -1 && ( document.querySelector('body').classList.contains('bd-homepage') || document.querySelectorAll('homePageFBUrl').length > 0 || window.page_name && window.page_name === \"Homepage\" || document.querySelectorAll('img[alt*=\"HD PWA HomePage\"]').length > 0 || document.querySelectorAll('img[alt*=\"HD_PWA_HomePage\"]').length > 0 );"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('link[rel=\"canonical\"]').length > 0 && document.querySelectorAll('link[rel=\"canonical\"]')[0].getAttribute('href').indexOf(\"harryanddavid.com\") > -1 && [\"/harryanddavid-home\",\"/\",'/pwa/'].indexOf(window.location.pathname) > -1;"}],[{"activation":"js","prop":"","prop2":"","prop3":"","val":"( document.querySelector('body').classList.contains('bd-homepage') || document.querySelectorAll('homePageFBUrl').length > 0 || window.page_name && window.page_name === \"Homepage\" || document.querySelectorAll('img[alt*=\"HD PWA HomePage\"]').length > 0 || document.querySelectorAll('img[alt*=\"HD_PWA_HomePage\"]').length > 0 );"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('link[rel=\"canonical\"][href=\"https://www.harryanddavid.com\"]').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"uat2-pwa."}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('#product_page_container').length > 0 || document.querySelectorAll('[data-pagetype=\"product\"]').length > 0;"}]]},"search":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname === \"/SearchDisplay\" || window.location.pathname.indexOf('/searchterm/') > -1 || document.querySelectorAll('#pagetype[data-pagetype=\"Search\"]').length > 0;"}]]}},"els":{"desktop_category_page_halfway":"#productContainer > div > div > .MuiGrid-root:eq(17)","desktop_category_page_second_row":"#productContainer > div > div >.MuiGrid-root:eq(5)","mobile_category_page_sixth_row":"#productContainer > div > div >.MuiGrid-root:eq(11)","signin_button":"#signInDropdown"},"vars":[{"name":"ever_logged_in","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in ? true : null;","trigger":""},{"name":"logged_in","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.parseJSON(window.localStorage.getItem('userInfo')).profile.membershipType !== 'G' && bouncex.parseJSON(window.localStorage.getItem('userInfo')).profile.contactId !== '';","trigger":""},{"name":"value_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function(){\n if (bouncex.website.pts === 'cart' || bouncex.website.pts === 'checkout' || window.location.href.indexOf('/wrap-up') > -1) {\n var $multipleItemsTotal = jQuery('#merchandise-price');\n var $multipleItemsTotalAlt = jQuery('[data-test=\"checkout-order-subtotal\"]');\n var $individualItemTotal = jQuery('[data-testid=\"price\"] span');\n var emptyCart = jQuery('[data-test=\"shopping-cart-header-text\"]:contains(\"Your shopping cart is currently empty.\"):visible, #emptyCart:visible').length > 0;\n\n if (emptyCart) {\n return 0;\n }\n if ($multipleItemsTotal.length > 0) {\n return Number($multipleItemsTotal.text().replace(/[^0-9.]/g, ''));\n } else if ($multipleItemsTotalAlt.length > 0) {\n return Number($multipleItemsTotalAlt.text().replace(/[^0-9.]/g, ''));\n } else if ($individualItemTotal.length > 0) {\n var total = 0;\n var $itemQuantities = jQuery('[id*=\"quantitySelector\"]');\n\n jQuery.each($individualItemTotal, function(index) {\n total += Number($individualItemTotal.eq(index).text().replace(/[^0-9.]/g, '')) * Number(jQuery('[id*=\"quantitySelector\"]').eq(index).val().replace(/[^0-9.]/g, ''));\n });\n return Number(total.toFixed(2));\n }\n } else if (jQuery('#minicart .MuiTypography-root:contains(\"Subtotal\") ~ .MuiTypography-root').length > 0) {\n return Number(jQuery('#minicart .MuiTypography-root:contains(\"Subtotal\") ~ .MuiTypography-root').text().replace(/[^0-9.]/g, ''));\n } else if (jQuery('.MuiTypography-root:contains(\"Subtotal\")').length > 0) {\n return Number(jQuery('.MuiTypography-root:contains(\"Subtotal\")').parent().text().replace(/[^0-9.]/g, ''));\n }\n return null;\n})();","trigger":""},{"name":"items_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function () {\n if ( window.location.href.indexOf('cart') > -1) {\n return Number(jQuery(' #orderContainerItem [id*=\"orderItem\"] h4').first().text().split('of').pop().replace(/[^0-9.]/g,''));\n } else if ( window.location.href.indexOf('checkout') > -1) {\n return Number(jQuery(' #orderContainerItem [id*=\"orderItem\"] h4').first().text().split('of').pop().replace(/[^0-9.]/g,''));\n } else if ( window.location.href.indexOf('blog') === -1 ) {\n return Number(jQuery('[aria-label=\"Cart-icon\"]').text().replace(/[^0-9.]/g, ''));\n }\n return null;\n})();","trigger":""},{"name":"is_passport_member","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var userInfo = window.localStorage.getItem('userInfo');\n if(userInfo) {\n return JSON.parse(userInfo).profile.userRole === 'P' || null;\n } else { \n return null; \n }\n})();","trigger":""},{"name":"category_page","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(() => {\n var pwaSite = window.location.origin.includes('pwa');\n if (jQuery('#pagetype').length > 0) {\n return jQuery('#pagetype').attr('data-pagetype').toLowerCase() === 'category';\n } else if (window.MoxieData !== undefined && !pwaSite) {\n return MoxieData.PageType === \"Category\";\n }\n \n return bouncex.website.pts === 'category';\n})();","trigger":""},{"name":"product_page","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product';","trigger":""},{"name":"passport_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (window.location.href.indexOf('/checkout/') > -1 && window.location.href.indexOf('/shipping/') === -1) {\n return jQuery('#passportOrderItem').length > 0 || jQuery('[data-test=\"checkout-passport-order-item\"]').length > 0;\n } else if (bouncex.website.pts === 'product') {\n if (window.location.href.indexOf('/wrap-up') > -1) {\n return null;\n }\n if (jQuery('#passport-banner-section:contains(\"Click to add\"):visible').length > 0) {\n return false;\n } else if (jQuery('#passport-banner-section:contains(\"passport\"):contains(\"has been added to your cart\")').length > 0) {\n return true;\n }\n } else if (window.location.href.indexOf('passport-harryanddavid') > -1 && jQuery('.MuiButton-label:contains(\"Continue Shopping\")').length > 0) {\n return true\n }\n return null;\n})();","trigger":""},{"name":"bx_test","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"window.location.href.indexOf('bx_test') > -1 || null;","trigger":""},{"name":"purchased","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (bouncex.vars.purchased || bouncex.cookie.lc) {\n return true;\n }\n\n var property = bouncex.vars.property;\n var historicalSite = 1622;\n var pwaSite = window.location.href.indexOf('pwa') > -1;\n \n if (pwaSite) {\n let orderConfirmation = window.location.href.indexOf('/checkout/order-confirmation/') > -1;\n if (orderConfirmation) {\n return true;\n }\n return null;\n } else if (!jQuery.isEmptyObject(bouncex.cookies) && bouncex.cookies[historicalSite] && bouncex.cookies[historicalSite].v && bouncex.cookies[historicalSite].v['previous_customer_'+ property]){\n return true;\n } \n return null;\n})();","trigger":""},{"name":"submitted_email","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n if (bouncex.vars.bx_test) {\n var websites = bouncex.cookies;\n for (var site in websites) {\n if (bouncex.cookies[site].es || (bouncex.cookies[site].v && bouncex.cookies[site].v.submitted_ecap_footer)) {\n return true;\n }\n }\n return null;\n }\n})();","trigger":""},{"name":"passport_member","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var userInfo = window.localStorage.getItem('userInfo');\n if(userInfo) {\n return JSON.parse(userInfo).profile.userRole === 'P';\n } else { \n return false; \n }\n})();","trigger":""},{"name":"property","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function (){\n \n var propertyMapping = {\n\t '18F': '1800flowers',\n\t '18B': '1800baskets',\n\t 'FB': 'fruitbouquets',\n\t 'CCO': 'cheryls',\n\t 'FM': 'fanniemay',\n\t 'TPF': 'thepopcornfactory',\n\t 'SY': 'stockyards',\n\t 'WM': 'wolfermans',\n\t\t'WLF': 'wolfermans',\n\t 'HD': 'harryanddavid',\n\t\t'SCH': 'simplychocolate',\n\t\t'PZU': 'personalizationuniverse',\n\t\t'TMP': 'goodsey',\n\t};\n\n if (window.utag_data && window.utag_data.brand_current) {\n return propertyMapping[window.utag_data.brand_current];\n } else if (window.fsDomain && typeof fsDomain !== undefined) {\n return propertyMapping[window.fsDomain];\n } else if (jQuery('link[rel=\"canonical\"]').length > 0) {\n var flowers = jQuery('link[rel=\"canonical\"]').attr('href').indexOf('1800flowers') > -1;\n var goodsey = jQuery('link[rel=\"canonical\"]').attr('href').indexOf('goodsey') > -1;\n var harryDavid = jQuery('link[rel=\"canonical\"]').attr('href').indexOf('harryanddavid') > -1;\n var personalization = jQuery('link[rel=\"canonical\"]').attr('href').indexOf('personalization') > -1;\n var chocolate = jQuery('link[rel=\"canonical\"]').attr('href').indexOf('chocolate') > -1;\n var wolferman = jQuery('link[rel=\"canonical\"]').attr('href').indexOf('wolferman') > -1;\n if (flowers) {\n return '1800flowers';\n }\n if (goodsey) {\n return 'goodsey'; \n }\n if (harryDavid) {\n return 'harryanddavid';\n }\n if (personalization) {\n return 'personalizationuniverse'; \n } \n if (chocolate) {\n return 'simplychocolate'; \n } \n if (wolferman) {\n return 'wolfermans'; \n } \n \n } else {\n return null;\n }\n})();\n\n","trigger":""},{"name":"content_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#pagetype').attr('data-pagetype') !== undefined ? jQuery('#pagetype').attr('data-pagetype').toLowerCase() === 'content' : false;","trigger":""},{"name":"passport_diff","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var diff = Number(jQuery('#pp-analytics').attr('data-price')) - Number(jQuery('#shippingCharge').next().text().replace(/[^0-9.]/g, '')),\n pwaSite = window.location.pathname.includes('checkout/payment/');\n\n if(diff){\n return diff > 0 ? diff : false;\n } else if (pwaSite && !bouncex.vars.passport_in_cart) {\n return bouncex.vars.passport_price - jQuery('#shippingPrice').text().replace(/[^0-9.]/g,'');\n } else if (bouncex.vars.passport_in_cart || bouncex.vars.is_passport_member) {\n return false;\n }\n return null;\n})();","trigger":""},{"name":"cart_plurality","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.items_in_cart > 1 ? 'items' : 'item';","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(function(){\n var price = jQuery('[data-testid*=\"sku-list\"]').filter(function(){\n return $(this).css('color') === \"rgb(255, 255, 255)\";\n });\n\n return Number(price.find('span:contains(\"$\")').first().text().replace(/[^0-9.]/g, '')) ||\n Number(bouncex.utils.getNestedProp(\"yotpo.productPrice\", false)) ||\n Number(jQuery('p:contains(\"Subtotal:\")').text().replace(/[^0-9.]/g, \"\"));\n})();","trigger":""},{"name":"prod_name","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product' ? bouncex.utils.getNestedProp('utag_data.product_names[0]') || jQuery('h1').text() : false;","trigger":"pageload"},{"name":"in_stock","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product';","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_set","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"","code":"null;","trigger":""},{"name":"cart_qty","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function () {\n switch (true) {\n case window.location.href.indexOf('cart') > -1:\n return Number(jQuery('span.MuiTypography-root, [id*=\"orderContainer\"] p.MuiTypography-root').first().text().split('of').pop().replace(/[^0-9.]/g,'')); \n case window.location.href.indexOf('checkout') > -1:\n return jQuery('h6.MuiTypography-subtitle2, [id*=\"orderContainer\"] p.MuiTypography-root').first().text().split('of').pop().replace(/[^0-9.]/g,'');\n default:\n return Number(jQuery('[aria-label=\"Cart-icon\"], [alt=\"icon-cart-mobile\"]').text().replace(/[^0-9.]/g, ''));\n }\n})();","trigger":"pageload"},{"name":"utm_source","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"","code":"(function() {\n var regexS = '[\\\\?&#&]'+'utm_source'+'=([^&#]*)';\n\t\t\tvar regex = new RegExp( regexS );\n\t\t\tvar results = regex.exec(window.location.href);\n\t\t\tif( results === null ) return NaN;\n\t\t\telse return decodeURIComponent(results[1]);\n})();","trigger":"pageload"},{"name":"utm_medium","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"","code":"(function() {\n var regexS = '[\\\\?&#&]'+'utm_medium'+'=([^&#]*)';\n\t\t\tvar regex = new RegExp( regexS );\n\t\t\tvar results = regex.exec(window.location.href);\n\t\t\tif( results === null ) return NaN;\n\t\t\telse return decodeURIComponent(results[1]);\n})();","trigger":"pageload"},{"name":"submitted_ecap_footer","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":""},{"name":"home_page_first","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(bouncex.cookie.vpv === 1 && bouncex.website.pts === 'home') || null;","trigger":""},{"name":"submitted_hd_ecap","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":""},{"name":"submitted_1800_ecap","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":0,"code":"null;","trigger":""},{"name":"ever_logged_in2","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"!!bouncex.utils.getNestedProp('utag.data.customer_contactId') || null;","trigger":""},{"name":"previous_customer_1800flowers","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var site = '1800flowers';\n if (typeof bouncex.conversion_hostname == 'string' && bouncex.conversion_hostname.indexOf(site) > -1) {\n return true;\n }\n return null;\n})()","trigger":""},{"name":"previous_customer_1800baskets","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var site = '1800baskets';\n if (typeof bouncex.conversion_hostname == 'string' && bouncex.conversion_hostname.indexOf(site) > -1) {\n return true;\n }\n return null;\n})()","trigger":""},{"name":"previous_customer_fruitbouquets","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var site = 'fruitbouquets';\n if (typeof bouncex.conversion_hostname == 'string' && bouncex.conversion_hostname.indexOf(site) > -1) {\n return true;\n }\n return null;\n})()","trigger":""},{"name":"previous_customer_cheryls","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var site = 'cheryls';\n if (typeof bouncex.conversion_hostname == 'string' && bouncex.conversion_hostname.indexOf(site) > -1) {\n return true;\n }\n return null;\n})()","trigger":""},{"name":"previous_customer_fanniemay","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var site = 'fanniemay';\n if (typeof bouncex.conversion_hostname == 'string' && bouncex.conversion_hostname.indexOf(site) > -1) {\n return true;\n }\n return null;\n})()\n","trigger":""},{"name":"previous_customer_popcornfactory","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var site = 'popcornfactory';\n if (typeof bouncex.conversion_hostname == 'string' && bouncex.conversion_hostname.indexOf(site) > -1) {\n return true;\n }\n return null;\n})()","trigger":""},{"name":"previous_customer_stockyards","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var site = 'stockyards';\n if (typeof bouncex.conversion_hostname == 'string' && bouncex.conversion_hostname.indexOf(site) > -1) {\n return true;\n }\n return null;\n})()","trigger":""},{"name":"previous_customer_wolfermans","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var site = 'wolfermans';\n if (typeof bouncex.conversion_hostname == 'string' && bouncex.conversion_hostname.indexOf(site) > -1) {\n return true;\n }\n return null;\n})()","trigger":""},{"name":"previous_customer_harryanddavid","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var site = 'harryanddavid';\n if (typeof bouncex.conversion_hostname == 'string' && bouncex.conversion_hostname.indexOf(site) > -1) {\n return true;\n }\n return null;\n})();","trigger":""},{"name":"submitted_wolfermans_ecap","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":""},{"name":"submitted_stockyards_ecap","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":""},{"name":"hd_submitted_ecap","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var email = jQuery('#EmailSentFooter');\n if(window.location.href.indexOf('harryanddavid') > -1){\n if(email.css('display') == 'block'){\n return true;\n }\n }\n})();","trigger":""},{"name":"is_excluded_product","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n\tvar skuPartNumber = jQuery('#skuPartNumber').val();\n\tif (!skuPartNumber) { return; }\n\n\tvar currentProductMatch = skuPartNumber.match(/-([0-9A-Z]+)$/);\n\tif (currentProductMatch.length < 2) { return; }\n\n\tvar currentProductId = currentProductMatch[1];\n\tvar currentProductNumber = Number(currentProductId.substr(0, 5));\n\tif (isNaN(currentProductNumber)) { return; }\n\n\tvar excludedProductIds = ['25756X','25757X','26560X','27193X','27224X','27268X','27298X','27299X','27300X','27301X','27383X','27388X','27392X','27394X','27396X','27537X','28283X','28304X','28368X','28529X','28534XA','28539X','28580X','28641X','28644X','28646X','28654X','28656X','28658X','28664X','28848X','28851X','28851XA','28852X','28853X','28855X','28859X','28860X','28867X','28961X','28963X','28988X','28989X','28995X','28996X','28997X','28998X','28999X','29001X','29002X','29003X','29062X','29091X','29092X','29094X','29095X','29096X','29097X','29098X','29099X','29127X','29128X','29129X','29130X','29131X','29188X','29190X','29192X','29214X','29216X','29294X','29295X','29296X','29297X','29482X','29483X','29585X','29586X','29782Z','29783Z','29784Z','29785Z','29786Z','29787Z','29788Z','29789Z','29790Z','29791Z','29792Z','29793Z','29794Z','29795Z','29796Z','29797Z','29798X','29799X','29800X','29801X','29842X','29843X','29844X','29845X','29846XA','29847X','29848X','29849X','29851X','29870X','29872X','29874X','29876X','29878X','29882X','29886X','29891XA','29892XA','29893XA','29894XA','29895XA','29896XA','29897XA','29898XA','29899XA','29901XA','29930Z','29931Z','29932Z','29933Z','29934X','29942Z','29943Z','29944Z','29945Z','29946X','29954Z','29955Z','29956Z','29957Z','29958X','29960XA','29961XA','29962XA','29963XA','29964XA','29965XA','29966XA','29967XA','29968XA','29970XA','29971XA','29978Z','29979Z','29980Z','29981Z','29982X','29990Z','29991Z','29992Z','29993Z','29994X','30013Z','30014Z','30016Z','30017Z','30018X','30040X','30041X','30042X','30043X','30044X','30045X','30063XA','30064XA','30066XA','30067XA','30068XA','30070XA','30071XA','30074XA','30075XA','30076X','30076XA','30078X','30078XA','30080X','30080XA','30081X','30081XA','30082X','30082XA','30097X','30097XA','30098X','30099X','30100X','30101X','30102X','30103X','30104X','30105X','30108X','30265X','30266X','30267X','30411X','30412X','30413X','30414X','30415X','30416X','30417X','30418X','30419X','30420X','30421X','30422X','30423X','30424X','30425X','30486X','30515X','30546XA','30548XA','30549XA','30550XA','30551XA','30552XA','30553XA','30554XA','30556XA','30558XA','30559XA','30560XA','30561XA','30562XA','30563XA','30564XA','30565XA','30566XA','30568XA','30569XA','30570X','30573X','30573XA','30574X','30575X','30578X','30582X','30594X','30595X','30608X','30611X','30667X','30700XA','30707Z','30708Z','30709Z','30710Z','30770XA','30771XA','30772XA','30773XA','30775X','30777X','30779X','30781X','30783X','30791X','30796X','30798X','30800X','30802X','30856X','30858X','30870X','30870XA','30872X','30872XA','30873X','30873XA','30886X','30887X','30888X','30983X','30985X','30986X','30994X','30995X','31017X','31017XA','31019X','31019XA','31029X','31030X','31031X','31081X','31082X','31083X','31084X','31097X','31110XA','31113XA','31116X','31132X','31133X','31195XA','31196XA','31197XA','31198XA','31199XA','31200XA','31202XA','31203XA','31204XA','31205XA','31206XA','31207XA','31208XA','31209XA','31210XA','31211XA','31212XA','31213XA','31214XA','31215XA','31216XA','31218XA','31219XA','31220XA','31221XA','31238X','31267X','31268XA','31269X','31269XA','31275X','31278XA','31279XA','31279XB','31279XC','31279XN','31279XO','31280XA','31280XB','31280XC','31281XA','31281XB','31281XC','31344X','31424XA','31424XB','31424XC','31425XA','31425XB','31425XC','31427XA','31427XB','31427XC','31431X','31440X','31442X','31523X','31524X','31525X','31746XA','40000X','40000XA','40000XB','40001X','40001XA','40001XB','40002X','40002XA','40004X','40004XA','40005X','40005XA','40006X','40006XA','40007X','40007XA','40007XB','40008X','40008XA','40009X','40009XA','40010X','40010XA','40011X','40011XA','40012X','40012XA','40013X','40014X','40015X','40016X','40017X','40020X','40026X','40033X','40034X','40035X','40036X','40037X','40038X','40040X','40040XA','51262X'];\n\tvar callCounter = 0;\n\tvar maxCalls = 50;\n\tvar targetArraySize = 20;\n\n\tfunction searchRefinedList(firstIndex, lastIndex) {\n\t\tfor (var i = firstIndex; i <= lastIndex; i++) {\n\t\t\tif (excludedProductIds[i] === currentProductId) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tfunction searchForId(target, firstIndex, lastIndex) {\n\t\tcallCounter++;\n\t\tvar arraySize = lastIndex - firstIndex;\n\t\tvar middleIndex = firstIndex + Math.floor((lastIndex - firstIndex) / 2);\n\t\tvar firstIndexNumber = Number(excludedProductIds[firstIndex].substr(0, 5));\n\t\tvar lastIndexNumber = Number(excludedProductIds[lastIndex].substr(0, 5));\n\t\tvar middleIndexNumber = Number(excludedProductIds[middleIndex].substr(0, 5));\n\n\t\tif (arraySize <= targetArraySize) {\n\t\t\treturn searchRefinedList(firstIndex, lastIndex);\n\t\t} else if (target === middleIndexNumber) {\n\t\t\treturn searchRefinedList((middleIndex - (targetArraySize / 2)), (middleIndex + (targetArraySize / 2)));\n\t\t} else if (target > middleIndexNumber && callCounter < maxCalls) {\n\t\t\treturn searchForId(target, (middleIndex + 1), lastIndex);\n\t\t} else if (target <= middleIndexNumber && callCounter < maxCalls) {\n\t\t\treturn searchForId(target, firstIndex, middleIndex);\n\t\t}\n\t}\n\n\treturn searchForId(currentProductNumber, 0, excludedProductIds.length - 1);\n})();\n","trigger":""},{"name":"page_type","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if(window.location.origin.includes('pwa')){\n const pwaPagetype = document.getElementById('utag_6').getAttribute('src').split('&')[1].split('=')[1], \n pageTypes = {\n \"homepage\":'home' ,\n 'category' : 'category',\n 'product' : 'product',\n 'search' : 'search',\n \"shoppingCart\":'cart',\n \"placeorder\": 'checkout',\n \"recipient\":'checkout' \n };\n if(window.location.pathname.includes('/checkout/interstitial-login/')){\n bouncex.website.pts = false;\n } else {\n bouncex.website.pts = pageTypes[pwaPagetype];\n }\n \n }\n return bouncex.website.pts;\n})();","trigger":"pageload"},{"name":"imageurl","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"typeof btPageData != \"undefined\" ? window.location.protocol + btPageData.productImgUrl : false","trigger":""},{"name":"passport_price","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n var passportDiv = jQuery('p[name=\"orderItemPrice\"]').parent().parent().parent().find('p:contains(passport annual membership)'),\n pwaSite = window.location.origin.includes('pwa'),\n pwaProdPage = document.getElementById('utag_6') \n && document.getElementById('utag_6').getAttribute('src').split('&')[1]\n && document.getElementById('utag_6').getAttribute('src').split('&')[1].split('=')[1] === \"product\" \n && window.location.origin.includes('pwa') && !window.location.pathname.includes('checkout/interstitial-login');\n \n if (passportDiv.length > 0 && pwaSite) {\n let passportPrice = jQuery('p:contains(passport annual membership)').parent().parent().parent().find('p[name=\"orderItemPrice\"]');\n \n return passportPrice.text().replace(/[^0-9.]/g,'');\n } else if (pwaProdPage) {\n let passport = 'passport-item-price',\n initialStateScript = jQuery('script[type=\"text/javascript\"]:contains(window.__INITIAL_STATE__)'),\n passportIndex = initialStateScript.text().trim().split('=')[1].indexOf(passport),\n passportPriceString = initialStateScript.text().trim().split('=')[1].substring(passportIndex, passportIndex + passport.length + 7);\n \n return passportPriceString.replace(/[^0-9.]/g,'');\n } else if (jQuery('#pp-analytics').attr('data-price')) {\n return jQuery('#pp-analytics').attr('data-price');\n }\n return null;\n})();","trigger":"pageload"},{"name":"suppress_gift_list","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"bouncex.utils.url.getParam('utm_source') === 'exacttarget_g' || bouncex.utils.url.getParam('utm_source') === 'exacttarget_G' || null;","trigger":"pageload"},{"name":"cancel_event_fired","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_images","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if (bouncex.website.pts === 'checkout' || bouncex.website.pts === 'cart' && jQuery('img[alt=\"product\"]').length) {\n var imgArr = [];\n jQuery('img[alt=\"product\"]').each(function(index, img) {\n //var itemID = jQuery('p[name=\"orderItemSku\"]').eq(index).text();\n //imgObj[itemID];\n imgArr.push(img.src);\n });\n //return (Object.values(imgObj).length && Object.values(imgObj).join(',')) || null;\n return (imgArr.length > 0 && imgArr.join(',')) || null;\n }\n return null;\n})();","trigger":"pageload"},{"name":"atc_success","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function() {\n var desktopATCSuccess = jQuery('div#minicart div[role=\"dialog\"], div.SlideOutMiniCart').length > 0 && jQuery('div#minicart div[role=\"dialog\"], div.SlideOutMiniCart').text(),\n mobileATCSuccess = window.location.href.indexOf('/wrap-up') > -1; \n \n if (!!desktopATCSuccess) {\n return desktopATCSuccess.toLowerCase().indexOf('added to your cart') > -1 || desktopATCSuccess.indexOf('Your Cart') > -1;\n }\n\n return mobileATCSuccess;\n})();","trigger":"pageload"},{"name":"selected_sku","polling":"vars","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"(function(){\n var selectedDiv = jQuery('div[data-partnumber]').filter(function(){\n return jQuery(this).css('background-color').toLowerCase() === 'rgb(0, 0, 0)';\n });\n return selectedDiv.length ? jQuery(selectedDiv).attr('data-id') : '';\n})();","trigger":"pageload"},{"name":"only_donation_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function () {\n var $products = jQuery('.SlideOutMiniCart h6'),\n onlyDonations = true,\n emptyCart = jQuery('h6').text().toLowerCase().indexOf('empty') > -1;\n\n if (bouncex.website.pts === 'checkout' || bouncex.website.pts === 'cart'){\n var $donation = jQuery('[data-test=\"checkout-donation-order-item\"]');\n $products = jQuery('[data-test=\"orderContainer-1\"]');\n \n onlyDonations = $products.length === 0 && $donation.length > 0;\n\n return emptyCart ? false : onlyDonations;\n } else if ($products.length > 0) {\n $products.each(function() {\n if (jQuery(this).text().toLowerCase().indexOf('donation') === -1){\n onlyDonations = false;\n }\n });\n return onlyDonations;\n }\n\n return null;\n})();","trigger":"pageload"},{"name":"footer_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('[data-emailanchor=\"true\"]').length > 0;","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":1,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"et_rid":"espemailid"},"cus":"","miw_exclude":"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":1,"spatm":0,"preinit_cjs":"/* moved this from custom JS to pre-init JS \nif (!bouncex.testmode.bxdev) {\n //added of new mobile site\n SinglePageApp.setCustomParams({\n shouldCheckSpa: function() {\n return bouncex.calling_url.indexOf('pwa.harryanddavid') > -1;\n }\n });\n}\n*/\nSinglePageApp.setCustomParams({\n shouldCheckSpa: function() {\n return window.isPWA;\n },\n currentPageIdentifier: function() {\n return (window.utag && window.utag.data && window.utag.data.page) || window.location.pathname;\n }\n});","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"","eventSharing":false,"shqId":"","enabled":0},"pde":true,"fmc":["US","CA"],"fme":true,"fmx":"","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":"264902921","ga4_measurement_id":"G-BMECK137YG","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":"04cde0014774b7eb597770595769aab1"}; 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_c957d4b6668bf5c52b37a4a0fd797d56.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); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();