function validateGender(){return $(".gender .male .mbutton.selected, .gender .female .fbutton.selected").length>0?!0:!1}function showSlides(){for(var t=document.getElementsByClassName("mySlides"),n=0;n<t.length;n++)t[n].style.display="none";slideIndex++;slideIndex>t.length&&(slideIndex=1);t[slideIndex-1].style.display="block";setTimeout(showSlides,1e4)}var selector,minutes,seconds,slideIndex;$(document).on("click",".gender a",function(){$(".gender a").removeClass("selected");$(".gender a").removeClass("input-gender-error");$(this).addClass("selected");$(".gender a").attr("aria-checked",!1);$(this).attr("aria-checked",!0)});window.onload=function(){$("#FieldErrors").val()!=""&&($("#divStage1").hide(),$("#divStage2").show());var n=$("#FullBirthDate"),t=n.val();t!=="0001/01/01"&&n.valid()&&$("#coregs").length>0&&$("#coregs").show()};$(document).on("click",".performPostcodeLookup",function(n){n.preventDefault();var t=$("#addressSelector").val();$(".postcodeLookupError").hide();$("#frm-registration").valid()?($(".performPostcodeLookup").addClass("Hidden"),$(".process").removeClass("Hidden"),$("#addressSelector").focus(),$("#Address_Postcode").prop("disabled","disabled"),$(".change-postcode").show()):($(".oxdata-postcode").addClass("input-validation-error"),$(".oxdata-postcode").focus())});$(function(){$(".change-postcode").click(function(n){n.preventDefault();$(".NotSelected").hide();$("#Address_Postcode").removeProp("disabled");$(".performPostcodeLookup").removeClass("Hidden");$(".process").addClass("Hidden");$("#Address_Postcode").val("");$("#addressSelector option:not(:first)").remove();$("#addressSelector").hide();$(this).hide()})});$(document).on("click","#processDetails",function(n){n.preventDefault();var t=$("#addressSelector").val(),i=$(".oxdata-postcode").val();if(validateGender()){if(i.length>=5)return t!=""||$(".oxdata-addressline1").is(":visible")?($("#Address_Postcode").removeProp("disabled"),$("#divStage1").addClass("Hidden"),$("#divStage2").removeClass("Hidden"),$("#coregs").css("display","none"),$(".NotSelected").hide(),$(".oxdata-title").focus(),!0):($(".NotSelected").show(),!1);$(".oxdata-postcode").addClass("input-validation-error");$(".oxdata-postcode").focus()}else $(".gender a").addClass("input-gender-error"),$(".gender a").focus()});selector="#collapsibleNavbar li, #navCollapse li, a.internalDocument, a.terms-link, a.privacy-link";$(document).on("click",selector,function(n){var t,i,r;n.preventDefault();t=$(this).attr("data-target");i=$(this).attr("data-scroll-to");$(selector).removeClass("selected");$(this).addClass("selected");r="/gettestkeep/static/";t.indexOf("/")==0&&(r="");$("#infoModal").find(".modalViewArea").load(r+t,function(){var n=$(this),r=0,t;i!=undefined&&(t=n.find("#"+i),t.length>0&&(r=t.offset().top-n.offset().top));n.scrollTop(r);n.find(".document-section").length>0&&(n.find(".document-section:not(.always-visible)").hide(),n.find(".document-section:not(:visible)").each(function(){if($(this).prev(".content-trigger").length==0){var n=$(this);$(this).before($("<a class='content-trigger' style='display:inline;text-decoration:underline' href='#'>+ Expand section<\/a>").click(function(t){t.preventDefault();n.is(":visible")?$(this).text("+ Expand section"):$(this).text("- Hide section");n.slideToggle()}))}}))});$("#infoModal").modal()});$(document).ready(function(){$(window).keydown(function(n){if(n.keyCode==13)return n.preventDefault(),!1})});minutes=2;seconds=59;$(function(){$("#timer").html(minutes+"m "+seconds+"s ");setInterval(function(){seconds<=0&&(minutes--,seconds=59);seconds--;$("#timer").html(minutes+"m "+seconds+"s ");minutes<=0&&seconds<=0&&(minutes=3,seconds=0)},1e3)});slideIndex=0;showSlides()