function animateHeader(){for(var n=1;n<13;n++)(function(n){window.setTimeout(function(){var t=$(".dk_bar_"+n),i=randomIntFromInterval(70,90);t.animate({height:i},600)},n*20)})(n);setTimeout(function(){var n=$(".dk_bar_10>div"),t=$(".dk_bar_11>div"),i=$(".dk_bar_12>div");n.animate({height:10},300);t.animate({height:25},300);i.animate({height:45},300)},600)}function randomIntFromInterval(n,t){return Math.floor(Math.random()*(t-n+1)+n)}function setScrollTriggers(){$(window).scroll(function(){var i=$("#bar, #bar_home"),r=$("#svgReceipts").offset().top,u=$("#svgReceipts").outerHeight(),f=$(".trPoint2").offset().top,e=$(".trPoint2").outerHeight(),o=$(".trPoint3").offset().top,s=$(".trPoint3").outerHeight(),t=$(window).height(),n=$(this).scrollTop();n<10?i.show():i.hide();n>r+u-t&&anTrigger1===!1&&(anTrigger1=!0,animateReceipts());n>f+e-t&&anTrigger2===!1&&(anTrigger2=!0,animateInvoice());n>o+s-t&&anTrigger3===!1&&(anTrigger3=!0,animateSeal())})}function animateSeal(){var n=new TimelineMax,t=$("#svgFreeService polygon, #svgFreeService text");n.to(t,0,{display:"block"},0);n.from(t,.7,{scale:.2,transformOrigin:"50% 50%",ease:Bounce.easeOut},.1)}function animateReceipts(){var t=new TimelineMax,i=$("#svgReceipts #ExpPhone"),r=$("#svgReceipts #Receipt"),s=$("#svgReceipts #Receipt .st11"),h=$("#svgReceipts #CamFlash"),c=$("#svgReceipts #Starflash"),u=$("#svgReceipts #CropZone, #svgReceipts #CropHandles"),l=$("#svgReceipts #CropHandles"),a=$("#svgReceipts #ExpPhone #ExpScreen"),f=$("#svgReceipts #Transmit"),e=$("#svgReceipts #LaptopInt, #svgReceipts #IntLabels, #svgReceipts #IntLabelVals"),v=$("#svgReceipts #IntLabelVals>*:nth-child(1)"),y=$("#svgReceipts #IntLabelVals>*:nth-child(2)"),p=$("#svgReceipts #IntLabelVals>*:nth-child(3)"),w=$("#svgReceipts #IntLabelVals>*:nth-child(4)"),b=$("#svgReceipts #IntLabels>*:nth-child(1)"),k=$("#svgReceipts #IntLabels>*:nth-child(2)"),d=$("#svgReceipts #IntLabels>*:nth-child(3)"),g=$("#svgReceipts #IntLabels>*:nth-child(4)"),o=$("#CheckIco"),n=.1;t.to(i,0,{display:"block"},n);t.from(i,.7,{x:"-=200",y:"+=300",rotation:-40,transformOrigin:"50% 50%",ease:Power4.easeOut},n);t.to(r,.1,{scale:.8,y:"-=30",transformOrigin:"50% 50%",ease:Power4.easeOut},n+.2);n+=.6;t.to(h,0,{display:"block"},n);t.to(c,2,{scale:4,transformOrigin:"50% 50%",ease:Power4.easeOut},n);t.to(h,2,{opacity:0},n+.1);n+=.6;t.to(u,0,{y:"-=5"},n);t.to(u,0,{display:"block"},n);t.to(l,.1,{x:"-=5"},n);t.to(a,0,{display:"none"},n);n+=1;t.to(f,0,{opacity:.5},n);t.to(f,0,{display:"block"},n);t.to(f,3,{x:"+=100",scale:1.3},n);n+=2;t.to(f,0,{display:"none"},n);t.to(e,0,{display:"block"},n);t.to(e,0,{opacity:0},n);t.to(e,.3,{opacity:1},n);t.to(e,.3,{x:"-=140",y:"-=30"},n);t.to(i,.3,{x:"-=140"},n);t.to(r,.3,{scale:.8},n);t.to(u,.3,{x:"-=140",onComplete:function(){r.insertAfter($("#IntLabelVals"))}},n);t.to(r,.3,{x:"+=40",y:"+=30"},n);t.to(i,.3,{opacity:0},n);t.to(u,.3,{opacity:0},n);n+=1.5;t.to(s,.1,{stroke:"#cc0000"},n);t.to(v,0,{display:"block"},n);t.to(b,.1,{fill:"#666666"},n);n+=.3;t.to(y,0,{display:"block"},n);t.to(k,.1,{fill:"#666666"},n);n+=.3;t.to(p,0,{display:"block"},n);t.to(d,.1,{fill:"#666666"},n);n+=.3;t.to(w,0,{display:"block"},n);t.to(g,.1,{fill:"#666666"},n);t.to(s,2,{stroke:"#cccccc"},n);t.to(o,0,{display:"block"},n);t.to(o,3,{y:"-=100"},n);t.to(o,3,{opacity:0},n)}function animateInvoice(){var i=new TimelineMax,e=$(".invoices-box #Contemporary"),o=$(".invoices-box #Rounded"),s=$(".invoices-box #Vista"),h=$(".invoices-box #Eco"),c=$(".invoices-box #Rhubarb"),l=$(".invoices-box #Neon"),f=$(window).width(),n=1600,r=300,a=f/1e3,t,u;f<1e3&&(n*=a,r=n/6,$(".invoices-box #Neon").hide());t=.1;u=.2;i.to(l,2,{x:"+="+n,ease:Power4.easeOut},t);n-=r;t+=u;i.to(c,2,{x:"+="+n,ease:Power4.easeOut},t);n-=r;t+=u;i.to(h,2,{x:"+="+n,ease:Power4.easeOut},t);n-=r;t+=u;i.to(s,2,{x:"+="+n,ease:Power4.easeOut},t);n-=r;t+=u;i.to(o,2,{x:"+="+n,ease:Power4.easeOut},t);n-=r;t+=u;i.to(e,2,{x:"+="+n,ease:Power4.easeOut},t)}function setLaptopText(n){$("#month").html(n)}function setupMobileHeader(){if(navigator.userAgent.match(/Mobi/))$(window).on("load scroll",function(){var n=getDeviceScale();n>=.75?($(".menu").show(),$(".logo").removeClass("logo-zooming").addClass("logo-base")):($(".menu").hide(),$(".logo").removeClass("logo-base").addClass("logo-zooming"))})}function getDeviceScale(){var n,t=Math.abs(window.orientation)==90;return n=t?Math.max(480,screen.height):screen.width,window.innerWidth/n}function setupHomeGui(){$(".menu-s").click(function(n){$(".menu-s-list").slideToggle(0);n.stopPropagation()});$(".menu-list").click(function(n){n.stopPropagation()});$(document).click(function(){$(".menu-s-list").css("display")==="block"&&$(".menu-s").click()});$("#btnjoin, #btnjoinl").click(function(){$("#btnjoin").hide();$(".mtdRibbon").hide();$("#domain").show();$("html, body").animate({scrollTop:$("#domain").offset().top-50},500)});$(".t_simple").click(function(){$("html, body").animate({scrollTop:$(".s_simple").offset().top-40},200)});$(".t_fast").click(function(){$("html, body").animate({scrollTop:$(".s_fast").offset().top-40},200)});$(".t_free").click(function(){$("html, body").animate({scrollTop:$(".s_free").offset().top-40},200)});$("#subdom").keyup(function(){var n=$(this).val(),t;n=n.replace(/[^A-Za-z0-9]/g,"");n=n.replace(/ /gi,"");$(this).val(n);$(".input-domain").text(n);n.length>=3?(domKeyhit=!0,t="searchStr="+n,$.ajax({type:"GET",url:"/handlers/AutoCompleteSearch/CheckClientID",async:!0,dataType:"json",data:t,success:function(n){$("#domain").removeClass("domhelper_good domhelper_bad");n.jval.isValid==="true"?($("#domain").addClass("domhelper_bad"),$("#domhelper").text("This name looks like it's already in use :(")):($("#domain").addClass("domhelper_good"),$("#domhelper").text("Great news! Your chosen name is available, click GO to continue"))}})):domKeyhit==!0&&($("#subdom").removeClass("domhelper_neutral domhelper_good domhelper_bad"),$("#subdom").addClass("domhelper_bad"),$("#domhelper").text("Your secure domain must be at least 3 characters long"))});$("#btngo").click(function(){if($("#subdom").css("border","1px solid #DDD"),$("#domain").hasClass("domhelper_good")===!1)$("#subdom").css("border","3px solid #cc0000");else{var n=$("#subdom").val();location.assign("https://www.quickfile.co.uk/register?clID="+n)}})}var domKeyhit,fbCursor;$(document).ready(function(){setupHomeGui();setScrollTriggers();animateHeader()});var anTrigger1=!1,anTrigger2=!1,anTrigger3=!1;domKeyhit=!1;fbCursor=1,function(){if("undefined"!=typeof window&&window.addEventListener){var n=Object.create(null),r,t=function(){clearTimeout(r);r=setTimeout(f,100)},i=function(){},e=function(){if(window.addEventListener("resize",t,!1),window.addEventListener("orientationchange",t,!1),window.MutationObserver){var n=new MutationObserver(t);n.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0});i=function(){try{n.disconnect();window.removeEventListener("resize",t,!1);window.removeEventListener("orientationchange",t,!1)}catch(i){}}}else document.documentElement.addEventListener("DOMSubtreeModified",t,!1),i=function(){document.documentElement.removeEventListener("DOMSubtreeModified",t,!1);window.removeEventListener("resize",t,!1);window.removeEventListener("orientationchange",t,!1)}},o=function(n){function i(n){if(void 0!==n.protocol)var t=n;else t=document.createElement("a"),t.href=n;return t.protocol.replace(/:/g,"")+t.host}if(window.XMLHttpRequest){var t=new XMLHttpRequest,r=i(location);n=i(n);t=void 0===t.withCredentials&&""!==n&&n!==r?XDomainRequest||void 0:XMLHttpRequest}return t},f=function(){function l(){--c;0===c&&(i(),e())}function v(t){return function(){!0!==n[t.base]&&(t.useEl.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+t.hash),t.useEl.hasAttribute("href")&&t.useEl.setAttribute("href","#"+t.hash))}}function p(n){return function(){var i=document.body,t=document.createElement("x");n.onload=null;t.innerHTML=n.responseText;(t=t.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",i.insertBefore(t,i.firstChild));l()}}function y(n){return function(){n.onerror=null;n.ontimeout=null;l()}}var t,u,c=0,f,s,h,r,a;for(i(),f=document.getElementsByTagName("use"),u=0;u<f.length;u+=1){try{s=f[u].getBoundingClientRect()}catch(w){s=!1}h=(t=f[u].getAttribute("href")||f[u].getAttributeNS("http://www.w3.org/1999/xlink","href")||f[u].getAttribute("xlink:href"))&&t.split?t.split("#"):["",""];r=h[0];h=h[1];a=s&&0===s.left&&0===s.right&&0===s.top&&0===s.bottom;s&&0===s.width&&0===s.height&&!a?(f[u].hasAttribute("href")&&f[u].setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t),r.length&&(t=n[r],!0!==t&&setTimeout(v({useEl:f[u],base:r,hash:h}),0),void 0===t&&(h=o(r),void 0!==h&&(t=new h,n[r]=t,t.onload=p(t),t.onerror=y(t),t.ontimeout=y(t),t.open("GET",r),t.send(),c+=1)))):a?r.length&&n[r]&&setTimeout(v({useEl:f[u],base:r,hash:h}),0):void 0===n[r]?n[r]=!0:n[r].onload&&(n[r].abort(),delete n[r].onload,n[r]=!0)}f="";c+=1;l()},u=function(){window.removeEventListener("load",u,!1);r=setTimeout(f,0)};"complete"!==document.readyState?window.addEventListener("load",u,!1):u()}}()