(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":3206,"name":"Ray-Ban AU","cookie_name":"bounceClientVisit3206","domain":"ray-ban.comaustralia","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"/* https://www.wrike.com/open.htm?id=439784749 */\nwindow.top.bouncex.tealiumTracker = function(campaignName, parentName, eventType) {\n\tvar tealium_data2track = window.top.tealium_data2track || [];\n\tvar speakingString = 'X-X-X-BounceX-'+ eventType;\n\ttealium_data2track.push({\n\t\t'id': speakingString,\n\t\t'Content_TestCampaign': parentName,\n\t\t'Content_TestVariation': campaignName\n\t});\n};\n\n/* https://www.wrike.com/open.htm?id=439784749 */\nwindow.top.bouncex.tealiumTrackerV2 = function(ca_id, eventType) {\n var campaign = bouncex.campaigns[ca_id];\n\tvar campaignLabel = campaign.ga_i.label.toLowerCase();\n\tvar childString = '';\n\tvar parentString = '';\n\n\tif (campaignLabel.indexOf('email capture') > -1 || campaignLabel.indexOf('capture email') > -1) {\n\t parentString += 'emailCapture ';\n\t} else if (campaignLabel.indexOf('cart') > -1) {\n\t parentString += 'cartRecovery ';\n\t} else if (campaignLabel.indexOf('checkout') > -1) {\n\t parentString += 'checkoutShaping ';\n\t} else {\n\t parentString += 'Campaign ';\n\t}\n\n\tparentString += campaignLabel.indexOf('mobile') > -1 ? 'M ' : 'D ';\n\tparentString += '('+campaign.pid+')';\n\n\tchildString += campaign.ttype === 'variation' ? 'variation ' : 'control ';\n\tchildString += '('+ca_id+')';\n\t\n\tvar tealium_data2track = window.top.tealium_data2track || [];\n\tvar speakingString = 'Bounce-'+ eventType;\n\t\n\ttealium_data2track.push({\n\t\t'id': speakingString,\n\t\t'Tool_Name_Abbreviation': 'BO',\n\t\t'Content_TestCampaign': parentString,\n\t\t'Content_TestVariation': childString\n\t});\n};\n\nbouncex.infoStore = {\n sessionStorageIdentifier: 'bxInfoStore',\n set: function(data) {\n var hashedData = bouncex.lz.compressToURI(JSON.stringify(data));\n try {\n sessionStorage.setItem(this.sessionStorageIdentifier, hashedData);\n } catch(e) {\n bouncex.err('session storage failure');\n }\n },\n \n get: function() {\n var info = sessionStorage.getItem(this.sessionStorageIdentifier);\n return info ? JSON.parse(bouncex.lz.decompressFromURI(info)) : '';\n },\n \n infoIsStored: function() {\n return !!sessionStorage.getItem(this.sessionStorageIdentifier);\n },\n \n populateFields: function(fields) {\n if (!this.infoIsStored()) return;\n \n var data = this.get();\n for (var field in fields) {\n if (fields.hasOwnProperty(field)) {\n fields[field].val(data[field]);\n }\n }\n }\n};\n\nwindow.top.bouncex.md5 = function(inputString) {\n var hc=\"0123456789abcdef\";\n function rh(n) {var j,s=\"\";for(j=0;j<=3;j++) s+=hc.charAt((n>>(j*8+4))&0x0F)+hc.charAt((n>>(j*8))&0x0F);return s;}\n function ad(x,y) {var l=(x&0xFFFF)+(y&0xFFFF);var m=(x>>16)+(y>>16)+(l>>16);return (m<<16)|(l&0xFFFF);}\n function rl(n,c) {return (n<>>(32-c));}\n function cm(q,a,b,x,s,t) {return ad(rl(ad(ad(a,q),ad(x,t)),s),b);}\n function ff(a,b,c,d,x,s,t) {return cm((b&c)|((~b)&d),a,b,x,s,t);}\n function gg(a,b,c,d,x,s,t) {return cm((b&d)|(c&(~d)),a,b,x,s,t);}\n function hh(a,b,c,d,x,s,t) {return cm(b^c^d,a,b,x,s,t);}\n function ii(a,b,c,d,x,s,t) {return cm(c^(b|(~d)),a,b,x,s,t);}\n function sb(x) {\n var i;var nblk=((x.length+8)>>6)+1;var blks=new Array(nblk*16);for(i=0;i>2]|=x.charCodeAt(i)<<((i%4)*8);\n blks[i>>2]|=0x80<<((i%4)*8);blks[nblk*16-2]=x.length*8;return blks;\n }\n var i,x=sb(\"\"+inputString),a=1732584193,b=-271733879,c=-1732584194,d=271733878,olda,oldb,oldc,oldd;\n for(i=0;i -1;\n}\n\nfunction getCategory() {\n if (isCustomItem()) {\n return 'custom';\n }\n\n return jQuery('.rb-breadcrumb.rb-child').eq(-2).text().trim() || 'Global';\n}\n\nfunction getImageUrl() {\n let img = jQuery('.fc-focused-image-preloader, .swiper-slide.image-gallery.swiper-slide-active img, .images-slide.current img').attr('src') ||\n jQuery('.rb-pdp-page .rb-product-images picture source').first().attr('src') || \n jQuery('.rb-product-images-outer-carousel__slide--current img').attr('src') || \n jQuery('.rb-images-grid__image img').first().attr('src') || \n jQuery('[property=\"og:image\"]').attr('content') || \n '';\n\n if (!!img) {\n return img.indexOf('https:') > -1 ? img : 'https:' + img;\n }\n\n return '';\n}\n\nfunction getPrice() {\n let price = jQuery('.rb-is-discounted').length > 0 ? jQuery('.rb-pdp-sticky-bar__price__discounted').first().text() : jQuery('.rb-pdp-sticky-bar__price__original-price, .fc-lux-price').first().text();\n\n if (!price && jQuery('.rb-prices .rb-prices__discounted').length) {\n price = jQuery('.rb-prices .rb-prices__discounted').first().text();\n } else if (!price && jQuery('.rb-prices .rb-prices__discounted').length === 0) {\n price = jQuery('.rb-prices').first().text();\n }\n\n if (price.match(/,\\d{2}$/)) {\n price = price.replace(/\\./g, '').replace(',', '.');\n }\n return price.replace(/[^0-9.]/g, '');\n}\n\nfunction getGroupId() {\n var dataPdpObj = bouncex.parseJSON(jQuery('#data_pdp').first().text()) || {};\n return bouncex.utils.getNestedProp('resolvedSkuGridLensBridgeVal', '', dataPdpObj);\n}\n\nfunction isExcludedProduct(productId) {\n var EXCLUSIONS_IDS = ['8056262352236'];\n\n return EXCLUSIONS_IDS.indexOf(productId) > -1; \n}\n\n/* ------------------------------ ITEM TRACKING ----------------------------- */\n\nfunction getItem() {\n var url = getUrl();\n\n return {\n id: getIdFromUrl(url),\n copy: jQuery('.rb-pdp-title, .fc-product-name, .fc-mobile-model-name, h1.rb-product-name').first().text().trim(),\n category: getCategory(),\n url: url,\n imageurl: getImageUrl(),\n price: getPrice(),\n instock: jQuery('.rb-pdp-sticky-bar--add, .fc-add-to-cart-button, .rb-sticky-bar__cta').length > 0,\n excluded: isExcludedProduct(getIdFromUrl(url))\n };\n}\n\nfunction fireViewItem(id, groupId) {\n var pushItem = { 'item:id': id };\n\n // if (groupId) {\n // pushItem['item:itemgroupid'] = groupId;\n // }\n bouncex.push(['view item', pushItem]);\n}\n\nfunction isGiftCard(item) {\n return item.url.indexOf('gift-card') > -1;\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.price &&\n !!item.url &&\n !!item.imageurl;\n },\n function () {\n if (isGiftCard(item)) {\n return;\n }\n item.groupId = getGroupId();\n bouncex.push(['item', item]);\n fireViewItem(item.id, item.groupId);\n initializeSkuEvents(item.id, item.groupId);\n },\n 10\n );\n}\n\n/* ------------------------------ SKU TRACKING ------------------------------ */\n\nfunction fireSelectSkuEvent(itemId, groupId, skuId) {\n bouncex.push([\n 'select_sku',\n {\n 'item:id': itemId,\n 'item:itemgroupid': groupId,\n 'item:feedid': skuId\n }\n ]);\n}\n\nfunction initializeSkuEvents(itemId, groupId) {\n if (jQuery('[class*=--selected]').length) {\n fireSelectSkuEvent(itemId, groupId, itemId);\n }\n\n bouncex.et.onVarChange('item_id', function (oldId, newId) {\n if (oldId && oldId !== newId) {\n fireSelectSkuEvent(newId, groupId, newId);\n fireViewItem(newId, groupId);\n }\n });\n}\n\n/* ---------------------------- CATEGORY TRACKING --------------------------- */\nfunction getItemIdsCat() {\n var ids = [],\n $tiles = jQuery('.rb-product-tile__wrapper'),\n i = 0,\n id = '';\n\n for (i; i < $tiles.length; i++) {\n id = getIdFromUrl(jQuery($tiles[i]).attr('href') || '').replace(/[^0-9]/g, '');\n\n if (!id || ids.indexOf(id) > -1) {\n continue;\n }\n\n ids[ids.length] = id;\n }\n\n return ids.join(',');\n}\n\nfunction getCategoryObject() {\n return {\n 'page:url': bouncex.utils.url.allowParams('searchTerm'),\n 'items:ids': getItemIdsCat()\n };\n}\n\nfunction initializeCategoryEvents() {\n var categoryObj;\n\n bouncex.et.onTrue(\n function () {\n categoryObj = getCategoryObject();\n return !!categoryObj['items:ids'].length &&\n !!categoryObj['page:url'];\n },\n function () {\n bouncex.push(['view category', categoryObj]);\n },\n 10\n );\n\n return;\n}\n\n/* ------------------------------- CART EVENTS ------------------------------ */\nfunction getItemDetails() {\n var len = bouncex.utils.getNestedProp('dataLayer', []).length,\n details;\n\n for (let i = len - 1; i > -1; i--) {\n let data = dataLayer[i];\n\n if (data.length > 2 && data[1] === 'add_to_cart' && data[2].items) {\n details = data[2].items[0];\n break;\n }\n }\n\n return details;\n}\n\nfunction trackCustomCart() {\n bouncex.on(jQuery(document), 'ajaxComplete', function (e, x, settings) {\n if (settings.url.indexOf('/remix/add-to-cart') > -1 && settings.type === 'POST') {\n var recipeId = JSON.parse(settings.data).recipeId,\n url;\n\n if (recipeId) {\n url = getUrl() + '?recipeId=' + recipeId;\n\n bouncex.push(['custom add',\n {\n 'item:id': bouncex.vars.item_id,\n 'item:customurl': url\n },\n ]);\n }\n if (bouncex.vars.item_id) {\n bouncex.push(['add to cart', { 'item:id': bouncex.vars.item_id }]);\n bouncex.setVar('cart', true);\n }\n }\n });\n}\n\nfunction addToCart() {\n if (isCustomItem()) {\n trackCustomCart();\n return;\n }\n bouncex.et.onVarChange('cart_qty', function (oldVal, newVal) {\n if (newVal > oldVal) {\n var details = getItemDetails() || {},\n itemId = details.item_id || bouncex.vars.item_id,\n replenItem = {\n catalogId: jQuery('#catalogId').val(),\n storeId: jQuery('#storeId').val(),\n langId: jQuery('#langId').val(),\n catEntryId: details.products_moco,\n quantity: 1\n };\n if (itemId) {\n bouncex.push([\n 'add to cart',\n {\n 'item:id': itemId,\n 'cart:item': JSON.stringify(replenItem)\n }\n ]);\n bouncex.setVar('cart', true);\n }\n }\n });\n}\n\nfunction emptyCart() {\n bouncex.et.onVarChange('cart_qty', function (oldVal, newVal) {\n if (bouncex.vars.cart && newVal === 0 && oldVal > 0 && bouncex.website.pts === 'cart') {\n bouncex.push(['empty_cart']);\n bouncex.setVar('cart', false);\n }\n });\n}\n\nfunction makeReplenItem(data, replenishmentUrl) {\n return function () {\n return jQuery.ajax({\n type: 'GET',\n url: replenishmentUrl,\n data: bouncex.utils.url.generateQuerystring(data)\n });\n };\n}\n\nfunction replenish(cart) {\n var replenishmentUrl = 'https://www.ray-ban.com/AjaxOrderItemAdd',\n $deferreds = [];\n\n cart.items.forEach(function (item) {\n $deferreds.push(makeReplenItem(item, replenishmentUrl));\n });\n\n $deferreds\n .reduce(function (promise, func) {\n return promise.then(function () {\n return func();\n });\n }, jQuery.Deferred().resolve([]))\n .then(replenComplete);\n}\n\nfunction replenComplete() {\n window.location.href = window.location.origin +\n window.location.pathname +\n '?bx_replen=true';\n}\n\nfunction initializeCartEvents() {\n bouncex.et.cart.init({\n cartCountVariable: 'cart_qty',\n storeValues: [],\n replenish: replenish,\n replenishmentType: 'ajax'\n });\n\n addToCart();\n emptyCart();\n\n}\n\n/* ------------------------------ USER TRACKING ----------------------------- */\nfunction getUserEmail() {\n return !!bouncex.utils.getNestedProp('bouncex.infoStore.get') && bouncex.infoStore.get().email;\n}\n\nfunction initializeUserTracking() {\n var emailId = '[type=\"email\"]',\n userEmail;\n\n bouncex.on(jQuery(emailId), 'blur.bx', function () {\n bouncex.infoStore.set({\n email: jQuery(emailId).val()\n });\n });\n\n if (!bouncex.vars.logged_in || !!bouncex.vars.logged_in_identified) {\n return;\n }\n\n bouncex.et.onTrue(\n function () {\n userEmail = getUserEmail();\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\n bouncex.setVar('logged_in_identified', true);\n },\n 10\n );\n}\n\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\nfunction isValidDomain() {\n return getUrl().indexOf('ray-ban.com') > -1;\n}\n\nfunction isEn() {\n return bouncex.html.attr('lang') === 'en-AU';\n}\n\nfunction isValidForTracking() {\n return isValidDomain() && isEn();\n}\n\nfunction init() {\n if (!isValidForTracking()) {\n return;\n }\n\n initializeUserTracking();\n initializeCartEvents();\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();","dge":false,"bxidLoadFirst":false,"pie":false,"cme":false,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/ShopCartDisplayView"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"localhost/"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"acceptance1.ray-ban"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"acceptance.ray-ban.com/"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.rb-plp').length > 0;"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.rbBoxes.pslider').length > 0;"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.rb-plp-page').length > 0;"}]]},"checkout":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('.rb-header-checkout').length > 0;"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('#pageName[value=\"HomePage\"]').length > 0;"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"acceptance1.ray-ban"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"localhost/"}],[{"activation":"current_page_url","prop":"not_contains","prop2":"","prop3":"","val":"lrrbec8fep01.luxgroup.net"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('[value=\"ProductPage\"]').length > 0;"},{"activation":"js","prop":"","prop2":"","prop3":"","val":"document.querySelectorAll('#productPageName').length > 0;"}]]},"search":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/SearchDisplay?"}]]}},"els":{"CART - Checkout Button":".wcs-button-checkout","CART - Promo Code Apply Button":".wcs-shopping-button-promo","CART - Promo Code Box":".wcs-shopping-txt-promo","CAT - Product Grid Image":".rbBox","Footer":"#wcs_footer","Navigation bar":"#rb-header","PDP - Color Option":"#D_PDP_Prod_ColorThumbs","PDP - Hero Image":".wcs-main-image","PDP - Product Name":".wcs-pdp-product-title","PDP - Product Price":".wcs-pdp-price-container","PDP - Quantity Option":".wcs-shopping-item-qty","PDP - Size Option":"#wcs-size-pdp-display","SEARCH - Product Grid Image":".rbBox"},"vars":[{"name":"logged_in","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if(window.location.href.indexOf('/customize/') > -1 ){\n return null;\n }\n\n return jQuery('.rb-header-account--logged').length > 0 || jQuery('[href*=\"https://www.ray-ban.com/Logoff\"]').length > 0 || (bouncex.website.pts === 'checkout' && bouncex.utils.getNestedProp('utag_data.User_LoginStatus') === 'Logged');\n})();","trigger":""},{"name":"ever_logged_in","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":""},{"name":"cart_qty","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function() {\n var cartCount = jQuery('.rb-badge, #cart-qty, .number-of-products').eq(0);\n if (bouncex.website.pts === 'checkout') {\n return null;\n } else if(bouncex.website.pts === 'cart') {\n cartCount = jQuery('#itemTotal, .all-items-counter');\n }\n return Number(jQuery(cartCount).eq(0).text().replace(/[^0-9.]/g, ''));\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function() {\n var $subtotalDiv = jQuery('.rb-minicart-container__recap-total span:last, .wcs-shopping-grandtotal-js, .wcs-delivery-total-price');\n\tvar zeroInCart = jQuery('.rb-badge, #cart-qty').eq(0).text().trim().indexOf('0') > -1|| jQuery('.wcs-empty-text, .wcs-basket-empty').length > 0;\n\n if ($subtotalDiv.length > 0) {\n return Number($subtotalDiv.text().replace(/[^0-9\\.]/g,''));\n } else {\n return zeroInCart && bouncex.website.pts !== 'checkout' ? 0 : null;\n }\n})();","trigger":""},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"Number(jQuery('.fc-price').text().replace(/[^0-9.]/g, '')) || Number(jQuery('.rb-pdp-sticky-bar__price__discounted').eq(0).text().replace(/[^0-9.]/g, '')) || Number(jQuery('.rb-pdp-sticky-bar__price__original').eq(0).text().replace(/[^0-9.]/g, ''));","trigger":""},{"name":"prod_name","polling":"all","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"jQuery('.fc-product-name').text().trim() || jQuery('.rb-pdp-title').text().trim() || jQuery('.fc-mobile-model-name').text().trim();","trigger":""},{"name":"in_stock","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.fc-add-to-cart-button:not(:disabled())').length > 0 || jQuery('.rb-pdp-sticky-bar--add:not(:disabled())').length > 0;","trigger":""},{"name":"submitted_onsite","polling":"all","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"jQuery('.rb-footer__mail__succes, .rb-footer__mail__title__ok').text().toUpperCase().indexOf('NOW YOU ARE A MEMBER OF RAY-BAN THE ONES COMMUNITY.') > -1 || null;","trigger":""},{"name":"has_replenished","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"ibx_login_once","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"mobile_added_to_cart","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"items_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":true,"default":"0","code":"window.location.href.indexOf('/customize/') > -1 ? null : Number(jQuery('.rb-badge').eq(1).text().replace(/[^0-9.]/g, '')) || Number(jQuery('.odr-title').eq(1).text().replace(/[^0-9.]/g, '')) || Number(jQuery('.cart-qty').text().replace(/[^0-9.]/g, '')) || Number(jQuery('.all-items-counter').text().replace('(', '').replace(')', ''));","trigger":"pageload"},{"name":"cart_total","polling":"all","persist":"visit","page_types":[],"testmode":true,"default":"0","code":"(function(){\n if (bouncex.website.pts === 'cart') {\n return Number(jQuery('#subTotalCalc').text().replace(/[^0-9.]/g, '')) || Number(jQuery('#subtotal').text().replace(/[^0-9.]/g, ''));\n }\n return Number(jQuery('.rb-minicart-modal__recap-list--subtotal').text().replace(/[^0-9.]/g, '')) || null;\n})();","trigger":"pageload"},{"name":"product_page","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"bouncex.website.pts === 'product';","trigger":"pageload"},{"name":"remix_page","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"(function(){\n if (typeof window.utag_data !== 'undefined') {\n if (utag_data.Page_Name === \"Remix:Configurator\" || utag_data.Page_NameFull.indexOf('RB_US:Remix:') > -1){\n return true;\n }\n }\n})();","trigger":"pageload"},{"name":"cart_count_start","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"0","code":"/*cart count at beginning of pageview */\nbouncex.vars.items_in_cart;","trigger":"pageload"},{"name":"added_cart_pv","polling":"vars","persist":"no","page_types":[],"testmode":true,"default":"false","code":"/*returns true if user added to cart on this page view */\n!!bouncex.vars.items_in_cart && bouncex.vars.items_in_cart > bouncex.vars.cart_count_start;","trigger":"pageload"},{"name":"ibx_test","polling":"none","persist":"visit","page_types":[],"testmode":true,"default":"false","code":"location.href.indexOf('ibx_test')>=0 || null;","trigger":"pageload"},{"name":"both_in_cart","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"(function() {\n var numAllProdsInCart = jQuery('.wcs-shopping-cart').find('.wcs-minicart-prod').length ? jQuery('.wcs-shopping-cart').find('.wcs-minicart-prod').length : 0;\n var numRemixProdsInCart = jQuery('.wcs-shopping-cart').find('.wcs-minicart-prod').length ? jQuery('.wcs-shopping-cart').find('.wcs-minicart-prod.remix-pd').length : 0;\n \n if (numRemixProdsInCart > 0 && numAllProdsInCart > numRemixProdsInCart) {\n return true;\n } else {\n return false;\n }\n})();","trigger":"pageload"},{"name":"multiple_remix_in_cart","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"(function() {\n var numRemixProdsInCart = jQuery('.wcs-shopping-cart').find('.wcs-minicart-prod').length ? jQuery('.wcs-shopping-cart').find('.wcs-minicart-prod.remix-pd').length : 0;\n if (numRemixProdsInCart > 1) {\n return true;\n } else {\n return false;\n }\n})();","trigger":"pageload"},{"name":"page_name","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"(function(){\n\tif( typeof window.top.utag !== 'undefined' && typeof window.top.utag.data !== 'undefined' && typeof window.top.utag.data.Page_Name !== 'undefined' ){\n\t\treturn window.top.utag.data.Page_Name;\n\t}\n})();","trigger":"pageload"},{"name":"viewed_items","polling":"none","persist":"visit","page_types":[],"testmode":true,"default":"0","code":"(function() {\n if (jQuery('#pdp_page').length > 0) {\n return bouncex.vars.viewed_items + 1;\n }\n return null;\n})();","trigger":"pageload"},{"name":"viewed_remix_items","polling":"none","persist":"visit","page_types":[],"testmode":true,"default":"0","code":"(function() {\n var $productType = jQuery('#producttype');\n if ($productType.length > 0 && $productType.attr('value') === 'Remix') {\n return bouncex.vars.viewed_remix_items + 1;\n }\n return null;\n})();","trigger":"pageload"},{"name":"category_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'category';","trigger":"pageload"},{"name":"products_tracked","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"0","code":"localStorage.getItem('bxProdHist') ? JSON.parse(localStorage.getItem('bxProdHist')).length : 0;","trigger":"pageload"},{"name":"excluded_prod_upc","polling":"all","persist":"visit","page_types":[],"testmode":true,"default":"false","code":"(function(){\n\tvar excludedUPCArray = [805289126577,805289602057,805289628460,805289742470,805289114567,805289653653,805289126591,8053672495744,805289653660,805289270102,8053672610451,805289048527,805289602071,805289115694,805289330462,805289346890,805289439899,805289288695,805289742463,805289628231];\n\n\tvar miniCartProductID = jQuery('.wcs-minicart-prod.last').children().find('img').attr('id');\n\t\n\tif (!miniCartProductID){ return; }\n\t\n\tfor(var i = 0; i < miniCartProductID.length; i++){\n\t\tif(miniCartProductID.indexOf(excludedUPCArray[i]) > -1){\n\t\t\treturn true;\n\t\t}\n\t}\n})();","trigger":"pageload"},{"name":"navbar_open","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"jQuery('.wcs-drop_panel:visible').length > 0;","trigger":"pageload"},{"name":"side_minicart_open","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"jQuery('.wcs-right-panel:visible').length > 0;","trigger":"pageload"},{"name":"vto_this_visit","polling":"all","persist":"visit","page_types":[],"testmode":true,"default":"false","code":"bouncex.vars.vto_this_visit || (function() {\n var $vto = jQuery('.vto-application');\n if ($vto.find('.preview-account-page').length > 0 || $vto.find('.preview-page').length > 0) {\n return true;\n }\n return null;\n})();","trigger":"pageload"},{"name":"virtual_model_saved","polling":"none","persist":"visit","page_types":[],"testmode":true,"default":"false","code":"bouncex.utils.cookies.read('vtorenderstatus') !== null ? true : null;","trigger":"pageload"},{"name":"create_virtual_model_page","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"window.location.pathname.indexOf('/mobile/') > -1 ? jQuery('.vto-cta-button').is(':visible') : jQuery('#D_PDP_Prod_VtoTryThemOnLink').is(':visible');","trigger":"pageload"},{"name":"using_edge_browser","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"bouncex.browser.edge","trigger":"pageload"},{"name":"customizable_click_url","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"(function() {\n var customizeText = jQuery('.customize-it-text');\n var customizeTextMobile = jQuery('.wcs-customize_new_link-mobile > a');\n\n if (customizeText.length > 0) {\n return customizeText.attr('href');\n } else if(customizeTextMobile.length > 0){\n return customizeTextMobile.attr('href');\n } \n})();","trigger":"pageload"},{"name":"product_name","polling":"all","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"jQuery('.rb-pdp-title').text().trim() || jQuery('.fc-product-name').text().trim() || jQuery('.fc-mobile-model-name').text().trim() || jQuery('h1.rb-product-name').text().trim();","trigger":"pageload"},{"name":"remix_product_name","polling":"all","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"window.location.href.indexOf('/customize/') > -1 ? jQuery('.fc-product-name').text() || jQuery('.fc-mobile-model-name').text().trim() : false;","trigger":"pageload"},{"name":"has_minimized","polling":"none","persist":"visit","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_coupon_copied","polling":"none","persist":"visit","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"frames_without_perscription","polling":"all","persist":"visit","page_types":[],"testmode":true,"default":"false","code":"(function(){\n var cartItemsNames = jQuery('.wcs-minicart-prod .wcs-product-name').text();\n var prodName = jQuery('meta[property=\"og:type\"]').attr('content') === 'product' || jQuery('#wcs-pdp-buy-button-display').length > 0 ? jQuery('#wcs-productdescval, .productHeader-col-left h1').eq(0).text().trim() : '';\n \n if (bouncex.vars.items_in_cart === 0) { return false }\n if (prodName && cartItemsNames.indexOf(prodName) > -1 && jQuery('.rc-prescription-lenses .rc-info-lenses-box:visible').length > 0) { return false }\n return (prodName && cartItemsNames.indexOf(prodName) > -1 && jQuery('#D_Pdp_Prod_AddPrescription:visible').length > 0) || null;\n})();","trigger":"pageload"},{"name":"cart_set","polling":"none","persist":"visit","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"tracked_cart_images","polling":"all","persist":"visit","page_types":[],"testmode":true,"default":"false","code":"(function(){\n var $cartItems = jQuery('.rb-sidebar-content__item-left-column img:visible'),\n \titems_in_cart = Number(jQuery('.rb-badge').eq(1).text().replace(/[^0-9.]/g, '')) || Number(jQuery('.odr-title').eq(1).text().replace(/[^0-9.]/g, '')) || Number(jQuery('.cart-qty').text().replace(/[^0-9.]/g, '')),\n \timages;\n\n if ($cartItems.length > 0) {\n images = [];\n $cartItems.each(function(ind, img){\n images.push(jQuery(img).attr('src'));\n });\n return images.join(' ');\n } else if (jQuery('.empty-cart-header:visible').length > 0 || !items_in_cart) {\n return false;\n } else {\n return null;\n }\n})();","trigger":"pageload"},{"name":"prev_viewed_image","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"item_id","polling":"vars","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"window.location.href.indexOf('#') > -1 ? window.location.href.split('#').shift().split('/').pop() : window.location.href.split('?').shift().split('/').pop();","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"atc_mask_clicked","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":1,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"bxid":"espemailid"},"cus":"","miw_exclude":"","enabled":1},"etjson":null,"osre":true,"osru":"osr.bounceexchange.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":1,"spatm":0,"preinit_cjs":"","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"coupons.bounceexchange.com","dfpcms":0,"sms":{"optm":"","eventSharing":false,"shqId":"","enabled":0},"pde":false,"fme":false,"fmx":"","uid2":false,"sdk":{"android":{"enabled":false,"enabledVersions":[],"eventModifications":null},"ios":{"enabled":false,"enabledVersions":[],"eventModifications":null}},"onsite":{"enabled":1},"ads":{"enabled":0},"pubs":{"enabled":0},"websdk":{"enabled":0,"devMode":0},"ga4_property_id":"","ga4_measurement_id":"","tag_state_domain":"api.bounceexchange.com"} ; bouncex.tag = 'tag3'; bouncex.$ = window.jQuery; bouncex.env = 'production'; bouncex.restrictedTlds = {"casl":{"ca":1},"gdpr":{"ad":1,"al":1,"at":1,"ax":1,"ba":1,"be":1,"bg":1,"by":1,"xn--90ais":1,"ch":1,"cy":1,"cz":1,"de":1,"dk":1,"ee":1,"es":1,"eu":1,"fi":1,"fo":1,"fr":1,"uk":1,"gb":1,"gg":1,"gi":1,"gr":1,"hr":1,"hu":1,"ie":1,"im":1,"is":1,"it":1,"je":1,"li":1,"lt":1,"lu":1,"lv":1,"mc":1,"md":1,"me":1,"mk":1,"xn--d1al":1,"mt":1,"nl":1,"no":1,"pl":1,"pt":1,"ro":1,"rs":1,"xn--90a3ac":1,"ru":1,"su":1,"xn--p1ai":1,"se":1,"si":1,"sj":1,"sk":1,"sm":1,"ua":1,"xn--j1amh":1,"va":1,"tr":1}}; bouncex.client = { supportsBrotli: 1 }; bouncex.assets = {"ads":"5de2fc2e3ea08c50e42d129f0eabf3b3","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"75060a85c1a4aebcc6f779b9e84db722","onsite":"abbdf7a49be9b52b097917b7b527b262","sms":"e39203556bab2366e56296ce42e974a7","websdk":"483170aad0127f060eef9a1ad6831b1e"}; 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_6e52ef65505a4667ed45c7b026be408f.br.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); bouncex.initializeTag = function() {}; }; runtime.onload = bouncex.initializeTag; document.body.appendChild(runtime); } } if (document.readyState === "loading") { document.addEventListener("DOMContentLoaded", bxBootstrap); } else { bxBootstrap(); }})();