(function(){aws={home:{},videoCampaign:{}}})(),function(){aws.util={setCookie:function(n,t,i){var u="",r;i&&(r=new Date,r.setTime(r.getTime()+i*864e5),u="; expires="+r.toUTCString());document.cookie=n+"="+(t||"")+u+";path=/"},getCookie:function(n){for(var t,r=n+"=",u=document.cookie.split(";"),i=0;i<u.length;i++){for(t=u[i];t.charAt(0)===" ";)t=t.substring(1,t.length);if(t.indexOf(r)===0)return t.substring(r.length,t.length)}return null},deleteCookie:function(n){document.cookie=n+"=; Max-Age=-99999999;HttpOnly;secure"},ontrimContentText:function(n,t){$(t).text().length>n?$(t).attr("title",$(t).text()):"";var i=$(t).text();i=$(t).text().length>n?i.substr(0,n)+" ...":i;$(t).text(i)},showBusyCursor:function(){$("body").addClass("aws-scroll-hidden");$("body").prepend("<div class='loadingPanel'><div class='loadingInnerPanel'><\/div><\/div>")},hideBusyCursor:function(){$("body").removeClass("aws-scroll-hidden");$("body").find(".loadingPanel").remove()},onLoadImage:function(n){$(n)[0].hasAttribute("data-image-url")&&($(n).css("background-image","url("+$(n).attr("data-image-url")+")"),$(n).css("background-size","cover"),$(n).attr("data-imgtype")==="banner"?$(n).css("background-position","left center"):$(n).css("background-position","center center"),$(n).css("min-height",$(n).attr("data-image-height")));$(n).css("background-color","transparent")},onsvgImageload:function(n,t,i){var u=".cls-1",f=".cls-2",r,e;$(n).find(u).attr("class",t);$(n).find(f).attr("class",i);r=textclassthree=$(n).find("style").text();textclasstwo=r.replace(u,"."+t);textclasstwo=textclasstwo.replace(f,"."+i);r=r.replace(u,".aws-hc ."+t);r=r.replace(f,".aws-hc ."+i);textclassthree=textclassthree.replace(u,".aws-lc ."+t);textclassthree=textclassthree.replace(f,".aws-lc ."+i);r=r.replace("92278f","FBD130");textclassthree=textclassthree.replace("92278f","000000");e=r+textclasstwo+textclassthree;$(n).find("style").text(e)},onValidateCarouseldots:function(n,t){return t<=$(n).children().length-t?!0:!1},onClickInternalpageVideo:function(n){$(n).parent().parent().find(".internalvideo").trigger("play");$(n).parent().hide()},onVideoEnded:function(n){n.load();$(n).parent().find(".internalpage-video-img-overlay").show()},onCheckApplicationState:function(n,t,i){$("body").hasClass("theme")&&$(n).parent().hasClass("theme-out-scope-width")===!0&&$(t).detach().appendTo(i)},owlCarouselChangeHandler:function(n){$(n).find(".owl-prev").hasClass("disabled")?$(n).find(".owl-prev").attr("aria-disabled","true"):$(n).find(".owl-prev").attr("aria-disabled","false");$(n).find(".owl-next").hasClass("disabled")?$(n).find(".owl-next").attr("aria-disabled","true"):$(n).find(".owl-next").attr("aria-disabled","false")}}}(),function(){$(document).ready(function(){var t,n;aws.util.setCookie("AWS","enabled");$("body").hasClass("theme")&&($("body").append('<div class="video-campaign-model videocamp-color"><\/div>'),$("body").append('<div class="image-campaign-model"><\/div>'));navigator.onBrowserVersionCheck=function(){var i=navigator.userAgent,t,n=i.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(n[1])?(t=/\brv[ :]+(\d+)/g.exec(i)||[],t[0].split(":")):n[1]==="Chrome"&&(t=i.match(/\b(OPR|Edge)\/(\d+)/),t!=null)?t.slice(1):(n=n[2]?[n[1],n[2]]:[navigator.appName,navigator.appVersion,"-?"],(t=i.match(/version\/(\d+)/i))!=null&&n.splice(1,1,t[1]),n)}();t=aws.util.getCookie("unsupported-browser");(navigator.onBrowserVersionCheck[0].trim()==="Chrome"&&parseInt(navigator.onBrowserVersionCheck[1].trim())<62||navigator.onBrowserVersionCheck[0].trim()==="Edge"&&parseInt(navigator.onBrowserVersionCheck[1].trim())<15||navigator.onBrowserVersionCheck[0].trim()==="rv"&&parseInt(navigator.onBrowserVersionCheck[1].trim())<9||navigator.onBrowserVersionCheck[0].trim()==="Firefox"&&parseInt(navigator.onBrowserVersionCheck[1].trim())<56||navigator.onBrowserVersionCheck[0].trim()==="Safari"&&parseInt(navigator.onBrowserVersionCheck[1].trim())<10)&&$(window).width()>1199&&t!="yes"&&$(".unsupport-browser").modal("show");$("span[onload]").trigger("onload");$("p[onload]").trigger("onload");$("a[onload]").trigger("onload");$("li[onload]").trigger("onload");$("h1[onload]").trigger("onload");$("h2[onload]").trigger("onload");$("h3[onload]").trigger("onload");$("div[onload]").trigger("onload");$("svg").each(function(){text=$(this).find("title").text();$(this).after("<span class='sr-only'>"+text+"<\/span>")});$(":input").on("keyup",function(){var n=$(this);setTimeout(function(){var t=n.val(),i=t[t.length-1],r;(i=="<"||i==">")&&(r=t.replace(/[<>]/g,""),n.val(r))})});$(":input").on("paste",function(){var n=$(this);setTimeout(function(){var t=n.val(),i=t.replace(/[<>]/g,"");n.val(i)})});n=0;$(".quickIcon-container .action-text").each(function(){$(this).height()>n&&(n=$(this).height())});$(".quickIcon-container .action-text").height(n);$("svg").attr({tabindex:"-1",focusable:"false","aria-hidden":"true"});$("svg").find("*").attr("tabindex","-1");$("svg").find("*").attr("aria-hidden","true");$("body").find(".IYA-input").length>0&&$(".IYA-input").geocomplete({country:"UK"});$(".IYA-alert").submit(function(n){n.preventDefault();var t=$(".IYA-alert").attr("data-url");t+="?loc="+$(".IYA-input").val();$(".IYA-alert").attr("action",t);$(".IYA-alert")[0].submit()});$(".close-browser-alert").on("click",function(){$(".alertband-container").removeClass("browser-outdated");$(".navbar-fixed-top").removeClass("increase-nav-height")});$(".helptext-popover").popover({html:"true",trigger:"focus",placement:"auto bottom",title:function(){return $(this).data("title")},template:'<div class="popover custom-popover-class"><div class="arrow"><\/div><div class="popover-inner"><button type="button" class="boxlinksclose icon-s-cross-14"><\/button><h3 class="popover-title body-copy"><\/h3><div class="popover-content">/div><\/div><\/div>'}).on("shown.bs.popover.custom-popover-class",function(){var n=$(this);$(this).parent().find("div.popover .boxlinksclose").on("click",function(){n.popover("hide")})});$(".unsupport-browser").on("hidden.bs.modal",function(){aws.util.setCookie("unsupported-browser","yes")})})}(),function(){aws.css={errors:{}};aws.css.errors.common={title:"Please select one of the following.",firstname:"First name is a mandatory field. Please enter your first name.",lastname:"Last name is a mandatory field. Please enter your last name.",phone:{required:"Phone number is a mandatory field. Please enter.",telecode:"Sorry the Phone number you have entered doesn’t seem to be valid. Please check and enter again."},mobilenumber:{required:"Mobile number is a mandatory field. Please enter your Mobile number.",telecode:"Sorry the mobile number you have entered doesn’t seem to be valid. Please check and enter again."},contactNo:{required:"Contact number is a mandatory field. Please enter.",telecode:"Sorry the contact number you have entered doesn’t seem to be valid. Please check and enter again."},phone:{required:"Phone is a mandatory field. Please enter.",telecode:"Sorry the contact number you have entered doesn’t seem to be valid. Please check and enter again."},email:{required:"Email address is a mandatory field. Please enter your email address.",emailcode:"Email address is in invalid format. Please enter a valid format."},SearchPostcode:{required:"Postcode is a mandatory field. Please enter your postcode.",ukpostcode:"Please enter a valid postcode.",address:"Please search postcode or enter manual address"},building:"Building is a mandatory field. Please enter your building.",street:"Street is a mandatory field. Please enter your street.",town:"Town is a mandatory field. Please enter your town.",city:"City is a mandatory field. Please enter your city",state:"State is a mandatory field. Please enter your state",houseno:"Please enter only alphanumeric value",accountno:{required:"This is a mandatory field. Please enter.",accountcode:"Sorry the account number you have entered doesn’t seem to be valid. Please check and enter again."},address:"Address is a mandatory field. Please select your address.",addressline:"Address is a mandatory field. Please enter your address.",postcode:{required:"Postcode is a mandatory field. Please enter your postcode.",ukpostcode:"Please enter a valid postcode.",address:"Please search postcode or enter manual address"},tandc:{required:"Please agree with the terms and conditions. It is mandatory"},nationalinsno:{required:"This is a mandatory field. Please enter",nationalinsuranceno:"This is an invalid format. Please enter a valid number",ukpostcode:"Please enter a valid postcode."},mandatoryfill:"This is a mandatory field. Please fill",mandatoryfieldselect:"This is a mandatory field. Please select.",mandatoryselect:"This is a mandatory selection. Please select.",selectone:"Please select one of the following",mandatoryenter:"This is a mandatory field. Please enter.",supplyadddresspostcode:{required:"Postcode is a mandatory field. Please enter your supply address postcode.",ukpostcode:"Please note that the correct format for postcode is AA11 1AA."}};aws.css.errors["education-center"]={studentcount:"The total number of students must be between 1 and 36",adultcount:"The number of adults does not meet the ratio requirements of one adult to six children"};aws.css.errors["watersure-app"]={applicanttype:"Please select which describes you the best. It is mandatory.",upload:"This is a mandatory field. Please upload.",checklist:"This is a mandatory checklist. Please select and upload the required document.",uploadtype:"This is a mandatory field. Please upload the required document.",medicalradio:"This is a mandatory field. Please select.",medicalcondition:"This is a mandatory field. Please select.",relationshipaccholder:"Please tell us your relationship with the registered account holder.",relationradio:"This is a mandatory field. Please select.",largefamilyradio:"This is a mandatory field. Please select.",fullname:"Full name is a mandatory field. Please enter your full name."};aws.css.errors["movein-out"]={movinghouse:"Please select if you are moving-in/out of house. It is mandatory.",title:"Please select a title.",firstname:"First name is a mandatory field. Please enter your first name.",lastname:"Last name is a mandatory field. Please enter your last name.",email:{required:"Email address is a mandatory field. Please enter your email address.",email:"Please enter E-mail ID in the correct format e.g. abc@xyz.com."},phone:{required:"Phone is a mandatory field. Please enter.",telecode:"Sorry the contact number you have entered doesn’t seem to be valid. Please check and enter again."},moveindate:"Please fill in Move-in date. It is a mandatory field.",moveoutdate:"Please fill in Move-out date. It is a mandatory field.",meterreading:"This is a mandatory field. Please fill.",meternumber:"Please provide the correct meter reading.",propertybuild:"This is a mandatory field. Please select.",paymentsetup:"This is a mandatory field. Please select.",paymentmode:"This is a mandatory field. Please select.",tandc:"Please select the terms and conditions. It is Mandatory.",accountno:{required:"This is a mandatory field. Please enter.",accountcode:"Sorry the account number you have entered doesn’t seem to be valid. Please check and enter again."},meterreading:"This is a mandatory field. Please enter.",meternumber:"Please provide the correct meter reading.",buildproperty:"This is a mandatory field. Please enter.",bankorsocietyno:"Please provide valid bank or building society account number."};aws.css.errors["provide-meter-reading"]={meterreadingSubmissionReason:"This is a mandatory field. Please select.",termsandcondition:"These are mandatory. Please select.",meternumber:"Please provide the correct meter reading."};aws.css.errors["setup-payment-plan"]={accountno:{required:"This is a mandatory field. Please enter.",accountcode:"Sorry the account number you have entered doesn’t seem to be valid. Please check and enter again."},title:"Please select one of the following.",firstname:"First name is a mandatory field. Please enter your first name.",lastname:"Last name is a mandatory field. Please enter your last name.",email:{required:"Email address is a mandatory field. Please enter your email address.",email:"Email address is in invalid format. Please enter a valid format."},contactNum:{required:"Phone is a mandatory field. Please enter.",telecode:"Sorry the contact number you have entered doesn’t seem to be valid. Please check and enter again."},postcode:{required:"Postcode is a mandatory field. Please enter your supply address postcode.",ukpostcode:"Please note that the correct format for postcode is AA11 1AA."},building:"Building is a mandatory field. Please enter your building.",street:"Street is a mandatory field. Please enter your street.",townCity:"Town is a mandatory field. Please enter your town.",postcode2:{required:"Postcode is a mandatory field. Please enter your postcode.",ukpostcode:"Please note that the correct format for postcode is AA11 1AA."},paymentmode:"This is a mandatory field. Please select.",meterreading:"This is a mandatory field. Please enter.",meternumber:"Please provide the correct meter reading.",tandc:"Please select the terms and conditions. It is Mandatory.",buildingAcNum:"Please provide valid bank or building society account number."};aws.css.errors["apply-for-meter"]={tandc:"These are mandatory. Please select.",confirm1:"These are mandatory. Please select.",confirm2:"These are mandatory. Please select.",buildingAcNum:"Please provide valid bank or building society account number."};aws.css.errors["lite-application"]={dobAccntholder:"This is a mandatory field. Please select.",radioMedical:"Please select whether anyone has a medical condition",radioDisability:"Please select whether anyone has a disability",medCondition:"Please provide the name of medical condition",disableType:"You must select who has a disability",homeowner:"Please select home owner",ownerType:"You must select tenant",otherDetails:"You must state the tenant type for other",numAdults:{required:"Please provide the number of adults",number:"Please enter valid number of adults"},numChild:{required:"Please provide the number of children",number:"Please enter valid number of children"},rent:{required:"Please enter valid number for rent/mortgage",number:"Please enter valid number for rent/mortgage"},cTax:{required:"Please enter valid number for council tax",number:"Please enter valid number for council tax"},amt1:{required:"Please enter valid value for council tax reduction",number:"Please enter valid value for council tax reduction"},amt2:{required:"Please enter valid value for housing benefit",number:"Please enter valid value for housing benefit"},amt3:{required:"Please enter valid value for support for mortgage interest",number:"Please enter valid value for support for mortgage interest"},totalIncome:{required:"Please provide the number of your total monthly income, or enter 0 if this does not apply",number:"Please enter valid number for your total monthly income"},partnerIncome:{required:"Please provide the number of your partner's total monthly income, or enter 0 if this does not apply",number:"Please enter valid number for your partner's total monthly income"},otherIncome:{number:"Please enter valid number for other monthly income"},bamt1:{required:"Please enter valid value for Child Benefit",number:"Please enter valid value for Child Benefit"},bamt2:{required:"Please enter valid value for Child Tax Credit",number:"Please enter valid value for Child Tax Credit"},bamt3:{required:"Please enter valid value for Employment Allowance",number:"Please enter valid value for Employment Allowance"},bamt4:{required:"Please enter valid value for income support",number:"Please enter valid value for income support"},bamt5:{required:"Please enter valid value for Jobseekers Allowance",number:"Please enter valid value for Jobseekers Allowance"},bamt6:{required:"Please enter valid value for State Pension Credit",number:"Please enter valid value for State Pension Credit"},bamt7:{required:"Please enter valid value for Working Tax Credit",number:"Please enter valid value for Working Tax Credit"},bamt8:{required:"Please enter valid value for DLA/PIP",number:"Please enter valid value for DLA/PIP"},bamt9:{required:"Please enter valid value for Universal Credit",number:"Please enter valid value for Universal Credit"},consent:{required:"You must select declaration."}};aws.css.errors["leakage-allowance"]={accountNum:{number:"Sorry the account number you have entered doesn’t seem to be valid. Please check and enter again."},title:"Please select one of the following.",firstname:"First name is a mandatory field. Please enter your first name.",lastname:"Last name is a mandatory field. Please enter your last name.",email:{required:"Email address is a mandatory field. Please enter your email address.",email:"Email address is in invalid format. Please enter a valid format."},contactNum:{required:"Phone is a mandatory field. Please enter.",telecode:"Sorry the contact number you have entered doesn’t seem to be valid. Please check and enter again."},postcode:{required:"Postcode is a mandatory field. Please enter your supply address postcode.",ukpostcode:"Please note that the correct format for postcode is AA11 1AA."},building:"Building is a mandatory field. Please enter your building.",street:"Street is a mandatory field. Please enter your street.",townCity:"Town is a mandatory field. Please enter your town.",postcode2:{required:"Postcode is a mandatory field. Please enter your postcode.",ukpostcode:"Please note that the correct format for postcode is AA11 1AA."},leakLocation:"This is a mandatory field. Please select.",leakGoTo:"This is a mandatory field. Please fill.",repairedBy:"This is a mandatory field. Please fill.",repairedDate:"This is a mandatory field. Please select.",meterDate:"This is a mandatory field. Please select.",meterreading:"This is a mandatory field. Please fill.",meterreadingSubmissionReason:"This is a mandatory field. Please select.",tandc:"This is a mandatory selection. Please select.",meternumber:"Please provide the correct Meter reading."};aws.css.errors["switch-to-metered-charges"]={termsandcondition:"This is mandatory. Please select.",meternumber:"Please provide the correct meter reading.",postcode:{required:"Please fill in the postcode to check eligibility"}};aws.css.errors["reduced-standing-charges"]={postcode:{required:"Postcode is a mandatory field. Please enter your supply address postcode.",ukpostcode:"Please note that the correct format for postcode is AA11 1AA."}};aws.css.errors["plots-to-postal"]={postcode:{ukpostcode:"Invalid format. Please correct format for postcode"}};aws.css.errors["priority-services"]={applyingfor:"Please select if you are applying for yourself or someone else. It is mandatory.",keystage:"Please select the appropriate service(s) you would like.",cssbooktac:"Please agree with the terms & conditions and data privacy policy.",title:"Please fill in the title.",email:{required:"E-mail address is a mandatory field. Please fill in the E-mail address.",emailcode:"Please note that the correct format for e-mail id is example@example.com."},mobilenumber:"One of the mobile/telephone number is mandatory.",selectcondition:"Please select the conditions that apply. It is mandatory.",incorrectpostcode:"Please note that the Postcode is not entered in correct format. The correct format is AA11 1AA.",fullname:"Please fill in your name. It is mandatory.",relationship:"Please tell us your relationship with the registered account holder.",company:"Please fill in your company. It is mandatory.",cssbehalf:"Please check and confirm that you are acting on behalf of registered account holder",cssaware:"Please confirm that User has given you full permission to access his data"};aws.css.errors["sewerage-contractors-application"]={title:"Please select a title.",firstname:"Please provide a first name.",lastname:"Please provide a last name.",companyname:"Please provide a company name.",website:{website:"Please provide a valid website address."},postcode:{required:"Please fill in the postcode to check eligibility"},email:{required:"Please provide a valid email address. ",emailcode:"Please provide a valid email address. "},serviceselect:"Please select a service category.",areaServed:"Please add a service area.",document:"This is a mandatory field. Please upload the required document.",checkbox:"Please select. This is mandatory."}}(),function(){var n=0;aws.validation={init:function(){$(document).ready(function(){$("body").scrollspy({target:".navbar",offset:50});aws.validation.initSelect(".css-month",[1,2,3,4,5,6,7,8,9,10,11,12],!0);aws.validation.initSelect(".css-year",[2018,2019,2020,2021,2022],!0);aws.validation.initSelect(".css-numeric",[1,2,3,4,5,6,7,8,9,10],!0);aws.validation.initSelect(".css-numeric-100",[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100],!0);aws.validation.initSelect(".css-select-number",[1,2],!0);aws.validation.initSelect(".css-select-title",["Mr","Mrs","Ms","Dr","Prof","Mx"],!0);aws.validation.initSelect(".css-select-month",["January","February","March","April","May","June","July","August","September","October","November","December"],!0);aws.validation.initSelect(".css-select-class-num",[2,3,4,5,6,7,8,9,10],!0);aws.validation.initSelect(".css-select-enquiry-nature",["Approved Plumbers / Contractors","Water Regulations","General Enquiry","Water Connections","Water Mains","Payment/ Charges enquiry","Sewer Enquiries","Sewer Contractors","Building over or near to a public sewer","Pre-development enquiry","Self-lay of water mains and services","NAV (New appointment and variation(s))"],!0);aws.validation.initSelect(".css-select-mi",["Info on the web","Repeat visit","Mailshot","Word of mouth"],!0);aws.validation.initSelect(".css-select-housenum",[1,2,3],!0);aws.validation.initSelect(".css-select-housenum-2",[1,2,3],!0);aws.validation.initSelect(".css-select-housenum-3",[1,2,3],!0);aws.validation.initSelect(".css-select-nature-of-enquiry",["Bill enquiry","Bill payment enquiry","Payment arrangement enquiry","Report a stopped/faulty meter","Report water quality","Water efficiency","Report an odour issue","General enquiry"],!0);aws.validation.initSelect(".css-select-priority-languages",["Afrikaans","Arabic","Bulgarian","Catalan","Czech","Danish","German","Greek","English","Spanish","Estonian","Finnish","French","Hebrew","Croatian","Hungarian","Indonesian","Icelandic","Italian","Japanese","Korean","Lithuanian","Latvian","Malaysian","Dutch","Norwegian","Polish","Portuguese","Romanian","Russian","Serbian","Slovakian","Slovenian","Swedish","Thai","Turkish","Ukrainian","Chinese trad","Chinese"],!0);aws.validation.initSelect(".css-select-priority-about-us",["Friend/Relative/Neighbour","Charity","Local authority/Council","Anglian Water","Utility company","Other"],!0);aws.validation.initSelect(".css-select-priority-relationship",["Friend","Relative","Neighbour","Citizens advice","Charity","Utility company","Partnership organisation","Other"],!0);aws.validation.initSelect(".css-select-idcard",["Yes","No"],!0);aws.validation.initSelect(".css-select-security",["Parent company guarantee","Security deposit"],!0);aws.validation.initSelect(".css-select-language",["English","French"],!0);aws.validation.initSelect(".css-select-address",[1,2,3],!1);aws.validation.initSelect(".css-select-propertyage",["1910s","1920s","1930s","1940s","1950s","1960s","1970s","1980s","1990s","2000s","2010s","other"],!0);aws.validation.initSelect(".css-know-situation",["I am the property owner and I live in the property","I am a tenant at this property","I am the property owner but I live at a different address","I visit the property","I am in the process of buying the property","Other"],!0);aws.validation.initSelect(".css-numeric-3",["1","2","3","More"],!0);aws.validation.initSelect(".css-test-promotion",["Friend/ Neighbour","GP Surgery","Hospital","School/Nursery","Website","Other"],!0);aws.validation.initSelect(".css-test-reason",["Concerned about the health effects of Lead","Found lead pipework whilst carrying out other work","Moving house","Considering changing the pipework"],!0);aws.validation.initSelect(".css-select-sewerage",["Affinity Water Central","Affinity Water East","Anglian Water","Cambridge Water","Severn Trent","Thames Water"],!0);aws.validation.initFormEvents();aws.validation.PlaceholderStyle("select.css-select-number");aws.validation.PlaceholderStyle("select.css-select-title");aws.validation.PlaceholderStyle("select.css-select-month");aws.validation.PlaceholderStyle("select.css-select-class-num");aws.validation.PlaceholderStyle("select.css-select-enquiry-nature");aws.validation.PlaceholderStyle("select.css-select-mi");aws.validation.PlaceholderStyle("select.css-select-housenum");aws.validation.PlaceholderStyle("select.css-select-nature-of-enquiry");aws.validation.phoneNumberRemoveMandatory();aws.validation.autoCapitalize();aws.validation.initDropDown();$(".helpIcon").click(function(){var n=$(this).parents(".headWithHelp").find(".helpText");$(".mobCheck").is(":visible")?n.css({top:$(this).position().top+50,left:0,width:"100%"}):n.css({top:$(this).position().top-15,left:$(this).position().left+45});n.show("fast")});$(document).on("click",".closePop",function(){$(this).parents(".helpText").hide("fast")})})},phoneNumberRemoveMandatory:function(){$(".css-telephone-no").on("keyup",function(){var n=$(".css-mobile-no");n.val().length>=11||n.val().length==0?(n.siblings("label").first().removeClass("css-mandatory"),$(this).val().length==0&&n.val().length==0&&(n.siblings("label").first().addClass("css-mandatory"),$(this).siblings("label").first().addClass("css-mandatory")),n.parent(".form-group").find("label.error").remove(),n.removeClass("error")):n.siblings("label").first().addClass("css-mandatory")});$(".css-mobile-no").on("keyup",function(){var n=$(".css-telephone-no");n.val().length>=11||n.val().length==0?(n.siblings("label").first().removeClass("css-mandatory"),$(this).val().length==0&&n.val().length==0&&(n.siblings("label").first().addClass("css-mandatory"),$(this).siblings("label").first().addClass("css-mandatory")),n.parent(".form-group").find("label.error").remove(),n.removeClass("error")):n.siblings("label").first().addClass("css-mandatory")})},autoCapitalize:function(){$(".auto-capitalize").on("focusout",function(){var n=$(this),t=n.val().charAt(0).toUpperCase()+n.val().slice(1);n.val(t)})},postcodeErrorPlacement:function(n,t){$(window).width()<767?n.insertAfter(t):n.insertAfter(t.parent())},autosizeTextArea:function(){$(document).on("focus.autoExpand"," .autoExpand",function(){var n=this.value;this.value="";this.baseScrollHeight=38;this.value=n}).on("input.autoExpand","textarea.autoExpand",function(){var n=this.getAttribute("data-min-rows")|0,t;this.rows=n;t=Math.ceil((this.scrollHeight-this.baseScrollHeight)/20);this.rows=n+t})},customValidators:function(){$.validator.addMethod("ukpostcode",function(n,t){return this.optional(t)||/^[a-zA-Z]{2}[0-9]{2}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{1}[0-9]{1}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{1}[0-9]{2}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{2}[0-9]{1}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{2}[0-9]{1}[a-zA-Z]{1}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{1}[0-9]{1}[a-zA-Z]{1}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)},"Please enter a valid postcode");$.validator.addMethod("ukpostcodeSpacecheck",function(n,t){return this.optional(t)||/\s/g.test(n)},"Please enter a valid postcode, including a space in the middle.");$.validator.addMethod("ukpostcodeIfnumeric",function(n,t){var i=/\d/g.test($(t).val());return i?this.optional(t)||/^[a-zA-Z]{2}[0-9]{2}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{1}[0-9]{1}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{1}[0-9]{2}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{2}[0-9]{1}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{2}[0-9]{1}[a-zA-Z]{1}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{1}[0-9]{1}[a-zA-Z]{1}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n):!0},"Please enter a valid input");$.validator.addMethod("number",function(n,t){return this.optional(t)||/^[0-9]\d*$/.test(n)},"Invalid format. Please enter valid format.");$.validator.addMethod("yearcode",function(n,t){return this.optional(t)||/^[0-9]{4}$/.test(n)},"Please enter the Year in correct format e.g. 1985");$.validator.addMethod("numbercode",function(n,t){return this.optional(t)||/^\d+$/.test(n)},"Please enter only numeric value");$.validator.addMethod("gridnum",function(n,t){return this.optional(t)||/^[a-zA-Z]{2}[ ]{1}[0-9]{5}[ ]{1}[0-9]{5}$/.test(n)},"Please provide the grid reference in the UK grid reference style i.e. TL 22956 73659");$.validator.addMethod("accountno",function(n,t){return this.optional(t)||/^[0-9]{9,10}$/.test(n)},"Sorry the account number you have entered doesn’t seem to be valid. Please check and enter again");$.validator.addMethod("accountnumber",function(n,t){return this.optional(t)||/^[0-9]{9,10}$/.test(n)},"Sorry the account number you have entered doesn’t seem to be valid. Please check and enter again");$.validator.addMethod("telecode",function(n,t){return this.optional(t)||/^[0-9]{10,11}$/.test(n)},"Please enter the  correct format");$.validator.addMethod("nopastyears",function(n,t){return this.optional(t)||n>=(new Date).getFullYear()},"Please enter only current or future year");$.validator.addMethod("numlessthan12",function(n,t){return this.optional(t)||parseInt(n)<=12},"Please enter only numeric value less than 12");$.validator.addMethod("emailcode",function(n,t){return this.optional(t)||/^\w+([.-]\w+)*@\w+([.-]\w+)*(\.\w{2,})+$/.test(n)},"Please note that the correct format for e-mail id is example@example.com");$.validator.addMethod("vehicleRegCode",function(n,t){return this.optional(t)||/^[A-Za-z0-9 _]*[A-Za-z0-9][A-Za-z0-9 _]*$/.test(n)},"Please note that the correct format is AA11 AAA");$.validator.addMethod("meterReading",function(n,t){return this.optional(t)||/^[0-9]{1}$/.test(n)},"Please provide the correct Meter reading");$.validator.addMethod("address",function(n,t){return this.optional(t)||!$(t).parents(".address-group").find(".address-success").hasClass("displayNone")||$(t).parents(".address-group").find(".boxclose").parent().is(":visible")},"Please search postcode or enter manual address");$.validator.addMethod("invalidaddress",function(n,t){return this.optional(t)||!$(t).parents(".address-group").find(".address-success").hasClass("displayNone")||$(t).parents(".address-group").find(".boxclose").parent().is(":visible")},"Address is invalid");$.validator.addMethod("nationalinsuranceno",function(n,t){return this.optional(t)||/^[a-zA-Z]{2}[ ]{1}[0-9]{2}[ ]{1}[0-9]{2}[ ]{1}[0-9]{2}[ ]{1}[a-zA-Z]{1}$/.test(n)},"Please fill the NI number in the correct format. It is AA 44 55 66 J");$.validator.addMethod("alphaNumSpace",function(n,t){return this.optional(t)||/^[A-Za-z0-9 _]*[A-Za-z0-9][A-Za-z0-9 _]*$/.test(n)},"Please enter only alphanumeric value");$.validator.addMethod("website",function(n,t){return this.optional(t)||/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(n)},"Please provide a valid website address.");$.validator.addMethod("ukpostcodeOnCondition",function(n,t){return $(t).parents(".address-details").is(":visible")?this.optional(t)||/^[a-zA-Z]{2}[0-9]{2}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{1}[0-9]{1}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{1}[0-9]{2}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{2}[0-9]{1}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{2}[0-9]{1}[a-zA-Z]{1}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n)||/^[a-zA-Z]{1}[0-9]{1}[a-zA-Z]{1}[ ]{1}[0-9]{1}[a-zA-Z]{2}$/.test(n):!0},"Please enter a valid postcode");$.validator.addMethod("telecodeOnCondition",function(n,t){return $(t).parents(".optiongroup").find(".radio-button-left .radioInput").is(":checked")?this.optional(t)||/^[0-9]{11}$/.test(n):!0},"Please enter the  correct format");$.validator.addMethod("numberOnCondition",function(n,t){return $(t).parents(".optiongroup").find(".rectCheckbox").is(":checked")?this.optional(t)||/^[0-9]\d*$/.test(n):!0},"Invalid format. Please enter valid format.");$.validator.addMethod("numlessthan12OnCondition",function(n,t){return $(t).parents(".optiongroup").find(".radio-button-right .radioInput").is(":checked")?this.optional(t)||parseInt(n)<=12:!0},"Please enter only numeric value less than 12");$.validator.addMethod("invalidMeterReading",function(n,t){var u=$(t).nextAll(".css-meter-reading"),f=$(t).prevAll(".css-meter-reading"),i=!1,r=!1;return $(u).each(function(){r=$(this).val()?!0:""}),$(f).each(function(){i=$(this).val()?!0:""}),i&&r?n?!0:!1:!0},aws.css.errors["leakage-allowance"].meternumber)},customUpload:function(n,t,i,r,u){$(document).on("change","."+n,function(){var f=$(this).parents(".file-upload-block"),s,l,a,o;if($(this).val()=="")f.find(".uploaded-file").remove(),$(this).parents(".employee-wrapper").find("img").attr("src","../static/img/employee.png");else{$(this).parents(".file-upload-block").find(".upload-items").children().remove();s=this.files[0].size/1048576;var e=$(this).val().split("\\").pop(),v=e.substr(e.lastIndexOf(".")+1),h=0,c=!1;for(l in r)v==r[l]&&(c=!0);c==!0?(fSizeinMB=i=="kb"?t/1e3:t,s>fSizeinMB?(f.find("label.error").remove(),f.append('<label class="error">Max size '+t+i+" per each<\/label>"),f.find(".uploaded-file").remove(),$(this).val("")):h=1):(f.find("label.error").remove(),u=="doc"?f.append('<label class="error">Only doc and pdf formats are allowed<\/label>'):f.append('<label class="error">Only png and jpg formats are allowed<\/label>'),f.find(".uploaded-file").remove(),$(this).val(""));h==1&&(f.find("label.error").remove(),f.find(".upload-items").append('<div class="uploaded-file"><span class="filename">'+e+'<\/span><span class="deleteFile"><\/span><\/div>'),n=="imgUpload"&&(a=$(this).parents(".employee-wrapper").find("img"),this.files&&this.files[0]&&(o=new FileReader,o.onload=function(n){$(a).attr("src",n.target.result)},o.readAsDataURL(this.files[0])),$(this).parents(".employee-wrapper").find("img").removeClass("dummy-image"),$(this).parents(".employee-wrapper").find(".file-upload-block").hide("fast"),$(this).parents(".employee-wrapper").find(".change-photo").show()))}});$(document).on("click",".change-photo",function(){$(this).parents(".employee-wrapper").find(".file-upload-block").show("fast");$(this).hide()});$(document).on("click",".deleteFile",function(){var n=$(this).parents(".employee-wrapper");$(this).parents(".file-upload-block").find("input.upload").val("");n.find(".upload").hasClass("imgUpload")&&n.find("img").attr("src","../static/img/employee.png").addClass("dummy-image");$(this).parents(".uploaded-file").remove()})},multipleFileUpload:function(t,i,r,u,f){$(document).on("change","."+t,function(){var e=$(this).parents(".file-upload-block"),o,a,v,y,h;if($(this).val()=="")e.find(".uploaded-file").remove(),$(this).parents(".employee-wrapper").find("img").attr("src","../static/img/employee.png");else{o=this.files[0].size/1048576;var s=$(this).val().split("\\").pop(),p=s.substr(s.lastIndexOf(".")+1),c=0,l=!1;for(a in u)p==u[a]&&(l=!0);l==!0?(fSizeinMB=r=="kb"?i/1e3:i,v=n+o,v>i?(e.find("label.error").remove(),e.append('<label class="error">Max size '+i+r+" per each<\/label>"),$(this).val("")):(n+=o,c=1)):(e.find("label.error").remove(),f=="pdf"?e.append('<label class="error">Only jpg and pdf formats are allowed<\/label>'):e.append('<label class="error">Only png and jpg formats are allowed<\/label>'),$(this).val(""));c==1&&(e.find("label.error").remove(),e.find(".upload-items").append('<div class="uploaded-file"><span class="filename">'+s+'<\/span><span class = "fileSize displayNone">'+o+'<\/span><span class="deleteFile2"><\/span><\/div>'),t=="imgUpload"&&(y=$(this).parents(".employee-wrapper").find("img"),this.files&&this.files[0]&&(h=new FileReader,h.onload=function(n){$(y).attr("src",n.target.result)},h.readAsDataURL(this.files[0])),$(this).parents(".employee-wrapper").find("img").removeClass("dummy-image"),$(this).parents(".employee-wrapper").find(".file-upload-block").hide("fast"),$(this).parents(".employee-wrapper").find(".change-photo").show()))}});$(document).on("click",".change-photo",function(){$(this).parents(".employee-wrapper").find(".file-upload-block").show("fast");$(this).hide()});$(document).on("click",".deleteFile",function(){var n=$(this).parents(".employee-wrapper");$(this).parents(".file-upload-block").find("input.upload").val("");n.find(".upload").hasClass("imgUpload")&&n.find("img").attr("src","../static/img/employee.png").addClass("dummy-image");$(this).parents(".uploaded-file").remove()});$(document).on("click",".deleteFile2",function(){var t=$(this).parents(".employee-wrapper");$(this).parents(".file-upload-block").find("input.upload").val("");t.find(".upload").hasClass("imgUpload")&&t.find("img").attr("src","../static/img/employee.png").addClass("dummy-image");n-=parseFloat($(this).parent().find(".fileSize")[0].innerHTML);$(this).parents(".uploaded-file").remove()})},initDropForm:function(n){typeof n!="undefined"&&n.forEach(function(n){setTimeout(function(){$("form[name="+n+"] select").each(function(){var t=$(this),i="."+t.parent().attr("data-selectId");t.selectmenu({change:function(){$("form[name="+n+"]").validate().element(this)?t.siblings(".ui-selectmenu-button").removeClass("error-select"):t.siblings(".ui-selectmenu-button").addClass("error-select");t.val()==""?t.siblings(".ui-selectmenu-button").addClass("c-placeholder-text-styled"):t.siblings(".ui-selectmenu-button").removeClass("c-placeholder-text-styled")}}).selectmenu("menuWidget").addClass("select-overflow");t.selectmenu("option","appendTo",i);t.val()==""&&t.siblings(".ui-selectmenu-button").addClass("c-placeholder-text-styled")})},500)})},initDropDown:function(){$(document).on("click",".select-wrapper",function(n){var t,i;n.preventDefault();t=$(this);t.find(".ui-selectmenu-menu .ui-menu-item-wrapper").first().text().toLowerCase()=="please select"&&t.find(".ui-selectmenu-menu .ui-menu-item-wrapper").first().addClass("c-placeholder-text-styled");t.find(".ui-selectmenu-menu").hasClass("ui-selectmenu-open")?(t.prev().hasClass("css-mandatory")&&t.find(".ui-selectmenu-menu .ui-menu-item").first().text().toLowerCase()=="please select"&&t.find(".ui-selectmenu-menu .ui-menu-item").first().hide(),i=parseFloat(t.find(".ui-selectmenu-open").css("top")),i+=5,t.find(".ui-selectmenu-open").css({top:i+"px"}),t.find(".ui-selectmenu-button").addClass("border-drop-active")):t.find(".ui-selectmenu-button").removeClass("border-drop-active")})},PlaceholderStyle:function(n){$(n).on("change",function(t){t.preventDefault();this.value==""?$(n).addClass("c-placeholder-text-styled"):$(n).removeClass("c-placeholder-text-styled")})},validationErrorScroll:function(n,t){var i,u,r;if(!t.numberOfInvalids())return!1;i=0;i=$(".navbar-collapse").is(":visible")?$(".navbar-collapse").outerHeight()+40:$(".navbar-header").outerHeight()+40;u=$(t.errorList[0].element).is("select");r=0;u?(r=$(t.errorList[0].element).siblings(".ui-selectmenu-button").parent().siblings("label").offset().top-i,$(t.errorList[0].element).siblings(".ui-selectmenu-button").focus()):(r=$(t.errorList[0].element).parent().offset().top-i,$(t.errorList[0].element).focus());$("html, body").animate({scrollTop:r},500)},initSelect:function(n,t,i){var u=$(n),r=[];i&&($(n).addClass("c-placeholder-text-styled"),r.push("<option value='' class='c-placeholder-text-styled'>Please select<\/option>"));t.forEach(function(n){r.push('<option value="'+n+'" class="option-style">'+n+"<\/option>")});u.html(r.join(""))},initFormEvents:function(){$(".address-details").hide();$(".address-exp-link").on("click",function(){if(!$(this).parents(".css-form-container").find(".address-details").is(":visible")){$(this).parents(".css-form-container").find(".address-details").show("fast");$(this).parents(".css-form-container").find(".address-details").removeClass("displayNone");$(".address-exp-link").attr("aria-expanded","true");var n=$(this).parent().siblings(".address-group");n.find("input").prop("disabled",!0).addClass("arrow-disabled").removeClass("error");n.find("select").selectmenu("disable");n.find("i").addClass("arrow-disabled");n.find(".css-address-mandatory").removeClass("css-mandatory");n.find("label.error").remove()}});$(".address-details-close-btn").on("click",function(){$(this).parents(".css-form-container").find(".address-details").hide("fast");$(this).parents(".css-form-container").find(".address-details").addClass("displayNone");$(".address-exp-link").attr("aria-expanded","false");var n=$(this).parent().siblings(".address-group");n.find("input").prop("disabled",!1).removeClass("arrow-disabled");n.find("select").selectmenu("enable");n.find("i").removeClass("arrow-disabled");n.find(".css-address-mandatory").addClass("css-mandatory")});$(".address-exp-link-2").on("click",function(){if(!$(this).parents(".css-form-container").find(".address-details-2").is(":visible")){$(this).parents(".css-form-container").find(".address-details-2").show("fast");$(this).parents(".css-form-container").find(".address-details-2").removeClass("displayNone");$(".address-exp-link-2").attr("aria-expanded","true");var n=$(this).parent().siblings(".address-group");n.find("input").prop("disabled",!0).addClass("arrow-disabled").removeClass("error");n.find("select").selectmenu("disable");n.find("i").addClass("arrow-disabled");n.find(".css-address-mandatory").removeClass("css-mandatory");n.find("label.error").remove()}});$(".address-details-close-btn-2").on("click",function(){$(this).parents(".css-form-container").find(".address-details-2").hide("fast");$(this).parents(".css-form-container").find(".address-details-2").addClass("displayNone");$(".address-exp-link-2").attr("aria-expanded","false");var n=$(this).parent().siblings(".address-group");n.find("input").prop("disabled",!1).removeClass("arrow-disabled");n.find("select").selectmenu("enable");n.find("i").removeClass("arrow-disabled");n.find(".css-address-mandatory").addClass("css-mandatory")});$(".address-exp-link-3").on("click",function(){if(!$(this).parents(".css-form-container").find(".address-details-3").is(":visible")){$(this).parents(".css-form-container").find(".address-details-3").show("fast");$(this).parents(".css-form-container").find(".address-details-3").removeClass("displayNone");$(".address-exp-link-3").attr("aria-expanded","true");var n=$(this).parent().siblings(".address-group");n.find("input").prop("disabled",!0).addClass("arrow-disabled").removeClass("error");n.find("select").selectmenu("disable");n.find("i").addClass("arrow-disabled");n.find(".css-address-mandatory").removeClass("css-mandatory");n.find("label.error").remove()}});$(".address-details-close-btn-3").on("click",function(){$(this).parents(".css-form-container").find(".address-details-3").hide("fast");$(this).parents(".css-form-container").find(".address-details-3").addClass("displayNone");$(".address-exp-link-3").attr("aria-expanded","false");var n=$(this).parent().siblings(".address-group");n.find("input").prop("disabled",!1).removeClass("arrow-disabled");n.find("select").selectmenu("enable");n.find("i").removeClass("arrow-disabled");n.find(".css-address-mandatory").addClass("css-mandatory")});$(".mandatory-items-head").click(function(){$(".mandatory-items-list").is(":visible")?($(".mandatory-items-list").slideUp(400),$(this).find(".select-arrow").removeClass("icon-s-up-arrow"),$(".mandatory-items-head").attr("aria-expanded","false")):($(".mandatory-items-list").slideDown(400),$(this).find(".select-arrow").addClass("icon-s-up-arrow"),$(".mandatory-items-head").attr("aria-expanded","true"))});$(".search-btn").on("click",function(){var n=$(this).siblings("input"),i=$(this).attr("data-valid"),t;n.rules("remove","address");t=$(this).parents(".address-group").find(".address-success");n.valid()?t.removeClass("displayNone"):(n.focus(),t.addClass("displayNone"));i||i=="eligibility"||n.rules("add",{address:!0})});$(".search-btn-2").on("click",function(){var n=$(this).siblings("input"),i=$(this).attr("data-valid"),t;n.rules("remove","address");t=$(this).parents(".address-group").find(".address-success-2");n.valid()?t.removeClass("displayNone"):(n.focus(),t.addClass("displayNone"));i||i=="eligibility"||n.rules("add",{address:!0})});$(".search-btn-3").on("click",function(){var n=$(this).siblings("input"),i=$(this).attr("data-valid"),t;n.rules("remove","address");t=$(this).parents(".address-group").find(".address-success-3");n.valid()?t.removeClass("displayNone"):(n.focus(),t.addClass("displayNone"));i||i=="eligibility"||n.rules("add",{address:!0})});$(document).on("click",function(n){var t=$(n.target);t.parent().hasClass("mandatory-items-list")||t.hasClass("mandatory-items-list")||t.parent().hasClass("mandatory-items-head")||t.hasClass("mandatory-items-head")||($(".mandatory-items-list").slideUp(400),$(".mandatory-items-head").find(".select-arrow").removeClass("icon-s-up-arrow"));t.parents(".multiselect-wrapper").length||t.hasClass("multiselect-wrapper")||($(".multi-list").addClass("displayNone"),$(".css-multiselect").removeClass("border-drop-active"),$(".css-multiselect").find(".select-arrow").removeClass("icon-s-up-arrow"));t.hasClass("ui-selectmenu-text")||$(".ui-selectmenu-button").removeClass("border-drop-active")})}};aws.validation.init()}()