!function(v,w){"use strict";if("IntersectionObserver"in v&&"IntersectionObserverEntry"in v&&"intersectionRatio"in v.IntersectionObserverEntry.prototype)"isIntersecting"in v.IntersectionObserverEntry.prototype||Object.defineProperty(v.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return 0<this.intersectionRatio}});else{var i=[];e.prototype.THROTTLE_TIMEOUT=100,e.prototype.POLL_INTERVAL=null,e.prototype.USE_MUTATION_OBSERVER=!0,e.prototype.observe=function(i){if(!this._observationTargets.some(function(e){return e.element==i})){if(!i||1!=i.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:i,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},e.prototype.unobserve=function(i){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=i}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},e.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},e.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},e.prototype._initThresholds=function(e){var i=e||[0];return Array.isArray(i)||(i=[i]),i.sort().filter(function(e,i,t){if("number"!=typeof e||isNaN(e)||e<0||1<e)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==t[i-1]})},e.prototype._parseRootMargin=function(e){var i=(e||"0px").split(/\s+/).map(function(e){var i=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!i)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(i[1]),unit:i[2]}});return i[1]=i[1]||i[0],i[2]=i[2]||i[0],i[3]=i[3]||i[1],i},e.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(t(v,"resize",this._checkForIntersections,!0),t(w,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in v&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(w,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},e.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,n(v,"resize",this._checkForIntersections,!0),n(w,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},e.prototype._checkForIntersections=function(){var a=this._rootIsInDom(),o=a?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(e){var i=e.element,t=m(i),n=this._rootContainsTarget(i),d=e.entry,r=a&&n&&this._computeTargetAndRootIntersection(i,o),s=e.entry=new c({time:v.performance&&performance.now&&performance.now(),target:i,boundingClientRect:t,rootBounds:o,intersectionRect:r});d?a&&n?this._hasCrossedThreshold(d,s)&&this._queuedEntries.push(s):d&&d.isIntersecting&&this._queuedEntries.push(s):this._queuedEntries.push(s)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},e.prototype._computeTargetAndRootIntersection=function(e,i){if("none"!=v.getComputedStyle(e).display){for(var t,n,d,r,s,a,o,c,l=m(e),h=g(e),p=!1;!p;){var u=null,f=1==h.nodeType?v.getComputedStyle(h):{};if("none"==f.display)return;if(h==this.root||h==w?(p=!0,u=i):h!=w.body&&h!=w.documentElement&&"visible"!=f.overflow&&(u=m(h)),u&&(t=u,n=l,void 0,d=Math.max(t.top,n.top),r=Math.min(t.bottom,n.bottom),s=Math.max(t.left,n.left),a=Math.min(t.right,n.right),c=r-d,!(l=0<=(o=a-s)&&0<=c&&{top:d,bottom:r,left:s,right:a,width:o,height:c})))break;h=g(h)}return l}},e.prototype._getRootRect=function(){var e;if(this.root)e=m(this.root);else{var i=w.documentElement,t=w.body;e={top:0,left:0,right:i.clientWidth||t.clientWidth,width:i.clientWidth||t.clientWidth,bottom:i.clientHeight||t.clientHeight,height:i.clientHeight||t.clientHeight}}return this._expandRectByRootMargin(e)},e.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,i){return"px"==e.unit?e.value:e.value*(i%2?t.width:t.height)/100}),i={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return i.width=i.right-i.left,i.height=i.bottom-i.top,i},e.prototype._hasCrossedThreshold=function(e,i){var t=e&&e.isIntersecting?e.intersectionRatio||0:-1,n=i.isIntersecting?i.intersectionRatio||0:-1;if(t!==n)for(var d=0;d<this.thresholds.length;d++){var r=this.thresholds[d];if(r==t||r==n||r<t!=r<n)return!0}},e.prototype._rootIsInDom=function(){return!this.root||d(w,this.root)},e.prototype._rootContainsTarget=function(e){return d(this.root||w,e)},e.prototype._registerInstance=function(){i.indexOf(this)<0&&i.push(this)},e.prototype._unregisterInstance=function(){var e=i.indexOf(this);-1!=e&&i.splice(e,1)},v.IntersectionObserver=e,v.IntersectionObserverEntry=c}function c(e){this.time=e.time,this.target=e.target,this.rootBounds=e.rootBounds,this.boundingClientRect=e.boundingClientRect,this.intersectionRect=e.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0},this.isIntersecting=!!e.intersectionRect;var i=this.boundingClientRect,t=i.width*i.height,n=this.intersectionRect,d=n.width*n.height;this.intersectionRatio=t?d/t:this.isIntersecting?1:0}function e(e,i){var t=i||{};if("function"!=typeof e)throw new Error("callback must be a function");if(t.root&&1!=t.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=function(e,i){var t=null;return function(){t=t||setTimeout(function(){e(),t=null},i)}}(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(t.rootMargin),this.thresholds=this._initThresholds(t.threshold),this.root=t.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" ")}function t(e,i,t,n){"function"==typeof e.addEventListener?e.addEventListener(i,t,n||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+i,t)}function n(e,i,t,n){"function"==typeof e.removeEventListener?e.removeEventListener(i,t,n||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+i,t)}function m(e){var i;try{i=e.getBoundingClientRect()}catch(e){}return i?(i.width&&i.height||(i={top:i.top,right:i.right,bottom:i.bottom,left:i.left,width:i.right-i.left,height:i.bottom-i.top}),i):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function d(e,i){for(var t=i;t;){if(t==e)return!0;t=g(t)}return!1}function g(e){var i=e.parentNode;return i&&11==i.nodeType&&i.host?i.host:i}}(window,document),require(["jquery","local-storage","cookie-helper"],function(m,f,g){var e,_=m.fn.Uniqid();if(m(".ciw-zip").keypress(function(e){return m(this).removeClass("error"),/\d/.test(String.fromCharCode(e.charCode))&&m(this).val().length<5}),m(".ciw-drp-label, .ciw-drp-arrow, .ciw-drp-value, .more-fltr").each(function(e){var c=m(this).parents(".ciw-drp");_parent_form=m(this).closest("form"),m(this).click(function(e){c.removeClass("error");var i=c.find(".ciw-drp-label"),t=c.find(".ciw-drp-arrow"),n=c.find(".ciw-drp-value"),d=c.find(".ciw-drp-close"),r=function(e){if(m(this).unbind("click",r),c.removeClass("opened"),c.find(".ciw-drp-content").addClass("hidden"),c.hasClass("ciw-drp-more"))h();else if(c.hasClass("ciw-drp-zip")){var i=c.find(".ciw-drp-value").text().split("Zip Code: "),t=c.find(".ciw-drp-val");2==i.length&&t.val()!=i[1]&&(_parent_form.find(".ciw-error-zip").addClass("hidden"),t.val(i[1]))}};if(!c.hasClass("opened")){c.addClass("opened"),c.find(".ciw-drp-content").removeClass("hidden");var s=m(window).width()-(c.offset().left+c.outerWidth()),a=c.find(".ciw-drp-content").outerWidth();if(c.outerWidth()+s<a){var o=c.outerWidth()+s-a-10;c.find(".ciw-drp-content").css("left",o+"px")}else c.find(".ciw-drp-content").css("left","0px");c.hasClass("ciw-drp-more")&&!c.hasClass("selected")&&(c.closest("form").find("input[name=dui][value=0]").prop("checked",!0),c.closest("form").find("input[name=sr][value=0]").prop("checked",!0),i.addClass("hidden"),t.addClass("hidden"),n.text("More").removeClass("hidden"),d.removeClass("hidden"),c.removeClass("opened").addClass("selected")),setTimeout(function(){m("body").click(r)})}})}),m(".dd-select span, .dd-select b").each(function(e){m(this).closest(".ciw-drp-content");_parent_two=m(this).parents(".dd-select"),m(this).click(function(e){_parent_two.removeClass("error");var i=function(e){m(this).unbind("click",i),_parent_two.removeClass("opened"),_parent_two.find(".ciw-drp-content").addClass("hidden")};_parent_two.hasClass("opened")?(_parent_two.removeClass("opened"),_parent_two.find(".ciw-drp-content").addClass("hidden")):(_parent_two.addClass("opened"),_parent_two.find(".ciw-drp-content").removeClass("hidden"),setTimeout(function(){m(".body").click(i)}),setTimeout(function(){m(".ciw-drp-content").click(i)}))})}),m(".ciw-drp-ho .items .opt").click(function(e){var i=m(this).parents(".ciw-drp-ho"),t=m(this).text(),n=m(this).attr("data-value");i.find(".ho-selected").text(t),i.find(".ciw-drp-val").val(n),i.removeClass("opened")}),m(".ciw-drp-more-close").click(function(){m("body").trigger("click")}),m(".car-insurance-widget-3").on("click",".ciw-drp-li",function(){var e=m(this),i=e.text(),t=e.data("value"),n=e.closest(".ciw-drp-content"),d=e.closest(".ciw-drp"),r=d.find(".ciw-drp-label"),s=d.find(".ciw-drp-arrow"),a=d.find(".ciw-drp-value"),o=d.find(".ciw-drp-close");c=d.find(".ciw-drp-val"),r.addClass("hidden"),s.addClass("hidden"),a.text(i).removeClass("hidden"),n.addClass("hidden"),o.removeClass("hidden"),d.removeClass("opened").addClass("selected"),c.val(t),h()}).on("click",".ciw-drp-close",function(){var e=m(this).closest(".ciw-drp"),i=e.find(".ciw-drp-val"),t=e.find(".ciw-drp-label"),n=e.find(".ciw-drp-arrow"),d=e.find(".ciw-drp-value"),r=e.find(".ciw-drp-close");return t.removeClass("hidden"),n.removeClass("hidden"),d.addClass("hidden"),r.addClass("hidden"),e.removeClass("selected"),i.val(""),e.hasClass("ciw-drp-more")&&function(e){e.find("input[name=accident][value=0]").prop("checked",!1),e.find("input[name=accident][value=1]").prop("checked",!1),e.find("input[name=dui][value=0]").prop("checked",!1),e.find("input[name=dui][value=1]").prop("checked",!1),e.find("input[name=sr][value=0]").prop("checked",!1),e.find("input[name=sr][value=1]").prop("checked",!1),e.find("input[name=ho]").val(""),e.find(".ciw-drp-ho").find(".ho-selected").text("Select")}(e.closest("form")),m("body").trigger("click"),h(),!1}).on("click",".ciw-keep",function(e){e.stopPropagation()}).on("click",".search-zip",function(e){var i=m(this).closest(".ciw-drp-container").find(".ciw-drp-val").val(),t=m(this).closest("form");t.find(".ciw-content-result"),t.find(".ciw-content-loading");if(_isValidZip=/(^\d{5}$)/.test(i)&&"00000"!=i,!_isValidZip)return t.find(".ciw-error-zip").removeClass("hidden"),t.find("input[name=zip]").focus(),e.stopPropagation(),!1;_isValidZip&&m(this).closest(".ciw-drp").find(".ciw-drp-value").html("Zip Code: "+i)}),g.read("wh_zipcode")){var i=m("#form-ci-widget");if(""!=g.read("wh_zipcode")&&null!=g.read("wh_zipcode")){var t=i.find(".ciw-drp-zip"),n="Zip Code: "+g.read("wh_zipcode"),d=t.find(".ciw-drp-content"),r=t.find(".ciw-drp-label"),s=t.find(".ciw-drp-arrow"),a=t.find(".ciw-drp-value"),o=t.find(".ciw-drp-close"),c=t.find(".ciw-drp-val");r.addClass("hidden"),s.addClass("hidden"),a.text(n).removeClass("hidden"),d.addClass("hidden"),o.removeClass("hidden"),t.removeClass("opened").addClass("selected"),i.find("input[name=zip]").val(g.read("wh_zipcode"))}if(""!=g.read("wh_age")&&null!=g.read("wh_age")){n="16-20",d=(t=i.find(".ciw-drp-age")).find(".ciw-drp-content"),r=t.find(".ciw-drp-label"),s=t.find(".ciw-drp-arrow"),a=t.find(".ciw-drp-value"),o=t.find(".ciw-drp-close"),c=t.find(".ciw-drp-val");switch(g.read("wh_age")){case"16":case"18":n="16-20";break;case"21":case"22":n="21-24";break;case"25":case"30":n="25-34";break;case"35":case"39":n="35-44";break;case"45":case"49":n="45-54";break;case"55":case"59":n="55-65";break;case"65":n="65+"}r.addClass("hidden"),s.addClass("hidden"),a.text(n).removeClass("hidden"),d.addClass("hidden"),o.removeClass("hidden"),t.removeClass("opened").addClass("selected"),i.find("input[name=age]").val(g.read("wh_age"))}if(""!=g.read("wh_currently_insured")&&null!=g.read("wh_currently_insured")){n="Currently Insured",d=(t=i.find(".ciw-drp-insured")).find(".ciw-drp-content"),r=t.find(".ciw-drp-label"),s=t.find(".ciw-drp-arrow"),a=t.find(".ciw-drp-value"),o=t.find(".ciw-drp-close"),c=t.find(".ciw-drp-val");switch(g.read("wh_currently_insured")){case"1":n="Currently Insured";break;case"0":n="No Insurance"}r.addClass("hidden"),s.addClass("hidden"),a.text(n).removeClass("hidden"),d.addClass("hidden"),o.removeClass("hidden"),t.removeClass("opened").addClass("selected"),i.find("input[name=currently_insured]").val(g.read("wh_currently_insured"))}var l=!1;if(""!=g.read("wh_homeowner")&&null!=g.read("wh_homeowner")){n="Homeowner",d=(t=i.find(".ciw-drp-ho")).find(".ho-selected");switch(g.read("wh_homeowner")){case"1":n="Homeowner";break;case"0":n="Renter"}d.text(n),i.find("input[name=ho]").val(g.read("wh_homeowner")),l=!0}if(""!=g.read("wh_is_accident")&&null!=g.read("wh_is_accident")){switch(g.read("wh_is_accident")){case"1":i.find("input[name=accident][value=0]").prop("checked",!1),i.find("input[name=accident][value=1]").prop("checked",!0);break;case"0":i.find("input[name=accident][value=0]").prop("checked",!0),i.find("input[name=accident][value=1]").prop("checked",!1)}l=!0}if(""!=g.read("wh_dui")&&null!=g.read("wh_dui"))switch(g.read("wh_dui")){case"1":i.find("input[name=dui][value=0]").prop("checked",!1),i.find("input[name=dui][value=1]").prop("checked",!0);break;case"0":i.find("input[name=dui][value=0]").prop("checked",!0),i.find("input[name=dui][value=1]").prop("checked",!1)}if(""!=g.read("wh_sr_22")&&null!=g.read("wh_sr_22")){switch(g.read("wh_sr_22")){case"1":i.find("input[name=sr][value=0]").prop("checked",!1),i.find("input[name=sr][value=1]").prop("checked",!0);break;case"0":i.find("input[name=sr][value=0]").prop("checked",!0),i.find("input[name=sr][value=1]").prop("checked",!1)}l=!0}if(l){d=(t=i.find(".ciw-drp-more")).find(".ciw-drp-content"),r=t.find(".ciw-drp-label"),s=t.find(".ciw-drp-arrow"),a=t.find(".ciw-drp-value"),o=t.find(".ciw-drp-close");r.addClass("hidden"),s.addClass("hidden"),a.text("More").removeClass("hidden"),d.addClass("hidden"),o.removeClass("hidden"),t.removeClass("opened").addClass("selected")}u(),h()}else(function(){var e=m("#form-ci-widget"),i=m(".ciw-drp-insured"),t=i.find(".ciw-drp-content"),n=i.find(".ciw-drp-label"),d=i.find(".ciw-drp-arrow"),r=i.find(".ciw-drp-value"),s=i.find(".ciw-drp-close");i.find(".ciw-drp-val");n.addClass("hidden"),d.addClass("hidden"),r.text("Currently Insured").removeClass("hidden"),t.addClass("hidden"),s.removeClass("hidden"),i.removeClass("opened").addClass("selected"),e.find("input[name=currently_insured]").val("1")})(),u(),e=!1,m.ajax({url:"/ajax.php",data:{action:"Calculators.MortgageIpToZip",loggedIn:e},success:function(e){var i=m("#form-ci-widget"),t=m(".ciw-drp-zip"),n="",d=t.find(".ciw-drp-content"),r=t.find(".ciw-drp-label"),s=t.find(".ciw-drp-arrow"),a=t.find(".ciw-drp-value"),o=t.find(".ciw-drp-close"),c=(t.find(".ciw-drp-val"),"");void 0!==e.zip?c=e.zip:"-"!=e[7]&&(c=e[7]),""!=c&&(n="Zip Code: "+c,r.addClass("hidden"),s.addClass("hidden"),a.text(n).removeClass("hidden"),d.addClass("hidden"),o.removeClass("hidden"),t.removeClass("opened").addClass("selected"),i.find("input[name=zip]").val(c),h())}});m("#form-ci-widget").on("submit",function(){return m("body").trigger("click"),h(),!1});var C='<svg class="rvs-star-svg" preserveAspectRatio="none" viewBox="0 0 16.82 16" width="16.8" height="16"><polygon class="a" points="10.57 5.86 16.82 6.12 11.91 9.98 13.59 16 8.4 12.52 3.2 15.99 4.9 9.97 0 6.1 6.24 5.86 8.42 0 10.57 5.86" fill="#31dde0"/></svg>',b='<svg class="rvs-star-svg" preserveAspectRatio="none" viewBox="0 0 16.82 16" width="16.8" height="16"><polygon points="6.24 5.86 0 6.1 4.9 9.97 3.2 15.99 8.4 12.52 8.42 0 6.24 5.86" fill="#31dde0"/><polygon points="16.82 6.12 10.57 5.86 8.42 0 8.4 12.52 13.59 16 11.91 9.98 16.82 6.12" fill="#e4e9eb"/></svg>',y='<svg class="rvs-star-svg" preserveAspectRatio="none" viewBox="0 0 16.82 16" width="16.8" height="16"><polygon class="a" points="10.57 5.86 16.82 6.12 11.91 9.98 13.59 16 8.4 12.52 3.2 15.99 4.9 9.97 0 6.1 6.24 5.86 8.42 0 10.57 5.86" fill="#e4e9eb"/></svg>';var k=null,I=[];function h(){var e=m("#form-ci-widget"),i=e.find("input[name=zip]").val(),t=e.find("input[name=age]").val(),n=e.find("input[name=score]").val(),d=e.find("input[name=currently_insured]").val(),r=e.find("input[name=ho]").val(),s=e.find("input[name=accident]:checked").val(),a=e.find("input[name=dui]:checked").val(),o=e.find("input[name=sr]:checked").val(),c=e.find(".ciw-content-result"),l=e.find(".ciw-content-loading"),h=e.find(".ciw-default-img").text();if(I=[],c.addClass("hidden"),l.removeClass("hidden"),e.find(".ciw-error-zip").addClass("hidden"),!(/(^\d{5}$)/.test(i)&&"00000"!=i))return e.find(".ciw-error-zip").removeClass("hidden"),c.removeClass("hidden"),l.addClass("hidden"),e.find(".ciw-drp-zip .ciw-drp-label").trigger("click"),e.find("input[name=zip]").focus(),!1;var p=e.find(".ciw-drp-zip"),u=p.find(".ciw-drp-label"),f=p.find(".ciw-drp-value"),v=p.find(".ciw-drp-arrow");u.addClass("hidden"),v.addClass("hidden"),f.removeClass("hidden"),p.removeClass("opened").addClass("selected");var w={};""!=i&&(w.zip=i),""!=t&&(w.age=t),""!=n&&(w.score=n),""!=r&&(w.ho=r),""!=_&&(w.viewid=_),w.currently_insured=d,w.accident=s,w.dui=a,w.sr_22=o,w.retun_json=!0,g.create("wh_zipcode",i||"",3650),g.create("wh_age",t||"",3650),g.create("wh_credit_rating",n||"",3650),g.create("wh_homeowner",r||"",3650),g.create("wh_currently_insured",d||"",3650),g.create("wh_is_accident",s||"",3650),g.create("wh_dui",a||"",3650),g.create("wh_sr_22",o||"",3650),k=m.ajax({url:"/ci/results",method:"GET",data:w,dataType:"json",beforeSend:function(){null!=k&&k.abort()},success:function(e){var t="";void 0!==e.ads&&(m.each(e.ads,function(e,i){I.push(i.db_click_url),t+='<div class="ciw-box-item" data-id="'+i.db_inst_id+'">',t+='<div class="ciw-title-mob">'+i.db_headline+"</div>",t+='<div class="ciw-flex">',t+='<div class="ciw-item-left">',t+='<div class="ciw-item-img-box"><img src="'+i.db_image_url+'" class="ciw-item-img no-animate" onError="this.onerror=null;this.src=&quot;'+h+'&quot;;" alt="Company Avatar"></div>',t+='<div class="ciw-item-btn">',t+='<span class="btn orange no-decoration full gotopage" rel="nofollow">Get a Quote</span>',t+="</div>",t+='<div class="ciw-rating">',t+='<div class="ciw-rating-stars">',t+=function(e){for(var i=Math.round(2*e)/2,t=i,n=parseInt(i+""),d=t-n,r="",s=0;s<5;s++)r+=s<n?C:s==n&&.1<d?b:y;return r}(i.db_rating),t+="</div>",0<i.db_rating&&(t+='<div class="ciw-rating-reviews">',t+='<a href="'+i.db_profile_url+'#reviews" target="_blank" class="link">',t+="("+i.db_votes.toLocaleString()+")",t+="</a>",t+="</div>"),t+="</div>",t+="</div>",t+='<div class="ciw-item-right">',t+='<div class="ciw-item-title">'+i.db_headline+"</div>",t+='<div class="ciw-item-content">'+i.description+"</div>",t+="</div>",t+="</div>",t+="</div>"}),0==e.ads.length&&(t+='<div class="ciw-loading-label">No results found. Please check your filters.</div>')),c.html(t),l.addClass("hidden"),c.removeClass("hidden"),function(){if(!(x=m("body").find(".ciw-box-item")))return;T=new IntersectionObserver(E,{threshold:[.5]}),m.ajax({url:"/sid.php",data:{a:"1"},success:function(e){var n=e.__whid;m(x).each(function(e){var i=m.fn.Uniqid(),t=m.fn.Uniqid();m(this).data("view-id",i),m(this).data("click-id",t),m(this).data("wh-id",n),m(this).find(".viewid").val(i),m(this).find(".clickid").val(t),T.observe(this)})}})}(),k=null}})}var x=m("body").find(".ciw-box-item"),T=new IntersectionObserver(E,{threshold:[.5]});function p(e,i){if(delete e.visibleTimeout,E(i.takeRecords()),"isVisible"in e&&e.isVisible){delete e.isVisible;var t=m(e).data("view-id"),n=m(e).data("id"),d=m(e).data("click-id"),r=m(e).data("wh-id");m.get("/pixel.png",{adview_start_view_id:_,adview_id:t,click_id:d,session_id:r,adview_pid:n,adview_offer_type:"Car_Insurance_Widget",adview_page:window.location.pathname}),i.unobserve(e)}}function E(e){e.forEach(function(e){var i=e.target;"visibleTimeout"in i&&(clearTimeout(i.visibleTimeout),delete i.visibleTimeout),i.isVisible=function(e,i){return.1<=i.width*i.height/(e.width*e.height)}(e.boundingClientRect,e.intersectionRect),"isVisible"in i&&(i.visibleTimeout=setTimeout(p,500,i,T))})}function u(){var e=!1,i=f.group(),t=m("#form-ci-widget"),n=m("#form-ci-widget").find(".ciw-drp-score");if(f.group("mw"),f.get("has-sess")&&f.get("full")&&g.is_logged_in()&&(e=!0,standing=f.get("crd")),f.group(i),""!=g.read("wh_credit_rating")&&null!=g.read("wh_credit_rating")){var d=t.find(".ciw-drp-score"),r="Excellent Credit",s=d.find(".ciw-drp-content"),a=d.find(".ciw-drp-label"),o=d.find(".ciw-drp-arrow"),c=d.find(".ciw-drp-value"),l=d.find(".ciw-drp-close");d.find(".ciw-drp-val");switch(g.read("wh_credit_rating")){case"excellent":r="Excellent Credit";break;case"good":r="Good Credit";break;case"average":r="Fair Credit";break;case"below average":r="Bad Credit";break;case"poor":r="No Credit/Limited History"}a.addClass("hidden"),o.addClass("hidden"),c.text(r).removeClass("hidden"),s.addClass("hidden"),l.removeClass("hidden"),d.removeClass("opened").addClass("selected"),t.find("input[name=score]").val(g.read("wh_credit_rating"))}else if(e){var h=["excellent","good","average","below average","poor"],p=["Excellent Credit","Good Credit","Fair Credit","Bad Credit","No Credit/Limited History"];if(standing){standing=standing.toString().toLowerCase();var u=m.inArray(standing,["excellent","good","fair","bad","limited"]);0<=u?(n.addClass("selected"),n.find(".ciw-drp-label").addClass("hidden"),n.find(".ciw-drp-arrow").addClass("hidden"),n.find(".ciw-drp-close").removeClass("hidden"),n.find(".ciw-drp-val").val(h[u]),n.find(".ciw-drp-value").text(p[u]).removeClass("hidden")):(n.addClass("selected"),n.find(".ciw-drp-label").addClass("hidden"),n.find(".ciw-drp-arrow").addClass("hidden"),n.find(".ciw-drp-close").removeClass("hidden"),n.find(".ciw-drp-val").val(h[4]),n.find(".ciw-drp-value").text(p[4]).removeClass("hidden"))}else n.addClass("selected"),n.find(".ciw-drp-label").addClass("hidden"),n.find(".ciw-drp-arrow").addClass("hidden"),n.find(".ciw-drp-close").removeClass("hidden"),n.find(".ciw-drp-val").val(h[4]),n.find(".ciw-drp-value").text(p[4]).removeClass("hidden")}}(x=m("body").find(".car-insurance-widget-3"))&&(T=new IntersectionObserver(E,{threshold:[.1]}),m.ajax({url:"/sid.php",data:{a:"1"},success:function(e){var t=e.__whid;m(x).each(function(e){m.fn.Uniqid();var i=m.fn.Uniqid();m(this).data("id",5e6),m(this).data("view-id",_),m(this).data("click-id",i),m(this).data("wh-id",t),T.observe(this)})}})),m("body").on("click",".gotopage",function(){var e=m(this).closest(".ciw-box-item"),i=m(this).closest("form").find(".ciw-default-url"),t=I[e.index()];return i.attr("href",t),m.get("/r.png",{id:e.data("id").toString()+"ci",url:t}).always(function(){}),m.get("/pixel.png",{adview_pid:e.data("id"),adview_click:e.data("click-id"),adview_id:e.data("view-id")}).always(function(){m(window).width()<768?window.location.href=t:i[0].click()}),!1})});