function myFunction(t){$(".exitblock").remove()}$(document).mouseleave((function(t){t.clientY<10&&$(".exitblock").fadeIn("fast")})),$(document).click((function(t){$(".exitblock").is(":visible")&&!$(t.target).closest(".exitblock .modaltext").length&&$(".exitblock").remove()}));var a={subtract:function(t){var e=$(".pac-minus").html()-0-t;e=e<5?5:e,$(".pac-minus").html(e)}};function Datee(){var t,e=new Date;t=["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"];for(var r=0;r<33;r++){var a="date-"+r,n=document.getElementsByClassName(a),o=new Date(e.getTime()-864e5*r),i=0;timeArray=u(n),timeArray=l(timeArray);for(var c=0;c<n.length;c++){var s=n[c].dataset;s.format?n[c].innerHTML=m(o,s.format):n[c].innerHTML=m(o),n[c].className.match(/\btime\b/)&&(n[c].innerHTML+="   "+timeArray[i],i++)}}function u(t,e){for(var r=[],a=0;a<t.length;a++)t[a].className.match(/\btime\b/)&&r.push(Math.round(0+1440*Math.random()));return e?r.sort((function(t,e){return e-t})):r.sort((function(t,e){return t-e})),r}function l(t){for(var e=[],r=0;r<t.length;r++){var a=Math.floor(t[r]/60),n=t[r]%60,o=a<10?"0"+a:a,i=n<10?"0"+n:n;e.push(o+":"+i)}return e}function m(e,r){var a="",n=e.getDate(),o=e.getFullYear(),i=e.getMonth()+1;switch(r||!0){case"mm.dd.yyyy":return a+=i<10?"0"+i:i,a+=".",a+=n<10?"0"+n:n,a+="."+o;case"dd month yyyy":return a+=n<10?"0"+n:n,a+=" ",a+=t[i-1],a+=" "+o;case"yyyy":return a+=" "+o;case"dd month":return a+=n<10?"0"+n:n,a+=" ",a+=t[i-1];case"day dd, month yyyy":return a+=["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"][new Date(o,i-1,n).getDay()],a+=" ",a+=n<10?"0"+n:n,a+=" ",a+=t[i-1],a+=" "+o;case"dd/mm/yyyy":return a+=n<10?"0"+n:n,a+="/",a+=i<10?"0"+i:i,a+="/"+o;case"dd-mm-yyyy":return a+=n<10?"0"+n:n,a+="-",a+=i<10?"0"+i:i,a+="-"+o;default:return a+=n<10?"0"+n:n,a+=".",a+=i<10?"0"+i:i,a+="."+o}}}$(document).ready((function(){setTimeout((function(){a.subtract(2),setInterval((function(){a.subtract(Math.floor(2*Math.random())+2)}),1e3*(Math.floor(5*Math.random())+20))}),2e3)})),$(document).ready((function(){$("[data-toggle=scroll]").on("click",(function(){var t=$(this).attr("href"),e=$(t).offset().top;return jQuery("html:not(:animated),body:not(:animated)").animate({scrollTop:e},2e3),!1}))})),document.addEventListener("DOMContentLoaded",Datee);var resultWrapper=document.querySelector(".spin-result-wrapper"),wheel=document.querySelector(".wheel-img");function spin(){wheel.classList.contains("rotated")||(wheel.classList.add("super-rotation"),setTimeout((function(){resultWrapper.style.display="block"}),8e3),setTimeout((function(){$(".spin-wrapper").slideUp(),$(".order_block").slideDown(),start_timer()}),1e4),wheel.classList.add("rotated"))}var closePopup=document.querySelector(".close-popup");$(".close-popup, .pop-up-button").click((function(t){t.preventDefault(),$(".spin-result-wrapper").fadeOut();var e=$("#form").offset().top;$("body,html").animate({scrollTop:e},800)}));var intr,time=600;function start_timer(){intr=setInterval(tick,1e3)}function tick(){time-=1;var t=Math.floor(time/60),e=time-60*t;0==t&&0==e&&clearInterval(intr),e=e>=10?e:"0"+e,$("#min").html("0"+t),$("#sec").html(e)}