function mobileTextSwap(){$(window).width()>540?($(".mobile-text-swap img").show(),$(".mobile-text-swap p").hide()):($(".mobile-text-swap img").hide(),$(".mobile-text-swap p").show())}function setDefaults(){var n=$(".MFRegionSelect_Class");n.empty();$.getJSON("/Api/Catalog/GetRegions",function(t){$(t.region).each(function(){$("<option value='"+this.Value+"'>"+this.Text+"<\/option>").appendTo(n)});var i=$(".fitguide-wrapper"),r=i.find(".MFMakeSelect_Class");resetMFRegion(i);setMFMakeSelectDefault(i);$.getJSON("/Api/Catalog/GetMakes",function(n){$(n.make).each(function(){$("<option value='"+this.Value+"'>"+this.Text+"<\/option>").appendTo(r)});resetMFModelSelect($(".fitguide-wrapper"));resetMFYearSelect($(".fitguide-wrapper"));var t=$(".MFFilters_Class");$.getJSON("/Api/Catalog/GetFilters",function(n){$(n.filter).each(function(){var n="Racks";switch(this.Name){case"All":n="All Racks";break;case"Trunk":n="Trunk Racks";break;case"Hitch":n="Hitch Racks";break;case"Specialty":n="Truck bed / Spare Tire"}$("<label><input type='radio' name='main' id='"+this.Id+"'><span>"+n+"<\/span><\/label>").appendTo(t)})})})})}function resetMFRegion(n){var t=n.find(".MRRegionSelect_Class").val();null==t||t=="0"?$.getJSON("/Api/Catalog/GetDefaultRegion",function(t){n.find(".MFRegionSelect_Class").val(t.regionId)}):n.find(".MFRegionSelect_Class").val(t);resetMFModelSelect(n);resetMFYearSelect(n)}function setMFMakeSelectDefault(n){var t=n.find(".MFMakeSelect_Class");t.empty();$("<option value='0'>Make<\/option>").prependTo(t);t.val("0")}function resetMFModelSelect(n){var t=n.find(".MFModelSelect_Class");t.empty();t.attr("disabled","disabled");$("<option value='0'>Model<\/option>").appendTo(t)}function resetMFYearSelect(n){var t=n.find(".MFYearSelect_Class");t.empty();t.attr("disabled","disabled");$("<option value='0'>Year<\/option>").appendTo(t)}function createStickyVehicle(n,t,i,r,u,f){$.post("/api/Catalog/SetVehicleMakeup",{yearId:i},function(){window.location.href.indexOf("/catalog/racks")>-1&&setProducts(i)});window.location.toString().indexOf("/catalog/racks")>-1&&(window.location.toString().indexOf("&make=")<0&&window.location.toString().indexOf("&model=")<0&&window.location.toString().indexOf("&year=")<0,window.location.toString().indexOf("&model=")<0,window.location.toString().indexOf("&year=")<0);$("#fitguide-top").length&&($("#fitguide-top .car-make").html(r),$("#fitguide-top .car-model").html(u),$("#fitguide-top .car-year").html("("+f+")"),$("#fitguide-top .MFMakeSelect_Class").hide(),$("#fitguide-top .MFModelSelect_Class").hide(),$("#fitguide-top .MFYearSelect_Class").hide(),$("#top-fitguide-carlabel").show());$("#catalog-filter-carlabel").length&&($("#catalog-carlabel").html(r+" "+u+" ("+f+') <span class="car-remove">Change<\/span>'),$("#catalog-filter-carlabel").show(),$("#catalog-filter-fields").hide());$(".catalog-car-filter-info").length&&($(".catalog-car-filter-info span").html(r+" "+u+" ("+f+")"),$("#catalog-car-filter-info").slideDown())}function removeStickyVehicle(){var n,t,i,r;window.location.toString().indexOf("&make=")>-1&&window.location.toString().indexOf("&model=")>-1&&window.location.toString().indexOf("&year=")>-1&&(location.href=location.href.replace(/&?make=([^&]$|[^&]*)/i,"").replace(/&?model=([^&]$|[^&]*)/i,"").replace(/&?year=([^&]$|[^&]*)/i,""));window.location.toString().indexOf("&model=")>-1;window.location.toString().indexOf("&year=")>-1;n=$("#top-fitguide-carlabel, #catalog-filter-carlabel");n.hide();t=$(".MFMakeSelect_Class, #MakeSelect_Id");t.show();i=$(".MFModelSelect_Class, #ModelSelect_Id");i.show();r=$(".MFYearSelect_Class, #YearSelect_Id");r.show();$.post("/api/Catalog/SetVehicleMakeup",{yearId:"0"},function(){window.location.href.indexOf("/catalog/racks")>-1&&setProducts()});$("#catalog-filter-carlabel").length&&($("#catalog-filter-carlabel").hide(),$("#catalog-filter-fields").show());$(".catalog-car-filter-info").length&&$(".catalog-car-filter-info").slideUp();window.location.href.indexOf("/catalog/racks")>-1&&$(".tplCatalog .tplHeading h1").html("Bike Racks");make="";model="";$("#YearSelect_Id").val("")}function setFlag(n){n=="Europe"?$("#country-flag-main").attr("src","/images/img-flag-eu.png"):$("#country-flag-main").attr("src","/images/img-flag-us.png")}function mainSearch(){var n="/search/"+$("#MSSearchString").val();window.location=n}function blogSearch(){var n="/search/"+$("#BlogSearchString").val();window.location=n}function setCookie(n,t,i){var r=new Date,u;r.setTime(r.getTime()+i*864e5);u="expires="+r.toUTCString();document.cookie=n+"="+t+";"+u+";path=/"}function getCookie(n){for(var t,r=n+"=",f=decodeURIComponent(document.cookie),u=f.split(";"),i=0;i<u.length;i++){for(t=u[i];t.charAt(0)==" ";)t=t.substring(1);if(t.indexOf(r)==0)return t.substring(r.length,t.length)}return""}var asked,gTxt;(function(n){n.fn.hoverIntent=function(t,i,r){var u={interval:100,sensitivity:7,timeout:0};u=typeof t=="object"?n.extend(u,t):n.isFunction(i)?n.extend(u,{over:t,out:i,selector:r}):n.extend(u,{over:t,out:t,selector:i});var f,e,o,s,h=function(n){f=n.pageX;e=n.pageY},c=function(t,i){if(i.hoverIntent_t=clearTimeout(i.hoverIntent_t),Math.abs(o-f)+Math.abs(s-e)<u.sensitivity)return n(i).off("mousemove.hoverIntent",h),i.hoverIntent_s=1,u.over.apply(i,[t]);o=f;s=e;i.hoverIntent_t=setTimeout(function(){c(t,i)},u.interval)},a=function(n,t){return t.hoverIntent_t=clearTimeout(t.hoverIntent_t),t.hoverIntent_s=0,u.out.apply(t,[n])},l=function(t){var r=jQuery.extend({},t),i=this;if(i.hoverIntent_t&&(i.hoverIntent_t=clearTimeout(i.hoverIntent_t)),t.type=="mouseenter"){o=r.pageX;s=r.pageY;n(i).on("mousemove.hoverIntent",h);i.hoverIntent_s!=1&&(i.hoverIntent_t=setTimeout(function(){c(r,i)},u.interval))}else n(i).off("mousemove.hoverIntent",h),i.hoverIntent_s==1&&(i.hoverIntent_t=setTimeout(function(){a(r,i)},u.timeout))};return this.on({"mouseenter.hoverIntent":l,"mouseleave.hoverIntent":l},u.selector)}})(jQuery),function(n){n.fn.flowtype=function(t){var i=n.extend({maximum:9999,minimum:1,maxFont:9999,minFont:1,fontRatio:35},t),r=function(t){var f=n(t),r=f.width(),e=r>i.maximum?i.maximum:r<i.minimum?i.minimum:r,u=e/i.fontRatio,o=u>i.maxFont?i.maxFont:u<i.minFont?i.minFont:u;f.css("font-size",o+"px")};return this.each(function(){var t=this;n(window).resize(function(){r(t)});r(this)})}}(jQuery);!function(n,t,i,r){var u=n(t);n.fn.lazyload=function(f){function s(){var t=0;o.each(function(){var i=n(this);if((!e.skip_invisible||i.is(":visible"))&&!n.abovethetop(this,e)&&!n.leftofbegin(this,e))if(n.belowthefold(this,e)||n.rightoffold(this,e)){if(++t>e.failure_limit)return!1}else i.trigger("appear"),t=0})}var h,o=this,e={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:t,data_attribute:"original",skip_invisible:!0,appear:null,load:null,placeholder:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC"};return f&&(r!==f.failurelimit&&(f.failure_limit=f.failurelimit,delete f.failurelimit),r!==f.effectspeed&&(f.effect_speed=f.effectspeed,delete f.effectspeed),n.extend(e,f)),h=e.container===r||e.container===t?u:n(e.container),0===e.event.indexOf("scroll")&&h.bind(e.event,function(){return s()}),this.each(function(){var i=this,t=n(i);i.loaded=!1;(t.attr("src")===r||t.attr("src")===!1)&&t.is("img")&&t.attr("src",e.placeholder);t.one("appear",function(){if(!this.loaded){if(e.appear){var r=o.length;e.appear.call(i,r,e)}n("<img />").bind("load",function(){var r=t.attr("data-"+e.data_attribute),u,f;t.hide();t.is("img")?t.attr("src",r):t.css("background-image","url('"+r+"')");t[e.effect](e.effect_speed);i.loaded=!0;u=n.grep(o,function(n){return!n.loaded});(o=n(u),e.load)&&(f=o.length,e.load.call(i,f,e))}).attr("src",t.attr("data-"+e.data_attribute))}});0!==e.event.indexOf("scroll")&&t.bind(e.event,function(){i.loaded||t.trigger("appear")})}),u.bind("resize",function(){s()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&u.bind("pageshow",function(t){t.originalEvent&&t.originalEvent.persisted&&o.each(function(){n(this).trigger("appear")})}),n(i).ready(function(){s()}),this};n.belowthefold=function(i,f){var e;return e=f.container===r||f.container===t?(t.innerHeight?t.innerHeight:u.height())+u.scrollTop():n(f.container).offset().top+n(f.container).height(),e<=n(i).offset().top-f.threshold};n.rightoffold=function(i,f){var e;return e=f.container===r||f.container===t?u.width()+u.scrollLeft():n(f.container).offset().left+n(f.container).width(),e<=n(i).offset().left-f.threshold};n.abovethetop=function(i,f){var e;return e=f.container===r||f.container===t?u.scrollTop():n(f.container).offset().top,e>=n(i).offset().top+f.threshold+n(i).height()};n.leftofbegin=function(i,f){var e;return e=f.container===r||f.container===t?u.scrollLeft():n(f.container).offset().left,e>=n(i).offset().left+f.threshold+n(i).width()};n.inviewport=function(t,i){return!(n.rightoffold(t,i)||n.leftofbegin(t,i)||n.belowthefold(t,i)||n.abovethetop(t,i))};n.extend(n.expr[":"],{"below-the-fold":function(t){return n.belowthefold(t,{threshold:0})},"above-the-top":function(t){return!n.belowthefold(t,{threshold:0})},"right-of-screen":function(t){return n.rightoffold(t,{threshold:0})},"left-of-screen":function(t){return!n.rightoffold(t,{threshold:0})},"in-viewport":function(t){return n.inviewport(t,{threshold:0})},"above-the-fold":function(t){return!n.belowthefold(t,{threshold:0})},"right-of-fold":function(t){return n.rightoffold(t,{threshold:0})},"left-of-fold":function(t){return!n.rightoffold(t,{threshold:0})}})}(jQuery,window,document),function(n){function t(t){n(t).size()>0&&n("html,body").animate({scrollTop:n(t).offset().top},{duration:600})}n.fn.centerize=function(){return this.css("position","absolute"),this.css("top",(n(window).height()-this.height())/2+n(window).scrollTop()+"px"),this.css("left",(n(window).width()-this.width())/2+n(window).scrollLeft()+"px"),this};n.ismobile=function(){var n=navigator.userAgent||navigator.vendor||window.opera;return/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(n.substr(0,4))?!0:!1};n.fn.resizer=function(t){return t(),n(window).resize(function(){t()}),this};n(".col-sm-6 .tplContent,#Product .product-overview,#ProductPanel .panel").flowtype({minFont:13});n("img.lazy").lazyload({effect:"fadeIn"});n(document).ready(function(){$window=n(window);$window.width()>480&&n("div[data-parallax-on]").each(function(){var t=n(this);n(window).scroll(function(){var n=-($window.scrollTop()/t.data("speed"))+t.data("start"),i="50% "+n+"px";t.css({backgroundPosition:i})})});n(window).scroll(function(){n("#freeshipping-popup").hasClass("active")&&(n("#nav-freeshipping").removeClass("active"),n("#freeshipping-popup").stop().slideUp(100,function(){n("#freeshipping-popup").removeClass("active")}))});n("#fitguide-link a").click(function(){return n("#fitguide-form").is(":hidden")?(t("#header"),n(this).parent().addClass("highlight"),n("#fitguide-form").removeClass("hide").hide(),n("#fitguide-form").slideDown("slow",function(){})):(n(this).parent().removeClass("highlight"),n("#fitguide-form").slideUp("slow")),n("#freeshipping-popup").hasClass("active")&&(n("#nav-freeshipping").removeClass("active"),n("#freeshipping-popup").stop().slideUp(200,function(){n("#freeshipping-popup").removeClass("active")})),!1});n("#qa-fit-guide a").click(function(){ga("send","event","fitGuideClick","click",window.location.href)});n(".product-willitfitmycar a, #qa-fit-guide a").click(function(){return n("#fitguide-form").is(":hidden")&&(n("#fitguide-link a").parent().addClass("highlight"),n("#fitguide-form").removeClass("hide").hide(),n("#fitguide-form").slideDown("slow",function(){})),setTimeout(function(){t("#header")},200),!1});n(".product-willitfitmycar2nd a").click(function(){n(this).addClass("hidden");n(".product-willitfitmycar2nd h5").removeClass("hidden");n(".product-willitfitmycar2nd p").removeClass("hidden");var t=n(".product-willitfitmycar2nd").attr("data-fitcheckcolor");return n(".product-willitfitmycar2nd").attr("style","background-color: "+t),!1});n("#Product .col-description,#Product .col-photo").size()==2;n(".navbar-toggle").click(function(){n(this).parent().removeClass("highlight");n("#fitguide-form").slideUp("slow")});n("#finddealer-close").click(function(){n("#popup-finddealer").removeClass("active");sessionStorage.viewedDealerLocator="1"});n("#nav-freeshipping a").click(function(){return n("#freeshipping-popup").hasClass("active")?(n("#nav-freeshipping").removeClass("active"),n("#freeshipping-popup").stop().slideUp(200,function(){n("#freeshipping-popup").removeClass("active")})):(n("#nav-freeshipping").addClass("active"),n("#fitguide-form").is(":hidden")?n("#freeshipping-popup").css("top","40px"):n("#freeshipping-popup").css("top","193px"),n("#freeshipping-popup").stop().slideDown(200,function(){n("#freeshipping-popup").addClass("active")})),!1});n("#nav-btn").click(function(){n(window).width()<768&&(n("#navbar-collapse").toggleClass("active"),n(".navbar-toggle").toggleClass("active"),n("body").toggleClass("mobile-hidden"))});n("li#fitguide-link a").click(function(){n(window).width()<768&&n("#navbar-collapse").hasClass("active")&&(n("#navbar-collapse").removeClass("active"),n(".navbar-toggle").removeClass("active"),n("body").removeClass("mobile-hidden"))});n("#search-toggle").click(function(){if(n("#search-link").hasClass("active"))n("#search-link #MSSearchString").blur(),n("#search-link").removeClass("active");else{n("#search-link").addClass("active");n("#search-link #MSSearchString").get(0).focus();n("#search-link").one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){n("#search-link #MSSearchString").get(0).focus()})}});n(".addons h5").on("click",function(){var t=n(this).next("ul");t.slideToggle();n(this).children(".fa").hasClass("fa-angle-right")?(n(this).children(".fa").removeClass("fa-angle-right"),n(this).children(".fa").addClass("fa-angle-down")):(n(this).children(".fa").addClass("fa-angle-right"),n(this).children(".fa").removeClass("fa-angle-down"))});n("a[href^='http'],area[href^='http']").click(function(t){if(typeof n(this).attr("href")!="undefined"&&n(this).attr("href").search(window.location.host)==-1&&window.location.pathname.indexOf("/product")>-1){var i={};if((n(this).is("[href^='https://www.youtube.com/watch']")||n(this).is("[href^='http://www.youtube.com/watch']"))&&(n(this).attr("href").replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function(n,t,r,u){i[t]=u}),n.ismobile()&&(window.location.href=typeof i.v!="undefined"&&i.v.length>0?"http://m.youtube.com/#/watch?v="+i.v:this.href)),t.preventDefault(),typeof i.v!="undefined"&&i.v.length>0)try{openYouTube(i.v)}catch(t){window.open(this.href)}else typeof this.href!="undefined"&&window.open(this.href);return!1}})});n(".dropdown,.dropdown-menu").hoverIntent(function(){n(this).find(".sub-menu").each(function(){n(".sub-menu").removeAttr("style");n(window).width()>768&&n(".sub-menu").height(n(this).closest(".dropdown-menu").height()+"px")})},function(){});n(".dropdown-menu>li,.sub-menu").hoverIntent(function(){clearTimeout(n(this).data("subtimeoutId"));n(this).siblings().find(".sub-menu").removeClass("visible");n(this).find(".sub-menu").addClass("visible")},function(){$parent=n(this);subtimeoutId=setTimeout(function(){$parent.find(".sub-menu").removeClass("visible")},650);n(this).data("subtimeoutId",subtimeoutId)});n(window).width()>750?n("#navlogo").insertBefore(n("#navbar")):n("#navbar").insertBefore(n("#navlogo"))}(jQuery);$(window).resize(function(){$(window).width()>750?$("#navlogo").insertBefore($("#navbar")):$("#navbar").insertBefore($("#navlogo"));mobileTextSwap()}),function(n,t,i){function r(t){t.each(function(){var t=n('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 31 17" width="31" height="17" class="country-flag-img"><defs><filter id="filtersPicture"><feComposite in="SourceGraphic" in2="SourceGraphic" operator="arithmetic" k1="0" k2="1" k3="0" k4="0" /><feColorMatrix type="saturate" values="0" data-filterid="38" /><\/filter><\/defs><image filter="url(&quot;#filtersPicture&quot;)" x="0" y="0" width="31" height="17" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="'+n(this).attr("src")+'" /><\/svg>');n(this).parent().addClass("nofilters");t.insertAfter(n(this))})}n(i).ready(function(){var t=!!navigator.userAgent.match(/Trident/);$element=n("img.country-flag-img");t&&$element.css("filter")==="none"&&r($element);n(".mobile-text-swap").append('<p class="serif">'+n(".mobile-text-swap img").hide().attr("alt")+"<\/p>");mobileTextSwap()})}(jQuery,window,document);$(document).ready(function(){($("#MFYearSelect_Id").val()==null||$("#MFYearSelect_Id").val()=="")&&setDefaults();$("#fitguide-top .MFModelSelect_Class").val()!="0"&&$("#fitguide-top .MFModelSelect_Class").attr("disabled")=="disabled"&&$("#fitguide-top .MFModelSelect_Class").removeAttr("disabled");$("#fitguide-top .MFYearSelect_Class").val()!="0"&&$("#fitguide-top .MFYearSelect_Class").attr("disabled")=="disabled"&&$("#fitguide-top .MFYearSelect_Class").removeAttr("disabled");$("#RegionSelect_Id").change(function(){return removeStickyVehicle(),!1});$(".MFRegionSelect_Class").change(function(){var n=$(this).closest(".fitguide-wrapper"),t=n.find(".MFMakeSelect_Class"),i;return t.empty(),resetMFModelSelect(n),resetMFYearSelect(n),$.getJSON("/Api/Catalog/GetMakes?regionId="+$(this).val(),function(i){$(i.make).length==0?$("<option value='0'>No Makes Found<\/option>").appendTo(t):(setMFMakeSelectDefault(n),$(i.make).each(function(){$("<option value='"+this.Value+"'>"+this.Text+"<\/option>").appendTo(t)}))}),i=n.find(".MFRegionSelect_Class").val(),n.find(".fitguide-region-flag.active").removeClass("active"),n.find(".fitguide-region-flag.location-"+i).addClass("active"),n.find(".MFMakeSelect_Class").show(),n.find(".MFModelSelect_Class").show(),n.find(".MFYearSelect_Class").show(),n.find(".fitguide-carlabel").hide(),removeStickyVehicle(),!1});$(".MFMakeSelect_Class").change(function(){var n=$(this).closest(".fitguide-wrapper"),t=n.find(".MFModelSelect_Class"),i,r;return t.attr("disabled","disabled"),resetMFModelSelect(n),i=n.find(".MFYearSelect_Class"),i.attr("disabled","disabled"),resetMFYearSelect(n),r=$(this).val(),$.getJSON("/Api/Catalog/MakeChanged",{makeId:$(this).val()},function(n){$(n.model).each(function(){$("<option value='"+this.Value+"'>"+this.Text+"<\/option>").appendTo(t)});r!=0&&t.removeAttr("disabled")}).error(function(){t.removeAttr("disabled")}),!1});$(".MFModelSelect_Class").change(function(){var n=$(this).closest(".fitguide-wrapper"),t=n.find(".MFYearSelect_Class"),i;return t.attr("disabled","disabled"),resetMFYearSelect(n),i=$(this).val(),$.getJSON("/Api/Catalog/ModelChanged",{regionId:n.find(".MFRegionSelect_Class").val(),modelId:n.find(".MFModelSelect_Class").val()},function(n){$(n.make).each(function(){$("<option value='"+this.Value+"'>"+this.Text+"<\/option>").appendTo(t)});i!=0&&t.removeAttr("disabled")}).error(function(){t.removeAttr("disabled")}),!1});$(".MFYearSelect_Class").change(function(){var n=$(this).closest(".fitguide-wrapper"),t=n.find(".MFYearSelect_Class"),u=t.val(),f=t.children("option:selected").text(),i=n.find(".MFMakeSelect_Class"),e=i.val(),o=i.children("option:selected").text(),r=n.find(".MFModelSelect_Class"),s=r.val(),h=r.children("option:selected").text(),c=n.find(".MFRegionSelect_Class").val(),l=$(this).val();return createStickyVehicle(e,s,u,o,h,f),typeof doesItFitMyCar=="function"&&$(".product-willitfitmycar")!=null&&doesItFitMyCar(),!1});$("#YearSelect_Id").change(function(){var n=$(this).closest("#ProductFit"),t=n.find("#YearSelect_Id"),u=t.val(),f=t.children("option:selected").text(),i=n.find("#MakeSelect_Id"),e=i.val(),o=i.children("option:selected").text(),r=n.find("#ModelSelect_Id"),s=r.val(),h=r.children("option:selected").text(),c=n.find("#RegionSelect_Id").val(),l=$(this).val();return createStickyVehicle(e,s,u,o,h,f),!1});$(".car-remove").on("click",function(){var n=$(".fitguide-wrapper"),t=n.find(".MFMakeSelect_Class"),i;return t.empty(),resetMFModelSelect(n),resetMFYearSelect(n),i=$("#MFRegionSelect_Id").val(),$.getJSON("/Api/Catalog/GetMakes?regionId="+i,function(i){$(i.make).length==0?$("<option value='0'>No Makes Found<\/option>").appendTo(t):(setMFMakeSelectDefault(n),$(i.make).each(function(){$("<option value='"+this.Value+"'>"+this.Text+"<\/option>").appendTo(t)}))}),removeStickyVehicle(),!1});$("#catalog-carlabel").click(function(n){if($(n.target).attr("class")==="car-remove")return removeStickyVehicle(),!1})});$(document).ready(function(){$("#MRRegionSelect_Id").change(function(){var n=$(this).closest(".fitguide-wrapper");return $.ajax({type:"POST",url:"/Api/Catalog/RegionChanged",data:{regionId:$("#MRRegionSelect_Id").val()},dataType:"json",success:function(t){setFlag(t.region);$.isFunction(resetRegion)?resetRegion(n):"";$.isFunction(resetMFRegion)?resetMFRegion(n):""}}),!1})});$(document).ready(function(){$("#search-link a").click(function(){return $(this).hasClass("open")?($(this).removeClass("open"),$("#SearchModal").slideUp("fast",function(){$(this).css("display","")})):($(this).addClass("open"),$("#SearchModal").slideDown()),!1});$("#MSSearchString").on("keypress",function(n){if(n.keyCode==13)return n.preventDefault(),mainSearch(),!1});$("#BlogSearchString").on("keypress",function(n){if(n.keyCode==13)return n.preventDefault(),blogSearch(),!1});$("#blog-search .btn-blog-search").click(function(){blogSearch()})});var modal=document.getElementById("myModal"),btn=document.getElementById("myBtn"),span=document.getElementsByClassName("close")[0];if(span&&(span.onclick=function(){modal.style.display="none"}),window.onclick=function(n){n.target==modal&&(modal.style.display="none")},asked=getCookie("NotifyMeAboutProduct"),asked===""){var modal=document.getElementById("myModal"),btn=document.getElementById("myBtn"),span=document.getElementsByClassName("close")[0];modal.style.display="block";gTxt=document.getElementById("mc-embedded-subscribe_global");gTxt&&gTxt.focus();span.onclick=function(){modal.style.display="none"};window.onclick=function(n){n.target==modal&&(modal.style.display="none")}}setCookie("NotifyMeAboutProduct",!0,30)