function setCookie(n,t,i){var r=new Date,u;r.setDate(r.getDate()+i);u=escape(t)+(i==null?"":"; expires="+r.toUTCString());document.cookie=n+"="+u}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 _isMobile(){return/iphone|ipod|ipad|android|ie|blackberry|fennec/.test(navigator.userAgent.toLowerCase())}function SetUnemployedValues(n,t,i,r,u,f){$("#"+n+"").val()=="U"?(_isMobile()?$("#"+t+"").val("Unemployed"):$("#"+t+"").select2().select2("val","Unemployed"),$("#"+r+"").hide(),_isMobile()?$("#"+i+"").val("Unemployed"):$("#"+i+"").select2().select2("val","Unemployed"),$("#"+u+"").hide()):$("#"+n+"").val()=="R"?(_isMobile()?$("#"+t+"").val("Retired"):$("#"+t+"").select2().select2("val","Retired"),$("#"+r+"").hide(),_isMobile()?$("#"+i+"").val("Retired"):$("#"+i+"").select2().select2("val","Retired"),$("#"+u+"").hide()):$("#"+n+"").val()=="H"?($("#"+r+"").show(),$("#"+u+"").show(),$("#"+t+"").val()=="Housewife"?(_isMobile()?$("#"+i+"").val("Housewife"):$("#"+i+"").select2().select2("val","Housewife"),$("#"+u+"").hide()):($("#"+r+"").show(),$("#"+u+"").show()),$("#"+t+"").val()=="Househusband"?(_isMobile()?$("#"+i+"").val("Househusband"):$("#"+i+"").select2().select2("val","Househusband"),$("#"+u+"").hide()):($("#"+r+"").show(),$("#"+u+"").show())):($("#"+r+"").show(),$("#"+u+"").show(),f==!0&&(_isMobile()?($("#"+t+"").val("X-1"),$("#"+i+"").val("X-1")):($("#"+t+"").select2().select2("val","X-1"),$("#"+i+"").select2().select2("val","X-1"))))}function SetUnemployed(n,t,i,r,u){$("#"+n+"").change(function(){SetUnemployedValues(n,t,i,r,u,!0)});$("#"+t+"").change(function(){SetUnemployedValues(n,t,i,r,u,!1)});SetUnemployedValues(n,t,i,r,u,!1)}function initialize(){var u,h,e,o;SetUnemployed("ctl00_MainContent_MainDriverDetails1_ddlMainEmploymentStatus","ctl00_MainContent_MainDriverDetails1_ddlMainOccupation","ctl00_MainContent_MainDriverDetails1_ddlMainEmployersBiz","OccupationDiv","EmployersBizDiv");SetUnemployed("ctl00_MainContent_MainDriverDetails1_AdditionalDriver1_ddlAddDriver1EmploymentStatus","ctl00_MainContent_MainDriverDetails1_AdditionalDriver1_ddlAddDriverOccupation","ctl00_MainContent_MainDriverDetails1_AdditionalDriver1_ddlAddDriverEmployersBusiness","ctl00_MainContent_MainDriverDetails1_AdditionalDriver1_OccupationDiv","ctl00_MainContent_MainDriverDetails1_AdditionalDriver1_EmployersBizDiv");SetUnemployed("ctl00_MainContent_MainDriverDetails1_AdditionalDriver2_ddlAddDriver1EmploymentStatus","ctl00_MainContent_MainDriverDetails1_AdditionalDriver2_ddlAddDriverOccupation","ctl00_MainContent_MainDriverDetails1_AdditionalDriver2_ddlAddDriverEmployersBusiness","ctl00_MainContent_MainDriverDetails1_AdditionalDriver2_OccupationDiv","ctl00_MainContent_MainDriverDetails1_AdditionalDriver2_EmployersBizDiv");SetUnemployed("ctl00_MainContent_MainDriverDetails1_AdditionalDriver3_ddlAddDriver1EmploymentStatus","ctl00_MainContent_MainDriverDetails1_AdditionalDriver3_ddlAddDriverOccupation","ctl00_MainContent_MainDriverDetails1_AdditionalDriver3_ddlAddDriverEmployersBusiness","ctl00_MainContent_MainDriverDetails1_AdditionalDriver3_OccupationDiv","ctl00_MainContent_MainDriverDetails1_AdditionalDriver3_EmployersBizDiv");$(".EmpButton, .selectLnk, #ctl00_MainContent_btAccept, #ctl00_MainContent_ctl01_SelectProduct").on("click",function(){try{setTimeout(function(){$(".LV_invalid_field").length==0&&parent.socket.postMessage("TOP")},300)}catch(n){}});u="a";h=!1;$(".NavigationButtons").on("click",function(){try{setTimeout(function(){$(".LV_invalid_field").length==0&&parent.socket.postMessage("TOP")},300)}catch(n){}});$(".tab_content").each(function(){$(this).addClass("hideDiv",1e3)});$("#WebServiceDetails").removeClass("hideDiv",1e3);$(".tabs li").click(function(){$(".tabs li").removeClass("active");$(this).addClass("active");$(".tab_content").addClass("hideDiv",1e3);var n=$(this).find("a").attr("href");return $(n).removeClass("hideDiv",1e3),!1});$(".show_hide").click(function(){$(".slidingDiv").slideDown("slow")});$(".show_hideCancel").click(function(){$(".slidingDiv").slideUp("slow")});$("#ctl00_MainContent_DiscountEffectiveDateFromTextBox, #ctl00_MainContent_DiscountEffectiveDateToTextBox, #ctl00_MainContent_MainDriverDetails1_DriverDOB_tbDate, #ctl00_MainContent_YourDetails1_VehiclePurchasedDate_tbDate, #ctl00_MainContent_YourDetails1_VehicleRegisteredDate_tbDate, #ctl00_MainContent_ResidencyDate_tbDate, #ctl00_MainContent_PreviousInsuranceExpiryDate_tbDate, #ctl00_MainContent_LicenceIssuedDate_tbDate").mask("99/99/9999");$("#ctl00_MainContent_AdditionalDriver1_Driver1DOB_tbDate, #ctl00_MainContent_AdditionalDriver2_Driver1DOB_tbDate, #ctl00_MainContent_AdditionalDriver3_Driver1DOB_tbDate").mask("99/99/9999");$("#ctl00_MainContent_DateFromTextBox_tbDate, #ctl00_MainContent_DateToTextBox_tbDate, #ctl00_MainContent_NamedDrivingExperienceExpiryDate_tbDate, #ctl00_MainContent_QualificationDate_tbDate, #ctl00_MainContent_YourDetails1_CoverStartDate_tbDate").mask("99/99/9999");$("#ctl00_MainContent_AdditionalDriver1_Driver1ResidencyDate_tbDate, #ctl00_MainContent_AdditionalDriver1_Driver1LicenceDate_tbDate, #ctl00_MainContent_AdditionalDriver1_Driver1QualificationDate_tbDate, #ctl00_MainContent_AdditionalDriver2_Driver1ResidencyDate_tbDate, #ctl00_MainContent_AdditionalDriver2_Driver1LicenceDate_tbDate, #ctl00_MainContent_AdditionalDriver2_Driver1QualificationDate_tbDate, #ctl00_MainContent_AdditionalDriver3_Driver1ResidencyDate_tbDate, #ctl00_MainContent_AdditionalDriver3_Driver1LicenceDate_tbDate, #ctl00_MainContent_AdditionalDriver3_Driver1QualificationDate_tbDate").mask("99/99/9999");$("#ctl00_MainContent_YourDetails1_LicenceIssuedDate_tbDate, #ctl00_MainContent_YourDetails1_ResidencyDate_tbDate, #ctl00_MainContent_YourDetails1_PreviousInsuranceExpiryDate_tbDate, #ctl00_MainContent_ClaimsControl1_DateOfClaim_tbDate, #ctl00_MainContent_ConvictionsControl1_DateOfConviction_tbDate, #ctl00_MainContent_PenaltyPointsControl1_PenaltyPointsAddPane_date_tbDate").mask("99/99/9999");$("#ctl00_MainContent_MainDriverDetails1_AdditionalDriver1_Driver1DOB_tbDate, #ctl00_MainContent_MainDriverDetails1_AdditionalDriver2_Driver1DOB_tbDate, #ctl00_MainContent_MainDriverDetails1_AdditionalDriver3_Driver1DOB_tbDate").mask("99/99/9999");$("#ctl00_MainContent_DriverDOB").mask("99/99/9999");$("#ctl00_MainContent_eQuoteFooter1_MotorAssumptions1_chkAssumptions").change(function(){$("#ctl00_MainContent_eQuoteFooter1_MotorAssumptions1_chkAssumptions").attr("checked")?$('label[for="'+$($("#ctl00_MainContent_eQuoteFooter1_MotorAssumptions1_chkAssumptions")).attr("id")+'"]').hasClass("checked")||$('label[for="'+$($("#ctl00_MainContent_eQuoteFooter1_MotorAssumptions1_chkAssumptions")).attr("id")+'"]').addClass("checked"):$('label[for="'+$($("#ctl00_MainContent_eQuoteFooter1_MotorAssumptions1_chkAssumptions")).attr("id")+'"]').hasClass("checked")&&$('label[for="'+$($("#ctl00_MainContent_eQuoteFooter1_MotorAssumptions1_chkAssumptions")).attr("id")+'"]').removeClass("checked")});$("#ctl00_MainContent_eQuoteFooter1_MailListSubscribe").change(function(){$("#ctl00_MainContent_eQuoteFooter1_MailListSubscribe").attr("checked")?$('label[for="'+$($("#ctl00_MainContent_eQuoteFooter1_MailListSubscribe")).attr("id")+'"]').hasClass("checked")||$('label[for="'+$($("#ctl00_MainContent_eQuoteFooter1_MailListSubscribe")).attr("id")+'"]').addClass("checked"):$('label[for="'+$($("#ctl00_MainContent_eQuoteFooter1_MailListSubscribe")).attr("id")+'"]').hasClass("checked")&&$('label[for="'+$($("#ctl00_MainContent_eQuoteFooter1_MailListSubscribe")).attr("id")+'"]').removeClass("checked")});$("#ctl00_MainContent_InsuranceCoverRequired1_ddlCurrentNCD").change(function(){$("#ctl00_MainContent_sliderCurrentNCD "+u+"").html($(this).val());$("#ctl00_MainContent_InsuranceCoverRequired1_ddlCurrentNCD").val()==9&&$("#ctl00_MainContent_sliderCurrentNCD "+u+"").html("9+");$("#ctl00_MainContent_InsuranceCoverRequired1_ddlCurrentNCD").val()<5?$("#ctl00_MainContent_InsuranceCoverRequired1_pnlOtherInsur").slideDown("slow"):$("#ctl00_MainContent_InsuranceCoverRequired1_pnlOtherInsur").slideUp("slow")});$("#ctl00_MainContent_InsuranceCoverRequired1_ddlCurrentNCD").val()<5?$("#ctl00_MainContent_InsuranceCoverRequired1_pnlOtherInsur").show():$("#ctl00_MainContent_InsuranceCoverRequired1_pnlOtherInsur").hide();_isMobile()||($("#ctl00_MainContent_MainDriverDetails1_ddlMainOccupation").select2(),$("#ctl00_MainContent_MainDriverDetails1_ddlMainEmployersBiz").select2(),$("#ctl00_MainContent_AdditionalDriver1_ddlAddDriverOccupation").select2(),$("#ctl00_MainContent_AdditionalDriver1_ddlAddDriverEmployersBusiness").select2(),$("#ctl00_MainContent_AdditionalDriver2_ddlAddDriverOccupation").select2(),$("#ctl00_MainContent_AdditionalDriver2_ddlAddDriverEmployersBusiness").select2(),$("#ctl00_MainContent_AdditionalDriver3_ddlAddDriverOccupation").select2(),$("#ctl00_MainContent_AdditionalDriver3_ddlAddDriverEmployersBusiness").select2());$.fillAreaKept();$.fillAreaUsed();$("#ctl00_MainContent_VehicleControlMain_AreaUsed_rootTextBox").change(function(){$("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot option[value='"+$("#ctl00_MainContent_VehicleControlMain_AreaUsed_rootTextBox").val()+"']").attr("selected","selected");$.fillSubAreaUsed();$("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild option[value='"+$("#ctl00_MainContent_VehicleControlMain_AreaUsed_childTextBox").val()+"']").attr("selected","selected");$("#ctl00_MainContent_VehicleControlMain_AreaUsed_childTextBox").val("X-1")});$("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot").change(function(){$("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot option[value='"+$("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot").val()+"']").attr("selected","selected");$("#ctl00_MainContent_VehicleControlMain_AreaUsed_rootTextBox").val($("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot").val());$.fillSubAreaUsed();$("#ctl00_MainContent_VehicleControlMain_AreaUsed_childTextBox").val("X-1")});$("#ctl00_MainContent_VehicleControlMain_AreaKept_rootTextBox").change(function(){$("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot option[value='"+$("#ctl00_MainContent_VehicleControlMain_AreaKept_rootTextBox").val()+"']").attr("selected","selected");$.fillSubAreaKept();$("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild option[value='"+$("#ctl00_MainContent_VehicleControlMain_AreaKept_childTextBox").val()+"']").attr("selected","selected");$("#ctl00_MainContent_VehicleControlMain_AreaKept_childTextBox").val("X-1")});$("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot").change(function(){$("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot option[value='"+$("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot").val()+"']").attr("selected","selected");$.fillSubAreaKept();$("#ctl00_MainContent_VehicleControlMain_AreaKept_rootTextBox").val($("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot").val());$("#ctl00_MainContent_VehicleControlMain_AreaKept_childTextBox").val("X-1")});$("#ctl00_MainContent_VehicleControlMain_AreaUsed_childTextBox").change(function(){$("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild option[value='"+$("#ctl00_MainContent_VehicleControlMain_AreaUsed_childTextBox").val()+"']").attr("selected","selected");$("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild").val()=="X-1"?$("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild option").size()!=1?ValidatorEnable($("#ctl00_MainContent_VehicleControlMain_AreaUsed_compareChild")[0],!0):ValidatorEnable($("#ctl00_MainContent_VehicleControlMain_AreaUsed_compareChild")[0],!1):ValidatorEnable($("#ctl00_MainContent_VehicleControlMain_AreaUsed_compareChild")[0],!1)});$("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild").change(function(){$("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild option[value='"+$("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild").val()+"']").attr("selected","selected");$("#ctl00_MainContent_VehicleControlMain_AreaUsed_childTextBox").val($("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild").val())});$("#ctl00_MainContent_VehicleControlMain_AreaKept_childTextBox").change(function(){$("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild option[value='"+$("#ctl00_MainContent_VehicleControlMain_AreaKept_childTextBox").val()+"']").attr("selected","selected");$("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild").val()=="X-1"?$("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild option").size()!=1?ValidatorEnable($("#ctl00_MainContent_VehicleControlMain_AreaKept_compareChild")[0],!0):ValidatorEnable($("#ctl00_MainContent_VehicleControlMain_AreaKept_compareChild")[0],!1):ValidatorEnable($("#ctl00_MainContent_VehicleControlMain_AreaKept_compareChild")[0],!1)});$("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild").change(function(){$("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild option[value='"+$("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild").val()+"']").attr("selected","selected");$("#ctl00_MainContent_VehicleControlMain_AreaKept_childTextBox").val($("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild").val())});$("#ctl00_MainContent_tbHomeTel, #ctl00_MainContent_MainDriverDetails1_tbHomeTel").on("change",function(){var n=$(this).val();n=n.replace(/ /g,"");$(this).val(n)});$("#ctl00_MainContent_MainDriverDetails1_tbYourDetailsForename, #ctl00_MainContent_MainDriverDetails1_tbYourDetailsSurname, #ctl00_MainContent_YourDetails1_tbYourDetailsAdd1, #ctl00_MainContent_YourDetails1_tbYourDetailsAdd2, #ctl00_MainContent_YourDetails1_tbYourDetailsAdd3, #ctl00_MainContent_YourDetails1_tbYourDetailsAdd4").blur(function(){ApplyCapitalization($(this))});var n=new Date,i=n.getDate(),r=n.getMonth()+1,c=n.getFullYear();i<10&&(i="0"+i);r<10&&(r="0"+r);n=i+"/"+r+"/"+c;var s=new Date,f=s.getHours()+1,t=15*Math.ceil(s.getMinutes()/15);t>=60?(t="00",f=f+1):t==0&&(t="00");e=f+":"+t;$("#ctl00_MainContent_YourDetails1_txtCoverStartTime").on("keydown",function(n){var t=n.keyCode||n.which;t==9&&(n.preventDefault(),$("#ctl00_MainContent_YourDetails1_tbYourLicenceNumber").focus())});$("#ctl00_MainContent_YourDetails1_CoverStartDate_tbDate").val()===n?($("#divCoverStartTime").show(),document.getElementById("ctl00_MainContent_YourDetails1_CoverStartDate_tbDate").tabIndex=1,document.getElementById("ctl00_MainContent_YourDetails1_txtCoverStartTime").tabIndex=2):$("#divCoverStartTime").hide();$("#ctl00_MainContent_YourDetails1_CoverStartDate_tbDate").on("change",function(){$("#ctl00_MainContent_YourDetails1_CoverStartDate_tbDate").val()===n?($("#divCoverStartTime").show(),document.getElementById("ctl00_MainContent_YourDetails1_CoverStartDate_tbDate").tabIndex=1,document.getElementById("ctl00_MainContent_YourDetails1_txtCoverStartTime").tabIndex=2):($("#ctl00_MainContent_YourDetails1_txtCoverStartTime").val(""),document.getElementById("ctl00_MainContent_YourDetails1_CoverStartDate_tbDate").tabIndex=-1,document.getElementById("ctl00_MainContent_YourDetails1_txtCoverStartTime").tabIndex=-1,$("#divCoverStartTime").hide())});$("#ctl00_MainContent_YourDetails1_CoverStartDate_tbDate").on("keydown",function(t){$("#ctl00_MainContent_YourDetails1_CoverStartDate_tbDate").val()===n&&($("#ctl00_MainContent_YourDetails1_CoverStartDate_tbDate").change(),setTimeout(function(){var n=t.keyCode||t.which;n==9&&$("#ctl00_MainContent_YourDetails1_txtCoverStartTime").focus()},101))});$("#ctl00_MainContent_YourDetails1_txtCoverStartTime").keydown(function(n){return n.preventDefault(),!1});$("#ctl00_MainContent_YourDetails1_txtCoverStartTime, #coverStartTime").on("click",function(){$("#ctl00_MainContent_YourDetails1_txtCoverStartTime").timepicker({closeOnWindowScroll:!0,disableTextInput:!0,forceRoundTime:!0,minTime:e,maxTime:"11:30pm",step:15,timeFormat:"H:i"}).timepicker("show")});o=$("#ctl00_MainContent_YourDetails1_hfNoClaimsYears").val();o=="0"&&($("#divNoClaimsCountry").hide(),$("#ctl00_MainContent_YourDetails1_ddlPrevInsuranceCountryObtainedAccidentFreeDriving").val("IE"));$("#ctl00_MainContent_YourDetails1_ddlCurrentInsurer").val()=="000"||$("#ctl00_MainContent_YourDetails1_ddlCurrentInsurer").val()=="X-1"?($("#ctl00_MainContent_YourDetails1_dcPreviousInsuranceExpiryDate_ddlYears").prop("disabled",!0),$("#divCurrentPolicyExpiry").hide()):$("#divCurrentPolicyExpiry").show();$("#ctl00_MainContent_YourDetails1_ddlCurrentInsurer").on("change",function(){$("#ctl00_MainContent_YourDetails1_ddlCurrentInsurer").val()=="000"||$("#ctl00_MainContent_YourDetails1_ddlCurrentInsurer").val()=="X-1"?($("#ctl00_MainContent_YourDetails1_dcPreviousInsuranceExpiryDate_ddlYears").prop("disabled",!0),$("#divCurrentPolicyExpiry").hide()):$("#divCurrentPolicyExpiry").show()})}function ApplyCapitalization(n){n.css("text-transform","capitalize")}function formatNum(n){return n.toString().replace(/\B(?=(?:\d{3})+(?!\d))/g,",")}function getParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i="[\\?&]"+n+"=([^&#]*)",r=new RegExp(i),t=r.exec(window.location.href);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}function initializeScripts(){Modernizr.inputtypes.date||$("input[type=date]").datepicker({dateFormat:"dd/mm/yy",changeMonth:!0,changeYear:!0});Modernizr.input.placeholder||($("[placeholder]").focus(function(){var n=$(this);n.val()==n.attr("placeholder")&&(n.val(""),n.removeClass("placeholder"))}).blur(function(){var n=$(this);(n.val()==""||n.val()==n.attr("placeholder"))&&(n.addClass("placeholder"),n.val(n.attr("placeholder")))}).blur(),$("[placeholder]").parents("form").submit(function(){$(this).find("[placeholder]").each(function(){var n=$(this);n.val()==n.attr("placeholder")&&n.val("")})}));$("#ctl00_BodyContent_txtDateFromTextBox, #ctl00_BodyContent_txtDateToTextBox").datepicker({changeMonth:!0,changeYear:!0,yearRange:"-5y:+5y",defaultDate:$("#ctl00_ContentPlaceHolder1_CoverDetails_CoverDetails_PolicyStartDate_tbDate").val(),dateFormat:"dd/mm/yy"});$("#ctl00_BodyContent_DateFromTextBox, #ctl00_BodyContent_DateToTextBox").datepicker({changeMonth:!0,changeYear:!0,yearRange:"-5y:+5y",dateFormat:"dd/mm/yy"});$("#ctl00_BodyContent_DiscountEffectiveDateFromTextBox, #ctl00_BodyContent_DiscountEffectiveDateToTextBox").datepicker({changeMonth:!0,changeYear:!0,yearRange:"-0:+5y",dateFormat:"dd/mm/yy"});$("html").hasClass("ie8")||($('input[type="checkbox"].style2').checkbox({buttonStyle:"btn-base",buttonStyleChecked:"btn-success",checkedClass:"fa-check-square-o",uncheckedClass:"fa-square-o",defaultState:!1,defaultEnabled:!0}),$('input[type="checkbox"].style3').checkbox({buttonStyle:"btn-danger",buttonStyleChecked:"btn-success",checkedClass:"fa-check-square-o",uncheckedClass:"fa-square-o",defaultState:!1,defaultEnabled:!0}));$("#aPolicyNotes").hasClass("collapsed")?($("#iPolicyNotes").removeClass(),$("#iPolicyNotes").addClass("fa fa-plus")):($("#iPolicyNotes").removeClass(),$("#iPolicyNotes").addClass("fa fa-minus"));$("#policyNotesHeader").click(function(){setTimeout(function(){$("#aPolicyNotes").hasClass("collapsed")?($("#iPolicyNotes").removeClass(),$("#iPolicyNotes").addClass("fa fa-plus")):($("#iPolicyNotes").removeClass(),$("#iPolicyNotes").addClass("fa fa-minus"))},100)});$("a[data-toggle='collapse']").on("click",function(){try{var n=$(this),t=$(n).attr("href");setTimeout(function(){$(n).hasClass("collapsed")?($(n).find("span.glyphicon-chevron-up").removeClass("glyphicon-chevron-up"),$(n).find("span.glyphicon").addClass("glyphicon-chevron-down")):($(n).find("span.glyphicon-chevron-down").removeClass("glyphicon-chevron-down"),$(n).find("span.glyphicon").addClass("glyphicon-chevron-up"),$("div.divMoreDetails a.collapsed").each(function(){$(this).not(n).find("span.glyphicon-chevron-up").removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down")}))},100)}catch(i){}})}function checkIsMobile(){return/iphone|ipod|ipad|android|ie|blackberry|fennec/.test(navigator.userAgent.toLowerCase())}function getParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}function testJson(){var n="0";$("#RegLookupFail").hide();$.ajax({type:"POST",url:carServiceURL+"GetCar",data:"{'Registration':'"+$("#ctl00_MainContent_VehicleControlMain_tbAddVehDetailsRegNo").val()+"','BID':'"+$("#ctl00_MainContent_VehicleControlMain_hfBID").val()+"'}",contentType:"application/json; charset=utf-8",dataType:"json",dataFilter:function(data){var msg=eval("("+data+")");return msg.hasOwnProperty("d")?msg.d:msg},success:function(t){t&&($("#jsonDiv").html(recurse(t)),$("#ctl00_MainContent_VehicleControlMain_pnlVehicle").show(),n=1,ga("send","event","CarLookup","Reg Lookup Vehicle Call - Success","",4))},error:function(){ga("send","event","CarLookup","Reg Lookup Vehicle Call - Fail")},complete:function(){n==1?($("#ManualVehicleSearch").hide(),$("#VehicleSelected").show("slow"),$("#VehicleListSearch").hide(),$("#VehicleRegLookup").hide(),$("#RegLookupFail").hide()):$("#RegLookupFail").show("slow")}})}function ParseObj(n){var r="",i="",u="",t,f;for(t in n)typeof n[t]=="object"?r+=ParseObj(n[t]):(t=="Description"&&(u=n[t]),t=="Code"&&(i=n[t]));return i.length>0&&(f=$('<option value="'+i+'"/>').html(u),$("#ctl00_MainContent_VehicleControlMain_ddlSelectedVehicle").append(f)),r}function recurse(n){for(var t in n)t=="VehicleDescription"&&($("#ctl00_MainContent_VehicleControlMain_lblSelectedVehicle").text(n[t]),$("#ctl00_MainContent_VehicleControlMain_lblModelDesc").val(n[t])),t=="VehicleABI"&&$("#ctl00_MainContent_VehicleControlMain_lblModelCode").val(n[t]),t=="VehicleManufacturer"&&$("#ctl00_MainContent_VehicleControlMain_VehicleMake").val(n[t]),t=="VehicleModel"&&$("#ctl00_MainContent_VehicleControlMain_VehicleModel").val(n[t]),t=="VehicleCC"&&$("#ctl00_MainContent_VehicleControlMain_VehicleCC").val(n[t]),t=="VehicleYear"&&$("#ctl00_MainContent_VehicleControlMain_VehicleYear").val(n[t]),t=="VehicleBody"&&($("#ctl00_MainContent_VehicleControlMain_VehicleBody").val(n[t]),console.log(n[t]));return""}function initializeCarControls(){try{$.CarControl("ctl00_MainContent_VehicleControlMain_ddlVehicleYearRegistered","ctl00_MainContent_VehicleControlMain_txtVehicleYearRegistered","ctl00_MainContent_VehicleControlMain_ddlFuelType","ctl00_MainContent_VehicleControlMain_txtFuelType","ctl00_MainContent_VehicleControlMain_Manufacturer","ctl00_MainContent_VehicleControlMain_txtVehicleManufacturer","ctl00_MainContent_VehicleControlMain_Model","ctl00_MainContent_VehicleControlMain_txtCarModel","ctl00_MainContent_VehicleControlMain_ddlCC","ctl00_MainContent_VehicleControlMain_txtCC","ctl00_MainContent_VehicleControlMain_ddlSelectedVehicle","ctl00_MainContent_VehicleControlMain_txtSelectedVehicle")}catch(n){}}function ParseObj(n,t,i){var f="",u,r;for(u in n)if(typeof n[u]=="object")ParseObj(n[u],t,i);else switch(i){case"EngineCapacity":if(u==i){for(r=n[u],r=r/1e3,r=Math.round(r*10)/10,r=formatNum(r),r=r.toString(),r.indexOf(".")==-1&&(r+=".");r.length<r.indexOf(".")+2;)r+="0";$("#"+t+"").find('option[value="'+roundHundred(n[u])+'"]').length>0||$("#"+t+"").append($("<option><\/option>").val(roundHundred(n[u])).html(r))}break;case"Description":u=="Code"&&(f=n[u]);u=="Description"&&$("#"+t+"").append($("<option><\/option>").val(f).html(n[u]))}}function roundHundred(n){return Math.round(n/100)*100}function formatNum(n){return n.toString().replace(/\B(?=(?:\d{3})+(?!\d))/g,",")}function NameCheck(n){var t=n,i=t.match(/\d+/g);return isNaN(t)&&t.length>=2&&i==null?!0:!1}function initializeMotorValidationQQ(){var i,r,u,b,f,k,e,o,s,h,c,l,a,v,n,t,y,p,w;SetDisplayMessageWhenEmptyFlag(!0);try{i=new LiveValidation("ctl00_MainContent_VehicleControlMain_ddlVehicleValue",{validMessage:tickDDL,wait:interval,onlyOnBlur:blurFlag});i.add(Validate.Exclusion,{within:ddlDefault,failureMessage:"Please select your vehicle value."});i.add(Validate.Presence,{within:ddlDefault,failureMessage:"Please select your vehicle value."});r=new LiveValidation("ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot",{validMessage:tickDDL,wait:interval,onlyOnBlur:blurFlag});r.add(Validate.Exclusion,{within:ddlDefault,failureMessage:"Please select the area in which your vehicle is kept."});r.add(Validate.Presence,{within:ddlDefault,failureMessage:"Please select the area in which your vehicle is kept."});$("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot").change(function(){setTimeout(function(){var n=new LiveValidation("ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild",{validMessage:tickDDL,wait:interval,onlyOnBlur:blurFlag});n.add(Validate.Exclusion,{within:ddlDefault,failureMessage:"Please select the sub-area in which your vehicle in kept."})},1e3)})}catch(nt){}try{u=new LiveValidation("ctl00_MainContent_DriverForename",{validMessage:tick,wait:interval,onlyOnBlur:blurFlag});b=$("#ctl00_MainContent_DriverForename").val();u.add(Validate.Presence,{failureMessage:"Please enter your forename."});u.add(Validate.Custom,{against:function(n,t){return NameCheck(n,t)},failureMessage:"Please enter at least 2 letters for your forename."});f=new LiveValidation("ctl00_MainContent_DriverSurname",{validMessage:tick,wait:interval,onlyOnBlur:blurFlag});k=$("#ctl00_MainContent_DriverSurname").val();f.add(Validate.Presence,{failureMessage:"Please enter your surname."});f.add(Validate.Custom,{against:function(n,t){return NameCheck(n,t)},failureMessage:"Please enter at least 2 letters for your surname."});e=new LiveValidation("ctl00_MainContent_dcDateOfBirth_ddlYears",{validMessage:tick,wait:interval,onlyOnBlur:blurFlag});e.add(Validate.Presence,{within:ddlDefault,failureMessage:"Please enter your year of birth."});e.add(Validate.Exclusion,{within:ddlDefault,failureMessage:"Please enter your year of birth."});o=new LiveValidation("ctl00_MainContent_dcDateOfBirth_ddlMonths",{validMessage:tick,wait:interval,onlyOnBlur:blurFlag});o.add(Validate.Presence,{within:ddlDefault,failureMessage:"Please enter your month of birth."});o.add(Validate.Exclusion,{within:ddlDefault,failureMessage:"Please enter your month of birth."});s=new LiveValidation("ctl00_MainContent_dcDateOfBirth_ddlDays",{validMessage:tick,wait:interval,onlyOnBlur:blurFlag});s.add(Validate.Presence,{within:ddlDefault,failureMessage:"Please enter your day of birth."});s.add(Validate.Exclusion,{within:ddlDefault,failureMessage:"Please enter your day of birth."});try{function d(){var n=$("#s2id_ctl00_MainContent_ddlOccupation").find("a:first");n.removeClass("validation-success");n.addClass("validation-failure")}function g(){var n=$("#s2id_ctl00_MainContent_ddlOccupation").find("a:first");n.removeClass("validation-failure");n.addClass("validation-success")}h=new LiveValidation("ctl00_MainContent_ddlOccupation",{validMessage:tickDDL,wait:interval,onlyOnBlur:blurFlag,onValid:g,onInvalid:d});h.add(Validate.Exclusion,{within:ddlDefault,failureMessage:"Please select your occupation."});h.add(Validate.Presence,{within:ddlDefault,failureMessage:"Please select your occupation."})}catch(nt){}c=new LiveValidation("ctl00_MainContent_ddlLicence",{validMessage:tickDDL,wait:interval,onlyOnBlur:blurFlag});c.add(Validate.Exclusion,{within:ddlDefault,failureMessage:"Please select your licence type."});c.add(Validate.Presence,{within:ddlDefault,failureMessage:"Please select your licence type."});l=new LiveValidation("ctl00_MainContent_ddlCurrentNCD",{validMessage:tickDDL,wait:interval,onlyOnBlur:blurFlag});l.add(Validate.Exclusion,{within:ddlDefault,failureMessage:"Please select your no claims bonus years."});l.add(Validate.Presence,{within:ddlDefault,failureMessage:"Please select your no claims bonus years."});a=new LiveValidation("ctl00_MainContent_tbHomeTel",{validMessage:tick,wait:interval,onlyOnBlur:blurFlag});a.add(Validate.Presence,{failureMessage:"Please enter your phone number."});a.add(Validate.Numericality,{failureMessage:"Please enter your phone number.",notANumberMessage:"Please enter your phone number."});v=new LiveValidation("ctl00_MainContent_tbMainEmail",{validMessage:tick,wait:interval,onlyOnBlur:blurFlag});v.add(Validate.Presence,{failureMessage:"Please enter your email address."});v.add(Validate.Email,{failureMessage:"Please enter your email address. (For example, the format may be: name@domain.com)"})}catch(nt){}try{n=new LiveValidation("ctl00_MainContent_VehicleControlMain_tbAddVehDetailsRegNo",{validMessage:tick,wait:interval,onlyOnBlur:blurFlag});n.add(Validate.Presence,{failureMessage:"Please enter your vehicle registration and search for your vehicle."});n.add(Validate.Custom,{against:function(){return CheckVehicleSelected()},failureMessage:"Please enter your vehicle registration and search for your vehicle."});t=new LiveValidation("ctl00_MainContent_VehicleControlMain_ddlVehicleYearRegistered",{validMessage:tick,wait:interval,onlyOnBlur:blurFlag});t.add(Validate.Custom,{against:function(){return CheckVehicleSelected()},failureMessage:"Please select your vehicle."});setTimeout(function(){$("#VehicleRegLookup").is(":visible")?(n.enable(),t.disable()):$("#ManualVehicleSearch").is(":visible")?(n.disable(),t.enable()):$("#VehicleSelected").is(":visible")&&(n.disable(),t.disable())},600);$("#lnkVehicleRegUnknown, #btSearchManual, #btChangeVehicle").click(function(){setTimeout(function(){$("#VehicleRegLookup").is(":visible")?(n.enable(),t.disable()):$("#ManualVehicleSearch").is(":visible")&&(n.disable(),t.enable())},1e3)});$("#SearchWithReg").click(function(){n.disable();setTimeout(function(){n.enable()},1e3)});$("#ctl00_MainContent_VehicleControlMain_ddlSelectedVehicle").change(function(){t.disable();setTimeout(function(){t.enable()},1e3)})}catch(nt){}try{y=new LiveValidation("ctl00_MainContent_dcCoverStartDate_ddlYears",{validMessage:tick,wait:interval,onlyOnBlur:blurFlag});y.add(Validate.Presence,{within:ddlDefault,failureMessage:"Please enter your cover start year."});y.add(Validate.Exclusion,{within:ddlDefault,failureMessage:"Please enter your cover start year."});p=new LiveValidation("ctl00_MainContent_dcCoverStartDate_ddlMonths",{validMessage:tick,wait:interval,onlyOnBlur:blurFlag});p.add(Validate.Presence,{within:ddlDefault,failureMessage:"Please enter your cover start month."});p.add(Validate.Exclusion,{within:ddlDefault,failureMessage:"Please enter your cover start month."});w=new LiveValidation("ctl00_MainContent_dcCoverStartDate_ddlDays",{validMessage:tick,wait:interval,onlyOnBlur:blurFlag});w.add(Validate.Presence,{within:ddlDefault,failureMessage:"Please enter your cover start day."});w.add(Validate.Exclusion,{within:ddlDefault,failureMessage:"Please enter your cover start day."})}catch(nt){}}function CheckVehicleSelected(){try{return $("#VehicleListSearch").is(":visible")||$("#ManualVehicleSearch").is(":visible")||$("#VehicleRegLookup").is(":visible")?!1:!0}catch(n){return!1}}var kpi_Premium;getCookie("visited")?$("#ctl00_MainContent_ReturnVisit").val("Y"):setCookie("visited",1,365),function(n){n.ui.autocomplete.prototype._renderItem=function(t,i){return i.label=i.label.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+n.ui.autocomplete.escapeRegex(this.term)+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1<\/strong>"),n("<li><\/li>").data("item.autocomplete",i).append("<a>"+i.label+"<\/a>").appendTo(t)}}(jQuery),function(n){n.ValidateDOB=function(){ValidatorValidate(document.getElementById("ctl00_MainContent_DriverDOB_DateRequiredValidator"));ValidatorValidate(document.getElementById("ctl00_MainContent_AdditionalDriver1_Driver1DOB_DateRequiredValidator"));ValidatorValidate(document.getElementById("ctl00_MainContent_AdditionalDriver2_Driver1DOB_DateRequiredValidator"));ValidatorValidate(document.getElementById("ctl00_MainContent_AdditionalDriver3_Driver1DOB_DateRequiredValidator"));_DOB(this,"ctl00_MainContent_MainDriverDetails1_DriverDOB_tbDate");_DOB(this,"ctl00_MainContent_AdditionalDriver1_Driver1DOB_tbDate");_DOB(this,"ctl00_MainContent_AdditionalDriver2_Driver1DOB_tbDate");_DOB(this,"ctl00_MainContent_AdditionalDriver3_Driver1DOB_tbDate")}}(jQuery),function(n){var i=window.location.pathname,t="";t=i.indexOf("QuickQuote")>0||i.indexOf("quickquote")>0?"../AppData/areaservice.xml":"AppData/areaservice.xml";n.fillAreaKept=function(){n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot option").remove();n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild option").remove();n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot").show();n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild").hide();n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChildStyle").hide();n("#ctl00_MainContent_VehicleControlMain_AreaKept_ControlLabel_2").hide();n("#ctl00_MainContent_VehicleControlMain_AreaKept_compareChild").hide();n("#ctl00_MainContent_VehicleControlMain_AreaKept_SubAreaLookup").hide();n.ajax({type:"GET",url:t,dataType:"xml",success:function(t){n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot option").remove();n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild option").remove();var i=window.location.pathname;i.indexOf("QuickQuote")>0||i.indexOf("quickquote")>0?n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot").append(n("<option><\/option>").val("X-1").html("Area Kept")):n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot").append(n("<option><\/option>").val("X-1").html("Please Select"));n(t).find("area").each(function(){n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot").append(n("<option><\/option>").val(n(this).attr("name")).html(n(this).attr("name")))});n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot option[value='"+n("#ctl00_MainContent_VehicleControlMain_AreaKept_rootTextBox").val()+"']").attr("selected","selected");n.fillSubAreaKept();n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild option[value='"+n("#ctl00_MainContent_VehicleControlMain_AreaKept_childTextBox").val()+"']").attr("selected","selected")}});n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot").show()};n.fillSubAreaKept=function(){n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild option").remove();n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild").hide();n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChildStyle").hide();n("#ctl00_MainContent_VehicleControlMain_AreaKept_ControlLabel_2").hide();n("#ctl00_MainContent_VehicleControlMain_AreaKept_compareChild").hide();n("#ctl00_MainContent_VehicleControlMain_AreaKept_SubAreaLookup").hide();n.ajax({type:"GET",url:t,dataType:"xml",success:function(t){n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild option").remove();n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild").append(n("<option><\/option>").val("X-1").html("Please Select"));var i=0;n(t).find('area[name="'+n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot").val()+'"]').find("sub").each(function(){n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild").append(n("<option><\/option>").val(n(this).text()).html(n(this).attr("name")));i++});i==1?(n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild option").remove(),n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild").hide(),n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChildStyle").hide(),n("#ctl00_MainContent_VehicleControlMain_AreaKept_ControlLabel_2").hide(),n("#ctl00_MainContent_VehicleControlMain_AreaKept_compareChild").hide(),n("#ctl00_MainContent_VehicleControlMain_AreaKept_SubAreaLookup").hide(),n(t).find('area[name="'+n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListRoot").val()+'"]').find("sub").each(function(){n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild").append(n("<option><\/option>").val(n(this).text()).html(n(this).attr("name")));n("#ctl00_MainContent_VehicleControlMain_AreaKept_childTextBox").val(n(this).text());i++})):i>1&&(n("#ctl00_MainContent_VehicleControlMain_AreaKept_SubAreaLookup").show(),n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild").show(),n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChildStyle").show(),n("#ctl00_MainContent_VehicleControlMain_AreaKept_ControlLabel_2").show(),n("#ctl00_MainContent_VehicleControlMain_AreaKept_compareChild").show());n("#ctl00_MainContent_VehicleControlMain_AreaKept_DropDownListChild option[value='"+n("#ctl00_MainContent_VehicleControlMain_AreaKept_childTextBox").val()+"']").attr("selected","selected")}})};n.fillAreaUsed=function(){n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot option").remove();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild option").remove();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot").show();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild").hide();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChildStyle").hide();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_ControlLabel_2").hide();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_compareChild").hide();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_SubAreaLookup").hide();n.ajax({type:"GET",url:t,dataType:"xml",success:function(t){n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot option").remove();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild option").remove();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot").append(n("<option><\/option>").val("X-1").html("Please Select"));n(t).find("area").each(function(){n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot").append(n("<option><\/option>").val(n(this).attr("name")).html(n(this).attr("name")))});n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot option[value='"+n("#ctl00_MainContent_VehicleControlMain_AreaUsed_rootTextBox").val()+"']").attr("selected","selected");n.fillSubAreaUsed();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot option[value='"+n("#ctl00_MainContent_VehicleControlMain_AreaUsed_childTextBox").val()+"']").attr("selected","selected")}});n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot").show()};n.fillSubAreaUsed=function(){n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild option").remove();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild").hide();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChildStyle").hide();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_ControlLabel_2").hide();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_compareChild").hide();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_SubAreaLookup").hide();n.ajax({type:"GET",url:t,dataType:"xml",success:function(t){var i,r;n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild option").remove();n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild").append(n("<option><\/option>").val("X-1").html("Please Select"));i=0;n(t).find('area[name="'+n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot").val()+'"]').find("sub").each(function(){n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild").append(n("<option><\/option>").val(n(this).text()).html(n(this).attr("name")));i++});i==1?(n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild option").remove(),n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild").hide(),n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChildStyle").hide(),n("#ctl00_MainContent_VehicleControlMain_AreaUsed_ControlLabel_2").hide(),n("#ctl00_MainContent_VehicleControlMain_AreaUsed_compareChild").hide(),n("#ctl00_MainContent_VehicleControlMain_AreaUsed_SubAreaLookup").hide(),n(t).find('area[name="'+n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListRoot").val()+'"]').find("sub").each(function(){n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild").append(n("<option><\/option>").val(n(this).text()).html(n(this).attr("name")));n("#ctl00_MainContent_VehicleControlMain_AreaUsed_childTextBox").val(n(this).text());i++})):i>1&&(n("#ctl00_MainContent_VehicleControlMain_AreaUsed_SubAreaLookup").show(),n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild").show(),n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChildStyle").show(),n("#ctl00_MainContent_VehicleControlMain_AreaUsed_ControlLabel_2").show(),n("#ctl00_MainContent_VehicleControlMain_AreaUsed_compareChild").show(),r=window.location.pathname,(r.indexOf("QuickQuote")>0||r.indexOf("quickquote")>0)&&n("#ctl00_MainContent_VehicleControlMain_AreaUsed_SubAreaLookup").hide());n("#ctl00_MainContent_VehicleControlMain_AreaUsed_DropDownListChild option[value='"+n("#ctl00_MainContent_VehicleControlMain_AreaUsed_childTextBox").val()+"']").attr("selected","selected")}})}}(jQuery);$(document).ready(function(){$("#myLogin").hide();$("#LoginHandle").click(function(){$("#myLogin").is(":visible")?$("#myLogin").slideUp("slow",function(){}):$("#myLogin").slideDown("slow",function(){})});initialize()});$(document).ready(function(){initializeScripts();$("#ctl00_Header1_lnkNewQuote").on("click",function(){DoNotValidate()})});$(function(){if(!_isMobile()){$("[rel='popover']").popover({delay:{show:300,hide:100},html:!0,placement:"auto",trigger:"hover",content:function(){return n("content",$(this).attr("id"))},title:function(){return n("title",$(this).attr("id"))}});function n(n,t){var i="";switch(t){case"popoverCoverRequired":return n=="content"?i="<b>Comprehensive<\/b> - includes accidental damage,fire and theft cover for your vehicle.<br><br><b>Third party fire and theft<\/b> - covers your third party liability and fire and theft for your vehicle.<br><br><b>Third party only<\/b> - covers your third party liability.":n=="title"&&(i="Type of Cover Required"),i;case"popoverNumberOfDrivers":return n=="content"?i="<b>1.<\/b> You may get an additional <b>Discount<\/b> if you are cohabiting with your partner and wish to add your partner to the policy - select '<b>Me and Spouse<\/b>'.<br><br><b>2.<\/b> <b>Young Drivers<\/b> - try adding one of your parents, it may or may not work out cheaper. Try the quote with and without your parent.":n=="title"&&(i="Number of Drivers"),i;case"popoverBonusProtection":return n=="content"?i="<b>Full Bonus Protection<\/b> - Have a claim for an unlimited amount without affecting your no claims bonus.<br><br><b>Partial Bonus Protection<\/b> - Have a claim up to a specified amount without affecting your no claims bonus.<br><br><b>Step Back Protection<\/b> - Your no claims bonus will be stepped back in the event of a claim (e.g 50% back to 30%).<br><br>":n=="title"&&(i="Bonus Protection"),i;case"popoverVoluntaryExcess":return n=="content"?i=" Opt for a higher excess, the insurance provider will usually lower the premium paid.<br><br><b>Voluntary excess will always be paid in addition to any compulsory excess<\/b>. ":n=="title"&&(i="Voluntary Excess"),i;case"popoverCurrentNCD":return n=="content"?i="This is the number of years earned with no cliams on a policy in your own name.":n=="title"&&(i="No Claims Discount Bonus"),i;case"popoverAnnualMileage":return n=="content"?i="Some Insurers  offer discounts for mileage below 5,000 and 10,000.":n=="title"&&(i="Annual Mileage"),i;case"popoverEmailAddress":return n=="content"?i="We'll need this so that we can email your quote results and policy details to you.":n=="title"&&(i="Email Address"),i;case"popoverHomeTelephone":return n=="content"?i="Phone number - please only enter digits.":n=="title"&&(i="Home Telephone Number"),i;case"popoverDOB":return n=="content"?i="Enter your date of birth in the format DD/MM/YYYY, or click on the <i class='glyphicon glyphicon-calendar'><\/i> button to select your date of birth.":n=="title"&&(i="Date of Birth"),i;case"popoverCoverStartDate":return n=="content"?i="Click on the <i class='glyphicon glyphicon-calendar'><\/i> button beside the textbox to select the date you want your cover to start from.":n=="title"&&(i="Cover Start Date"),i;case"popoverCoverStartTime":return n=="content"?i="Click on the <i class='fa fa-clock-o fa-lg'><\/i> button beside the textbox to select your cover start time.":n=="title"&&(i="Cover Start Time"),i;case"popoverLicenceNumber":return n=="content"?i="If not readily available, type 123456 and we will get this later.":n=="title"&&(i="Licence Number"),i;case"popoverLicenceIssuedDate":return n=="content"?i="If not readily available, please estimate and we will get this later.":n=="title"&&(i="Licence Issued Date"),i;case"popoverClassUse":return n=="content"?(i="<strong>Social, Domestic and Pleasure use<\/strong> provides cover for social, domestic and pleasure and travelling to and from your permanent place of work. <br/><br/>",i+="<strong>Class 1 use<\/strong> means use by the insured in person in connection with their declared occupation, excluding carriage of goods. <br/><br/>",i+="<strong>Class 2 use<\/strong> covers business use, including carriage of goods, excluding goods for sale. <br/><br/>",i+="<strong>Class 3 use<\/strong> covers carriage of goods, including goods for sale."):n=="title"&&(i="Types of Use"),i;case"popoverAtFault":return n=="content"?i="Was this claim a result of an incident that was your fault?":n=="title"&&(i="At Fault?"),i;case"popoverInjuryCaused":return n=="content"?i="Was there injured caused in relation to this claim?":n=="title"&&(i="Injury Caused?"),i;case"popoverNCBAffected":return n=="content"?i="Was No Claims Bonus affected as a result of this claim?":n=="title"&&(i="No Claims Bonus Affected?"),i;case"popoverClaimSettled":return n=="content"?i="Was this claim settled or is it still currently active?":n=="title"&&(i="Claim Settled?"),i;case"popoverResultOfAccident":return n=="content"?i="Did this conviction come as a result of a traffic accident?":n=="title"&&(i="Result of Accident?"),i;default:return n=="content"?i="Empty":n=="title"&&(i="Empty"),i}}}});$(function(){if(!_isMobile()){$("[rel='popoverBottom']").popover({delay:{show:300,hide:100},html:!0,placement:"bottom",trigger:"hover",content:function(){return n("content",$(this).attr("id"))},title:function(){return n("title",$(this).attr("id"))}});function n(n,t){var i="",r=$("#ctl00_hdfBrokerID").val();switch(t){case"popoverWindscreen":return r=="93dcdf62-db58-4709-be91-e39c0246313d"?n=="content"?i="Automatically included on Comprehensive policies.":n=="title"&&(i="Windscreen Cover"):n=="content"?i="Your cover may include Windscreen Cover.":n=="title"&&(i="Windscreen Cover"),i;case"popoverStepBack":return r=="93dcdf62-db58-4709-be91-e39c0246313d"?n=="content"?i="In the event of an accident, your No Claim Bonus will only be reduced by 2 years.":n=="title"&&(i="Step Back Bonus"):n=="content"?i="Your no claims bonus will be stepped back in the event of a claim (e.g 50% back to 30%).":n=="title"&&(i="Step Back Bonus"),i;case"popoverNoClaims":return n=="content"?i="Have a claim for an unlimited amount without affecting your no claims bonus.":n=="title"&&(i="Protect NCB"),i;case"popoverBreakdown":return r=="93dcdf62-db58-4709-be91-e39c0246313d"?n=="content"?i="Automatically included, including home start.":n=="title"&&(i="Breakdown Assist"):n=="content"?i="Your cover may include Breakdown Assist.":n=="title"&&(i="Breakdown Assist"),i;case"popoverAccident":return n=="content"?i="Your cover may include Personal Accident.":n=="title"&&(i="Personal Accident"),i;case"popoverDrivingAbroad":return r=="93dcdf62-db58-4709-be91-e39c0246313d"?n=="content"?i="Automatic cover for up to 31 days.":n=="title"&&(i="Driving Abroad"):n=="content"?i="Your cover may include Driving Abroad.":n=="title"&&(i="Driving Abroad"),i;default:return n=="content"?i="Empty":n=="title"&&(i="Empty"),i}}}});$(function(){function o(n,t,i,r,u,o,s,h){t.change(function(){e(n,t,i);f(n,t,i,r,0);t.val()!=="X-1"?(u.val(t.val()),h.val(s.val()+"/"+o.val()+"/"+u.val()),i.prop("disabled",!1),i.val()!=="X-1"?(r.prop("disabled",!1),f(n,t,i,r,i.val())):(r.val("X-1"),r.prop("disabled",!0))):(i.val("X-1"),i.prop("disabled",!0),r.val("X-1"),r.prop("disabled",!0))});i.change(function(){var e=i.val();f(n,t,i,r,e);e!=="X-1"?(parseInt(e)<10&&(e="0"+e),o.val(e),h.val(s.val()+"/"+o.val()+"/"+u.val()),r.prop("disabled",!1)):(r.val("X-1"),r.prop("disabled",!0))});r.change(function(){var n=r.val();n!=="X-1"&&(parseInt(n)<10&&(n="0"+n),s.val(n),h.val(s.val()+"/"+o.val()+"/"+u.val()))})}function s(n,r,u,o){var s="",c;if(r.empty(),r.append(new Option("Year","X-1")),n.selector==="#divDateOfBirthQQ"){if($("#divDateOfBirthQQ").length){for(c=t-u;c>=t-o;c--)s+='<option value="'+c+'">'+c+"<\/option>";r.append(s);$("#ctl00_MainContent_hdfDateOfBirth").length&&$("#ctl00_MainContent_hdfDateOfBirth").val().length>0&&h($("#ctl00_MainContent_hdfDateOfBirth"),n,r,$("#ctl00_MainContent_dcDateOfBirth_ddlMonths"),$("#ctl00_MainContent_dcDateOfBirth_ddlDays"))}}else n.selector==="#divCoverStartDate"&&(i>=10?(s+='<option value="'+t+'">'+t+"<\/option>",s+='<option value="'+(t+1)+'">'+(t+1)+"<\/option>"):s+='<option value="'+t+'">'+t+"<\/option>",r.append(s),$("#ctl00_MainContent_hdfCoverStartDate").val().length>0?h($("#ctl00_MainContent_hdfCoverStartDate"),n,r,$("#ctl00_MainContent_dcCoverStartDate_ddlMonths"),$("#ctl00_MainContent_dcCoverStartDate_ddlDays")):(r.val(t),$("#ctl00_MainContent_dcCoverStartDate_hdfYears").val(r.val()),e(n,$("#ctl00_MainContent_dcCoverStartDate_ddlYears"),$("#ctl00_MainContent_dcCoverStartDate_ddlMonths")),f(n,r,$("#ctl00_MainContent_dcCoverStartDate_ddlMonths"),$("#ctl00_MainContent_dcCoverStartDate_ddlDays"),$("#ctl00_MainContent_dcCoverStartDate_ddlMonths").val())))}function e(n,r,f){n.selector==="#divDateOfBirthQQ"?r.val()==t-17?u(n,f,0,i):u(n,f,0,11):n.selector==="#divCoverStartDate"&&(r.val()==t&&i>=10?u(n,f,i,11):r.val()==t+1&&i==10?u(n,f,0,0):r.val()==t+1&&i==11?u(n,f,0,1):u(n,f,i,i+1))}function u(n,t,i,r){var f="",u;if(t.empty(),t.append(new Option("Month","X-1")),n.selector==="#divDateOfBirthQQ"||n.selector==="#divCoverStartDate"){for(u=i;u<=r;u++)f+='<option value="'+(u+1)+'">'+c[u]+"<\/option>";t.append(f)}}function f(u,f,e,o,s){var c=i+1,h=f.val();if(u.selector==="#divDateOfBirthQQ"){if(u.length)if(f.val()==t-17&&e.val()==c)switch(parseInt(s)){case 1:case 3:case 5:case 7:case 8:case 10:case 12:n(o,1,r);break;case 4:case 6:case 9:case 11:n(o,1,r);break;case 2:h%4==0?n(o,1,r):n(o,1,r);break;default:n(o,1,31)}else if(f.val()==t-17&&e.val()!=c)switch(parseInt(s)){case 1:case 3:case 5:case 7:case 8:case 10:case 12:n(o,1,31);break;case 4:case 6:case 9:case 11:n(o,1,30);break;case 2:h%4==0?n(o,1,29):n(o,1,28);break;default:n(o,1,31)}else switch(parseInt(s)){case 1:case 3:case 5:case 7:case 8:case 10:case 12:n(o,1,31);break;case 4:case 6:case 9:case 11:n(o,1,30);break;case 2:h%4==0?n(o,1,29):n(o,1,28);break;default:n(o,1,31)}}else if(u.selector==="#divCoverStartDate"&&$("#divCoverStartDate").length)if(e.val()==c)switch(parseInt(s)){case 1:case 3:case 5:case 7:case 8:case 10:case 12:n(o,r,31);break;case 4:case 6:case 9:case 11:n(o,r,30);break;case 2:h%4==0?n(o,r,29):n(o,r,28);break;default:n(o,1,31)}else switch(parseInt(s)){case 1:case 3:case 5:case 7:case 8:case 10:case 12:n(o,1,31);break;case 4:case 6:case 9:case 11:n(o,1,30);break;case 2:h%4==0?n(o,1,29):n(o,1,28);break;default:n(o,1,31)}}function n(n,t,i){var u="",r;for(n.empty(),n.append(new Option("Day","X-1")),r=t;r<=i;r++)u+='<option value="'+r+'">'+r+"<\/option>";n.append(u)}function h(n,t,i,r,u){var o,c,l,a,v,y,p,s,h;o=n.val();o=o.split("/");c=parseInt(o[2]);l=c;e(t,i,r);i.val(l);a=parseInt(o[1]);v=a;f(t,i,r,u,r.val());r.val(v);y=parseInt(o[0]);p=y;f(t,i,r,u,r.val());u.val(p);s=r.val();h=u.val();parseInt(s)<10&&(s="0"+s);parseInt(h)<10&&(h="0"+h);n.val(h+"/"+s+"/"+i.val())}try{checkIsMobile()||$("#ctl00_MainContent_ddlOccupation").select2()}catch(l){}var t=(new Date).getFullYear(),i=(new Date).getMonth(),r=(new Date).getDate(),c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"];$("#divDateOfBirthQQ").length&&(s($("#divDateOfBirthQQ"),$("#ctl00_MainContent_dcDateOfBirth_ddlYears"),17,100,$("#ctl00_MainContent_dcDateOfBirth_hdfYears"),$("#ctl00_MainContent_dcDateOfBirth_hdfMonths"),$("#ctl00_MainContent_dcDateOfBirth_hdfDays")),o($("#divDateOfBirthQQ"),$("#ctl00_MainContent_dcDateOfBirth_ddlYears"),$("#ctl00_MainContent_dcDateOfBirth_ddlMonths"),$("#ctl00_MainContent_dcDateOfBirth_ddlDays"),$("#ctl00_MainContent_dcDateOfBirth_hdfYears"),$("#ctl00_MainContent_dcDateOfBirth_hdfMonths"),$("#ctl00_MainContent_dcDateOfBirth_hdfDays"),$("#ctl00_MainContent_hdfDateOfBirth")));$("#divCoverStartDate").length&&(s($("#divCoverStartDate"),$("#ctl00_MainContent_dcCoverStartDate_ddlYears"),0,100,$("#ctl00_MainContent_dcCoverStartDate_hdfYears"),$("#ctl00_MainContent_dcCoverStartDate_hdfMonths"),$("#ctl00_MainContent_dcCoverStartDate_hdfDays")),o($("#divCoverStartDate"),$("#ctl00_MainContent_dcCoverStartDate_ddlYears"),$("#ctl00_MainContent_dcCoverStartDate_ddlMonths"),$("#ctl00_MainContent_dcCoverStartDate_ddlDays"),$("#ctl00_MainContent_dcCoverStartDate_hdfYears"),$("#ctl00_MainContent_dcCoverStartDate_hdfMonths"),$("#ctl00_MainContent_dcCoverStartDate_hdfDays"),$("#ctl00_MainContent_hdfCoverStartDate")));$("#divDateOfBirthQQ").length&&($("#divDateOfBirthQQ").val().length!==0?($("#ctl00_MainContent_dcDateOfBirth_ddlMonths").prop("disabled",!1),$("#ctl00_MainContent_dcDateOfBirth_ddlDays").prop("disabled",!1),$("#ctl00_MainContent_dcDateOfBirth_hdfYears").val($("#ctl00_MainContent_dcDateOfBirth_ddlYears").val()),$("#ctl00_MainContent_dcDateOfBirth_hdfMonths").val($("#ctl00_MainContent_dcDateOfBirth_ddlMonths").val()),$("#ctl00_MainContent_dcDateOfBirth_hdfDays").val($("#ctl00_MainContent_dcDateOfBirth_ddlDays").val())):($("#ctl00_MainContent_dcDateOfBirth_ddlMonths").prop("disabled",!0),$("#ctl00_MainContent_dcDateOfBirth_ddlDays").prop("disabled",!0)));$("#divCoverStartDate").length&&($("#divCoverStartDate").val().length!==0?($("#ctl00_MainContent_dcCoverStartDate_ddlDays").prop("disabled",!1),$("#ctl00_MainContent_dcCoverStartDate_hdfYears").val($("#ctl00_MainContent_dcCoverStartDate_ddlYears").val()),$("#ctl00_MainContent_dcCoverStartDate_hdfMonths").val($("#ctl00_MainContent_dcCoverStartDate_ddlMonths").val()),$("#ctl00_MainContent_dcCoverStartDate_hdfDays").val($("#ctl00_MainContent_dcCoverStartDate_ddlDays").val())):$("#ctl00_MainContent_dcCoverStartDate_ddlDays").prop("disabled",!0))});var path=window.location.pathname,carServiceURL="",xsltPath="";path.indexOf("QuickQuote")>0||path.indexOf("quickquote")>0?(carServiceURL="../../services/carreglookup.asmx/",xsltPath="../XSLT/"):(carServiceURL="../services/carreglookup.asmx/",xsltPath="XSLT/");$(document).ready(function(){function r(){try{$("#ctl00_MainContent_VehicleControlMain_ddlVehicleYearRegistered").val("X-1");$("#ctl00_MainContent_VehicleControlMain_Manufacturer").val("X-1");$.ResetOptions("ctl00_MainContent_VehicleControlMain_Model","Please Select");$.ResetOptions("ctl00_MainContent_VehicleControlMain_ddlCC","Please Select");$("#ctl00_MainContent_VehicleControlMain_Manufacturer").attr("disabled","disabled");$("#ctl00_MainContent_VehicleControlMain_Model").attr("disabled","disabled");$("#ctl00_MainContent_VehicleControlMain_ddlCC").attr("disabled","disabled")}catch(n){}}$("#FailedSearch").hide();$("#RegLookupFail").hide();var t="",i="",n="true";try{n=$("#ctl00_MainContent_VehicleControlMain_UseCartel").val();i=$("#ctl00_MainContent_VehicleControlMain_lblModelCode").val();t=$("#ctl00_MainContent_VehicleControlMain_lblModelDesc").val();i.length>0?($("#ctl00_MainContent_VehicleControlMain_lblSelectedVehicle").text(t),$("#ManualVehicleSearch").hide(),$("#VehicleSelected").show(),$("#VehicleListSearch").hide(),$("#VehicleRegLookup").hide(),$("#ctl00_MainContent_VehicleControlMain_VehicleManualLookup").val("true")):$("#ctl00_MainContent_VehicleControlMain_lblModelCode").value!=null?($("#VehicleSelected").show(),n=="true"?$("#btSearchManual").show("slow"):$("#btSearchManual").hide()):($("#VehicleSelected").hide(),$("#VehicleListSearch").hide(),n=="true"?($("#VehicleRegLookup").show(),$("#ManualVehicleSearch").hide(),$("#btSearchManual").show()):($("#VehicleRegLookup").hide(),$("#ManualVehicleSearch").show(),$("#btSearchManual").hide()))}catch(u){}$("#btChangeVehicle").click(function(){$("#ctl00_MainContent_VehicleControlMain_lblModelCode").val("");$("#ctl00_MainContent_VehicleControlMain_ddlSelectedVehicle option").remove();r();var n="true";n=$("#ctl00_MainContent_VehicleControlMain_UseCartel").val();n=="true"?($("#ManualVehicleSearch").hide(),$("#VehicleRegLookup").show("slow"),$("#btSearchManual").show("slow")):($("#VehicleRegLookup").hide(),$("#ManualVehicleSearch").show("slow"),$("#btSearchManual").hide());$("#VehicleSelected").hide();$("#VehicleListSearch").hide()});$("#lnkVehicleRegUnknown").click(function(){initializeCarControls();$("#ManualVehicleSearch").show("slow");$("#VehicleSelected").hide();$("#VehicleListSearch").hide();$("#VehicleRegLookup").hide();$("#ctl00_MainContent_VehicleControlMain_VehicleReg").val("");ga("send","event","CarLookup","Manual Vehicle Call")});$("#btSearchManual").click(function(){$("#RegLookupFail").hide();$("#ManualVehicleSearch").hide();$("#VehicleSelected").hide();$("#VehicleListSearch").hide();$("#VehicleRegLookup").show("slow");ga("send","event","CarLookup","Return to Reg Lookup Vehicle Call")});$("#SearchWithReg").click(function(n){n.preventDefault();$("#jsonDiv").html("");$("#ctl00_MainContent_VehicleControlMain_VehicleManualLookup").val("false");$("#ctl00_MainContent_VehicleControlMain_tbAddVehDetailsRegNo").val()!=""?(testJson(),$("#ctl00_MainContent_VehicleControlMain_VehicleReg").val($("#ctl00_MainContent_VehicleControlMain_tbAddVehDetailsRegNo").val()),$("#ctl00_MainContent_VehicleControlMain_divRegNumberError").hide()):$("#ctl00_MainContent_VehicleControlMain_divRegNumberError").show()});$("#ListBox1").change(function(){$("input#text1").val($("#ListBox1 option:selected").val())});$("#ctl00_MainContent_VehicleControlMain_ddlSelectedVehicle").change(function(){var n=$("#ctl00_MainContent_VehicleControlMain_ddlSelectedVehicle option:selected").val(),t;n!="X-1"&&n!=""&&(t=$("#ctl00_MainContent_VehicleControlMain_txtVehicleManufacturer").val()+" "+$("#ctl00_MainContent_VehicleControlMain_ddlSelectedVehicle option:selected").text(),$("#ctl00_MainContent_VehicleControlMain_lblSelectedVehicle").text(t),$("#ctl00_MainContent_VehicleControlMain_lblModelDesc").val(t),$("#ctl00_MainContent_VehicleControlMain_lblModelCode").val(n),$("#RegLookupFail").hide(),$("#FailedSearch").hide(),$("#ManualVehicleSearch").hide(),$("#VehicleSelected").show("slow"),$("#VehicleListSearch").hide(),$("#VehicleRegLookup").hide())});$("#SearchManual").click(function(n){n.preventDefault();setTimeout(function(){var n=$("#ctl00_MainContent_VehicleControlMain_ddlSelectedVehicle option").size();n==0?($("#ManualVehicleSearch").show(),$("#VehicleSelected").hide(),$("#VehicleListSearch").hide(),$("#VehicleRegLookup").hide(),$("#FailedSearch").show()):($("#ManualVehicleSearch").hide(),$("#VehicleSelected").hide(),$("#VehicleListSearch").show("slow"),$("#VehicleRegLookup").hide())},1e3);$("#ctl00_MainContent_VehicleControlMain_VehicleMake").val($("#ctl00_MainContent_VehicleControlMain_Manufacturer").val());$("#ctl00_MainContent_VehicleControlMain_VehicleModel").val($("#ctl00_MainContent_VehicleControlMain_Model").val());$("#ctl00_MainContent_VehicleControlMain_VehicleCC").val($("#ctl00_MainContent_VehicleControlMain_ddlCC").val());$("#ctl00_MainContent_VehicleControlMain_VehicleYear").val($("#ctl00_MainContent_VehicleControlMain_ddlVehicleYearRegistered").val());$("#ctl00_MainContent_VehicleControlMain_tbAddVehDetailsRegNo").val("");$("#ctl00_MainContent_VehicleControlMain_VehicleManualLookup").val("true")});try{n=$("#ctl00_MainContent_VehicleControlMain_UseCartel").val();n!="true"&&initializeCarControls()}catch(u){}}),function(n){n.CarControl=function(t,i,r,u,f,e,o,s,h,c,l,a){var v=n("#ctl00_MainContent_VehicleControlMain_lblModelCode").val();n("#"+t+"").val("X-1");n("#"+f+"").empty();n("#"+o+"").empty();n("#"+h+"").empty();n("#"+f+"").attr("disabled","disabled");n("#"+o+"").attr("disabled","disabled");n("#"+h+"").attr("disabled","disabled");n.ResetOptions(o,s);n.ResetOptions(h,c);n("#"+i+"").val()!="X-1"&&n("#"+i+"").val(n("#"+t+"").val());n("#"+t+"").change(function(){n("#"+t+"").val()!="X-1"?(n("#"+f+"").removeAttr("disabled"),n("#"+o+"").attr("disabled","disabled"),n("#"+h+"").attr("disabled","disabled"),n.ResetOptions(o,s),n.ResetOptions(h,c),n.ResetOptionsVehSelect(l,a),n("#"+i+"").val(n("#"+t+"").val())):(n("#"+f+"").attr("disabled","disabled"),n("#"+o+"").attr("disabled","disabled"),n("#"+h+"").attr("disabled","disabled"));n("#"+f+"").focus()});n.DisplayMakes(t,r,f);n("#"+f+" option[value='"+n("#"+e+"").val()+"']").attr("selected","selected");n("#"+e+"").val()!="X-1"&&(n.DisplayModels(t,r,f,o),n("#"+e+"").val(n("#"+f+"").val()));n("#"+f+"").change(function(){n("#"+o+"").removeAttr("disabled");n("#"+h+"").attr("disabled","disabled");n.ResetOptions(o,s);n.ResetOptions(h,c);n.ResetOptionsVehSelect(l,a);n.DisplayModels(t,r,f,o);n("#"+e+"").val(n("#"+f+"").val());n("#"+o+"").focus()});n("#"+o+" option[value='"+n("#"+s+"").val()+"']").attr("selected","selected");n("#"+s+"").val()!="X-1"&&(n.DisplayCC(t,r,f,o,h),n("#"+s+"").val(n("#"+o+"").val()));n("#"+o+"").change(function(){n("#"+h+"").removeAttr("disabled");n.ResetOptions(h,c);n.ResetOptionsVehSelect(l,a);n.DisplayCC(t,r,f,o,h);n("#"+s+"").val(n("#"+o+"").val());n("#"+h+"").focus()});n("#"+h+" option[value='"+n("#"+c+"").val()+"']").attr("selected","selected");n("#"+c+"").val()!="X-1"&&(n.GetCars(h,f,t,r,l,o),n("#"+c+"").val(n("#"+h+"").val()));n("#"+h+"").change(function(){n.ResetOptionsVehSelect(l,a);n.GetCars(h,f,t,r,l,o);n("#"+c+"").val(n("#"+h+"").val())});setTimeout(function(){n("#"+l+" option[value='"+n("#"+a+"").val()+"']").attr("selected","selected");n("#"+a+"").val()!="X-1"&&n("#"+a+"").val(n("#"+l+"").val())},2500);n("#"+l+"").change(function(){n("#"+a+"").val(n("#"+l+"").val())});n("#"+i+"").change(function(){n("#"+t+" option[value='"+n("#"+i+"").val()+"']").attr("selected","selected")});n("#"+u+"").change(function(){n("#"+r+" option[value='"+n("#"+u+"").val()+"']").attr("selected","selected")});n("#"+e+"").change(function(){n("#"+f+" option[value='"+n("#"+e+"").val()+"']").attr("selected","selected")});n("#"+s+"").change(function(){n("#"+o+" option[value='"+n("#"+s+"").val()+"']").attr("selected","selected")});n("#"+c+"").change(function(){n("#"+h+" option[value='"+n("#"+c+"").val()+"']").attr("selected","selected")});n("#"+a+"").change(function(){n("#"+l+" option[value='"+n("#"+a+"").val()+"']").attr("selected","selected")})};n.DisplayMakes=function(t,i,r){n("#"+r+"").append(n("<option><\/option>").val("X-1").html("Please Select"));n.LoadData(xsltPath+"CarsServiceMin.xml",xsltPath+"CarList.xslt",r,"CarRegYear",n("#"+t+"").val(),"CarFuelParam","P","","","","")};n(document).ajaxSend(function(){n("#loading-indicator").show()});n(document).ajaxComplete(function(){n("#loading-indicator").hide()});n.GetCars=function(t,i,r,u,f,e){if(n("#"+t+"").val()!="X-1"){var o="",s="",h=0,l="P",c=0;o=n("#"+i+"").val();s=n("#"+e+"").val();h=n("#"+t+"").val();c=n("#"+r+"").val();l=n("#"+u+"").val();n.ajax({type:"POST",url:carServiceURL+"GetCarList",data:"{'Manufacturer':'"+o+"','Model':'"+s+"','EngineCapacity': "+h+",'FuelType':'','YearOfManufacture':"+c+",'BID':'"+n("#ctl00_MainContent_VehicleControlMain_hfBID").val()+"'}",contentType:"application/json; charset=utf-8",dataType:"json",dataFilter:function(data){var msg=eval("("+data+")");return msg.hasOwnProperty("d")?msg.d:msg},success:function(n){n.length==0?ParseObj(n,f,"Description"):ParseObj(n,f,"Description");ga("sent","event","CarLookup","Manual Vehicle Sent Success")},error:function(){},complete:function(){setTimeout(function(){var t=n("#ctl00_MainContent_VehicleControlMain_ddlSelectedVehicle option").size();n("#"+f+"").prepend(n("<option value='X-1' selected='selected'>Please Select<\/option>"));n("#"+f+"").val("X-1");t==0?(n("#ManualVehicleSearch").show(),n("#VehicleSelected").hide(),n("#VehicleListSearch").hide(),n("#VehicleRegLookup").hide(),n("#FailedSearch").show()):(n("#ManualVehicleSearch").hide(),n("#VehicleSelected").hide(),n("#VehicleListSearch").show("slow"),n("#VehicleRegLookup").hide(),n("#ctl00_MainContent_VehicleControlMain_ddlSelectedVehicle").focus())},1e3);n("#ctl00_MainContent_VehicleControlMain_VehicleMake").val(n("#ctl00_MainContent_VehicleControlMain_Manufacturer").val());n("#ctl00_MainContent_VehicleControlMain_VehicleModel").val(n("#ctl00_MainContent_VehicleControlMain_Model").val());n("#ctl00_MainContent_VehicleControlMain_VehicleCC").val(n("#ctl00_MainContent_VehicleControlMain_ddlCC").val());n("#ctl00_MainContent_VehicleControlMain_VehicleYear").val(n("#ctl00_MainContent_VehicleControlMain_ddlVehicleYearRegistered").val());n("#ctl00_MainContent_VehicleControlMain_tbAddVehDetailsRegNo").val("");n("#ctl00_MainContent_VehicleControlMain_VehicleManualLookup").val("true")}})}else n("#"+f+" option").remove()};n.DisplayModels=function(t,i,r,u){n.LoadData(xsltPath+"CarsServiceMin.xml",xsltPath+"ModelList.xslt",u,"CarMakeParam",n("#"+r+"").val(),"CarRegYear",n("#"+t+"").val(),"CarFuelParam","P","","")};n.DisplayCC=function(t,i,r,u,f){n.LoadData(xsltPath+"CarsServiceMin.xml",xsltPath+"CCList.xslt",f,"CarRegYear",n("#"+t+"").val(),"CarFuelParam","P","CarMakeParam",n("#"+r+"").val(),"CarModelParam",n("#"+u+"").val());var e={};n("#"+f+"  option").each(function(){this.text=="0 cc"&&(this.text="0 (Electric)");e[this.text]?n(this).remove():e[this.text]=this.value})};n.LoadData=function(t,i,r,u,f,e,o,s,h,c,l){if(window.ActiveXObject||"ActiveXObject"in window){xml=new ActiveXObject("MSXML2.DOMDocument.3.0");xml.async=!1;xml.load(t);xsl=new ActiveXObject("MSXML2.FreeThreadedDOMDocument.3.0");xsl.async=!1;xsl.load(i);docCache=new ActiveXObject("MSXML2.XSLTemplate.3.0");docCache.stylesheet=xsl;docProcessor=docCache.createProcessor();docProcessor.input=xml;u!=""&&docProcessor.addParameter(u,f);e!=""&&docProcessor.addParameter(e,o);s!=""&&docProcessor.addParameter(s,h);c!=""&&docProcessor.addParameter(c,l);docProcessor.transform();var a=docProcessor.output;n(a).appendTo(n("#"+r))}else document.implementation&&document.implementation.createDocument&&(xml=n.LoadXMLDoc(t),xsl=n.LoadXMLDoc(i),xsltProcessor=new XSLTProcessor,xsltProcessor.importStylesheet(xsl),u!=""&&xsltProcessor.setParameter("",u,f),e!=""&&xsltProcessor.setParameter("",e,o),s!=""&&xsltProcessor.setParameter("",s,h),c!=""&&xsltProcessor.setParameter("",c,l),resultDocument=xsltProcessor.transformToFragment(xml,document),document.getElementById(r).appendChild(resultDocument))};n.LoadXMLDoc=function(n){return xhttp=window.ActiveXObject?new ActiveXObject("Msxml2.XMLHTTP.3.0"):new XMLHttpRequest,xhttp.open("GET",n,!1),xhttp.send(""),xhttp.responseXML};n.ResetOptions=function(t,i){n("#"+t+" option").remove();n("#"+t+"").append(n("<option><\/option>").val("X-1").html("Please Select"));n("#"+i+"").val("X-1")};n.ResetOptionsVehSelect=function(t){n("#"+t+" option").remove()}}(jQuery);var tick="",cross="",tickDDL="",crossDDL="",dateFormat="/(((0[1-9]|[12][0-9]|3[01])([-./])(0[13578]|10|12)([-./])(d{4}))|(([0][1-9]|[12][0-9]|30)([-./])(0[469]|11)([-./])(d{4}))|((0[1-9]|1[0-9]|2[0-8])([-./])(02)([-./])(d{4}))|((29)(.|-|/)(02)([-./])([02468][048]00))|((29)([-./])(02)([-./])([13579][26]00))|((29)([-./])(02)([-./])([0-9][0-9][0][48]))|((29)([-./])(02)([-./])([0-9][0-9][2468][048]))|((29)([-./])(02)([-./])([0-9][0-9][13579][26])))/",dateFormatHTML5="/^d{4}-((0d)|(1[012]))-(([012]d)|3[01])$/",ddlDefault=["X-1"],ddlDefault0=["X-0"],interval=500,args,blurFlag=!0;$(function(){initializeMotorValidationQQ()});var pathname=window.location.pathname,ServerRoot="/relay.equote",ServerStatus="";$("#HiddenField").hide();$("#Address5").hide();$("#UnavailLoc").hide();pathname=pathname.replace(/{.*?}/g,"").replace(/\[.*?\]/g,"").replace(/<.*?>/g,"").replace(/\(.*?\)/g,"").replace("/)","").toLowerCase();localStorage.getItem("lastVisit")?ga("send","event","Visit"+ServerStatus,"Return","Relay.eQuote",0):(ga("send","event","Visit"+ServerStatus,"New","Relay.eQuote",0),localStorage.setItem("lastVisit",new Date));switch(pathname){case(ServerRoot+"/CV/QuickQuote/QQResults.aspx").toLowerCase():document.getElementById("ctl00_MainContent_h1ComprehensivePrem")?ga("send","event","QuotationMetrics"+ServerStatus,"CV-QuickQuote","Relay.eQuote",0):document.getElementById("ctl00_MainContent_h1ThirdPartyPrem")?ga("send","event","QuotationMetrics"+ServerStatus,"CV-QuickQuote","Relay.eQuote",0):ga("send","event","QuotationMetrics"+ServerStatus,"CV-NoQuote","Relay.eQuote",0);break;case(ServerRoot+"/CV/QuoteResults.aspx").toLowerCase():document.getElementById("ctl00_ContentPlaceHolder1_Quotes_ctl01_lblAcceptPremium")||"ctl00_ContentPlaceHolder1_Quotes_ctl01_lblBuyNowPremium"?ga("send","event","QuotationMetrics"+ServerStatus,"CV-FullQuote","Relay.eQuote",0):ga("send","event","QuotationMetrics"+ServerStatus,"CV-NoQuote","Relay.eQuote",0);break;case(ServerRoot+"/CV/FullQuote.aspx").toLowerCase():document.getElementById("ctl00_ContentPlaceHolder1_QuickQuoteResults_quotes_ctl00_divQQResult")?ga("send","event","QuotationMetrics"+ServerStatus,"CV-QuickQuote","Relay.eQuote",0):document.getElementById("ctl00_ContentPlaceHolder1_QuickQuoteResults_quotes_ctl00_NoQuotes")&&ga("send","event","QuotationMetrics"+ServerStatus,"CV-QuickQuote-NoQuote","Relay.eQuote",0);case(ServerRoot+"/CV/QuoteSelected.aspx").toLowerCase():document.getElementById("AcceptanceBody")&&ga("send","event","QuotationMetrics"+ServerStatus,"CV-Acceptance","Relay.eQuote",0);break;case(ServerRoot+"/CV/PurchasedQuote.aspx").toLowerCase():document.getElementById("ctl00_MainContent_AcceptanceBody")&&(kpi_Premium=0,ga("send","event","QuotationMetrics"+ServerStatus,"CV-Purchase","Relay.eQuote",kpi_Premium))}switch(pathname){case(ServerRoot+"/Motor/Motor1.aspx").toLowerCase():document.getElementById("ctl00_MainContent_QuickQuoteResults_quotes_ctl00_Premium")?ga("send","event","QuotationMetrics"+ServerStatus,"Motor-QuickQuote","Relay.eQuote",0):document.getElementById("ctl00_MainContent_QuickQuoteResults_quotes_ctl01_Premium")?ga("send","event","QuotationMetrics"+ServerStatus,"Motor-QuickQuote","Relay.eQuote",0):document.getElementById("ctl00_MainContent_QuickQuoteResults_quotes_ctl02_Premium")?ga("send","event","QuotationMetrics"+ServerStatus,"Motor-QuickQuote","Relay.eQuote",0):document.getElementById("ctl00_MainContent_QuickQuoteResults_NoQuotes")&&ga("send","event","QuotationMetrics"+ServerStatus,"Motor-QuickQuote-NoQuote","Relay.eQuote",0);break;case(ServerRoot+"/Motor/QuickQuote/QuickQuoteResults.aspx").toLowerCase():document.getElementById("ct100_MainContent_QuoteResultsPNL")&&ga("send","event","QuotationMetrics"+ServerStatus,"Motor-QuickQuote","Relay.eQuote",0);document.getElementById("ctl00_MainContent_NoQuotes")&&ga("send","event","QuotationMetrics"+ServerStatus,"Motor-QuickQuote-NoQuote","Relay.eQuote",0);break;case(ServerRoot+"/Motor/finalQuoteAll.aspx").toLowerCase():(document.getElementById("ctl00_MainContent_QuoteResults1_quotes_ctl01_lblAcceptPremium")||document.getElementById("ctl00_MainContent_QuoteResults1_quotes_ctl01_lblBuyNowPremium"))&&ga("send","event","QuotationMetrics"+ServerStatus,"Motor-FullQuote","Relay.eQuote",0);document.getElementById("ctl00_MainContent_QuoteResults1_pnlFailureCallMe")&&ga("send","event","QuotationMetrics"+ServerStatus,"Motor-Full-NoQuote","Relay.eQuote",0);break;case(ServerRoot+"/Motor/AcceptedQuote.aspx").toLowerCase():document.getElementById("acceptedQuoteDetails")&&ga("send","event","QuotationMetrics"+ServerStatus,"Motor-Acceptance","Relay.eQuote",0);break;case(ServerRoot+"/Motor/PurchasedQuote.aspx").toLowerCase():document.getElementById("ctl00_MainContent_hdfPolicyPremium")&&(kpi_Premium=0,ga("send","event","QuotationMetrics"+ServerStatus,"Motor-Purchase","Relay.eQuote",kpi_Premium))}switch(pathname){case(ServerRoot+"/Home/Home-Results.aspx").toLowerCase():document.getElementById("ctl00_ContentPlaceHolder1_HomeResults_rptQuotes_ctl01_lblAcceptPremium")||document.getElementById("ctl00_ContentPlaceHolder1_HomeResults_rptQuotes_ctl01_lblBuyNowPremium")?ga("send","event","QuotationMetrics"+ServerStatus,"Home-FullQuote","Relay.eQuote",0):ga("send","event","QuotationMetrics"+ServerStatus,"Home-NoQuote","Relay.eQuote",0);break;case(ServerRoot+"/Home/Home-Quote-1.aspx").toLowerCase():document.getElementById("ctl00_ContentPlaceHolder1_QuickQuoteResults_quotes_ctl00_divQQResult")?ga("send","event","QuotationMetrics"+ServerStatus,"Home-QuickQuote","Relay.eQuote",0):document.getElementById("ctl00_ContentPlaceHolder1_QuickQuoteResults_quotes_ctl00_NoQuotes")&&ga("send","event","QuotationMetrics"+ServerStatus,"Home-QuickQuote-NoQuote","Relay.eQuote",0);case(ServerRoot+"/Home/QuickQuote/QuickQuoteResults.aspx").toLowerCase():document.getElementById("ctl00_MainContent_QuoteResultsPNL")?ga("send","event","QuotationMetrics"+ServerStatus,"Home-QuickQuote","Relay.eQuote",0):document.getElementById("ctl00_MainContent_NoQuotes")&&ga("send","event","QuotationMetrics"+ServerStatus,"Home-QuickQuote-NoQuote","Relay.eQuote",0);case(ServerRoot+"/Home/Home-Quote-Selected.aspx").toLowerCase():document.getElementById("divAcceptedQuote")&&ga("send","event","QuotationMetrics"+ServerStatus,"Home-Acceptance","Relay.eQuote",0);break;case(ServerRoot+"/Home/PurchasedQuote.aspx").toLowerCase():document.getElementById("ctl00_MainContent_AcceptanceBody")&&(kpi_Premium=0,ga("send","event","QuotationMetrics"+ServerStatus,"Home-Purchase","Relay.eQuote",kpi_Premium))}switch(pathname){case"/eHIQSwl/household-quotes.aspx".toLowerCase():document.getElementById("ctl00_mainbody_ctl_HouseholdQuotes_gv_Quotes")&&ga("send","event","QuotationMetrics"+ServerStatus,"Home-FullQuote","HIQS",0)}switch(pathname){case"/relay.equote.motor/quoteAll.aspx".toLowerCase():document.getElementById("ctl00_MainContent_QuoteResults1_SuccessQuoteContainer")&&ga("send","event","QuotationMetrics"+ServerStatus,"Motor-QuickQuote","OLD",0);break;case"/relay.equote.motor/finalQuoteAll.aspx".toLowerCase():document.getElementById("ctl00_MainContent_QuoteResults1_SuccessQuoteContainer")&&ga("send","event","QuotationMetrics"+ServerStatus,"Motor-FullQuote","OLD",0);break;case"/relay.equote.motor/AcceptedQuote.aspx".toLowerCase():document.getElementById("ctl00_MainContent_AcceptanceBody")&&ga("send","event","QuotationMetrics"+ServerStatus,"Motor-Acceptance","OLD",0)}$(document).ready(function(){$(".btn-retrieveQuote").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Retrieve Quote Opened","Relay.eQuote",0)});$("#ctl00_Header1_RetrieveQuote_btnRetrieveQuote").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Retrieve Quote Clicked","Relay.eQuote",0)});$("#btnShowCallMe").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Call Me Opened","Relay.eQuote",0)});$("#btnCallMe").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Call Me Clicked","Relay.eQuote",0)});$("#btnClose").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Call Me Cancel","Relay.eQuote",0)});$(".addonDate").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Date Picker Opened","Relay.eQuote",0)});$("#modalMotorAssumptions").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Motor Assumptions Opened","Relay.eQuote",0)});$("#ctl00_Header1_backbtn").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Back Button Opened","Relay.eQuote",0)});$("#ctl00_Header1_lnkBack").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Back Button Clicked","Relay.eQuote",0)});$("#ctl00_Header1_HyperLink1").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Back Button Canceled","Relay.eQuote",0)});$("#ctl00_Header1_lnkNewQuote").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"New Quote Clicked","Relay.eQuote",0)});jQuery(document).on("paste",function(){ga("send","event","eQuoteInfo"+ServerStatus,"Paste Detected","Relay.eQuote",0)});jQuery(document).on("copy",function(){ga("send","event","eQuoteInfo"+ServerStatus,"Copy Detected","Relay.eQuote",0)});jQuery(document).on("cut",function(){ga("send","event","eQuoteInfo"+ServerStatus,"Cut Detected","Relay.eQuote",0)});$("#ctl00_MainContent_ClaimsControl1_btnClaimAdd").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Add Claim Opened","Relay.eQuote",0)});$("#ctl00_MainContent_ClaimsControl1_btnSaveClaim").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Add Claim Clicked","Relay.eQuote",0)});$("#ctl00_MainContent_ClaimsControl1_btnSaveEditClaim").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Edit Claim Clicked","Relay.eQuote",0)});$("#CancelClaim").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Cancel Claim Clicked","Relay.eQuote",0)});$("#ctl00_MainContent_PenaltyPointsControl1_btnPenaltyPointsAdd").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Penalty Points Opened","Relay.eQuote",0)});$("#ctl00_MainContent_PenaltyPointsControl1_btnSavePenaltyPoints").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Add Penalty Points Clicked","Relay.eQuote",0)});$("#ctl00_MainContent_PenaltyPointsControl1_btnSaveEditPenaltyPoints").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Edit Penalty Points Clicked","Relay.eQuote",0)});$("#CancelPenaltyPoints").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Cancel Penalty Points Clicked","Relay.eQuote",0)});$("#ctl00_MainContent_ConvictionsControl1_btnConvictionAdd").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Convictions Opened","Relay.eQuote",0)});$("#ctl00_MainContent_ConvictionsControl1_btnSaveConviction").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Add Convictions Clicked","Relay.eQuote",0)});$("#ctl00_MainContent_ConvictionsControl1_btnSaveEditConviction").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Edit Convictions Clicked","Relay.eQuote",0)});$("#CancelConviction").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Cancel Convictions Clicked","Relay.eQuote",0)});$('a[href="#YourDetailsSummary"]').click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Your Details Clicked","Relay.eQuote",0)});$(".divMoreDetails").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"More Details Clicked","Relay.eQuote",0)});$("#ctl00_MainContent_QuoteResults1_wucRecalculateQuote_btnRecalc").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Recalculate Quote Clicked","Relay.eQuote",0)});$("#ctl00_MainContent_QuoteResults1_wucRecalculateQuote_ddlCoverRequired").change(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Cover Required Changed","Relay.eQuote",0)});$("#ctl00_MainContent_QuoteResults1_wucRecalculateQuote_ddlAddCoverVoluntaryExcess").change(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Voluntary Excess Changed","Relay.eQuote",0)});$("#ctl00_MainContent_QuoteResults1_wucRecalculateQuote_ddlAddCoverProtection").change(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Protection Changed","Relay.eQuote",0)});$("#ctl00_MainContent_TC").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Terms And Conditions Clicked","Relay.eQuote",0)});$("#ctl00_BotCheck_txt_Value").change(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Bot Detected","Relay.eQuote",0)});document.getElementById("ctl00_MainContent_QuoteResults1_pnlFailureCallMe")&&ga("send","event","eQuoteInfo"+ServerStatus,"No Quotes","Relay.eQuote",0);document.getElementById("ctl00_MainContent_QuoteResults1_SuccessQuoteContainer")&&ga("send","event","eQuoteInfo"+ServerStatus,"Quotes Returned","Relay.eQuote",0);$(".close").click(function(){ga("send","event","eQuoteInfo"+ServerStatus,"Modal Closed","Relay.eQuote",0)})})