(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":5604,"name":"Original Penguin","cookie_name":"bounceClientVisit5604","domain":"originalpenguin.com","ct":"fp_local_storage","ally":0,"ei":0,"tcjs":"","cjs":"/* --------------------------- INITIALIZE SHOPIFY DYNAMIC COUPON AUTOAPPLY -------------------------- */\r\nfunction initShopifyCouponAutoApply() {\r\n var isShopifyHostedTheme = !!bouncex.utils.getNestedProp('Shopify.theme.id');\r\n if (isShopifyHostedTheme) {\r\n bouncex.off(bouncex.window, 'bxCouponFetched.bx-cpn-auto-apply');\r\n bouncex.on(bouncex.window, 'bxCouponFetched.bx-cpn-auto-apply', function(event, params) {\r\n if (params.code !== bouncex.vars.coupon_auto_applied) {\r\n ajaxShopifyAutoApply(params.code);\r\n }\r\n });\r\n }\r\n}\r\nfunction ajaxShopifyAutoApply(discount) {\r\n var updateJSON = JSON.stringify({\r\n 'discounts': [discount],\r\n }),\r\n errorMessage = 'event tracking: error with shopify coupon auto-apply',\r\n discountUrl = '/discount/'+discount,\r\n updateUrl = '/cart/update.js';\r\n jQuery.ajax({\r\n url: discountUrl,\r\n method: 'GET',\r\n })\r\n .then(function(){\r\n jQuery.ajax({\r\n url: updateUrl,\r\n method: 'POST',\r\n contentType: 'application/json',\r\n dataType: 'text',\r\n data: updateJSON,\r\n })\r\n .then(function(){ updateCouponVar(discount); }, function(){ bouncex.log(errorMessage + ' POST ' + updateUrl); });\r\n }, function(){ bouncex.log(errorMessage + 'GET '+ discountUrl); });\r\n}\r\nfunction updateCouponVar(discount) {\r\n bouncex.setVar('coupon_auto_applied', discount);\r\n}\r\ninitShopifyCouponAutoApply();","force_https":false,"waypoints":false,"content_width":900,"gai":"UA-791922-2","swids":"","sd":0,"ljq":"auto","campaign_id":0,"is_preview":false,"aco":{"first_party_limit":"3500","local_storage":"1"},"cmp":{"gdpr":0,"gmp":0,"whitelist_check":0},"burls":[],"ple":false,"fbe":true,"ffs":"","mas":2,"map":1,"gar":true,"ete":1,"ettm":false,"etjs":"/* ---------------------------- SHARED VARIABLES ---------------------------- */\nvar CART_COOKIE_KEY = 'cart',\n CLEAN_URL = bouncex.utils.url.allowParams();\n\n/* ------------------------------ ITEM TRACKING ----------------------------- */\n\n// ensures we are only firing ids with 13 digits\nfunction isValidItemId(id) {\n return /^\\d{13}$/g.test(id);\n}\n\nfunction getItemRating() {\n var rating = Number(jQuery('.yotpo-bottom-line-score:first').text().trim() || '') || 0;\n \n return rating && rating >= 4 ? rating : '';\n}\n\nfunction getItemReviews() {\n var rating = Number(jQuery('.yotpo-bottom-line-score:first').text().trim() || ''),\n reviews = jQuery('.yotpo-bottom-line-basic-text:first').text().trim().replace(/\\D/g,'') || 0;\n \n return rating && rating >= 4 ? reviews : '';\n}\n\nfunction getItem() {\n\tvar itemData = window.item\n || {};\n\n\treturn {\n\t\tid: itemData.ProductID,\n\t\tcopy: jQuery('.product-single__title').first().text().trim(),\n\t\tcategory: jQuery('.breadcrumb a').last().text().trim() || 'global',\n\t\turl: itemData.URL,\n\t\timageurl: itemData.ImageURL,\n\t\tinstock: bouncex.vars.in_stock,\n\t\trating: getItemRating(),\n\t\treviews: getItemReviews()\n\t};\n}\n\n\nfunction initializeItemEvents() {\n var item;\n\n bouncex.et.onTrue(\n function () {\n item = getItem();\n return itemLoaded(item);\n },\n function () {\n if (item.url.indexOf('gift-card') > -1) {\n return;\n }\n fireItemEvents(item);\n initializeATCClickTracking(item.id);\n // fireSelectSkuOnLoad(item.id);\n initializeSkuEvents(item.id);\n },\n 10\n );\n}\n\nfunction fireItemEvents(item) {\n bouncex.push(['item', item]);\n bouncex.push(['view item', {\n 'item:id': item.id,\n 'item:itemgroupid': item.id\n }]);\n}\n\nfunction itemLoaded(item) {\n return isValidItemId(item.id) &&\n !!item.copy &&\n !!item.category &&\n !!item.url &&\n !!item.imageurl;\n}\n\n/* ------------------------------ SKU TRACKING ------------------------------ */\n\n// function fireSelectSkuOnLoad(itemId) {\n // var skuId = bouncex.utils.url.getParam('variant'),\n // data = dataLayer,\n // len = dataLayer.length;\n\n// if (!skuId) {\n// for (i = len-1; i > 0; i--) {\n// var dpt = data[i];\n// if (dpt !== undefined && dpt.event !== undefined && dpt.event === \"dl_view_item\") {\n// skuId = dpt.ecommerce.detail.products[0].variant_id;\n// }\n// }\n// }\n\n// fireSelectSku(itemId, skuId)\n// }\n\nfunction initializeSkuEvents(itemId) {\n\n var skuId = window.PEIActiveProductVariantId;\n fireSelectSku(itemId, skuId);\n \n bouncex.et.onVarChange('prod_sku', function (oldVal, newVal) {\n fireSelectSku(itemId, newVal);\n });\n}\n\nfunction fireSelectSku(itemId, skuId) {\n bouncex.push(['select_sku', {\n 'item:id': itemId,\n 'item:itemgroupid': itemId,\n 'item:feedid': skuId\n }]);\n}\n\n/* ---------------------------- CATEGORY TRACKING --------------------------- */\n\nfunction getItemIdsCat() {\n var ids = [];\n\n jQuery('.boost-sd__product-item[data-product-id]').each(function (i, e) {\n var id = jQuery(e).attr('data-product-id');\n\n if (isValidItemId(id) && ids.indexOf(id) < 0) {\n ids.push(id);\n }\n });\n\n return ids.join(',');\n}\n\nfunction getCategoryObject() {\n return {\n 'page:url': bouncex.utils.url.allowParams(['q', 'name', 'query', 'products.size']),\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\n/* ------------------------------- CART EVENTS ------------------------------ */\nfunction fireAddToCart(itemId, replenItem) {\n var token;\n\n bouncex.et.onTrue(\n function () {\n token = bouncex.getBounceCookie(CART_COOKIE_KEY);\n return token;\n },\n function () {\n bouncex.push([\n 'add to cart',\n {\n 'item:id': itemId,\n 'cart:token': token\n }\n ]);\n\n if (bouncex.vars.cart) {\n return;\n }\n\n bouncex.setVar('cart', true);\n },\n 10\n );\n}\n\nfunction initializeATCClickTracking(itemId) {\n bouncex.et.on(bouncex.document, 'click.bxatc', function () {\n fireAddToCart(itemId);\n }, '.add-to-cart');\n}\n\nfunction emptyCart() {\n bouncex.et.onVarChange('cart_qty', function (oldVal, newVal) {\n if (bouncex.vars.cart && newVal === 0 && oldVal > 0) {\n bouncex.push(['empty_cart']);\n bouncex.setVar('cart', false);\n }\n });\n}\n\nfunction initializeCartEvents() {\n bouncex.et.cart.init({\n replenishmentType: 'cookie',\n replenish: function (cart) {\n bouncex.utils.cookies.create({\n name: CART_COOKIE_KEY,\n value: cart.token\n });\n replenComplete();\n }\n });\n\n function replenComplete() {\n window.location.href = CLEAN_URL + '?bx_replen=true';\n }\n\n emptyCart();\n}\n\n/* ------------------------------ USER TRACKING ----------------------------- */\n\nfunction initializeUserTracking() {\n if (!bouncex.vars.logged_in || !!bouncex.vars.logged_in_identified) {\n return;\n }\n\n var userEmail;\n\n bouncex.et.onTrue(\n function () {\n var data = dataLayer,\n len = dataLayer.length;\n for (i = len-1; i > 0; i--) {\n var dpt = data[i];\n if (dpt !== undefined && dpt.event !== undefined && dpt.event === \"dl_login\") {\n userEmail = dpt.user_properties.customer_email;\n }\n }\n \n return bouncex.utils.validate.email(userEmail);\n },\n function () {\n bouncex.push([\n 'user',\n {\n 'email': userEmail,\n 'source': 'LoggedIn'\n }\n ]);\n bouncex.setVar('logged_in_identified', true);\n },\n 5\n );\n}\n\n/* --------------------------- INITIALIZE TRACKING -------------------------- */\nfunction isValidDomain() {\n return CLEAN_URL.indexOf('www.originalpenguin.com') > -1;\n}\n\nfunction isEn() {\n return bouncex.html.attr('lang') === 'en';\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 setTimeout(function() {\n initializeItemEvents();\n }, 1500);\n break;\n default:\n break;\n }\n}\n\ninit();","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":"/cart"}]]},"category":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('ShopifyAnalytics.meta.page.pageType', '') === 'collection';"}]]},"checkout":{"testmode":false,"val":[[{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/checkouts/"}]]},"home":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"window.location.pathname === '/';"}]]},"product":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('ShopifyAnalytics.meta.page.pageType', '') === 'product';"}]]},"search":{"testmode":false,"val":[[{"activation":"js","prop":"","prop2":"","prop3":"","val":"bouncex.utils.getNestedProp('ShopifyAnalytics.meta.page.pageType', '') === 'searchresults';"},{"activation":"current_page_url","prop":"contains","prop2":"","prop3":"","val":"/search-results"}]]}},"els":{"blank_site_element":""},"vars":[{"name":"logged_in","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(function () {\n if (bouncex.website.pts === 'checkout') {\n return jQuery('.breadcrumb__item--current:contains(\"Information\")').length > 0 ? jQuery('.logged-in-customer-information:visible').length > 0 : null;\n }\n\n return !!bouncex.utils.getNestedProp('ShopifyAnalytics.meta.page.customerId');\n})();","trigger":""},{"name":"ever_logged_in","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"bouncex.vars.logged_in || null;","trigger":""},{"name":"cart_qty","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function () {\n var count = 0;\n if (bouncex.website.pts === 'checkout') {\n var visibleCart = jQuery('[aria-label=\"Shopping cart\"]:visible').eq(0);\n visibleCart.find(\n '[role=\"table\"] [role=\"rowgroup\"]:not(:first) [role=\"row\"]'\n ).each(function () {\n count +=\n Number(\n jQuery(this)\n .find('picture + div span')\n .eq(1)\n .text()\n .replace(/[^0-9]/g, '')\n ) || 0;\n });\n } else if (bouncex.website.pts === 'cart') {\n jQuery('.cart__item').each(function (i, el) {\n count += Number(jQuery(el).find('.js-qty__num').val()) || 0;\n });\n } else {\n if (jQuery('#CartDrawer.drawer--is-open').length === 0) {\n return null;\n }\n jQuery('.cart__item').each(function (i, el) {\n count += Number(jQuery(el).find('.js-qty__num').val()) || 0;\n });\n }\n return count;\n})();","trigger":""},{"name":"cart_value","polling":"all","persist":"visit","page_types":[],"testmode":false,"default":"0","code":"(function () {\n var total = 0;\n if (bouncex.website.pts === 'checkout') {\n return Number(jQuery('[role=\"table\"] [role=\"row\"]:last-child [role=\"cell\"] strong').text().split('$').at(-1).replace(/[^0-9.]/g, ''));\n } else if (bouncex.website.pts === 'cart') {\n jQuery('.cart__item').each(function (i, el) {\n var price = jQuery(el).find('.cart__price').text().replace(/[^0-9.]/g, '');\n total += Number(price) * (Number(jQuery(el).find('.js-qty__num').val()) || 0);\n });\n } else {\n if (jQuery('#CartDrawer.drawer--is-open').length === 0) {\n return null;\n }\n jQuery('.cart__item').each(function (i, el) {\n var price = jQuery(el).find('.cart__price').text().replace(/[^0-9.]/g, '');\n total += Number(price) * (Number(jQuery(el).find('.js-qty__num').val()) || 0);\n });\n }\n return total;\n})();","trigger":""},{"name":"submitted_onsite","polling":"none","persist":"permanent","page_types":[],"testmode":false,"default":"false","code":"window.location.pathname.indexOf('/pages/email-subscribe') > -1 && jQuery('#emailsignup-landing h2').text().indexOf('THANK YOU') > -1 || null;","trigger":""},{"name":"page_url","polling":"none","persist":"no","page_types":["category","search"],"testmode":true,"default":"false","code":"","trigger":""},{"name":"cart","polling":"none","persist":"permanent","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":false,"default":"false","code":"bouncex.website.pts;","trigger":"pageload"},{"name":"shop","polling":"none","persist":"no","page_types":[],"testmode":true,"default":"false","code":"window.location.href.indexOf('//shop.') > -1;","trigger":"pageload"},{"name":"prod_sku","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"window.PEIActiveProductVariantId;","trigger":"pageload"},{"name":"logged_in_identified","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"listrak_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#ltkpopup-container:visible').length > 0;","trigger":"pageload"},{"name":"modal_visible","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.mfp-wrap #size-chart').length > 0;","trigger":"pageload"},{"name":"item_id","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"(jQuery('.product-section-master:visible').data() || {}).sectionId;","trigger":"pageload"},{"name":"truevault_present","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.polaris-consent-widget:visible').length > 0;","trigger":"pageload"},{"name":"minicart_open","polling":"all","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('#CartDrawer.drawer--is-open').length > 0;","trigger":"pageload"},{"name":"coupon_auto_applied","polling":"none","persist":"visit","page_types":[],"testmode":false,"default":"false","code":"null;","trigger":"pageload"},{"name":"prod_size_sku","polling":"all","persist":"no","page_types":["product"],"testmode":false,"default":"false","code":"jQuery('.product-single__meta:visible .product-single__sku').text().match(/\\d+/)[0];","trigger":"pageload"},{"name":"in_stock","polling":"none","persist":"no","page_types":[],"testmode":false,"default":"false","code":"jQuery('.add-to-cart').length > 0;","trigger":"pageload"}],"dgu":"pixel.cdnwidget.com","dgp":false,"ba":{"enabled":0,"fbte":0},"biu":"wd.originalpenguin.com","bau":"wd.originalpenguin.com","beu":"wd.originalpenguin.com","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":"wd.originalpenguin.com/v1/osr/items","checkDfp":false,"gamNetwork":"","spa":0,"spatm":1,"preinit_cjs":"","crs":{"integrations":null,"pageCount":null},"mat":0,"math":0,"cpnu":"wd.originalpenguin.com","dfpcms":0,"sms":{"optm":"","eventSharing":false,"shqId":"","enabled":0},"pde":true,"fmc":["AW","AI","AG","AR","BS","BB","BZ","BM","BO","BQ","BR","CA","KY","CL","CO","CR","CU","CW","DM","DO","EC","SV","GF","GL","GD","GT","GP","HT","HN","JM","MQ","MX","MS","NI","PA","PY","PE","PR","PM","MF","BL","KN","LC","VC","SX","SR","TT","US","UM","UY","VE","VG","VI"],"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":"260353615","ga4_measurement_id":"G-E3YFW577ZZ","tag_state_domain":"wd.originalpenguin.com","tag_state_domain_enabled":true} ; 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":"ab32a6b5686be642d523d400d49e8c7e","creativesBaseStyles":"a53944a2","gpsAuction":"bbb80866120d17013073bb6d284cbd6b","inbox":"b205bbe35290429afd398e356288fd36","onsite":"1238d00d70e4de87443df9eb69ff1a61","sms":"e39203556bab2366e56296ce42e974a7","websdk":"ce4f7e1528b69b73de9be032afe17e84","website_campaigns_5604":"42b2ed2d739b8b9c28a8245d9b31943d"}; bouncex.push = function(pushData) { bouncex.pushedData.push(pushData); } var runtime = document.createElement('script'); runtime.setAttribute('src', '//wd.originalpenguin.com/assets/smart-tag/versioned/runtime_c81e76ee00d795b1eebf8d27949f8dc5.br.js'); runtime.setAttribute('async', 'async'); bouncex.initializeTag = function() { var script = document.createElement('script'); script.setAttribute('src', '//wd.originalpenguin.com/assets/smart-tag/versioned/main-v2_c29390f1ed380692d1d1af6e1712338d.br.js'); script.setAttribute('async', 'async'); document.body.appendChild(script); var deviceGraphScript = document.createElement('script'); deviceGraphScript.setAttribute('src', '//wd.originalpenguin.com/assets/smart-tag/versioned/cjs_min_c84323e2726f3e99b307ab7740c6434b.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(); }})();