(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":6661,"name":"Ray-Ban BR","cookie_name":"bounceClientVisit6661","domain":"ray-ban.combrazil","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"/* enable.feature.REDACTED_FIELD_FOR_OUTSIDE_THE_US */","force_https":false,"waypoints":false,"content_width":900,"gai":"","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":0,"gmp":0,"whitelist_check":0},"burls":[],"ple":false,"fbe":true,"ffs":"","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"var CLEAN_URL = bouncex.utils.url.allowParams();\n\n// ---- HELPERS ---- //\n\nfunction isValidDomain() {\n return CLEAN_URL.indexOf('https://www.ray-ban.com') > -1 && jQuery('html').attr('lang').indexOf('pt-BR') > -1;\n}\n\nfunction isValidForTracking() {\n return CLEAN_URL.indexOf('/gift-cards') > -1 && CLEAN_URL.indexOf('/usa') > -1;\n}\n\nfunction setVarAndCookie(varName, value) {\n bouncex.setVar(varName, value);\n bouncex.setBounceCookie();\n}\n\nfunction getIdFromUrl(url) {\n return url.split('/').pop();\n}\n\nfunction getIdFromImgUrl(url) {\n url = url ? bouncex.utils.url.allowParams('', url) : '';\n return url.split('/').pop().split('_')[0];\n}\n\n// ---- ITEM META DATA ---- //\n\nfunction getItemCopy() {\n return jQuery('.rb-pdp-title').first().text().trim() || jQuery('.fc-product-name').first().text().trim() || jQuery('.fc-mobile-model-name').first().text().trim() || jQuery('h1.rb-product-name').first().text().trim();\n}\n\nfunction getItemCategory() {\n if (isCustomItem()) {\n return 'custom';\n }\n return jQuery('.rb-breadcrumb.rb-child').eq(-2).first().text() || jQuery('#productTypeKeywordVal').val() || jQuery('.category-name').first().text() || 'Global';\n}\n\nfunction getItemImage() {\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-pdp-page .rb-product-images picture 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 itemInStock() {\n return !jQuery('.rb-pdp-sticky-bar-mobile__not-available').length || jQuery('button[data-element-id=\"X_Pdp_Stickybar_AddCart\"]').first().text().indexOf('ADD TO BAG') > -1;\n}\n\nfunction getItem() {\n var url = window.location.href.split('#').shift().split('?').shift();\n return {\n id: getIdFromUrl(url),\n copy: getItemCopy(),\n category: getItemCategory(),\n url: url,\n imageurl: getItemImage(),\n instock: itemInStock(),\n };\n}\n\nfunction viewItem(itemId) {\n var groupId,\n lastItemId;\n if (lastItemId !== itemId) {\n bouncex.et.onTrue(function () {\n groupId = bouncex.utils.getNestedProp('utag_data.Products[' + itemId + '].Sku');\n return groupId;\n }, function () {\n lastItemId = itemId;\n bouncex.push(['view item', {\n 'item:id': itemId\n }]);\n \n if (jQuery('.rb-colours-list button').length == 1 || jQuery('.rb-colours-list button.rb-colour-variant--selected').length > 0) {\n bouncex.push([\n 'select_sku',\n {\n 'item:id': itemId,\n 'item:itemgroupid': groupId,\n 'item:feedid': itemId\n }\n ]);\n } else {\n // jQuery('.rb-colours-list button:not(.rb-colour-variant--selected)').off('click.bx').on('click.bx', function () {\n // var regex = /\\/(\\d+)__/;\n // var match = jQuery(this).find('img').attr('src').match(regex);\n // var extractedString = match && match[1];\n \n // bouncex.push([\n // 'select_sku',\n // {\n // 'item:id': extractedString,\n // 'item:itemgroupid': groupId,\n // 'item:feedid': extractedString\n // }\n // ]);\n // });\n }\n }, 5);\n }\n}\n\nfunction fireItemEvents(item) {\n if (!isCustomItem() || isCustomItem() && isValidCustomImageFromMap(item.id, item.imageurl)) {\n bouncex.push(['item', item]);\n }\n}\n\nfunction isCustomItem() {\n return CLEAN_URL.indexOf('/customize') > -1;\n}\n\nfunction isValidCustomImageFromMap(itemId, imageUrl) {\n var customItemImageMap = {\n 'rb-2140-original-wayfarer-sunglasses': '001166010022100011100100000000200100000000100000000000',\n 'rb-3447-round-metal-sunglasses': '0001281400020011121110001111111110002100111110110200100000000000110000000000001',\n 'rb-2132-new-wayfarer-sunglasses': '000111670273110002000200100275100000000100000000000',\n 'rb-3016-clubmaster-sunglasses': '031000010200111110011200111101111111110351080000111490800000000000100000000001101',\n 'rb-3025-aviator-large-metal-sunglasses': '1090014610100006431001001111100111111111002010011111000000000001000000000001101',\n 'rb-3647N-round-double-bridge-sunglasses': '00019290000600020100111110150060000101111100111111111000000000000100000000000111',\n 'rb-3548N-hexagonal-sunglasses': '0152900004000000111111111002001011111013040000000010000000000110'\n },\n recipe = customItemImageMap[itemId],\n recipeParam = bouncex.utils.url.getParam('recipe', imageUrl),\n decodedParam = recipeParam.replace(/[^\\d.-]|-/g, '');\n\n return decodedParam.indexOf(recipe) > -1;\n}\n\n// ---- CATEGORY META DATA ---- //\n\nfunction getCategoryPageTitle() {\n return jQuery('.rb-page-title').first().text() || bouncex.utils.getNestedProp('boxes_config.pageName') || jQuery('.rb-plp-header__title').text().trim();\n}\n\nfunction getCategoryIds() {\n var selectors = '.rb-plp-product-tile__container, .rbBox.striked a, .rb-products.grid a';\n\n return jQuery(selectors).map(function () {\n var url = jQuery(this).attr('href') || '',\n itemId = getIdFromUrl(url);\n\n if (itemId) {\n return itemId;\n }\n\n }).toArray().join(',');\n}\n\nfunction getCategoryObj() {\n return {\n 'page:title': getCategoryPageTitle(),\n 'page:url': CLEAN_URL,\n 'items:ids': getCategoryIds()\n };\n}\n\nfunction getItemDetails() {\n var len = bouncex.utils.getNestedProp('dataLayer', []).length,\n details;\n\n for (let i = len - 1; i > -1; i--) {\n // eslint-disable-next-line no-undef\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\n\n// ---- CART TRACKING ---- //\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 = CLEAN_URL + '?recipeId=' + recipeId;\n\n bouncex.push(['custom add',\n {\n 'item:id': bouncex.vars.item_id,\n 'item:customurl': url\n },\n ]);\n }\n\n bouncex.push(['add to cart', { 'item:id': bouncex.vars.item_id }]);\n\n var currItem = {\n id: bouncex.vars.item_id,\n img: window.location.protocol + jQuery('.fc-focused-image-preloader').attr('src'),\n url: encodeURI(CLEAN_URL)\n };\n addItemsToOSR(currItem);\n setVarAndCookie('cart_set', true);\n }\n });\n}\n\nfunction addItemsToOSR(currItem) {\n if (!currItem) {\n return;\n }\n var cart_items = JSON.parse(bouncex.vars.osr_items) || [];\n\n // Check if currItem.id is not present in cart_items\n var isItemAlreadyInCart = false;\n for (var i = 0; i < cart_items.length; i++) {\n if (cart_items[i].id === currItem.id) {\n isItemAlreadyInCart = true;\n break;\n }\n }\n\n if (!isItemAlreadyInCart) {\n // Add currItem to cart_items\n cart_items.push(currItem);\n }\n\n setVarAndCookie('osr_items', JSON.stringify(cart_items));\n}\n\nfunction addToCart() {\n if (isCustomItem()) {\n trackCustomCart();\n return;\n }\n\n bouncex.et.onVisible('#continueToReviewButton.loading,.rb-sidebar-content__top-section:contains(\"ADDED TO BAG\"), .rb-minicart-container:contains(\"ADDED TO BAG\"), .rb-minicart-content__title .common__icon--circle-check', function () {\n var details = getItemDetails() || {},\n itemId = bouncex.vars.item_id,\n itemImg = jQuery('.rb-minicart-item__image img,[class*=\"productImageContent__productImage\"]').attr('src'),\n replenItem = {\n catalogId: jQuery('#catalogId').val(),\n storeId: jQuery('#storeId').val(),\n langId: jQuery('#langId').val(),\n catEntryId: details.products_moco || jQuery('#catEntryId').val(),\n quantity: 1,\n };\n if (!itemId || !replenItem.catalogId || !replenItem.storeId || !replenItem.langId || !replenItem.catEntryId) {\n return;\n }\n bouncex.push([\n 'add to cart',\n {\n 'item:id': itemId,\n 'cart:item': JSON.stringify(replenItem),\n },\n ]);\n\n var currItem = {\n id: itemId,\n img: itemImg,\n url: encodeURI(CLEAN_URL)\n };\n if (itemImg) {\n addItemsToOSR(currItem);\n }\n setVarAndCookie('cart_set', true);\n });\n}\n\nfunction emptyCart() {\n if (bouncex.vars.cart_set && bouncex.vars.items_in_cart === 0) {\n bouncex.push(['empty_cart']);\n setVarAndCookie('cart_set', false);\n }\n}\n\nfunction replenish(cart) {\n var replenishmentUrl = 'https://www.ray-ban.com/AjaxOrderItemAdd',\n $deferreds = [];\n\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 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 replenComplete() {\n window.location.href = window.location.origin + window.location.pathname + '?bx_replen=true';\n}\n\n/** ***************************** LoggedIn User ********************************/\n\nfunction trackLoggedInUser() {\n if (bouncex.vars.logged_in && !bouncex.vars.logged_in_identified) {\n var qString,\n qStrObj,\n email;\n\n\n if (CLEAN_URL.indexOf('/MyDetailsView') > -1) {\n email = jQuery('#email').val();\n } else if (bouncex.website.pts === 'cart') {\n qString = jQuery('#delivery_information_form_add').attr('action');\n qStrObj = bouncex.utils.url.queryStringToObject(qString);\n email = qStrObj.email1;\n }\n\n if (bouncex.utils.validate.email(email)) {\n fireLoggedInUser(email);\n }\n }\n}\n\nfunction fireLoggedInUser(email) {\n bouncex.push([\n 'user',\n {\n 'email': email,\n 'source': 'LoggedIn'\n }\n ]);\n\n setVarAndCookie('logged_in_identified', true);\n}\n\n/** **************************** INITIALIZE EVENTS *****************************/\n\nfunction isValidCatObj(catObj) {\n return (\n catObj['items:ids']\n && catObj['page:url']\n && catObj['page:title']\n );\n}\n\nfunction initializeItemEvents() {\n var item;\n\n bouncex.et.onTrue(\n function () {\n item = getItem();\n return !!item.id &&\n !!item.copy &&\n !!item.category &&\n !!item.url &&\n !!item.imageurl;\n },\n function () {\n fireItemEvents(item);\n viewItem(item.id);\n },\n 20\n );\n\n // bouncex.et.onVarChange('item_id', function (oldVal) {\n // if (!oldVal) {\n // initItemChangeListener(item.id);\n // }\n // });\n}\n\nfunction initItemChangeListener(prevId) {\n bouncex.setInterval2(function () {\n var newId = getIdFromUrl(bouncex.utils.url.allowParams());\n if (newId && newId !== prevId) {\n prevId = newId;\n viewItem(prevId);\n }\n }, 1000);\n}\n\nfunction initializeCategoryEvents() {\n var categoryObj;\n if (bouncex.website.pts === 'category') {\n bouncex.et.onTrue(\n function () {\n categoryObj = getCategoryObj();\n return isValidCatObj(categoryObj);\n },\n function () {\n bouncex.push(['view category', categoryObj]);\n\n }\n );\n }\n}\n\nfunction initializeOSRCartEvents() {\n var cart_items = [];\n\n jQuery('.cart-item-container').each(function () {\n var url = jQuery(this).find('a').attr('href');\n\n if (url != '#') {\n var id = getIdFromUrl(url);\n var img = jQuery(this).find('img').attr('src');\n url = url.indexOf(window.location.origin) > -1 ? url : window.location.origin + url;\n\n if (id && img) {\n var currItem = {\n id: id,\n img: img,\n url: encodeURI(url)\n };\n\n cart_items.push(currItem)\n }\n }\n })\n\n setVarAndCookie('osr_items', JSON.stringify(cart_items))\n}\n\nfunction initializeCartEvents() {\n bouncex.et.cart.init({\n cartCountVariable: 'items_in_cart',\n storeValues: [],\n replenish: replenish,\n replenishmentType: 'ajax'\n });\n\n addToCart();\n // bouncex.et.onVarChange('items_in_cart', emptyCart);\n emptyCart();\n}\n\nfunction init() {\n if (isValidDomain()) {\n trackLoggedInUser();\n initializeCartEvents();\n\n if (!isValidForTracking) { return; }\n\n switch (bouncex.website.pts) {\n case 'product':\n initializeItemEvents();\n break;\n case 'category':\n initializeCategoryEvents();\n break;\n case 'cart':\n initializeOSRCartEvents();\n break;\n default:\n break;\n }\n }\n}\n\ninit();\n","dge":true,"bxidLoadFirst":false,"pie":true,"cme":true,"gbi_enabled":0,"bpush":false,"pt":{"cart":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/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;"}]]},"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":{"blank_site_element":""},"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').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, '')) || Number(jQuery('.number-of-products').text().trim());\n})();","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').length > 0 || jQuery('.rb-footer__mail__title__ok').length > 0 || null;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"logged_in_identified","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":"cookie_modal_present","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"null;","trigger":"pageload"},{"name":"page_type","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"bouncex.website.pts;","trigger":"pageload"},{"name":"attentive_visible","polling":"vars","persist":"no","page_types":[],"testmode":true,"default":"false","code":"jQuery('#attentive_overlay').length > 0;","trigger":"pageload"},{"name":"items_in_cart","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"(function(){\n if(window.location.href.indexOf('ShopCartDisplayView') > -1 && !bouncex.state.mobile){\n return Number(jQuery('#itemTotal').text()) || 0;\n } else if (jQuery('.all-items-counter').length > 0) {\n return Number(jQuery('.all-items-counter').text().match(/\\((\\d+)\\)/)[1]) || null;\n }\n \n return jQuery('.number-of-products').length > 0 ? Number(jQuery('.number-of-products').text().trim()) : null;\n})();","trigger":"pageload"},{"name":"cart_total","polling":"all","persist":"visit","page_types":[],"testmode":false,"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-summary__recap-total').text().replace(/[^0-9.]/g, '')) || null;\n})();","trigger":""},{"name":"product_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'product';","trigger":""},{"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 && utag_data.Page_NameFull.indexOf('RB_US:Remix:') > -1)){\n return true;\n }\n }\n})();","trigger":""},{"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":""},{"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":""},{"name":"ibx_test","polling":"none","persist":"visit","page_types":[],"testmode":true,"default":"false","code":"location.href.indexOf('ibx_test')>=0 || null;","trigger":""},{"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":""},{"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":""},{"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":""},{"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":""},{"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":""},{"name":"category_page","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"bouncex.website.pts === 'category';","trigger":""},{"name":"products_tracked","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"0","code":"localStorage.getItem('bxProdHist') ? JSON.parse(localStorage.getItem('bxProdHist')).length : 0;\n","trigger":""},{"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":""},{"name":"navbar_open","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"jQuery('.wcs-drop_panel:visible').length > 0;","trigger":""},{"name":"side_minicart_open","polling":"all","persist":"no","page_types":[],"testmode":true,"default":"false","code":"jQuery('.wcs-right-panel:visible').length > 0;","trigger":""},{"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":""},{"name":"virtual_model_saved","polling":"none","persist":"visit","page_types":[],"testmode":true,"default":"false","code":"bouncex.utils.cookies.read('vtorenderstatus') !== null ? true : null;","trigger":""},{"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":""},{"name":"using_edge_browser","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"bouncex.browser.edge","trigger":""},{"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":""},{"name":"product_name","polling":"all","persist":"no","page_types":["product"],"testmode":false,"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":false,"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":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"cart_coupon_copied","polling":"none","persist":"visit","page_types":[],"testmode":false,"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":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"prod_price","polling":"all","persist":"no","page_types":["product"],"testmode":false,"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":"pageload"},{"name":"tracked_cart_images","polling":"all","persist":"visit","page_types":[],"testmode":false,"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":"all","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":"atc_mask_clicked","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"pdp_exclusions","polling":"none","persist":"no","page_types":["product"],"testmode":true,"default":"false","code":"(function(){\n var url = bouncex.calling_url;\n var excludedCodesModel = [\"RB3025\",\"0RBR0101S\",\"RB3025K\",\"RB2198\",\"RBR0501S\",\"0RBR0102S\",\"RB3016\",\"RB4397\",\"RB3548NM\",\"RB2447NM\",\"RB2448MF\",\"RB8351M\",\"RB4310M\",\"RB8305M\",\"RB4309M\",\"gift-cards\",\"RB2298\",\"RB3548N\",\"RB3957\",\"RB3636\",\"RJ9052S\",\"RJ9069S\",\"RB4395\",\"RB4395F\",\"RB0316S\",\"RX0316V\",\"RB0840S\",\"RB0840SF\",\"RX0840V\",\"RB3025K\",\"RX7216\",\"RB2132\",\"RJ9052S\",\"RJ9052SF\",\"RB3029\",\"RB0880S\",\"RB2132\",\"RB2132M\",\"RB2140\",\"RB2202M\",\"RB2447MF\",\"RB2447NM\",\"RB2448MF\",\"RB2448NM\",\"RB3016\",\"RX3447V\",\"RB3460M\",\"RB3548NM\",\"RX3578VM\",\"RB3617M\",\"RB3647M\",\"RB3659M\",\"RB3662M\",\"RB3673M\",\"RB3674M\",\"RB3685M\",\"RB3696M\",\"RB3698M\",\"RX3698VM\",\"RB3703M\",\"RB3715M\",\"RB3748M\",\"RB3847M\",\"RB4125M\",\"RB4165\",\"RB4171\",\"RB4179M\",\"RB4195M\",\"RB4228M\",\"RB4296M\",\"RB4297M\",\"RB4302M\",\"RB4308M\",\"RB4309M\",\"RB4310M\",\"RB4322M\",\"RB4329M\",\"RB4343M\",\"RB4363M\",\"RB4364M\",\"RB4365M\",\"RB4366M\",\"RB4367M\",\"RB4369M\",\"RB4370M\",\"RB4394M\",\"RB4393M\",\"RB4404M\",\"RB4405M\",\"RX5404M\",\"RX5405M\",\"RX6355M\",\"RX6448M\",\"RX6467M\",\"RX6473M\",\"RX6480M\",\"RX6484M\",\"RX6492M\",\"RX6496\",\"RX6507M\",\"0RX7144M\",\"0RX7151M\",\"RX7180M\",\"RX7181M\",\"RX7192M\",\"RX7205M\",\"RX7213M\",\"RX7221M\",\"RX7222M\",\"RB8125M\",\"RB8305M\",\"RB8313M\",\"RB8324M\",\"RX8327VM\",\"RB8327M\",\"RB8331M\",\"RB8351M\",\"RB8356M\",\"RB8359M\",\"RB8360M\",\"RB8361M\",\"RB8368M\",\"RB8395M\",\"RX8416M\",\"RX8901M\",\"RX8907M\",\"RB3475Q\",\"RB3447\",\"RB4195M\",\"RB3602M\",\"RB4195MF\",\"RB8125M\",\"RB3601M\",\"RB3602M\",\"RB4195MF\",\"RB4302M\",\"RB8321M\",\"RB3601M\",\"RB3698M\",\"RB3674M\",\"RB8395M\",\"RB4195M\",\"RB8313M\",\"RB4309M\",\"RB4195M\",\"RB4308M\",\"RB3138\",\"RB2186\",\"RB8395M\",\"RJ9066S\",\"0RBR0502S\",\"RB4398\",\"RX7215\",\"RB4398F\",\"RX7215F\",\"RX7217\",\"RX7217F\",\"RX6496\",\"RX6496L\",\"RX0298V\",\"RX0298VF\",\"RB2398\",\"RB2398F\",\"RX5598\",\"RX5598F\",\"RB2186\",\"RB0499P\",\"RB8327M\",\"RB3556\",\"RB2140CO\",\"RB0298S\",\"RB0298SF\",\"RW4009\",\"RW4006\"];\n return !excludedCodesModel.every(function(string){\n return !url.includes(string);\n });\n})();","trigger":"pageload"},{"name":"osr_items","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"assets.bounceexchange.com","bau":"api.bounceexchange.com","beu":"events.bouncex.net","ibx":{"tjs":"","cjs":"","miw":0,"mibcx":1,"te":1,"cart_rep":{"get":"","set":""},"ulpj":{"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":true,"fmc":["BR"],"fme":true,"fmx":"","uid2":false,"sdk":{"android":{"enabled":false,"enabledVersions":[],"eventModifications":null},"ios":{"enabled":false,"enabledVersions":[],"eventModifications":null}},"onsite":{"enabled":1},"ads":{"enabled":0},"pubs":{"enabled":0},"websdk":{"enabled":0,"devMode":0},"ga4_property_id":"","ga4_measurement_id":"","tag_state_domain":"api.bounceexchange.com"} ; bouncex.tag = 'tag3'; bouncex.$ = window.jQuery; bouncex.env = 'production'; bouncex.restrictedTlds = {"casl":{"ca":1},"gdpr":{"ad":1,"al":1,"at":1,"ax":1,"ba":1,"be":1,"bg":1,"by":1,"xn--90ais":1,"ch":1,"cy":1,"cz":1,"de":1,"dk":1,"ee":1,"es":1,"eu":1,"fi":1,"fo":1,"fr":1,"uk":1,"gb":1,"gg":1,"gi":1,"gr":1,"hr":1,"hu":1,"ie":1,"im":1,"is":1,"it":1,"je":1,"li":1,"lt":1,"lu":1,"lv":1,"mc":1,"md":1,"me":1,"mk":1,"xn--d1al":1,"mt":1,"nl":1,"no":1,"pl":1,"pt":1,"ro":1,"rs":1,"xn--90a3ac":1,"ru":1,"su":1,"xn--p1ai":1,"se":1,"si":1,"sj":1,"sk":1,"sm":1,"ua":1,"xn--j1amh":1,"va":1,"tr":1}}; bouncex.client = { supportsBrotli: 1 }; bouncex.assets = {"ads":"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); 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(); }})();