(function(){
var deals=[
['Up to 40% off Adidas spikes','/cricket-equipment/footwear/g373.aspx'],
['New Balance CK4020F6 rubber shoes now $100','/product/new-balance-ck4020f6-rubber-shoes-(25/26)/crshnbck4020f625.aspx'],
['At least 10% off all cricket shoes','/cricket-equipment/footwear/g373.aspx'],
['35% off Kookaburra Diablo bats','/search.aspx?q=diablo+bat'],
['25% off all New Balance bats','/cricket-equipment/bats/g349.aspx?rsb=%2C0%7C1%7C0%7CNew%20Balance&rsc=%2C0%2C'],
['25% off Kookaburra Kashmir willow bats','/cricket-equipment/bats/kashmir/poplar-willow-bats/g351.aspx?rsb=%2C0%7C1%7C0%7CKookaburra&rsc=%2C0%2C'],
['At least 20% off all English willow bats','/cricket-equipment/bats/g349.aspx'],
['30% off GM Rival gloves & pads','/cricket-equipment/batting-protection/g357.aspx?sortby=2'],
['25% off all Kookaburra batting gloves','/cricket-equipment/batting-protection/batting-gloves/g363.aspx?rsb=%2C0%7C1%7C0%7CKookaburra&rsc=%2C0%2C'],
['At least 20% off all batting pads','/cricket-equipment/batting-protection/batting-pads/g370.aspx'],
['20% off Aero duffle bags & all wheelie bags','/cricket-equipment/luggage/wheelie-bags/g415.aspx']
];
var SALE_URL='/page/black-friday-sale.aspx';
/* hides itself automatically from Tue 1 Dec (NZDT) */
if(new Date().getTime() >= new Date('2026-12-01T00:00:00+13:00').getTime()) return;
document.documentElement.classList.add('ce-bf-live');
/* header red-to-black wipe: CSS starts the menu bar red; adding ce-hdr-black sweeps it to black.
Homepage: synced with the banner. Other pages: plays on the first page of a visit, then stays black. */
var DE=document.documentElement,isHome=!!document.getElementById('proCarousel'),seen=false,hdrT;
try{seen=sessionStorage.getItem('ce-hdr-wiped')==='1';sessionStorage.setItem('ce-hdr-wiped','1')}catch(e){}
function hdrBlack(){DE.classList.add('ce-hdr-black')}
if((seen&&!isHome)||(window.matchMedia&&matchMedia('(prefers-reduced-motion: reduce)').matches)){DE.classList.add('ce-hdr-instant');hdrBlack()}
else hdrT=setTimeout(hdrBlack,isHome?3500:1200);
/* NOTE: no less-than characters in this script - the e-retailer editor strips them */
function el(tag,cls,text){var e=document.createElement(tag);if(cls)e.className=cls;if(text)e.textContent=text;return e}
function link(href,text,hidden){var a=el('a',null,text);a.href=href;if(hidden)a.tabIndex=-1;return a}
function sep(){return el('span','ce-bf-sep','●')}
function group(hidden){
var g=el('div','ce-bf-group');
if(hidden)g.setAttribute('aria-hidden','true');
var first=link(SALE_URL,'',hidden);
first.appendChild(el('span','ce-bf-hl','Black Friday'));
first.appendChild(document.createTextNode(' Up to 40% off · Ends Mon 30 Nov'));
g.appendChild(first);g.appendChild(sep());
deals.forEach(function(d){g.appendChild(link(d[1],d[0],hidden));g.appendChild(sep())});
return g;
}
/* Black Friday Sale logo on the right-hand end of the black menu bar, centred in the bar - desktop only, scales to the space after the menu, hides if it will not fit */
function addLogo(hdr){
var h1=hdr.querySelector('h1.logo');if(!h1||document.getElementById('ce-bf-logo'))return;
var a=el('a');a.id='ce-bf-logo';a.href=SALE_URL;a.title='Shop the Black Friday Sale';a.setAttribute('aria-label','Shop the Black Friday Sale');
var im=el('span');im.className='ce-bfl';var w1=el('b');w1.textContent='Black';var w2=el('i');w2.textContent='Friday';var w3=el('u');w3.textContent='sale';im.appendChild(w1);im.appendChild(w2);im.appendChild(w3);a.appendChild(im);
/* same fonts as the homepage banner, loaded on every page */
var lf=document.getElementById('ce-bfh-font');if(!lf){lf=el('link');lf.id='ce-bfh-font';lf.rel='stylesheet';lf.href='https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@800;900&family=Inter:wght@400;500;600;700&family=Kaushan+Script&display=swap';document.head.appendChild(lf)}
if(document.fonts&&document.fonts.ready)document.fonts.ready.then(function(){place()});
/* goes inside the black menu bar so it sits above the menu layer and can be hovered and clicked */
(document.getElementById('ctl00_HeaderMiddle_pnlContentContainerData')||h1.parentNode).appendChild(a);
var RATIO=690/160,GAP=24,EDGE=30,MAXH=68,MINH=30;
function place(){
var last=null;Array.prototype.forEach.call(hdr.querySelectorAll('ul.mainMenuTop > li'),function(li){if(li.offsetWidth)last=li});
if(768 > innerWidth||!last){a.style.display='none';return}
a.style.display='block';
var bar=document.getElementById('ctl00_HeaderMiddle_pnlContentContainerData')||h1;
var pr=(a.offsetParent||hdr).getBoundingClientRect(),hr=hdr.getBoundingClientRect(),br=bar.getBoundingClientRect(),mr=last.getBoundingClientRect();
var room=hr.right-EDGE-mr.right-GAP,h=Math.min(MAXH,br.height*0.8);
im.style.fontSize=h+'px';var w=im.offsetWidth;
if(w > room){h=h*room/w;im.style.fontSize=h+'px';w=im.offsetWidth}
if(MINH > h){a.style.display='none';return}
a.style.left=Math.round(hr.right-EDGE-w-pr.left)+'px';
/* centred top-to-bottom in the black menu bar */
a.style.top=Math.round(br.top-pr.top+(br.height-h)/2)+'px';
}
place();window.addEventListener('resize',place);window.addEventListener('load',place);
setTimeout(place,300);setTimeout(place,1500);
if(window.ResizeObserver)new ResizeObserver(place).observe(h1);
/* the site's own script moves the main logo by changing a style on the header, so follow it */
if(window.MutationObserver)new MutationObserver(place).observe(hdr,{attributes:true,attributeFilter:['style','class']});
}
/* Black Friday homepage hero: adds the red-to-black banner to the homepage carousel and shows it first.
It is added at the END of the slide list so the slider's own script keeps its slide numbering, then shown on load and slotted back in after the last slide. */
function addHero(){
var car=document.getElementById('proCarousel'),tpl=document.getElementById('ce-bfh-tpl');
if(!car||!tpl||!tpl.content||document.querySelector('.ce-bfh'))return;
var inner=car.querySelector('.carousel-inner');if(!inner)return;
var f=document.getElementById('ce-bfh-font');
if(!f){f=el('link');f.id='ce-bfh-font';f.rel='stylesheet';f.href='https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@800;900&family=Inter:wght@400;500;600;700&family=Kaushan+Script&display=swap';document.head.appendChild(f)}
var item=el('div','carousel-item');item.appendChild(tpl.content.cloneNode(true));
var cur=inner.querySelector('.carousel-item.active');if(cur)cur.classList.remove('active');
item.classList.add('active');inner.appendChild(item);
car.classList.add('ce-bfh-ready');
/* sale period: Black Friday is the only homepage banner - the other slides are taken out of the page here (nothing is deleted; they come back automatically after the sale) */
Array.prototype.slice.call(inner.children).forEach(function(c){if(c!==item&&c.classList.contains('carousel-item'))inner.removeChild(c)});
car.classList.add('ce-bfh-only');
car.addEventListener('slide.bs.carousel',function(e){e.preventDefault()});
var hero=item.querySelector('.ce-bfh'),t,ht,shownAt=Date.now(),userAt=0,HOLD=10000;
function myIdx(){var k=0,n=-1;Array.prototype.forEach.call(inner.children,function(c){if(c.classList.contains('carousel-item')){if(c===item)n=k;k++}});return n}
function inst(){return window.bootstrap&&window.bootstrap.Carousel&&window.bootstrap.Carousel.getInstance(car)}
function play(){var bx=hero.querySelectorAll('.bfx');Array.prototype.forEach.call(bx,function(b){b.classList.remove('run')});void hero.offsetWidth;Array.prototype.forEach.call(bx,function(b){b.classList.add('run')})}
/* the artwork is drawn at 1440x720 (desktop) and 390x780 (mobile) and scaled to the slider width */
var dEl=hero.querySelector('.ce-bfh-d'),mEl=hero.querySelector('.ce-bfh-m');
function fit(){var w=hero.clientWidth;if(!w)return;if(dEl)dEl.style.transform='scale('+(w/1440)+')';if(mEl)mEl.style.transform='scale('+(w/390)+')'}
fit();window.addEventListener('resize',fit);if(window.ResizeObserver)new ResizeObserver(fit).observe(hero);
/* wait (max 1.2s) for the Inter font so the text does not jump from Arial */
var started=false;function start(){if(started)return;started=true;shownAt=Date.now();play();clearTimeout(hdrT);hdrT=setTimeout(hdrBlack,2100)}
function fontThenStart(){if(document.fonts&&document.fonts.load){Promise.all([document.fonts.load('900 40px "Big Shoulders Display"'),document.fonts.load('600 20px Inter'),document.fonts.load('40px "Kaushan Script"')]).then(start,start)}else start()}
if(f.sheet)fontThenStart();else{f.addEventListener('load',fontThenStart);f.addEventListener('error',start)}
setTimeout(start,1200);
function user(){userAt=Date.now()}
car.addEventListener('pointerdown',user,true);car.addEventListener('keydown',user,true);
car.addEventListener('slide.bs.carousel',function(e){
var now=Date.now(),me=myIdx(),auto=now-userAt>1500;
/* keep this slide up for 10s unless the shopper clicks or swipes */
if(e.from===me&&auto&&HOLD > now-shownAt){
e.preventDefault();clearTimeout(ht);
ht=setTimeout(function(){var c=inst();if(c)c.next()},HOLD-(now-shownAt));
return;
}
/* when the slider loops from the last original slide back to the first, show this slide first */
if(auto&&e.from===me-1&&e.to===0){
e.preventDefault();setTimeout(function(){var c=inst();if(c)c.to(me)},0);
}
});
car.addEventListener('slid.bs.carousel',function(e){if(e.relatedTarget===item||e.to===myIdx()){shownAt=Date.now();play()}else{clearTimeout(ht)}});
}
function init(){
var hdr=document.getElementById('ctl00_divHeader');
if(!hdr||document.getElementById('ce-bf-bar')) return;
var bar=el('div');bar.id='ce-bf-bar';
bar.setAttribute('role','region');bar.setAttribute('aria-label','Black Friday deals');
var track=el('div','ce-bf-track');
track.appendChild(group(false));track.appendChild(group(true));
bar.appendChild(track);
hdr.insertBefore(bar,hdr.firstChild);hdr.classList.add('ce-bf-on');addLogo(hdr);addHero();
/* constant speed (~70px per second) whatever the text length */
track.style.setProperty('--ce-bf-dur',Math.round(track.scrollWidth/2/70)+'s');
/* push page content down by the bar height so nothing hides under the fixed header */
var main=document.querySelector('.maincontent');
function offset(){
if(!main) return;
main.style.marginTop='';
/* only needed when the header is fixed (desktop); on mobile it is sticky and already pushes content down */
if(getComputedStyle(hdr).position!=='fixed') return;
var base=parseFloat(getComputedStyle(main).marginTop)||0;
main.style.marginTop=(base+bar.offsetHeight)+'px';
}
offset();
var t;window.addEventListener('resize',function(){clearTimeout(t);t=setTimeout(offset,150)});
}
/* run straight away if the header and homepage slider are already on the page, so the slide is in before the slider script counts its slides */
if(document.readyState!=='loading'||(document.getElementById('ctl00_divHeader')&&document.getElementById('proCarousel'))) init(); else document.addEventListener('DOMContentLoaded',init);
})();
;(function(){
/* Black Friday promo page: live countdown, and keeps the jump-to bar under the fixed header */
function run(){
var c=document.getElementById('bfp-count');if(!c)return;
var de=document.documentElement;function sbw(){de.style.setProperty('--bfp-sbw',Math.max(0,innerWidth-de.clientWidth)+'px')}sbw();window.addEventListener('resize',sbw);
/* full-bleed to the real screen edges on any device */
var bp=document.querySelector('.bfp');function bleed(){if(!bp||!bp.parentElement)return;var pl=bp.parentElement.getBoundingClientRect().left;bp.style.left='0';bp.style.marginLeft=(-pl)+'px';bp.style.marginRight='0';bp.style.width=de.clientWidth+'px'}bleed();window.addEventListener('resize',bleed);window.addEventListener('load',bleed);if(window.ResizeObserver)new ResizeObserver(bleed).observe(de);
var st=new Date(c.getAttribute('data-start')).getTime(),en=new Date(c.getAttribute('data-end')).getTime();
var lab=c.querySelector('[data-l]'),u={};['d','h','m','s'].forEach(function(k){u[k]=c.querySelector('[data-u="'+k+'"]')});
function pad(n){return (10 > n?'0':'')+n}
function tick(){var now=Date.now(),pre=st > now,t=Math.max(0,(pre?st:en)-now),s=Math.floor(t/1000);
if(lab)lab.textContent=pre?'Sale starts in':(t?'Sale ends in':'Sale has ended');
if(u.d)u.d.textContent=Math.floor(s/86400);if(u.h)u.h.textContent=pad(Math.floor(s%86400/3600));if(u.m)u.m.textContent=pad(Math.floor(s%3600/60));if(u.s)u.s.textContent=pad(s%60);
if(!t&&!pre){c.classList.add('bfp-ended');return}
setTimeout(tick,1005-now%1000)}
tick();
var nav=document.querySelector('.bfp-nav'),hdr=document.getElementById('ctl00_divHeader');
function top(){if(!nav||!hdr)return;var p=getComputedStyle(hdr).position,b=(p=='fixed'||p=='sticky')?Math.max(0,Math.round(hdr.getBoundingClientRect().bottom)):0;nav.style.setProperty('--bfp-top',b+'px');Array.prototype.forEach.call(document.querySelectorAll('.bfp-cat,.bfp-more'),function(x){x.style.scrollMarginTop=(b+nav.offsetHeight+16)+'px'})}
top();window.addEventListener('resize',top);window.addEventListener('scroll',top,{passive:true});
}
if(document.readyState=='loading')document.addEventListener('DOMContentLoaded',run);else run();
})();
(function(){
var storeKey='er-product-category-context-v1';
function path(url){try{var u=new URL(url,location.href);return u.origin===location.origin?u.pathname.toLowerCase():'';}catch(e){return '';}}
function category(url){return /\/g\d+\.aspx$/i.test(path(url));}
function saved(){try{var data=JSON.parse(sessionStorage.getItem(storeKey)||'{}');return data && typeof data==='object' && !Array.isArray(data)?data:{};}catch(e){return {};}}
function remember(product,cat){if(!/^\/product\//.test(product)||!category(cat))return;try{var all=saved();all[product]={path:cat,time:Date.now()};var keys=Object.keys(all).sort(function(a,b){return all[b].time-all[a].time;});keys.slice(80).forEach(function(k){delete all[k];});sessionStorage.setItem(storeKey,JSON.stringify(all));}catch(e){}}
function ensureChild(parent,source,level){var href=path(source.href);if(!category(href))return null;var list=parent.querySelector(':scope > ul');if(!list){list=document.createElement('ul');list.className='categorysubmenulevel'+level;var parentId=path(parent.querySelector(':scope > a').href).match(/\/g(\d+)\.aspx$/);if(parentId)list.id='cul'+parentId[1];parent.appendChild(list);}var li=Array.from(list.children).find(function(n){var a=n.querySelector(':scope > a');return a && path(a.href)===href;});if(!li){li=document.createElement('li');li.className='lm-lvl'+level;var id=href.match(/\/g(\d+)\.aspx$/);if(id)li.id='cli'+id[1];var a=document.createElement('a');a.href=source.href;a.textContent=source.textContent.trim();a.title=a.textContent;li.appendChild(a);list.appendChild(li);}return li;}
function fillTree(root){Array.from(document.querySelectorAll('.mainMenuTop > li')).forEach(function(top){var head=top.querySelector(':scope > a');if(!head)return;var parent=Array.from(root.children).find(function(li){var a=li.querySelector(':scope > a');return a && path(a.href)===path(head.href);});if(!parent)return;top.querySelectorAll('.dropdownColumns .lvl1').forEach(function(group){var a=group.querySelector(':scope > li > a');if(!a)return;var branch=ensureChild(parent,a,2);if(branch)group.querySelectorAll('.lvl2 a').forEach(function(child){ensureChild(branch,child,3);});});});}
function sync(){var root=document.getElementById('cul0');if(!root)return;var current=path(location.href),product=/^\/product\//.test(current);if(product)fillTree(root);var links=Array.from(root.querySelectorAll('li > a'));function find(p){return links.find(function(a){return path(a.href)===p;});}var chosen=current,source='page';if(product){chosen='';var from=path(document.referrer),record=saved()[current];if(category(from) && find(from)){chosen=from;source='referrer';}else if(record && category(record.path) && find(record.path)){chosen=record.path;source='product-history';}if(chosen)remember(current,chosen);}
root.querySelectorAll('.selected').forEach(function(n){n.classList.remove('selected');});root.querySelectorAll('.ce-category-path').forEach(function(n){n.classList.remove('ce-category-path');});root.querySelectorAll('a[aria-current]').forEach(function(n){n.removeAttribute('aria-current');});var active=chosen?find(chosen):null;root.dataset.browseCategoryPath=active?chosen:'';root.dataset.browseCategorySource=active?source:'none';if(active){active.classList.add('selected');active.setAttribute('aria-current',product?'location':'page');active.parentElement.classList.add('selected');var li=active.parentElement;while(li && root.contains(li)){li.classList.add('ce-category-path');li=li.parentElement.closest('li');}}else if(product){var equipment=Array.from(document.querySelectorAll('.mainMenuTop > li > a')).find(function(a){return /equipment/i.test(a.textContent);});var base=equipment && find(path(equipment.href));if(base){base.parentElement.classList.add('ce-category-path');root.dataset.browseCategoryPath=path(base.href);root.dataset.browseCategorySource='equipment-fallback';}}root.classList.add('ce-category-context');}
function capture(e){var link=e.target.closest && e.target.closest('a[href]');if(!link || !link.closest('.stylesummarybox'))return;var current=path(location.href);if(!category(current))return;var root=document.getElementById('cul0');if(!root || !Array.from(root.querySelectorAll('li > a')).some(function(a){return path(a.href)===current;}))return;remember(path(link.href),current);}
document.addEventListener('pointerdown',capture,true);document.addEventListener('click',capture,true);document.addEventListener('auxclick',capture,true);
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',sync);else sync();window.addEventListener('pageshow',sync);
})();
jq(document).ready(function() {
if (jq('.shopby-container').length > 0) {
const length = jq('.shopby-container').length;
const count = length === 5 ? "five" : length === 6 ? "six" : "four";
jq('.shopby-container').each(function (i,obj) {
obj.classList.add(count);
});
}
});
(function(){function init(){if(!document.querySelector('#cul0')){var account=document.querySelector('.navbar-toggle.my-account'),content=document.querySelector('.maincontent');if(account&&content){var toolbar=account.parentElement.parentElement;toolbar.classList.add('ce-home-toolbar');var item=document.createElement('li');item.className='nav-item ce-home-category-item';var trigger=document.createElement('a');trigger.className='navbar-toggle left-menu collapsed';trigger.href='#ctl00_tdLeft';trigger.setAttribute('role','button');trigger.setAttribute('aria-label','Toggle category menu');trigger.setAttribute('aria-controls','ctl00_tdLeft');trigger.setAttribute('aria-expanded','false');var caret=document.createElement('b');caret.className='caret-right';trigger.appendChild(caret);item.appendChild(trigger);toolbar.prepend(item);var drawer=document.createElement('div');drawer.id='ctl00_tdLeft';drawer.className='mainleft sidebar-offcanvas ce-home-category-drawer';drawer.setAttribute('role','dialog');drawer.setAttribute('aria-label','Categories');drawer.setAttribute('aria-modal','true');var wrap=document.createElement('div');wrap.id='ctl00_MainLeft_pnlContentContainerData';var header=document.createElement('header');header.className='header';var close=document.createElement('button');close.type='button';close.className='btn-close';close.setAttribute('aria-label','Close categories');header.appendChild(close);var category=document.createElement('div');category.className='categorymenu';var roots=document.createElement('ul');roots.id='cul0';roots.className='categorymenulevel';[{"href":"/cricket-equipment/g174.aspx","id":"cli174","label":"CRICKET EQUIPMENT"},{"href":"/cricket-community/g574.aspx","id":"cli574","label":"CRICKET COMMUNITY"},{"href":"/cricket-bundles/g729.aspx","id":"cli729","label":"CRICKET BUNDLES"},{"href":"/deals/g749.aspx","id":"cli749","label":"DEALS"},{"href":"/cricket-outlet/g678.aspx","id":"cli678","label":"CRICKET OUTLET"},{"href":"/workshop/g690.aspx","id":"cli690","label":"WORKSHOP"}].forEach(function(data){var li=document.createElement('li');li.id=data.id;li.className='lm-lvl1';var link=document.createElement('a');link.href=data.href;link.textContent=data.label;li.appendChild(link);roots.appendChild(li);});category.appendChild(roots);wrap.append(header,category);drawer.appendChild(wrap);content.prepend(drawer);var opened=false,oldOverflow='';function shut(){if(!opened)return;opened=false;document.body.classList.remove('sidebar-open');content.classList.remove('in');document.body.style.overflow=oldOverflow;drawer.setAttribute('aria-hidden','true');trigger.setAttribute('aria-expanded','false');trigger.focus({preventScroll:true});}drawer.setAttribute('aria-hidden','true');trigger.addEventListener('click',function(e){e.preventDefault();e.stopImmediatePropagation();if(opened){shut();return;}opened=true;oldOverflow=document.body.style.overflow;document.body.style.overflow='hidden';document.body.classList.add('sidebar-open');content.classList.add('in');drawer.setAttribute('aria-hidden','false');trigger.setAttribute('aria-expanded','true');close.focus({preventScroll:true});});close.addEventListener('click',shut);document.addEventListener('keydown',function(e){if(!opened)return;if(e.key==='Escape'){e.preventDefault();shut();}if(e.key==='Tab'){var focusable=Array.from(drawer.querySelectorAll('button,a[href]')).filter(function(n){return n.getClientRects().length;});var first=focusable[0],last=focusable[focusable.length-1];if(e.shiftKey&&document.activeElement===first){e.preventDefault();last.focus();}else if(!e.shiftKey&&document.activeElement===last){e.preventDefault();first.focus();}}});window.addEventListener('resize',function(){if(innerWidth>767)shut();});}}var root=document.querySelector('#cul0');if(!root || document.querySelector('.ce-category-explorer'))return;var media=matchMedia('(max-width:991px)'),cache={},stack=[],busy=false;
function title(s){return s===s.toUpperCase()?s.toLowerCase().replace(/(^|[\s-])\S/g,function(x){return x.toUpperCase();}):s;}
function list(ul){return Array.from(ul.children).map(function(li){var a=li.querySelector(':scope > a'),sub=li.querySelector(':scope > ul');if(!a)return null;var item={id:li.id,label:title(a.textContent.trim()),url:a.href,level:Number((li.className.match(/lm-lvl(\d+)/)||[])[1]||1)};if(sub)cache[item.url]=list(sub);return item;}).filter(Boolean);}
var menuToggle=document.querySelector('.navbar-toggle.main-menu'),categoryToggle=document.querySelector('.navbar-toggle.left-menu');if(menuToggle)menuToggle.parentElement.classList.add('ce-unified-secondary');if(categoryToggle){categoryToggle.setAttribute('aria-label','Open menu');categoryToggle.parentElement.parentElement.classList.add('ce-unified-toolbar');}document.body.classList.add('ce-unified-mobile');
function link(label,url,cls){var a=el('a',cls||'',label);a.href=url;return a;}
function extras(panel,current){if(current){if(false){var workshop=el('div','ce-menu-help');workshop.appendChild(el('h3','','Workshop guides'));[['Bat maintenance','/page/services/bat-maintenance.aspx'],['Bat repairs','/page/services/bat-repairs.aspx'],['English willow vs Kashmir willow','/page/services/english-kashmir-willow.aspx']].forEach(function(x){workshop.appendChild(link(x[0],x[1]));});panel.appendChild(workshop);}return;}
var rewards=el('section','ce-menu-mvp');rewards.setAttribute('aria-label','MVP rewards');var logo=el('img','ce-menu-mvp-logo');logo.src='/user/files/2103_JH_MVP-Web-footer%20(4).webp?t=0101010000';logo.alt='MVP Loyalty Programme';logo.width=150;logo.height=70;rewards.appendChild(logo);rewards.appendChild(el('h3','','Make every run count.'));var steps=el('ol','ce-menu-mvp-steps');[['Join free','Create your MVP account.'],['Earn points','Sign in and earn on eligible purchases.'],['Get rewarded','150 points unlocks $10 off a future purchase.']].forEach(function(x){var li=el('li','');li.appendChild(el('strong','',x[0]));li.appendChild(el('span','',x[1]));steps.appendChild(li);});rewards.appendChild(steps);var actions=el('div','ce-menu-mvp-actions');actions.appendChild(link('Join MVP','/register.aspx','ce-menu-join'));actions.appendChild(link('How it works','/page/loyalty-programme.aspx','ce-menu-learn'));rewards.appendChild(actions);rewards.appendChild(el('p','ce-menu-small','Exclusions and programme terms apply.'));if(window.ceMvpPersonalize)window.ceMvpPersonalize(rewards);panel.appendChild(rewards);
var help=el('section','ce-menu-help');help.appendChild(el('h3','','Help & inspiration'));[['Contact & store finder','/page/contact-and-store-finder.aspx'],['Size guides','/page/equipment-size-guides.aspx'],['Gift vouchers','/estore/giftcard.aspx'],['Blog','/page/blog.aspx']].forEach(function(x){help.appendChild(link(x[0],x[1]));});var more=el('details','ce-menu-more');more.appendChild(el('summary','','More useful links'));[['Shipping','/page/shipping.aspx'],['Returns','/page/product-returns.aspx'],['Pre-order info','/page/pre-order-info.aspx'],['Cricket bundle guide','/page/cricket-essentials-bundle-guide.aspx'],['Teamwear & customised clothing','/page/teamwear-and-customized-clothing.aspx'],['About us','/page/about-us.aspx'],['Terms & conditions','/page/terms-and-conditions.aspx']].forEach(function(x){more.appendChild(link(x[0],x[1]));});help.appendChild(more);panel.appendChild(help);}
var deals=root.querySelector('#cli749 > a');if(deals){deals.href='/deals/g749.aspx';deals.textContent='DEALS';}var items=list(root);items.forEach(function(item){if(item.id==='cli749'){delete cache[item.url];item.label='DEALS';item.url=location.origin+'/deals/g749.aspx';item.level=3;}});items.forEach(function(item){if(item.id==='cli574')item.label='Teamwear & clubs';});items.sort(function(a,b){var order=['cli174','cli729','cli749','cli678','cli574','cli690'];return order.indexOf(a.id)-order.indexOf(b.id);});items.forEach(function(item){if(item.id==='cli690')cache[item.url]=[['Bat maintenance','/page/services/bat-maintenance.aspx'],['Bat repairs','/page/services/bat-repairs.aspx'],['English willow vs Kashmir willow','/page/services/english-kashmir-willow.aspx']].map(function(x,i){return {id:'ce-workshop-guide-'+i,label:x[0],url:location.origin+x[1],level:3};});});items.unshift({id:'ce-latest',label:'Latest arrivals',url:location.origin+'/list/new.aspx',level:3});var nav=document.createElement('nav');nav.className='ce-category-explorer';nav.setAttribute('aria-label','Shop categories');root.before(nav);
function el(tag,cls,text){var e=document.createElement(tag);e.className=cls;if(text)e.textContent=text;return e;}
function render(focus){nav.replaceChildren();nav.classList.toggle('ce-ex-root',!stack.length);var current=stack[stack.length-1],panel=el('div','ce-ex-panel'),top=el('div','ce-ex-top');if(current){var back=el('button','ce-ex-back',stack.length>1?stack[stack.length-2].label:'All categories');back.type='button';back.addEventListener('click',function(){stack.pop();render(true);});top.appendChild(back);if(stack.length>1){var home=el('button','ce-ex-home','Start over');home.type='button';home.addEventListener('click',function(){stack=[];render(true);});top.appendChild(home);}}else top.appendChild(el('span','ce-ex-eyebrow','Explore Cricket Express'));panel.appendChild(top);var heading=el('h2','',current?current.label:'Shop');heading.tabIndex=-1;panel.appendChild(heading);if(!current){var accountRow=el('div','ce-menu-account');accountRow.setAttribute('aria-label','Your account');var nativeLogout=document.querySelector('.loginmenu-logout a');accountRow.appendChild(link(nativeLogout?'My account':'Sign in / Register','/myaccount.aspx'));if(nativeLogout){var logout=el('button','ce-menu-signout','Sign out');logout.type='button';logout.addEventListener('click',function(){nativeLogout.click();});accountRow.appendChild(logout);}panel.appendChild(accountRow);}if(current){var shop=el('a','ce-ex-shop','Shop all '+current.label);shop.href=current.url;panel.appendChild(shop);}var ul=el('ul','ce-ex-list');(current?cache[current.url]:items).forEach(function(item){var li=el('li',''),a=el('a','ce-ex-row',item.label);a.href=item.url;if(item.level>=3 && !cache[item.url])a.setAttribute('data-leaf','true');var rowPath=new URL(item.url).pathname.toLowerCase();if(rowPath===location.pathname.toLowerCase())a.setAttribute('aria-current','page');else if(rowPath===root.dataset.browseCategoryPath)a.setAttribute('aria-current','location');a.addEventListener('click',function(e){if(e.ctrlKey || e.metaKey || e.shiftKey || e.altKey)return;if(item.level>=3 && !cache[item.url])return;e.preventDefault();open(item,a);});li.appendChild(a);ul.appendChild(li);});panel.appendChild(ul);extras(panel,current);var status=el('div','ce-ex-status');status.setAttribute('role','status');panel.appendChild(status);nav.appendChild(panel);if(focus){var drawer=nav.closest('.sidebar-offcanvas');if(drawer)drawer.scrollTop=0;heading.focus({preventScroll:true});}}
function contextStack(){var target=root.dataset.browseCategoryPath;if(!target)return [];function walk(nodes,trail){for(var i=0;nodes.length > i;i++){var it=nodes[i],children=cache[it.url]||[],next=trail.concat(it);if(new URL(it.url,location.href).pathname.toLowerCase()===target)return children.length?next:trail;var found=walk(children,next);if(found)return found;}return null;}return walk(items,[])||[];}
async function open(item,a){if(busy)return;busy=true;a.setAttribute('aria-busy','true');try{if(!Object.prototype.hasOwnProperty.call(cache,item.url)){var response=await fetch(item.url,{credentials:'same-origin'});if(!response.ok)throw Error();var doc=new DOMParser().parseFromString(await response.text(),'text/html'),li=doc.getElementById(item.id);if(!li)throw Error();var sub=li.querySelector(':scope > ul');cache[item.url]=sub?list(sub):[];}if(!cache[item.url].length){location.href=item.url;return;}stack.push(item);render(true);}catch(e){nav.querySelector('.ce-ex-status').textContent='Could not load categories. Please tap again to retry.';}finally{busy=false;a.removeAttribute('aria-busy');}}
stack=contextStack();render(false);
document.addEventListener('click',function(e){if(e.target.closest('.navbar-toggle.left-menu,.navbar-toggle.main-menu') && media.matches){stack=contextStack();render(false);}},true);
}if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',init);else init();})();
(function(){
function number(key){var value=window[key];if(value===undefined||value===null||String(value).trim()==='')return null;var n=Number(value);return Number.isFinite(n)&&n>=0?n:null;}
function money(n){return '$'+n.toLocaleString('en-NZ',{minimumFractionDigits:n%1?2:0,maximumFractionDigits:2});}
function data(){if(!document.querySelector('.loginmenu-logout a'))return null;var credit=number('ke_Customer_MarketingDiscount'),remaining=number('ke_Customer_AmountToNextMarketingBreak'),target=number('ke_Switch_MarketingDiscountBreak'),bonus=number('ke_Switch_MarketingDiscountAmount');if(credit===null)return null;var valid=remaining!==null&&target>0&&bonus>0&&remaining<=target;return {credit:credit,remaining:remaining,target:target,bonus:bonus,valid:valid,title:credit>0?money(credit)+' MVP credit available':'Your MVP rewards',detail:valid?(credit===0 && remaining===target?'Spend '+money(target)+' to earn your first '+money(bonus)+' reward':remaining===0?'Your next reward threshold is reached':money(remaining)+' to your next '+money(bonus)+' reward'):'View your rewards in My account'};}
function el(tag,cls,text){var n=document.createElement(tag);n.className=cls;if(text)n.textContent=text;return n;}
function progress(d){var p=el('div','ce-reward-progress');p.setAttribute('role','progressbar');p.setAttribute('aria-label','Eligible spending towards your next MVP reward');p.setAttribute('aria-valuemin','0');p.setAttribute('aria-valuemax',String(d.target));p.setAttribute('aria-valuenow',String(d.target-d.remaining));p.setAttribute('aria-valuetext',d.detail);var fill=el('span','');fill.style.width=((d.target-d.remaining)/d.target*100)+'%';p.appendChild(fill);return p;}
window.ceMvpPersonalize=function(root){var d=data();if(!d)return;root.classList.add('ce-mvp-personal');root.querySelector('h3').textContent=d.title;var steps=root.querySelector('.ce-menu-mvp-steps');if(steps)steps.remove();var detail=el('p','ce-reward-detail',d.detail);var actions=root.querySelector('.ce-menu-mvp-actions');root.insertBefore(detail,actions);if(d.valid)root.insertBefore(progress(d),actions);var join=root.querySelector('.ce-menu-join');join.textContent='My rewards';join.href='/myaccount.aspx';};
function init(){document.querySelectorAll('.ce-menu-mvp:not(.ce-mvp-personal)').forEach(function(root){window.ceMvpPersonalize(root);});if(document.querySelector('.ce-header-rewards'))return;var d=data(),social=document.querySelector('#ctl00_divHeader .topbar .socials'),mobile=document.querySelector('#ctl00_MainCentre_container_pnlContentContainerData');if(!d||!social)return;var card=el('a','ce-header-rewards');card.href='/myaccount.aspx';card.setAttribute('aria-label',d.title+'. '+d.detail+'. View My account');var logo=el('img','');logo.src='https://www.cricketexpress.co.nz/user/files/MVPLogo.webp?t=1910211129';logo.alt='MVP';logo.width=46;logo.height=40;var copy=el('span','ce-reward-copy');copy.appendChild(el('strong','',d.title));copy.appendChild(el('span','',d.detail));if(d.valid)copy.appendChild(progress(d));var icon=el('span','ce-reward-badge');icon.appendChild(logo);card.append(icon,copy);social.classList.add('ce-reward-socials');var mq=matchMedia('(max-width:767px)');function place(){if(mq.matches&&document.body.classList.contains('EPHOME')&&mobile){mobile.prepend(card);social.classList.remove('ce-reward-socials');}else{social.appendChild(card);social.classList.add('ce-reward-socials');}}place();mq.addEventListener('change',place);}
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',init);else init();
})();
(function(){function init(){var header=document.querySelector('#ctl00_divHeader'),nav=header&&header.querySelector('.mainMenu'),logo=header&&header.querySelector('.logo');if(!header||!nav||!logo)return;function align(){logo=header.querySelector('.logo');nav=header.querySelector('.mainMenu');if(!logo||!nav)return;if(innerWidth<768){header.style.removeProperty('--ce-desktop-logo-top');return;}var h=header.getBoundingClientRect(),n=nav.getBoundingClientRect(),l=logo.getBoundingClientRect();if(n.height&&l.height)header.style.setProperty('--ce-desktop-logo-top',(n.top-h.top+(n.height-l.height)/2)+'px');}var observer=new ResizeObserver(align);observer.observe(header);observer.observe(nav);observer.observe(logo);window.addEventListener('resize',align);if(document.fonts)document.fonts.ready.then(align);align();}if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',init);else init();})();
(function(){function init(){var card=document.querySelector('.ce-header-rewards'),host=document.querySelector('#ctl00_MainCentre_container_pnlContentContainerData');if(!card||!host||document.querySelector('.ce-rewards-toggle'))return;card.id='ce-personal-rewards-tab';var button=document.createElement('button');button.type='button';button.className='ce-rewards-toggle';button.setAttribute('aria-controls',card.id);button.setAttribute('aria-expanded','true');button.setAttribute('aria-label','Minimise MVP rewards');button.title='Minimise MVP rewards';var tabShape=document.createElement('span');tabShape.className='ce-rewards-small-shape';tabShape.setAttribute('aria-hidden','true');button.appendChild(tabShape);host.appendChild(button);try{if(sessionStorage.getItem('ce-rewards-minimised')==='1'){host.classList.add('ce-rewards-minimised');button.setAttribute('aria-expanded','false');button.setAttribute('aria-label','Show MVP rewards');button.title='Show MVP rewards';}}catch(e){}button.addEventListener('click',function(){var collapsed=host.classList.toggle('ce-rewards-minimised');try{sessionStorage.setItem('ce-rewards-minimised',collapsed?'1':'0');}catch(e){}button.setAttribute('aria-expanded',String(!collapsed));button.setAttribute('aria-label',collapsed?'Show MVP rewards':'Minimise MVP rewards');button.title=collapsed?'Show MVP rewards':'Minimise MVP rewards';});var observer=new ResizeObserver(function(){host.style.setProperty('--ce-reward-tab-height',card.offsetHeight+'px');host.style.setProperty('--ce-reward-tab-width',card.offsetWidth+'px');});observer.observe(card);}if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',init);else init();})();
(function(){function init(){var input=document.querySelector('input.searchtextbox');if(!input||input.dataset.ceSearchPolished)return;input.dataset.ceSearchPolished='1';var field=input.parentElement;field.classList.add('ce-search-field');var watermark='What are you looking for?';input.removeAttribute('onfocus');input.removeAttribute('onblur');input.classList.remove('enablewatermark');input.classList.add('disablewatermark');input.placeholder='Search products, brands & gear…';input.setAttribute('aria-label','Search products, brands and gear');input.setAttribute('enterkeyhint','search');var query=new URLSearchParams(location.search).get('q');if(location.pathname.toLowerCase()==='/search.aspx'&&query!==null)input.value=query;else if(input.value===watermark)input.value='';var submit=field.querySelector('a');if(submit)submit.setAttribute('aria-label','Submit search');var clear=document.createElement('button');clear.type='button';clear.className='ce-search-clear';clear.textContent='×';clear.setAttribute('aria-label','Clear search');field.insertBefore(clear,submit);function sync(){clear.hidden=!input.value;}clear.addEventListener('click',function(){input.value='';sync();input.focus();});input.addEventListener('input',sync);sync();var trigger=document.querySelector('[data-bs-target="#mainMenuSearchBar"]'),panel=document.querySelector('#mainMenuSearchBar');var close=document.createElement('button');close.type='button';close.className='ce-search-close';close.textContent='Close';close.setAttribute('aria-label','Close search');field.appendChild(close);function shut(){if(trigger&&trigger.getAttribute('aria-expanded')==='true'){trigger.click();trigger.focus();}}close.addEventListener('click',shut);input.addEventListener('keydown',function(e){if(e.key==='Escape'){e.preventDefault();shut();}});if(panel){panel.addEventListener('shown.bs.collapse',function(){input.focus();});}if(trigger){trigger.addEventListener('click',function(){if(trigger.getAttribute('aria-expanded')==='true')input.focus();});}if(location.pathname.toLowerCase()==='/search.aspx'){var empty=document.querySelector('.productsnotfound');if(empty){empty.textContent='No matching products found.';document.querySelectorAll('.styleresultbar-collapse-link,.styleresultbar-collapse').forEach(function(e){e.style.display='none';});var help=document.createElement('div');help.className='ce-search-empty-help';var p=document.createElement('p');p.textContent='Check the spelling or try a shorter product or brand name. You can also browse our equipment or ask us for help.';help.appendChild(p);[['Browse cricket equipment','/cricket-equipment/g174.aspx'],['Contact our team','/page/contact-and-store-finder.aspx']].forEach(function(item){var a=document.createElement('a');a.textContent=item[0];a.href=item[1];help.appendChild(a);});empty.parentElement.appendChild(help);}}}if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',init);else init();})();
if(!document.body.classList.contains("ECATEGORY")){window.addEventListener('load',function(){if(innerWidth>767)return;document.querySelectorAll('.styleresultbar-shopby').forEach(function(box){if(!box.querySelector('input[type=checkbox]'))return;box.classList.add('shopby_box');Array.from(box.children).forEach(function(head){if(!head.classList.contains('shopby_header_wrapper'))return;var list=head.nextElementSibling;if(!list||!list.classList.contains('shopby_body'))return;var wrap=document.createElement('div');wrap.className='shopby-container';head.before(wrap);wrap.appendChild(head);wrap.appendChild(list);});var root=box.closest('.refine-search-wrap');if(root)root.querySelectorAll('.sortby').forEach(function(e){e.style.setProperty('display','none','important');});});});
window.addEventListener('load',function(){document.querySelectorAll('.shopby_box').forEach(function(box){var inputs=Array.from(box.querySelectorAll('input[type=checkbox]'));if(!inputs.length)return;var actions=document.createElement('div');actions.className='ce-filter-actions';var msg=document.createElement('span');msg.className='ce-filter-note';msg.setAttribute('aria-live','polite');actions.appendChild(msg);[['ce-filter-reset','Clear all'],['ce-filter-apply','Apply filters']].forEach(function(item){var b=document.createElement('button');b.type='button';b.className=item[0];b.textContent=item[1];actions.appendChild(b);});box.appendChild(actions);var note=actions.querySelector('.ce-filter-note');function pending(){note.textContent='Selections changed — apply to see results';box.dispatchEvent(new Event('ce-filter-pending'));}box.addEventListener('click',function(e){var input=e.target.closest('input[type=checkbox]'),link=e.target.closest('a');if(!input&&link&&link.closest('.shopby_body'))input=link.parentElement.querySelector('input[type=checkbox]');if(input){if(input.disabled||input.classList.contains('disabled')){e.preventDefault();e.stopImmediatePropagation();return;}var checked=e.target===input?input.checked:!input.checked;e.preventDefault();e.stopImmediatePropagation();setTimeout(function(){input.checked=checked;pending();},0);return;}var clear=e.target.closest('.shopby_clear');if(clear){e.preventDefault();e.stopImmediatePropagation();clear.closest('.shopby-container').querySelectorAll('input[type=checkbox]').forEach(function(i){i.checked=false;});pending();}},true);actions.querySelector('.ce-filter-reset').addEventListener('click',function(){inputs.forEach(function(i){i.checked=false;});pending();});actions.querySelector('.ce-filter-apply').addEventListener('click',function(){var chosen=inputs.filter(function(i){return i.checked;}),url=new URL(location.href);if(chosen.length){url.searchParams.set('rsb',','+chosen.map(function(i){return i.value;}).join(','));url.searchParams.set('rsc',','+Array.from(new Set(chosen.map(function(i){return i.value.split('|')[0];}))).join(',')+',');}else{url.searchParams.delete('rsb');url.searchParams.delete('rsc');}url.searchParams.delete('page');location.href=url.toString();});});});
window.addEventListener('load',function(){document.querySelectorAll('.shopby_box').forEach(function(box){var inputs=Array.from(box.querySelectorAll('input[type=checkbox]'));if(!inputs.length)return;var groups=Array.from(new Set(inputs.map(function(i){return i.value.split('|')[0];}))),timer,version=0,controller;function paint(){inputs.forEach(function(i){var row=i.closest('li'),a=row.querySelector('a');row.classList.add('ce-filter-option');if(i.checked){i.disabled=false;i.classList.remove('disabled');i.classList.add('enabled');}row.classList.toggle('ce-unavailable',i.disabled);if(a){a.classList.toggle('disabled',i.disabled);a.classList.toggle('enabled',!i.disabled);a.setAttribute('aria-disabled',String(i.disabled));}});box.querySelectorAll('.shopby-container').forEach(function(c){var clear=c.querySelector('.shopby_clear');if(clear)clear.classList.toggle('hidden',!Array.from(c.querySelectorAll('input[type=checkbox]')).some(function(i){return i.checked;}));});}box.querySelectorAll('.shopby-container').forEach(function(c){var clear=c.querySelector('.shopby_clear'),list=c.querySelector('.shopby_body');if(!clear||!list)return;var row=document.createElement('li');row.className='ce-filter-clear-row';clear.textContent='Clear '+c.querySelector('.shopby_header').textContent.trim().toLowerCase();clear.classList.remove('ce-red-button-pop');row.appendChild(clear);list.prepend(row);});paint();box.addEventListener('ce-filter-pending',paint);});});
window.addEventListener('load',function(){document.querySelectorAll('.shopby_box .shopby-container').forEach(function(wrap){var header=wrap.querySelector('.shopby_header'),panel=wrap.querySelector('.shopby_body');if(!header||!panel)return;var motion;header.addEventListener('click',function(event){if(!event.target.closest('a'))return;event.preventDefault();event.stopImmediatePropagation();var open=header.getAttribute('is-expanded')!=='true',start=panel.getBoundingClientRect().height;if(motion){motion.cancel();motion=null;}header.setAttribute('is-expanded',String(open));header.classList.toggle('shopby_header_active',open);header.classList.toggle('shopby_header_default',!open);var span=header.querySelector('span');if(span){span.classList.toggle('shopby_header_icon_exp',open);span.classList.toggle('shopby_header_icon_col',!open);}var link=header.querySelector('a');link.setAttribute('aria-expanded',String(open));if(panel.id)link.setAttribute('aria-controls',panel.id);if(matchMedia('(prefers-reduced-motion: reduce)').matches){panel.style.display=open?'block':'none';return;}panel.style.display='block';var cs=getComputedStyle(panel),end=panel.getBoundingClientRect().height;var frames=open?[{height:start+'px',opacity:start?1:0},{height:end+'px',opacity:1}]:[{height:start+'px',opacity:1},{height:'0px',opacity:0}];motion=panel.animate(frames,{duration:260,easing:'cubic-bezier(.22,.61,.36,1)',fill:'both'});var current=motion;current.onfinish=function(){if(motion!==current)return;panel.style.display=open?'block':'none';current.cancel();motion=null;};},true);});});
window.addEventListener('load',function(){document.querySelectorAll('.refine-search-wrap').forEach(function(root){var trigger=root.querySelector('.styleresultbar-collapse-link'),panel=trigger&&document.getElementById(trigger.getAttribute('aria-controls'));if(!trigger||!panel)return;trigger.removeAttribute('data-bs-toggle');trigger.removeAttribute('data-toggle');var motion,children=[];root.addEventListener('click',function(e){if(!trigger.contains(e.target)||innerWidth>767)return;e.preventDefault();e.stopImmediatePropagation();var open=trigger.getAttribute('aria-expanded')!=='true',start=panel.getBoundingClientRect().height;if(motion){motion.cancel();motion=null;}children.forEach(function(a){a.cancel();});children=[];trigger.setAttribute('aria-expanded',String(open));trigger.classList.toggle('collapsed',!open);panel.classList.remove('collapsing');panel.classList.add('collapse','in','show');panel.style.setProperty('display','block');panel.style.height='auto';if(matchMedia('(prefers-reduced-motion: reduce)').matches){panel.classList.toggle('in',open);panel.classList.toggle('show',open);panel.style.display=open?'block':'none';return;}var end=panel.getBoundingClientRect().height;panel.style.overflow='hidden';motion=panel.animate(open?[{maxHeight:start+'px',opacity:start?1:0},{maxHeight:end+'px',opacity:1}]:[{maxHeight:start+'px',opacity:1},{maxHeight:'0px',opacity:0}],{duration:open?420:320,easing:'cubic-bezier(.22,.61,.36,1)',fill:'both'});if(open){Array.from(panel.querySelectorAll('.shopby-container,.ce-filter-actions')).filter(function(el){return el.getBoundingClientRect().height>0;}).forEach(function(el,index){children.push(el.animate([{transform:'translateY(-14px)',opacity:0},{transform:'translateY(0)',opacity:1}],{duration:420,delay:0,easing:'cubic-bezier(.22,.61,.36,1)',fill:'backwards'}));});}var current=motion;current.onfinish=function(){if(motion!==current)return;panel.classList.toggle('in',open);panel.classList.toggle('show',open);panel.style.display=open?'block':'none';panel.style.overflow='';current.cancel();motion=null;};},true);});});}
(function(){function headings(){if(!document.body.classList.contains('EPHOME'))return;[['#Content_1279_pnlContentData_Header','Our picks'],['.brands-v2__header','Shop the brands you trust']].forEach(function(item){var el=document.querySelector(item[0]);if(!el)return;el.removeAttribute('style');el.classList.add('ce-section-heading');el.textContent=item[1];el.setAttribute('role','heading');el.setAttribute('aria-level','2');});}if(document.readyState==='complete')headings();else window.addEventListener('load',headings);})();
(function(){function footer(){var root=document.getElementById('ctl00_divFooter');if(!root||root.classList.contains('ce-footer'))return;var old=root.querySelector('.footercontainer:not(.footerbottom)'),social=old&&old.querySelector('.socialicons'),mvp=old&&old.querySelector('.footercol_right a'),image=mvp&&mvp.querySelector('img');if(!old||!social||!mvp||!image)return;
var links=Array.from(old.querySelectorAll('.footerlinks>a')),find=function(part){return links.find(function(a){return a.getAttribute('href').indexOf(part)!==-1;});};var contact=find('contact-and-store-finder'),register=find('register.aspx'),shipping=find('shipping.aspx'),privacy=find('privacy-policy'),terms=find('terms-and-conditions');if(!contact||!register||!shipping||!privacy||!terms)return;
var main=document.createElement('div');main.className='ce-footer-main';var support=document.createElement('section'),account=document.createElement('section'),card=document.createElement('section');support.innerHTML='