function slickInit(_target,_slidesNmb){_slidesNmb<5&&$(".relatedProduct").eq(_slidesNmb-1).css("border-right","0");$(_target).slick({dots:!1,infinite:!0,autoplaySpeed:2e3,autoplay:!0,slidesToShow:_slidesNmb>3?3:_slidesNmb,prevArrow:'<button type="button" class="slick-prev"><i class="fa fa-chevron-left"><\/i><\/button>',nextArrow:'<button type="button" class="slick-next"><i class="fa fa-chevron-right"><\/i><\/button>',slidesToScroll:1,responsive:[{breakpoint:1440,settings:{slidesToShow:_slidesNmb>3?3:_slidesNmb}},{breakpoint:1280,settings:{slidesToShow:_slidesNmb>3?3:_slidesNmb}},{breakpoint:1024,settings:{slidesToShow:_slidesNmb>2?2:_slidesNmb,centerMode:!1,variableWidth:!1}},{breakpoint:768,settings:{centerMode:!1,variableWidth:!1,slidesToShow:1}}]})}function SetShippingCost(currencyChosen){var shippingCost="16.50";currencyChosen=="EUR"?shippingCost="35,00":currencyChosen=="USD"&&(shippingCost="50.00");$(".shippingCost").text(shippingCost)}function setPriceDisplay(currencyChosen){$(".priceGBP").css("display","none");$(".priceEUR").css("display","none");$(".priceUSD").css("display","none");$(".price"+currencyChosen).css("display","inline-block");currencyChosen=="EUR"?$(".shippingCurrency").html("&#8364;"):currencyChosen=="USD"?$(".shippingCurrency").html("&#36;"):currencyChosen=="GBP"?$(".shippingCurrency").html("&#163;"):$(".shippingCurrency").html("&#163;");$(".currency").val(currencyChosen.toLowerCase());SetShippingCost(currencyChosen)}function getCookie(cname){for(var c,name=cname+"=",decodedCookie=decodeURIComponent(document.cookie),ca=decodedCookie.split(";"),i=0;i<ca.length;i++){for(c=ca[i];c.charAt(0)==" ";)c=c.substring(1);if(c.indexOf(name)==0)return c.substring(name.length,c.length)}return""}var APP={isMobile:$(window).outerWidth()<=1024?!0:!1,height:$(window).outerHeight(),width:$(window).outerWidth(),mobileBrowser:function(){var check=!1;return function(a){(/(|android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/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|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(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|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))&&(check=!0)}(navigator.userAgent||navigator.vendor||window.opera),check}};ECU={init:function(){if(APP.isMobile){$(document).on("click",".openMenu,.closeMenu",function(){$(".menu").toggleClass("active")});$(document).on("click",".menu .megamenu a.main",function(){return $(this).parent().toggleClass("active"),$(".megamenu").not($(this).parent()).removeClass("active"),$(".menu").scrollTo($(this).parent(),300),!1})}$(document).on("click",".menu .megamenu a.main",function(e){e.preventDefault();$(this).parent().toggleClass("hover");$(".megamenu").not($(this).parent()).removeClass("hover");$(".background").css("height",$(this).parent().find("ul li ul").height()+20+"px")});if($(document).click(function(e){$(".megamenu.hover").length>0&&!$(e.target).hasClass("main")&&($(e.target).closest(".megamenu.hover ul").is(":visible")||$(".megamenu").removeClass("hover"))}),$(".defaultContent table").wrap('<div class="tableWrapper" />'),!Cookies.get("cookies")){$(".cookie-notice").show();Cookies.set("cookies","accepted");$(document).on("click",".close-cookie-notice",function(){$(".cookie-notice").slideUp()})}if(APP.isMobile)$(document).on("click",".callUs",function(){return document.location.href=$(this).find(".click-to-call").attr("href"),!1});else{$(".callUs").removeClass("click-to-call");$(document).on("click",".click-to-call",function(){return!1})}$(".searchTop").on("submit",function(){if(!$(this).find("#query").val())return!1});$(".product").on("click",function(){$(this).data("href")&&(window.location.href=$(this).data("href"))});$("#relatedParts")&&slickInit(".relatedProducts",$("#relatedParts").val());APP.width>=1024&&setTimeout(function(){var newHeight=$(".header_3").length>0?$(".header_3").outerHeight():$(".header_2").outerHeight();$(".header_1 .thumbnail").css("height",newHeight-10)},500);$(document).on("click",".popupTrigger,.popup .shadow",function(){if(this.className!="shadow")if($(".popup").css("display")=="none"){$(".popupBox").hide();$(".popup").toggle("clip",150);var _target=$(this).data("target");setTimeout(function(){$(".popup .wrapper").addClass("active");$(".popupBox."+_target).show()},300)}else $(".popup .wrapper").removeClass("active"),setTimeout(function(){$(".popupBox").hide();$(".popup").toggle("clip",300)},300)}).keyup(function(e){e.keyCode==27&&$(".popup").css("display")=="block"&&$(".popup .shadow").trigger("click")});$(".accordionList").not(".disable, .contact .accordionList").accordion({collapsible:!0,heightStyle:"content",active:!1});$(".contact .accordionList h3").on("click",function(){$(this).toggleClass("ui-state-active").next().slideToggle()});$(".banner .col-50 h1").on("click",function(){$(this).toggleClass("active").next().slideToggle()});$("#partNumber").on("focus",function(){this.value===this.defaultValue&&(this.value="")}).on("blur",function(){this.value===""&&(this.value=this.defaultValue)});$("#faultByManufacturer select").change(function(){$("#faultByManufacturer").submit()});$(".options .callUs, .callUs-mobile").on("click",function(e){APP.width>560&&(e.preventDefault(),$(".callUsBox").show())});$("#faultByCategory").on("change",function(){$(this).closest("form").submit()});$(document).on("click",function(e){$(e.target).parents().is(".callUs")||$(".callUsBox").hide()})},initSelect:function(){$("select option:selected").removeAttr("selected");$(".custom-select").customSelect({fontAwesome:"f107",firstchild:!1})},initICheck:function(){$("input").iCheck({checkboxClass:"icheckbox_minimal-green",radioClass:"iradio_minimal-green",increaseArea:"20%"})},home:{vplayer:null,init:function(){ECU.initSelect();$(document).on("change","#filters select",function(){var form=$(this).closest("form");$(form).submit()})},filterRedirect:function(result){result.url?window.location.href=result.url:$("#filters .custom-select").customSelect({fontAwesome:"f107",firstchild:!0})}},writeReview:{init:function(){ECU.initSelect()},filterRedirect:function(result){if(result.url)window.location.href=result.url;else{$("#filters .custom-select").customSelect({fontAwesome:"f107",firstchild:!0});var ratingCount=$("#Rating").val();$(".givestars i").each(function(index){if(index<ratingCount)$(this).addClass("active"),$(this).css("color","black"),$(this).removeClass("fa-star-o"),$(this).addClass("fa-star");else return!1})}}},productcatalogue:{accordion:function(){$(".accordionList").accordion({collapsible:!0,heightStyle:"content",active:!1})}},vehicleDetails:null,componentDetails:null,partLineItem:null};$(document).ready(function(){ECU.init()});$(document).ajaxComplete(function(){$("form").removeData("validator");$("form").removeData("unobtrusiveValidation");$.validator.unobtrusive.parse("form")});$(document).ready(function(){$("#submit-more").on("click",function(e){e.preventDefault();var form=$(this).closest("form");$(form).submit()})});window.onload=function(){function handleLanguageButtonClick(){gtag("event","Languagebutton",{event_category:"Language Button",event_label:"Language Button Clicked"})}function setCookie(cname,cvalue,exdays,domain){const d=new Date;d.setTime(d.getTime()+exdays*864e5);let expires="expires="+d.toUTCString(),cookieString=cname+"="+cvalue+";"+expires+";path=/";domain&&(cookieString+=";domain="+domain);document.cookie=cookieString}var domain=window.location.hostname,locality,cookie,cookieSplit,culture,currency;let languageButton=document.querySelector(".languageButton");$(".languageButton").on("click",function(){$(this).toggleClass("open");$(".caretDown").toggleClass("fa-rotate-180");languageButton.addEventListener("click",handleLanguageButtonClick)});locality=$("#locality").val();$(".testUS").on("click",function(){var ip,cookieDomain;locality="US";ip=getCookie("_currentCultureIPD02092020").split("&")[2];console.log(window.location.hostname);cookieDomain="";domain=="www-staging.ecutesting.biz"&&(cookieDomain=".ecutesting.biz");setCookie("_currentCultureIPD02092020","lastVisit%3D2023-08-07%2012%3A04%3A49%26Culture%3Den-US%26"+ip+"%26CountryCode%3DUS%26Currency%3DUSD%26Continent%3DUS%26City%3DCoventry%26Region%3DEngland%26Country%3DUnited%20Kingdom",9,cookieDomain);location.reload()});if(locality=="IT")setPriceDisplay("EUR");else{cookie=getCookie("_currentCultureIPD02092020");cookieSplit=cookie.split("&");cookieSplit.length>=4?(culture=cookieSplit[1].includes("Culture=")?cookieSplit[1].replace("Culture=",""):"en-GB",currency=cookieSplit[4].includes("Currency=")?cookieSplit[4].replace("Currency=",""):"GBP"):(culture="en-GB",currency="GBP");$(".priceDropdown").css("display","inline-block");$(".currency").val(currency.toLowerCase());setPriceDisplay(currency);$(".currency").on("change",function(){var currencyChosen=$(this).val().toUpperCase();$("#currencyChosen").text(currencyChosen);$("#hidCurrency").val(currencyChosen);setPriceDisplay(currencyChosen)})}};
ECU.vehicleDetails={lookupAction:null,init:function(){$("#vehicleLookup").on("click",ECU.vehicleDetails.lookup)},lookup:function(e){var registration=$("#VehicleDetails_Registration").val();registration!=""&&$.post(ECU.vehicleDetails.lookupAction,"registration="+registration,ECU.vehicleDetails.populate);e.preventDefault()},populate:function(data){$("#VehicleDetails_Manufacturer").val(data.Manufacturer);$("#VehicleDetails_Model").val(data.Model);$("#VehicleDetails_EngineSize").val(data.EngineSize);$("#VehicleDetails_ManufactureYear").val(data.ManufactureYear);data.Fuel=="0"?($("#Petrol").iCheck("check"),$("#Diesel").iCheck("uncheck")):($("#Petrol").iCheck("uncheck"),$("#Diesel").iCheck("check"));data.Transmission!=null?data.Transmission=="0"?($("#Manual").iCheck("check"),$("#Automatic").iCheck("uncheck")):($("#Manual").iCheck("uncheck"),$("#Automatic").iCheck("check")):($("#Manual").iCheck("uncheck"),$("#Automatic").iCheck("uncheck"))}};
ECU.componentDetails={lookupAction:null,init:function(){$('input[id^="ComponentDetails."][type="radio"]').on("ifToggled",ECU.componentDetails.toogleView);$("#addfaultcode").on("click",function(e){ECU.componentDetails.addFaultCode();e.preventDefault()});$("#ComponentDetails\\.StoredFaultCode\\.Yes").on("ifToggled",function(e){$(this).is(":checked")?ECU.componentDetails.addFaultCode():ECU.componentDetails.removeFaultCodes();e.preventDefault()})},toogleView:function(){$("#symptoms").is(":visible")||$("#ComponentDetails_SymptomsDescription").val("");$("#symptoms").toggle($("#ComponentDetails\\.SymptomsIntermittent\\.Yes").is(":checked"));$("#faultcheck").is(":visible")||$('input[id^="ComponentDetails\\.FaultCommunicate\\."]').iCheck("uncheck");$("#faultcheck").toggle($("#ComponentDetails\\.FaultCodeCheck\\.Yes").is(":checked"));$("#faultstored").is(":visible")||$('input[id^="ComponentDetails\\.FaultCleared\\."]').iCheck("uncheck");$("#faultstored").toggle($("#ComponentDetails\\.StoredFaultCode\\.Yes").is(":checked"));$("#faultcleared").is(":visible")||$('input[id^="ComponentDetails\\.FaultReturned\\."]').iCheck("uncheck");$("#faultcleared").toggle($("#ComponentDetails\\.FaultCleared\\.Yes").is(":checked"));$("#faultreturned").is(":visible")||$("#ComponentDetails_FaultReturnCondition").val("");$("#faultreturned").toggle($("#ComponentDetails\\.FaultReturned\\.Yes").is(":checked"))},addFaultCode:function(){index=$('input[name="ComponentDetails.FaultCodes.Index"]').length;$.get(ECU.componentDetails.lookupAction,"index="+index,function(data){$("#addfaultcode").before($(data))})},removeFaultCodes:function(){$("#faultcodes").find(".form-group, input").remove()}};
ECU.partLineItem={lookupAction:null,init:function(){$("#ContactDetails_Country").on("change",ECU.partLineItem.lookup)},lookup:function(e){var countryISO=$("#ContactDetails_Country").val();countryISO!=""&&$.post(ECU.partLineItem.lookupAction,"countryISO="+countryISO,ECU.partLineItem.populate);e.preventDefault()},populate:function(data){var price=parseFloat($("#price").html()),netPrice=price+data.ShippingPrice,VAT=netPrice/100*data.VATPercentage,grossPrice=netPrice+VAT;$("#shipping").html(data.ShippingPrice.toFixed(2));$("#vat").html(VAT.toFixed(2));$("#total").html(grossPrice.toFixed(2))}};
ECU.coreform={init:function(){$('input[id^="CorePaymentType."][type="radio"]').on("ifToggled",ECU.coreform.toggleView);$(".updatequantity").on("click",function(e){e.preventDefault();total=parseFloat($("#GrossPrice").val())*parseInt($("#Quantity").val(),10);$(".total").text("Total: £"+total.toFixed(2))})},toggleView:function(){$("#banktransfer").toggle($("#CorePaymentType\\.BankTransfer").is(":checked"));$("#cheque").toggle($("#CorePaymentType\\.Cheque").is(":checked"));$("#paypal").toggle($("#CorePaymentType\\.PayPal").is(":checked"));$("#banktransfer").is(":visible")||($("#banktransfer #BankName").val(""),$("#banktransfer #AccountNo").val(""),$("#banktransfer #SortCode").val(""),$("#banktransfer #AccountHoldersName").val(""));$("#cheque").is(":visible")||$("#cheque #PayableTo").val("");$("#paypal").is(":visible")||($("#paypal #PayPalEmail").val(""),$("#paypal #PayPalEmailConfirm").val(""))}};
//# sourceMappingURL=/sb/nmap/bundles_ecu.js.v5a096ba58e64ebd2d32518632a9de40ba4d107e5