(function(){ var V='5.4.4', CDN='https://cdn.jsdelivr.net/npm/photoswipe@'+V+'/dist/'; var es=/^\/esp(\/|$)/.test(location.pathname); var T=es?{c:'Caso',of:'de',d:'Los resultados individuales varían.',cta:'Reservar consulta virtual',open:'Ampliar caso',ba:'antes y después',more:'Ver todos los resultados',all:'Ver todos los resultados de {t}'} :{c:'Case',of:'of',d:'Individual results vary.',cta:'Book a Virtual Consultation',open:'Open case',ba:'before and after',more:'See all results',all:'See all {t} results'}; var CONSULT='https://consultations.epionebh.com/consultation'; var loading=null; function load(){ if(loading) return loading; var l=document.createElement('link');l.rel='stylesheet';l.href=CDN+'photoswipe.css';document.head.appendChild(l); loading=import(CDN+'photoswipe.esm.min.js').then(function(m){return m.default;}); return loading; } function name(){ var h=document.querySelector('h1'); if(h&&h.firstElementChild&&h.firstElementChild.textContent.trim()) return h.firstElementChild.textContent.trim(); var t=document.title.split('|')[0]; return t.replace(/\s*(Before (and|&) After|Antes y despu[eé]s).*$/i,'').trim()||t.trim(); } function ratio(img){return (img.naturalWidth&&img.naturalHeight)?img.naturalWidth/img.naturalHeight:0;} function ready(imgs){ return Promise.all(imgs.map(function(img){ if(ratio(img)) return 1; img.loading='eager'; return new Promise(function(res){var d=setTimeout(res,2500);img.addEventListener('load',function(){clearTimeout(d);res();},{once:true});img.addEventListener('error',function(){clearTimeout(d);res();},{once:true});}); })); } function slides(imgs){ return imgs.map(function(img){ var r=ratio(img)||1.6, M=1600; return {src:img.getAttribute('src'),msrc:img.currentSrc||img.src,width:r>=1?M:Math.round(M*r),height:r>=1?Math.round(M/r):M,alt:img.alt}; }); } function open(group,index,label){ var imgs=group.imgs; Promise.all([load(),ready(imgs)]).then(function(r){ var PhotoSwipe=r[0]; var pswp=new PhotoSwipe({ dataSource:slides(imgs),index:index,bgOpacity:1,showHideAnimationType:'zoom', wheelToZoom:true,initialZoomLevel:'fit', secondaryZoomLevel:function(z){return Math.min(Math.max(z.fit*2.5,1),4);}, maxZoomLevel:function(z){return Math.max(z.fit*4,2);}, paddingFn:function(vp){return vp.x<601?{top:56,bottom:176,left:0,right:0}:{top:60,bottom:96,left:64,right:64};}, preload:[1,2],closeTitle:es?'Cerrar':'Close',zoomTitle:'Zoom',arrowPrevTitle:es?'Anterior':'Previous',arrowNextTitle:es?'Siguiente':'Next' }); pswp.addFilter('thumbEl',function(el,data,i){return imgs[i]||el;}); pswp.on('uiRegister',function(){ pswp.ui.registerElement({name:'ep-cap',appendTo:'root',order:9,isButton:false,html:'',onInit:function(el,p){ el.className='ep-pswp-cap'; var upd=function(){var n=p.currIndex+1,im=imgs[p.currIndex],href=im&&im.getAttribute('data-ep-href');var t=label||((im&&im.alt)||'').replace(/\s*(before and after|antes y después).*$/i,'').replace(/,\s*$/,'');el.innerHTML='
'+t+''+T.c+' '+n+' '+T.of+' '+p.getNumItems()+' · '+T.d+'
'+(href?''+(/\/photo-gallery\/?$/.test(href)?T.more:T.all.replace('{t}',t))+''+T.cta+'':''+T.cta+'')+'
';}; p.on('change',upd);upd(); }}); }); if(group.hash){ var setH=function(){try{history.replaceState(null,'','#case-'+(pswp.currIndex+1));}catch(e){}};pswp.on('change',setH);pswp.on('afterInit',setH); pswp.on('close',function(){try{history.replaceState(null,'',location.pathname+location.search);}catch(e){}}); } var H=document.documentElement,L=window.lenis; pswp.on('afterInit',function(){pswp.options.allowPanToNext=true;H.classList.add('ep-pswp-open');pswp.element.setAttribute('data-lenis-prevent','');try{L&&L.stop&&L.stop();}catch(e){}}); pswp.on('destroy',function(){H.classList.remove('ep-pswp-open');try{L&&L.start&&L.start();}catch(e){}}); pswp.init(); }); } var zoomIcon=''; function wire(el,img,group,i,label){ el.setAttribute('role','button');el.setAttribute('tabindex','0'); el.setAttribute('aria-label',T.open+' '+(i+1)+(label?' · '+label:'')); var go=function(e){if(e.type==='keydown'&&e.key!=='Enter'&&e.key!==' ')return;e.preventDefault();open(group,i,label);}; el.addEventListener('click',go);el.addEventListener('keydown',go); el.addEventListener('pointerenter',load,{once:true});el.addEventListener('touchstart',load,{once:true,passive:true}); } // Home "Real Results" marquee: curated, aligned real cases, labeled by treatment var HB='https://cdn.prod.website-files.com/69a1bd24713d4e1de5aab11b/'; var HOME=[ ['6add880b3afeca34a020363d_home-01-non-surgical-nose-job-11','Non-Surgical Nose Job','Rinoplastia no quirúrgica','non-surgical-nose-job'], ['69a308c14e7a4952024d766e/6add30aff1538cd080385765_non-surgical-neck-lift-12','Non-Surgical Neck Lift','Lifting de cuello no quirúrgico','non-surgical-neck-lift'], ['6ade1de3cace370dd2498625_home-16-non-surgical-facelift-04','Non-Surgical Facelift','Lifting facial no quirúrgico','non-surgical-facelift'], ['69a308c14e7a4952024d766e/6add303b3afeca34a018f153_brazilian-butt-lift-03','Non-Surgical Butt Lift','Levantamiento de glúteos no quirúrgico','brazilian-butt-lift'], ['6add880bac3ef69bfd11a573_home-03-non-surgical-lip-augmenation-12','Lip Augmentation','Aumento de labios','non-surgical-lip-augmenation',1], ['69a308c14e7a4952024d766e/6add2dcee0acb5479b6914cb_non-surgical-nose-job-13','Non-Surgical Nose Job','Rinoplastia no quirúrgica','non-surgical-nose-job'], ['6add880b082f01212138b780_home-04-melasma-treatment-03','Melasma Treatment','Tratamiento de melasma','melasma-treatment'], ['69a308c14e7a4952024d766e/6add3146b1525d95d6a74277_stretch-marks-03','Stretch Mark Removal','Eliminación de estrías','stretch-marks'], ['6ade1de3b26de708a91c5586_home-17-non-surgical-jawline-contouring-01','Jawline Contouring','Contorno de mandíbula','non-surgical-jawline-contouring'], ['69a308c14e7a4952024d766e/6ade1edd0f473cebbaf19318_non-surgical-facelift-01','Non-Surgical Facelift','Lifting facial no quirúrgico','non-surgical-facelift'], ['6add880c942cc529ab83794b_home-06-non-surgical-dark-circle-removal-14','Dark Circles & Under-Eye Bags','Ojeras y bolsas','non-surgical-dark-circle-removal',1], ['69a308c14e7a4952024d766e/6add3015d4e2b38f94a23eb4_non-surgical-arm-lift-01','Non-Surgical Arm Lift','Lifting de brazos no quirúrgico','non-surgical-arm-lift'], ['6add8c3ab1525d95d6b0feb2_home-07-cheek-contouring-04','Cheek Contouring','Contorno de mejillas','cheek-contouring'], ['69a308c14e7a4952024d766e/6add2ed6c1666713b8a91956_acne-scar-removal-14','Acne & Acne Scars','Acné y cicatrices de acné','acne-scar-removal'], ['6add8c3aff143545014068cc_home-08-skin-resurfacing-09','Skin Resurfacing','Rejuvenecimiento cutáneo','skin-resurfacing'], ['69a308c14e7a4952024d766e/6add30d45a9373586d0b0100_non-surgical-skin-tightening-02','Skin Tightening','Tensado de piel','non-surgical-skin-tightening',1], ['6ade1de30f473cebbaf173ae_home-18-non-surgical-facelift-03','Non-Surgical Facelift','Lifting facial no quirúrgico','non-surgical-facelift'], ['69a308c14e7a4952024d766e/6add2daa9d6c402cfe4b3493_non-surgical-lip-augmenation-18','Lip Augmentation','Aumento de labios','non-surgical-lip-augmenation',1], ['6add880b49eb70e98bdc0f0d_home-10-non-surgical-nose-job-22','Non-Surgical Nose Job','Rinoplastia no quirúrgica','non-surgical-nose-job'], ['69a308c14e7a4952024d766e/6add3089e7abdfa0c15c08dc_non-surgical-hand-rejuvenation-05','Hand Rejuvenation','Rejuvenecimiento de manos','non-surgical-hand-rejuvenation',1], ['6add880b4bff0d09c44463d9_home-11-non-surgical-neck-lift-08','Non-Surgical Neck Lift','Lifting de cuello no quirúrgico','non-surgical-neck-lift'], ['69a308c14e7a4952024d766e/6add2d75fc1021a5c2637ddd_skin-resurfacing-02','Skin Resurfacing','Rejuvenecimiento cutáneo','skin-resurfacing'], ['6add880cff143545014024ca_home-12-facial-contouring-09','Facial Contouring','Contorno facial','facial-contouring'], ['69a308c14e7a4952024d766e/6ade1f05a453bde7aa4c5754_non-surgical-chin-contouring-03','Chin Contouring','Contorno de mentón','non-surgical-chin-contouring'], ['6add880cca366620fdd72bc8_home-13-acne-scar-removal-10','Acne & Acne Scars','Acné y cicatrices de acné','acne-scar-removal'], ['69a308c14e7a4952024d766e/6add95c3c7d9553df864b428_non-surgical-wrinkle-removal-05','Wrinkle Removal','Eliminación de arrugas','non-surgical-wrinkle-removal'], ['6ade1de3bbcf70c54b59508a_home-19-non-surgical-chin-augmentation-07','Chin Augmentation','Aumento de mentón','non-surgical-chin-augmentation'], ['69a308c14e7a4952024d766e/6add22ed864274d40b8af859_scar-revision-02','Scar Revision','Revisión de cicatrices','scar-revision'], ['6ade1de38744271fad99035e_home-20-non-surgical-wrinkle-removal-14','Wrinkle Removal','Eliminación de arrugas','non-surgical-wrinkle-removal'], ['69a308c14e7a4952024d766e/6add3120e0acb5479b6971e2_skin-lightening-01','Skin Lightening','Aclaramiento de piel','skin-lightening'] ]; // Home marquee engine: slow auto-advance; drag (mouse), swipe (touch) or trackpad to move forward or back, with momentum. // Press and hold stops it, release lets it glide and ease back to the slow drift. Never pauses on hover (build rule). var mqTween=null,car=null; function killForeign(cms){ if(!window.gsap) return; gsap.getTweensOf(cms).forEach(function(t){var p=t.parent;t.kill();try{if(p&&p!==gsap.globalTimeline&&!p.getChildren().length)p.kill();}catch(e){}}); } function retime(){ var mq=document.querySelector('.beauty-marquee');if(!mq||car) return; var cms=[].slice.call(mq.querySelectorAll('.beauty-cms'));if(!cms.length) return; killForeign(cms); if(window.gsap) gsap.set(cms,{clearProps:'transform'}); mq.classList.add('ep-hmq','ep-car'); var reduce=window.matchMedia&&matchMedia('(prefers-reduced-motion: reduce)').matches; var auto=function(){return reduce?0:(innerWidth<768?20:28);}; var W=0,pos=0,vel=auto(),last=0,press=null,blockUntil=0,pend=0,wAxis=null,wT=0,lastX=null; var mod=function(v){return ((v%W)+W)%W;}; var measure=function(){ cms.forEach(function(c){c.style.transform='none';}); W=cms[1]?cms[1].getBoundingClientRect().left-cms[0].getBoundingClientRect().left:cms[0].getBoundingClientRect().width; if(!(W>0)) W=cms[0].offsetWidth||1;lastX=null; }; var paint=function(){var x=-mod(pos);if(lastX!==null&&Math.abs(x-lastX)<0.01) return;lastX=x;var t='translate3d('+x.toFixed(2)+'px,0,0)';for(var i=0;i40||Math.abs(pend)>20; press={id:e.pointerId,type:e.pointerType,x0:e.clientX,y0:e.clientY,p0:pos,on:false,t0:performance.now(),caught:gliding,s:[[performance.now(),e.clientX]]}; vel=0;pend=0; // touching stops the motion (hold to look closer) }); mq.addEventListener('pointermove',function(e){ if(!press||e.pointerId!==press.id) return; var dx=e.clientX-press.x0,dy=e.clientY-press.y0; if(!press.on){ if(Math.abs(dx)<8&&Math.abs(dy)<8) return; if(Math.abs(dy)>Math.abs(dx)){stopPress();return;} // vertical gesture: let the page scroll press.on=true;press.x0+=dx>0?8:-8;press.p0=pos;mq.classList.add('ep-car-drag'); try{mq.setPointerCapture(e.pointerId);}catch(_){} dx=e.clientX-press.x0; } if(e.cancelable&&press.type!=='mouse') e.preventDefault(); pos=press.p0-dx; var now=performance.now();press.s.push([now,e.clientX]);while(press.s.length>2&&now-press.s[0][0]>120) press.s.shift(); }); var release=function(e){ if(!press||(e&&e.pointerId!==press.id)) return; if(press.on){ var s=press.s,a=s[0],b=s[s.length-1],now=performance.now(),v=0; if(b[0]-a[0]>15&&now-b[0]<80) v=-(b[1]-a[1])/(b[0]-a[0])*1000; vel=Math.max(-1800,Math.min(1800,v));blockUntil=now+350; }else if(press.caught||performance.now()-press.t0>650){blockUntil=performance.now()+350;} // catching a glide or a long hold is not a tap stopPress(); }; mq.addEventListener('pointerup',release); mq.addEventListener('lostpointercapture',function(e){if(e.target===mq) release(e);}); // capture moving off a child image is not a release mq.addEventListener('pointercancel',function(e){if(press&&e.pointerId===press.id) stopPress();}); // a drag or swipe never opens the image or the treatment link; a clean tap or click still does mq.addEventListener('click',function(e){if(performance.now()200) wAxis=null;wT=now; var dx=e.deltaX,dy=e.deltaY;if(e.shiftKey&&!dx){dx=dy;dy=0;} var k=e.deltaMode===1?16:(e.deltaMode===2?innerWidth:1); if(!wAxis){if(Math.abs(dx)>0.5&&Math.abs(dx)>=Math.abs(dy)) wAxis='x';else if(Math.abs(dy)>0.5) wAxis='y';else return;} if(wAxis!=='x') return; e.preventDefault();e.stopPropagation(); pend+=dx*k;vel=auto(); },{passive:false}); // keyboard: focusing a treatment link brings its card into view mq.addEventListener('focusin',function(e){var it=e.target.closest('.beauty-item');if(!it) return;var r=it.getBoundingClientRect(),m=mq.getBoundingClientRect();if(r.leftm.right) pend+=r.left-m.left-24;}); addEventListener('load',function(){var f=mod(pos)/W;measure();pos=f*W;}); var rz;addEventListener('resize',function(){clearTimeout(rz);rz=setTimeout(function(){var f=mod(pos)/W;measure();pos=f*W;paint();},120);}); // load every card early so a fast swipe never shows a blank tile var warm=function(){var a=[].slice.call(mq.querySelectorAll('img[loading=lazy]'));(function n(){a.splice(0,4).forEach(function(i){i.loading='eager';});if(a.length) setTimeout(n,700);})();}; if(document.readyState==='complete') setTimeout(warm,1500); else addEventListener('load',function(){setTimeout(warm,1500);}); // the theme bundle can re-create its own tween (e.g. on refresh); keep it off setInterval(function(){killForeign(cms);},2000); car={get pos(){return pos;},get vel(){return vel;},get W(){return W;},get dragging(){return !!(press&&press.on);}};window.__epCar=car; } function homeMarquee(){ var tpl=document.querySelector('.beauty-marquee .beauty-item.is-home');if(!tpl) return; var lists=[].slice.call(document.querySelectorAll('.beauty-marquee .beauty-list'));if(!lists.length) return; tpl=tpl.cloneNode(true); var mqEl=document.querySelector('.beauty-marquee');if(mqEl) mqEl.classList.add('ep-hmq'); lists.forEach(function(list,li){ list.innerHTML=''; HOME.forEach(function(h,n){ var it=tpl.cloneNode(true),img=it.querySelector('img');if(!img) return; var base=(h[0].indexOf('/')>0?'https://cdn.prod.website-files.com/':HB)+h[0],label=es?h[2]:h[1],href=(es?'/esp':'')+'/photo-gallery/'+h[3]; img.removeAttribute('srcset');img.removeAttribute('sizes'); var ss=base+'-p-500.jpg 500w, '+base+'-p-800.jpg 800w, '+(h[4]?'':base+'-p-1080.jpg 1080w, ')+base+'.jpg 1200w'; // h[4]: Webflow made no 1080 variant if(li===0&&n<6){img.src=base+'.jpg';img.srcset=ss;}else{img.setAttribute('data-ep-src',base+'.jpg');img.setAttribute('data-ep-srcset',ss);} img.addEventListener('error',function(){if(img.getAttribute('srcset')){img.removeAttribute('srcset');img.removeAttribute('sizes');img.src=base+'.jpg';}}); img.sizes='(max-width: 767px) 96vw, 46vw';img.loading='lazy';img.decoding='async'; img.alt=label+' '+T.ba;img.setAttribute('data-ep-href',href); var a=document.createElement('a');a.className='ep-ba-cap';a.href=href;a.textContent=label+' ';var ar=document.createElement('span');ar.setAttribute('aria-hidden','true');ar.textContent='→';a.appendChild(ar); a.addEventListener('click',function(e){e.stopPropagation();}); if(li>0){a.tabIndex=-1;} it.appendChild(a);list.appendChild(it); }); if(li>0&&list.closest('.beauty-cms')) list.closest('.beauty-cms').setAttribute('aria-hidden','true'); }); var fill=function(){[].forEach.call(document.querySelectorAll('.beauty-marquee img[data-ep-src]'),function(i){i.srcset=i.getAttribute('data-ep-srcset');i.src=i.getAttribute('data-ep-src');i.removeAttribute('data-ep-src');i.removeAttribute('data-ep-srcset');});}; if('IntersectionObserver' in window&&mqEl){var io=new IntersectionObserver(function(en){if(en[0].isIntersecting){io.disconnect();fill();}},{rootMargin:'300px 0px'});io.observe(mqEl);}else fill(); retime();var tries=0;(function wait(){killForeign(document.querySelectorAll('.beauty-marquee .beauty-cms'));if(++tries<40) setTimeout(wait,250);})(); } // Any image with a link or button directly under it (cards) goes where that button goes function linkImages(){ var vw=window.innerWidth; var ok=function(a){var h=a.getAttribute('href');return h&&h.charAt(0)!=='#'&&!/^(tel|mailto|sms|javascript):/i.test(h);}; [].slice.call(document.querySelectorAll('img')).forEach(function(img){ if(img.__epLinked) return; var r=img.getBoundingClientRect(); if(r.width<80||r.height<60||r.width>vw*0.85) return; if(img.closest('a,button,[role=button],nav,header,footer,.w-nav,.nav-wrapper,.gallery-detail-grid,.pswp,.beauty-marquee')||img.classList.contains('beauty-img')||img.classList.contains('ep-ba-click')) return; var cx=r.left+r.width/2,cy=r.top+r.height/2,e=img,best=null; for(var k=0;k<10;k++){ e=e.parentElement;if(!e||e===document.body||e.tagName==='MAIN') break; var all=[].slice.call(e.querySelectorAll('a,button')); if(!all.length){if(e.tagName==='SECTION') break; continue;} // already clickable: a card overlay link or trigger covers the image if(all.some(function(a){var ar=a.getBoundingClientRect();return ar.width>0&&ar.left<=cx&&ar.right>=cx&&ar.top<=cy&&ar.bottom>=cy;})) break; var as=all.filter(function(a){return a.tagName==='A'&&ok(a)&&!a.closest('p,li,td,blockquote,h1,h2,h3,h4,h5,h6,.w-richtext')&&a.getBoundingClientRect().width>0;}); if(!as.length){if(e.tagName==='SECTION') break; continue;} // 1) the button directly under the image var under=as.filter(function(a){var ar=a.getBoundingClientRect();return ar.top>=r.bottom-6&&ar.top-r.bottom<450&&ar.leftr.left;}); if(under.length){best=under.filter(function(a){return /button|btn|cta|more|w-button/i.test(a.className)||/more|learn|see|view|read|book|explore|discover|shop|visit/i.test(a.textContent);})[0]||under.sort(function(a,b){return a.getBoundingClientRect().top-b.getBoundingClientRect().top;})[0];} // 2) otherwise the block's single call to action else{var hs=as.map(function(a){return a.href;}).filter(function(h,i,s){return s.indexOf(h)===i;});if(hs.length===1) best=as[0];} break; } if(!best) return; img.__epLinked=1;img.classList.add('ep-img-link'); img.addEventListener('click',function(ev){ if(ev.metaKey||ev.ctrlKey||best.target==='_blank') window.open(best.href,'_blank','noopener'); else best.click(); }); img.addEventListener('auxclick',function(ev){if(ev.button===1) window.open(best.href,'_blank','noopener');}); }); } function init(){ var label=name(); var h1h=document.querySelector('h1.h1.is-home');if(h1h&&/\S
/i,'
'); // keeps a space when the line break is hidden on phones homeMarquee(); // 1) Gallery pages document.querySelectorAll('.gallery-detail-grid').forEach(function(grid){ var items=[].slice.call(grid.querySelectorAll('.gallery-detail-item')).filter(function(it){return it.querySelector('img');}); if(!items.length) return; grid.setAttribute('role','group'); var group={imgs:items.map(function(it){return it.querySelector('img');}),hash:true}; items.forEach(function(it,i){ var img=group.imgs[i]; if(!img.alt||/^[^,]*\s\d+$/.test(img.alt)) img.alt=label+' '+T.ba+', '+T.c.toLowerCase()+' '+(i+1); img.decoding='async'; if(i<2) img.loading='eager'; it.insertAdjacentHTML('beforeend',zoomIcon); wire(it,img,group,i,label); }); var m=location.hash.match(/^#case-(\d+)$/); if(m){var k=+m[1]-1;if(k>=0&&k-1?f:'';}; var go=function(img,href){img.classList.add('ep-img-link');img.__epLinked=1; img.addEventListener('click',function(ev){if(ev.metaKey||ev.ctrlKey) window.open(href,'_blank','noopener'); else location.href=href;}); img.addEventListener('auxclick',function(ev){if(ev.button===1) window.open(href,'_blank','noopener');});}; // treatment pages: the lightbox title is the treatment itself, taken from the page heading var PL=((document.querySelector('h1')||{}).textContent||'').replace(/\s+/g,' ').replace(/\s+(in|en)\s+(Beverly Hills|Los Angeles|LA)\b.*$/i,'').trim(); byParent.forEach(function(all,sec){ var btn=[].slice.call(sec.querySelectorAll('a[href]')).filter(function(a){return /\/photo-gallery\/?$/.test(a.getAttribute('href'));})[0]; var slugs=all.map(slugOf).filter(function(x,i,s){return x&&s.indexOf(x)===i;}); var gal=slugs.length===1?(es?'/esp':'')+'/photo-gallery/'+slugs[0]:''; if(btn&&gal&&!sec.querySelector('.beauty-marquee')) btn.setAttribute('href',gal); // tap or click expands the case first; the lightbox then offers a button to that treatment's full gallery all.forEach(function(img){var href=img.getAttribute('data-ep-href')||gal||(btn&&btn.getAttribute('href'));if(href) img.setAttribute('data-ep-href',href);}); var uniq=[];all.forEach(function(img){if(!uniq.some(function(x){return x.getAttribute('src')===img.getAttribute('src');}))uniq.push(img);}); var group={imgs:uniq,hash:false}; all.forEach(function(img){var i=uniq.findIndex(function(x){return x.getAttribute('src')===img.getAttribute('src');});img.classList.add('ep-ba-click');img.__epLinked=1;wire(img,img,group,i,sec.querySelector('.beauty-marquee')?'':PL);if(img.closest('[aria-hidden=true]')) img.tabIndex=-1;}); }); } if(document.readyState==='loading') document.addEventListener('DOMContentLoaded',init); else init(); var li=function(){try{linkImages();}catch(e){}};if(document.readyState==='complete'){setTimeout(li,800);}else{window.addEventListener('load',function(){setTimeout(li,800);});}setTimeout(li,4000); })();