body, html { overflow: initial !important; overscroll-behavior: initial !important; } .store-front { height: auto !important; } #loaderAlign{ height: 100vh; display: flex; justify-content: center; align-items: center; } .loader { border: 16px solid #f3f3f3; border-radius: 50%; border-top: 16px solid #3498db; width: 120px; height: 120px; -webkit-animation: spin 2s linear infinite; /* Safari */ animation: spin 2s linear infinite; } /* Safari */ @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } var asbFSPluginVersion = “20210901-0805″; var pageUrl = location.href; var domainUrl = document.domain; var pageQuery = null; var iframeHasSameDomainUrl = true; var categoryArray = [ {‘name’ : ‘fanwear’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘lacrosse’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘baseball’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘basketball’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘soccer’, ‘discount’ : 5, ‘addlLeadTime’ : 2, ‘moq’:6, ‘moqPrice’:60}, {‘name’ : ‘football’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘hockey’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘fleece’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘track’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘training’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60}, {‘name’ : ‘softball’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘polo’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘5-day-turbo’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘volleyball’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘babe-ruth-turbo’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘accessories’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘compression’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 }, {‘name’ : ‘semi-sublimated’, ‘discount’ : 5, ‘addlLeadTime’ : 2,’moq’:6, ‘moqPrice’:60 } ]; var categoryShareMapper = { ‘fanwear’ : ‘fanwear’, ‘lacrosse’ : ‘lacrosse’, ‘baseball’ : ‘baseball’, ‘basketball’ : ‘basketball’, ‘soccer’ : ‘soccer’, ‘football’ : ‘football’, ‘hockey’ : ‘hockey’, ‘fleece’ : ‘fleece’, ‘outerwear’ : ‘fleece’, ‘track’ : ‘track’, ‘training’ : ‘training’, ‘softball’ : ‘softball’, ‘polos’ : ‘polo’, ‘turbo’ : ‘5-day-turbo’, ‘volleyball’ : ‘volleyball’, ‘babe ruth turbo’ : ‘babe-ruth-turbo’, ‘masks, gaiters,’ : ‘accessories’, ‘compression’ : ‘compression’, ‘semi-sublimated’ : ‘semi-sublimated’ }; window.onmessage = (e) => { var data = e.data.toString(); if(e.data.domainUrl){ iframeHasSameDomainUrl = false; pageUrl = e.data.pageUrl; pageQuery = e.data.pageQuery; var domain = e.data.domainUrl; domainUrl = domain.replace(/^https?:\/\//,”); setIframeSrc(); var iframeSrc = getIframeSrc(); } if (data.indexOf(‘asgIframeHeight’) > -1) { var iframeHeight = e.data.split(“:”); document.getElementById(‘iframediv’).style.height = iframeHeight[1] + ‘px’; } if (data.indexOf(‘reLoadIframe’) > -1) { //document.getElementById(“showSummary”).style.display = “none”; setIframeSrc(); } if (data.indexOf(‘scrollToTop’) > -1) { window.scrollTo({ top: 0, left: 0, behavior: ‘smooth’ }); } if (data.indexOf(‘asgPageName’) > -1) { var pageName = e.data.split(“:”); if (pageName[1] == ‘configurator’) document.getElementById(“myIframe”).setAttribute(“scrolling”, “yes”); else { document.getElementById(“myIframe”).setAttribute(“scrolling”, “no”); } } }; document.querySelector(‘#myIframe’).addEventListener(“load”, e => { sendParentHeightToChild(); }) function sendParentHeightToChild() { var child = document.getElementById(“myIframe”).contentWindow; var elemTop = document.getElementById(“iframediv”).offsetTop; var windowHeight = document.documentElement.clientHeight || document.body.clientHeight || window.innerHeight; var calcHeight = windowHeight – elemTop; if (child.postMessage) { child.postMessage(“parentHeight:” + calcHeight, ‘*’); child.postMessage(“parentDomain:” + domainUrl, ‘*’); } } function sendDataToChild() { var child = document.getElementById(“myIframe”).contentWindow; if (child.postMessage) { child.postMessage(“loadNextPageIframe”, ‘*’); } } function getFullUrl (){ var searchLocation = false; if(window.location){ if(window.location.search){ if(window.location.search.substr(1)){ searchLocation = true; } } } if(searchLocation){ return window.location.search.substr(1); } else { var baseUrl = window.document.baseURI; var baseUrlData = baseUrl.split(“?”); if(baseUrlData[1] != undefined){ return baseUrlData[1]; } return “”; } } function getCurrentUrlParams () { if(iframeHasSameDomainUrl === false){ return pageQuery; } else { var operator = ‘&’; var getUrl = getFullUrl(); var queryString = (function(params) { if (params === “”) return {}; var obj = {}; for (var i = 0; i ((x.name).toLowerCase()).trim() === categoryName ); var categoryObj = categoryArray[Index]; var url = currentIframeUrl.split(‘?’); var urlArray = url[0]; var paramsArray = url[1]; var urlHrefArray = urlArray.split(‘/’); var urlHrefReplaceEntity = urlHrefArray[urlHrefArray.length -1]; url[0] = urlArray.replace(urlHrefReplaceEntity, replaceText); var newUrl = url.join(‘?’); var href = new URL(newUrl); var categoryObjLength = Object.keys(categoryObj).length; if(categoryObjLength) { Object.keys(categoryObj).forEach(function(key){ href.searchParams.delete(key); href.searchParams.set(key, categoryObj[key]); }) } if(isConfiguratorPage()){ Object.keys(queryString).forEach(function(key){ href.searchParams.delete(key); href.searchParams.set(key, queryString[key]); }) } return href.toString(); } function isScrolledIntoView() { var elem = document.getElementById(“iframediv”); var docViewTop = (document.documentElement && document.documentElement.scrollTop) || document.body.scrollTop; var windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight; var docViewBottom = docViewTop + windowHeight; var elemTop = elem.offsetTop; var elemBottom = elemTop + elem.offsetHeight; return ((elemBottom <= docViewBottom)); } if (typeof $ !== "undefined"){ if($(document).ready) {$(document).ready(pageLoad, false);} else {document.addEventListener('load', pageLoad, false);} }else{ if (window.attachEvent) {window.attachEvent('onload', pageLoad);} else if (window.addEventListener) {window.addEventListener('load', pageLoad, false);} else {document.addEventListener('load', pageLoad, false);} } function pageLoad() { setIframeSrc(); window.onscroll = function() { if (isScrolledIntoView()) { sendDataToChild(); } }; }