function faqShowAll(n){var t=document.querySelectorAll(".expandBox");for(let n=0;n<t.length;n++){let i=t[n].querySelector(".title");i.classList.add("active");i.nextElementSibling.classList.add("active")}n.onclick=function(){faqHideAll(this)}}function faqHideAll(n){var t=document.querySelectorAll(".expandBox");for(let n=0;n<t.length;n++){let i=t[n].querySelector(".title");i.classList.remove("active");i.nextElementSibling.classList.remove("active")}n.onclick=function(){faqShowAll(this)}}function validateSearch(n){var t=n.querySelector(".searchBox");return t.clientWidth<100?(t.focus(),!1):t.value==""?!1:void 0}function promoSlide(n){var t=document.getElementById("jackpotPromo");t&&(n=="up"?t.classList.add("popped"):(t.classList.remove("popped"),t.classList.add("hidden")))}function promoFade(n){var t=document.getElementById("jackpotPromo");t&&(n=="in"?t.classList.add("popped"):(t.classList.remove("popped"),t.classList.add("hidden"),setTimeout(function(){t.style.display="none"},1e3)))}function getCookie(n){for(var r,u,i=document.cookie.split(";"),t=0;t<i.length;t++)if(r=i[t].substr(0,i[t].indexOf("=")),u=i[t].substr(i[t].indexOf("=")+1),r=r.replace(/^\s+|\s+$/g,""),r==n)return unescape(u)}function setCookie(n,t,i){t||(t=n);i||(i=1);var r=new Date;r.setDate(r.getDate()+i);document.cookie=n+"="+t+"; expires="+r.toUTCString()+"; path=/"}function getURL(n){var t=n.getElementsByTagName("a");for(let n=0;n<t.length;n++){t[0].getAttribute("href")!==""&&(window.location=t[0].getAttribute("href"));break}}function showTix(n){var i=document.querySelectorAll(".ticketsArea"),r=document.querySelectorAll(".lotteryTabs li a"),t;for(let n=0;n<i.length;n++)i[n].style.display="none";for(let n=0;n<r.length;n++)r[n].classList.remove("active");return t=document.getElementById(n.getAttribute("href").replace("#","")),n.classList.add("active"),t&&(t.style.display="block"),!1}function AppSlide(n){setTimeout(function(){document.querySelector(".slideOne").classList.add(n)},400);setTimeout(function(){document.querySelector(".slideTwo").classList.add(n)},800);setTimeout(function(){document.querySelector(".slideThree").classList.add(n)},1200);setTimeout(function(){document.querySelector(".appBox .button").classList.add(n)},1600)}function displayTimerFree(n,t,i){var r=document.getElementById(n);r&&(r.innerHTML=(i?"":"<li>"+Math.floor(t/86400)+"<span>d<\/span><\/li>")+"<li"+(i?" class='first-elem'":"")+">"+Math.floor(t%86400/3600)+"<span>h<\/span><\/li><li>"+Math.floor(t%3600/60)+"<span>m<\/span><\/li><li>"+Math.floor(t%60)+"<span>s<\/span><\/li>",t>0&&setTimeout(function(){t--;displayTimerFree(n,t,i)},1e3))}function showSummary(n){var t=document.getElementById("opener");n.open?(n.parentElement.style.maxHeight="60px",t.innerHTML="+",n.open=!1):(n.parentElement.style.maxHeight="1800px",t.innerHTML="-",n.open=!0)}function getInstantWin(n,t,i){iwSkip+=n;iwSkip>iwCount-t&&(iwSkip=0);iwSkip<0&&(iwSkip=iwCount-t);var r=new XMLHttpRequest;r.open("GET","/"+i+"/"+iwSkip+"/"+t+"/",!0);r.onreadystatechange=function(){if(r.readyState===4&&r.status===200){let n=document.getElementById("instantWin");n.style.opacity=0;setTimeout(function(){n.innerHTML=r.responseText;n.style.opacity=1},200)}};r.send()}function searchRaffles(n,t){var u=n.value.toLowerCase().replace(/\ /g,""),i=document.querySelectorAll(".raffleBox."+t),r=document.getElementById(t+"Error");r.style.display="none";for(let n=0;n<i.length;n++)i[n].style.display=i[n].innerHTML.toLowerCase().replace(/\ /g,"").indexOf(u)==-1?"none":"inline-block";for(let n=0;n<i.length;n++){if(i[n].style.display=="inline-block")break;r.style.display=n==i.length-1?"block":"none"}}function yPos(){return self.pageYOffset?self.pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop?document.body.scrollTop:0}function elYPos(n){for(var i=document.getElementById(n),r=i.offsetTop,t=i;t.offsetParent&&t.offsetParent!=document.body;)t=t.offsetParent,r+=t.offsetTop;return r}function smoothScroll(n){var i=yPos(),t=elYPos(n),s=t>i?t-i:i-t,e,f;if(s<100){scrollTo(0,t);return}e=Math.round(s/100);e>=20&&(e=20);var u=Math.round(s/25),r=t>i?i+u:i-u,o=0;if(t>i){for(f=i;f<t;f+=u)setTimeout("window.scrollTo(0, "+r+")",o*e),r+=u,r>t&&(r=t),o++;return}for(f=i;f>t;f-=u)setTimeout("window.scrollTo(0, "+r+")",o*e),r-=u,r<t&&(r=t),o++}function checkDetails(n){var s=n?"0":"",i=document.getElementById("Email"+s),r=document.getElementById("Password"+s),t=document.getElementById("NewPassword"),u=document.getElementById("ConfirmNewPassword"),f=document.getElementById("FirstName"),e=document.getElementById("Surname"),h=document.getElementById("AcceptTerms"),o=document.getElementById("Salutation");if(r||(r=document.getElementById("CurrentPassword")),t||(t=document.getElementById("Password")),u||(u=document.getElementById("ConfirmPassword")),!n&&f&&f.value=="")return alert("Please enter your first name."),f.focus(),!1;if(!n&&e&&e.value=="")return alert("Please enter your surname."),e.focus(),!1;if(i){if(i.value=="")return alert("Please enter your email address."),i.focus(),!1;if(apos=i.value.indexOf("@"),dotpos=i.value.lastIndexOf("."),apos<1||dotpos-apos<2)return alert("Please enter a valid email address."),i.focus(),!1}if(!n&&t&&u){if(t.value=="")return alert("Please enter your new password."),t.focus(),!1;if(validPassword(t)){if(u.value!==t.value)return alert("Your new passwords do not match."),u.focus(),!1}else return!1}else if(r&&r.value=="")return alert("Please enter a password."),r.focus(),!1;if(!n&&h&&!h.checked)return alert("Please read and accept the terms & conditions."),!1;if(!n&&o){var c=document.getElementById("GenderMale"),w=document.getElementById("GenderFemale"),b=document.getElementById("GenderNonBinary"),l=document.getElementById("DateOfBirth"),a=document.getElementById("Address1"),v=document.getElementById("City"),y=document.getElementById("County"),p=document.getElementById("PostCode");if(o.selectedIndex==0)return alert("Please select your salutation from the drop down list."),o.focus(),!1;if(c.checked==!1&&w.checked==!1&&b.checked==!1)return alert("Please enter your gender."),c.focus(),!1;if(l.value=="")return alert("Please enter your date of birth."),l.focus(),!1;if(a.value=="")return alert("Please enter your address."),a.focus(),!1;if(v.value=="")return alert("Please enter your city."),v.focus(),!1;if(y.value=="")return alert("Please enter your county."),y.focus(),!1;if(p.value=="")return alert("Please enter your post code or ZIP code."),p.focus(),!1}return!0}function validPassword(n){var t=n.value;return t.length<8?(alert("Passwords should contain at least eight characters"),!1):/^[a-zA-Z0-9!@#$%^|\?*\(\)]{8,}$/.test(t)?!0:(alert("Passwords can only contain letters, numbers and a selection of special characters: ! @ # $ % ^ | ? * ( )"),!1)}var contactDivs=[];addLoadEvent(function(){var a=document.querySelector("#menuOpen"),u,t,f,r,s,n,h,c,l;a&&a.addEventListener("click",function(){document.querySelector("body").classList.toggle("menuOpen");this.classList.toggle("active")});u=document.querySelectorAll("span.openSub");for(let n=0;n<u.length;n++)u[n].addEventListener("click",function(){this.nextElementSibling.classList.toggle("open");this.innerHTML=this.innerHTML=="+"?"-":"+"});if(t=document.querySelectorAll("li.sub"),"ontouchend"in window&&window.innerWidth>991)for(let n=0;n<t.length;n++)t[n].addEventListener("touchend",function(n){this.clicked||(this.clicked=!0,this.classList.remove("inactive"),n.stopPropagation(),n.preventDefault())});f=document.querySelector(".languages");f&&f.addEventListener("click",function(){this.clicked=!this.clicked;this.clicked?this.classList.remove("inactive"):this.classList.add("inactive")});var e=document.querySelectorAll(".ticketsArea"),v=document.querySelectorAll(".lotteryTabs li a"),y=document.querySelector(".lotteryTabs li a[href='"+window.location.hash+"']");if(e.length>0)for(let n=1;n<e.length;n++)e[n].style.display="none";v.length>0&&v[0].classList.add("active");y&&showTix(y);let o=document.querySelector("a.reset"),i=document.querySelectorAll(".level1, .level2");for(let n=0;n<i.length;n++){let t=i[n].getAttribute("href").split("#")[1];contactDivs.push(t);i[n].addEventListener("click",function(n){var r,i;if(n.preventDefault(),r=this.className.indexOf("level1")!=-1?"level1":"level2",this.className.indexOf("disabled")!=-1)return!1;o.style.display="inline-block";i=document.querySelectorAll("."+r);for(let n=0;n<i.length;n++)this!=i[n]&&i[n].classList.add("disabled");document.getElementById(t).style.display="block"})}o&&o.addEventListener("click",function(n){n.preventDefault();for(let n=0;n<contactDivs.length;n++)document.getElementById(contactDivs[n]).style.display="none";this.style.display="none";for(let n=0;n<i.length;n++)i[n].classList.remove("disabled")});document.getElementById("onoffswitch")&&(r=document.getElementById("onoffswitch"),r.onclick=function(){var n=document.querySelectorAll(".checkerResult");for(let t=0;t<n.length;t++)n[t].querySelectorAll(".won").length!=0||n[t].hide?(n[t].style.display="",n[t].hide=!1):(n[t].style.display="none",n[t].hide=!0);r.className=r.className=="onoffswitch"?"onoffswitch on":"onoffswitch"});s=document.querySelectorAll("ul.tabs");for(let n=0;n<s.length;n++){let t,i=s[n].querySelectorAll("a");t=Array.from(i).filter(n=>n.className.indexOf("active")!=-1)[0]||i[0];t.classList.add("active");for(let n=0;n<i.length;n++)i[n].className.indexOf("active")==-1&&(document.querySelector(i[n].hash).style.display="none"),i[n].addEventListener("click",function(n){t.classList.remove("active");document.querySelector(t.hash).style.display="none";t=this;t.classList.add("active");document.querySelector(this.hash).style.display="block";n.preventDefault()})}n=document.querySelectorAll(".dropdown");h=document.querySelectorAll(".dropdown ul li");for(let t=0;t<n.length;t++)n[t].addEventListener("click",function(i){for(let i=0;i<n.length;i++)t!=i&&n[i].classList.remove("active");this.classList.toggle("active");i.stopPropagation()});for(let n=0;n<h.length;n++)h[n].addEventListener("click",function(){var n=this.innerHTML,t;n.indexOf("<a")!=-1&&(t=/(<a([^>]+)>)/ig,n=n.replace(t,""),n=n.replace("<\/a>",""));this.parentNode.previousElementSibling.innerHTML=n});document.querySelector("body").addEventListener("click",function(){for(let t=0;t<n.length;t++)n[t].classList.remove("active")});document.querySelector("body").addEventListener("touchend",function(){for(let n=0;n<t.length;n++)t[n].classList.add("inactive"),t[n].clicked=!1});c=document.querySelectorAll(".expandBox");for(let n=0;n<c.length;n++)c[n].querySelector(".title").addEventListener("click",function(){this.classList.toggle("active");this.nextElementSibling.classList.toggle("active")});l=document.querySelectorAll(".note");for(let n=0;n<l.length;n++)l[n].addEventListener("click",function(){this.clicked=!this.clicked;this.clicked?this.classList.remove("inactive"):this.classList.add("inactive")})});addLoadEvent(function(){document.getElementById("quickPick")&&SelectedBalls()});const appSlider=(n,t)=>{let r=document.querySelector(t),e=document.querySelector(n),o=document.querySelectorAll(".app-features-nav .button"),u=document.querySelectorAll(".app-features-box .inner-box"),s=document.body.getBoundingClientRect().width,h=document.querySelector(".app-features-nav").getBoundingClientRect().top+document.documentElement.scrollTop;const i=(n,t,i=false)=>{for(let r=0;r<n.length;r++)i?setTimeout(()=>{n[r].classList.remove(t)},200):n[r].classList.remove(t)};s<640&&window.scrollTo({top:h,left:0,behavior:"smooth"});const f=(n,t,i)=>{setTimeout(()=>{n.classList.add(i)},t)};i(o,"active");i(u,"active",!0);i(u,"fade");e.classList.add("active");f(r,200,"active");f(r,300,"fade")}