var static_root="https://static1.st8fm.com/en_US/errors/1";var dvts_version="8-6";var sfx_version="8-6-0";var strhost=(location.hostname.match(".*(es[.-]).*")!==null)?"es":"en";var localeHF="";var careers_root="http://careers"+getSubdomain()+".statefarm.com";var isCanada=false;var assistanceNumber="888-559-1922";var b2b_root="https://b2b"+getSubdomain()+".statefarm.com/b2b/index.html";var login_root="https://online2"+getSubdomain()+".statefarm.com";var redirectToSA=redirectToSAErrorPage();oneX.$(function(){oneX.Loader.callback=function(){console.log("Files Loaded")};oneX.Loader.isLimited=false;oneX.Loader.isAuth=false;if(strhost=="es"||location.href.indexOf("es_US")>-1){oneX.Loader.isSpanish=true}else{oneX.Loader.isSpanish=false}oneX.Loader.contentArea="#content";oneX.Loader.languageLink=null;setTimeout(function(){oneX.Loader.init()},300)});if(strhost=="es"){$("html").attr("lang","es-US");static_root=static_root.replace("en_US","es_US");localeHF=''}if(location.hostname.indexOf(".ca")>0){static_root=static_root.replace("en_US","en_CA");careers_root="http://careers"+getSubdomain()+".statefarm.ca";$("html").attr("lang","en-CA");isCanada=true}var cssFiles=[static_root+"/../../b2c_dvts/"+dvts_version+"/css/min/dvts.modules.min.css","https://static1.st8fm.com/en_US/dxl-1x/prod/css/1x.core.css","https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css",static_root+"/../../b2c_dvts/custom/landing-page/css/west.search.css"];var scriptFiles=["https://cdn-pci.optimizely.com/js/8421581994.js",static_root+"/../../b2c_dvts/custom/landing-page/js/west.search.js"];if(redirectToSA){page+="SA"}$(function(){$.ajax({type:"GET",url:static_root+"/"+page+"_jsonp.js",dataType:"jsonp",jsonp:"returnBody",cache:false})});function returnBody(a){$.each(scriptFiles,function(b,c){if((c==static_root+"/../../b2c_dvts/"+dvts_version+"/js/min/dvts.modules.min.js")||(c==static_root+"/../../b2c_dvts/common/js/lib/StateFarmCommon.js")||(c==static_root+"/../../b2c_dvts/global/js/min/dvts.header.min.js")||(c==static_root+"/../../b2c_dvts/"+dvts_version+"/js/min/pages.min.js")||c=="http://static1.st8fm.com/en_US/dxl-1x/prod/js/1x.core.js"){setTimeout(function(){$('',"");c=c.replace('SSL',"
");c=replaceAll("https://www.statefarm.com",h,c);c=c.replace('',"");c=c.replace("/homepage","");c=c.replace("webdav/700_Web-en_US/Website%20Root/CONTENT_PAGES/1/pages/000_homepage","");c=replaceAll('method="post" />','method="post">',c);c=replaceAll("https://www.statefarm.com/careers",careers_root,c);c=replaceAll("https://b2b.statefarm.com/b2b/index.html",b2b_root,c);c=replaceAll("https://online2.statefarm.com",login_root,c);c=replaceAll("https://www.statefarm.com","https://www.statefarm.com",c);c=replaceAll("https://bank.statefarm.com/BankRates-web/","https://bank.statefarm.com/BankRates-web/",c);return c}function replaceAll(a,b,c){return c.replace(new RegExp(a,"g"),b)}function getSubdomain(){var a=location.host;var b="";if(a.indexOf("-dvnt")!=-1||a.indexOf("localhost")!=-1){b=".tcdev1"}else{if(a.indexOf("-syst")!=-1){b=".tcidv"}else{if(a.indexOf("-perf")!=-1){b=".tcipf"}else{if(a.indexOf("-prep")!=-1){b=".tcisp"}}}}return b}function getSubdomain1(){var a=location.host;var b="";if(a.indexOf("-dvnt")!=-1||a.indexOf("localhost")!=-1){b=".tcdev1"}else{if(a.indexOf("-syst")!=-1){b=".tcidv"}else{if(a.indexOf("-perf")!=-1){b=".tcipf"}else{if(a.indexOf("-prep")!=-1){b=".tcisp"}}}}return b}function setEnvironment(){var a="";var b=getSubdomain1();if(b===".tcdev1"){a="-dvnt-d.test"}else{if(b===".tcidv"){a="-syst-a.test"}else{if(b===".tcipf"){a="-perf.test"}else{if(b===".tcisp"){a="-prep.test"}}}}return a}function isSubdomain(){return window.location.host.indexOf("www")!=-1&&window.location.host.indexOf("es")===0}function buildLanguageToggle(a){$link=a.find("a:first");if($link.length>0){if(strhost=="es"){$link.text("English");$link.attr("href",$(location).attr("href").replace("es","www"))}else{if(!isCanada){$link.html("Español");$link.attr("href",$(location).attr("href").replace("www","es"))}}}return a}function cleanUp(){$(".utility-nav-bundle").html("");$("#logo").find("img").attr("alt","State Farm Registered Trademark Logo");if(isCanada||redirectToSA){$(".utility-nav-language-selector").html("");if(redirectToSA){$("#left-channel").children().remove()}}else{buildLanguageToggle($(".utility-nav-language-selector"))}if($(".phoneNumber").length>0){if($(".phoneNumberText").length>0&&hasNumber()){$(".phoneNumberText").show()}else{$(".phoneNumber").text(assistanceNumber);$(".phoneNumberText").show()}}function a(){$("#helpCenterLink").remove();$(".-oneX-btn-secondary__anchor").slice(1).remove();$(".-oneX-link--block.-oneX-login-userid").slice(1).remove();$(".-oneX-link--block.-oneX-login-password").slice(1).remove();$(".-oneX-justify-content-center .-oneX-link--block").slice(1).remove()}a()}function hasNumber(){return $("span.phoneNumber").text().trim().length>0?true:false}function redirectToSAErrorPage(){var e=false;var a=window.location.hostname;var d=/\.org/g;var b=false;var c=d.test(a.substring(a.lastIndexOf(".")));if(getCookie("loginIntent")!==null){if(getCookie("loginIntent")==="E"&&!c){b=true}}if(c||b){e=true}return e}function errorMsgDisplay(){$(".controls").find($('input[type="text"]')).attr("name","location")}function errorMsgDisplayMobile(){if(window.innerWidth<=599){$("div.span12.secondary.module").addClass("row-fluid")}}function getCookie(d){var f=d+"=";var b=document.cookie.split(";");for(var e=0;e