Warning messageYour browser is not currently set to Accept Cookies or check to see if you have another program set to block cookies
Warning message
You are currently using Internet Explorer 8 which is not supported by our new website. We recommend you update to the latest version of Internet Explorer or alternatively use a different web browser.

Berghaus Customer Service

Static page js

// JavaScript Document $(function() { $("#submit").hide(); $("#page-changer select").change(function() { window.location = $("#page-changer select option:selected").val(); }) }); // // Check width // - move nav out of hero for mobile (allows for mobile nav positioning relative under img) // - add mobile class in html (this is a fallback - being used for max-width and overflow-x: hidden;) // function checkWidth(init) { //If browser resized, check width again */ if ($(window).width() < 420) { $('.gutters > .left').insertBefore('.gutters > .right'); $('.hero > .content.nav').each(function() { //Remove nav and place below parent - position relative $(this).parent().after(this); $('html').addClass('mobile'); $('.technology').each(function() { // each function splits the class into its indivifual divs (see below) // we want the middle one as it's our technology name //.technology '.insert tech name' .clearfix // this prevents ALL images going to ALL sections var classSpliter = $(this).attr('class').split(" ")[1]; // number in [ ] is the class ... 0 is the first, 1 is the second, 2 is the third //alert(cn); $('.'+classSpliter+' > .content.bgImg').insertBefore('.'+classSpliter+' > .content.technologyTop'); }); }) } else { if (!init) { //Add nav inside hero - position absolute $('.gutters > .left').insertAfter('.gutters > .right'); $('.content.nav').appendTo('.hero'); $('html').removeClass('mobile'); $('.technology').each(function() { // each function splits the class into its indivifual divs (see below) // we want the middle one as it's our technology name //.technology '.insert tech name' .clearfix // this prevents ALL images going to ALL sections var classSpliter = $(this).attr('class').split(" ")[1]; // number in [ ] is the class ... 0 is the first, 1 is the second, 2 is the third //alert(cn); $('.'+classSpliter+' > .content.bgImg').insertAfter('.'+classSpliter+' > .column.full.logos'); }); } } } $(document).ready(function() { checkWidth(true); $(window).resize(function() { checkWidth(false); }); }); $(document).ready(function(){ var dwfrm_ordertrack_orderNumber_validated = true; var dwfrm_ordertrack_email_validated = true; var dwfrm_ordertrack_email_ajax_validated = true; $("#dwfrm_ordertrack_orderNumber").keyup(function() { if($("#dwfrm_ordertrack_orderNumber").val() == "") { $(".favAlert").addClass("hide"); dwfrm_ordertrack_orderNumber_validated = false; } else { dwfrm_ordertrack_orderNumber_validated = true; $(".dwfrm_ordertrack_orderNumber").removeClass("validationError"); } }) $(".js_chk_order_status").click(function() { if($("#dwfrm_ordertrack_orderNumber").val() == "") { $(".favAlert").addClass("hide"); $(".dwfrm_ordertrack_orderNumber").addClass("validationError"); if($( ".dwfrm_ordertrack_orderNumber_validationMessage" ).length < 1) { $(".dwfrm_ordertrack_orderNumber").append('
Please enter an order number.
'); } dwfrm_ordertrack_orderNumber_validated = false; } else { $(".dwfrm_ordertrack_orderNumber").removeClass("validationError"); dwfrm_ordertrack_orderNumber_validated = true; } if($("#dwfrm_ordertrack_email").val() == "") { $(".favAlert").addClass("hide"); $(".dwfrm_ordertrack_email").addClass("validationError"); if($( ".dwfrm_ordertrack_email_validationMessage" ).length < 1) { $(".dwfrm_ordertrack_email").append('
Please enter email address.
'); } dwfrm_ordertrack_email_validated = false; } else { if(dwfrm_ordertrack_email_ajax_validated == true) { $(".dwfrm_ordertrack_email").removeClass("validationError"); } dwfrm_ordertrack_email_validated = true; } $("#dwfrm_ordertrack_email").keyup(function() { if($("#dwfrm_ordertrack_email").val() == "") { $(".favAlert").addClass("hide"); dwfrm_ordertrack_email_validated = false; } else { dwfrm_ordertrack_email_validated = true; $(".dwfrm_ordertrack_email").removeClass("validationError"); } }) $.post("http://www.berghaus.com/on/demandware.store/Sites-brggbgbp-Site/en_GB/Order-TrackOrder?ajax=true" , { dwfrm_ordertrack_orderNumber : $("#dwfrm_ordertrack_orderNumber").val() , dwfrm_ordertrack_email : $("#dwfrm_ordertrack_email").val()}, function(data) { if(data.success) { if(dwfrm_ordertrack_orderNumber_validated && dwfrm_ordertrack_email_validated) { $("#trackOrder").submit(); } } else { if(data.emailfailure) { $(".favAlert").addClass("hide"); $(".dwfrm_ordertrack_email").addClass("validationError"); if($( ".dwfrm_ordertrack_email_validationMessage" ).length < 1) { $(".dwfrm_ordertrack_email").append('
' + data.errormessage + '
'); } else if(dwfrm_ordertrack_email_validated == true){ $(".dwfrm_ordertrack_email_validationMessage").text(data.errormessage); } else if(dwfrm_ordertrack_email_validated == false) { $(".dwfrm_ordertrack_email_validationMessage").text("Please enter email address."); } dwfrm_ordertrack_email_validated = false; dwfrm_ordertrack_email_ajax_validated = false; } else if(dwfrm_ordertrack_email_validated == true && dwfrm_ordertrack_orderNumber_validated == true) { dwfrm_ordertrack_email_ajax_validated = true; $(".dwfrm_ordertrack_email").removeClass("validationError"); $(".dwfrm_ordertrack_orderNumber").removeClass("validationError"); $(".favAlert").removeClass("hide"); } } } ); }); $("body").keypress(function(event) { if (event.which == 13) { event.preventDefault(); $(".js_chk_order_status").click(); } }); }); /* js code for jacket finder page starts*/ jQuery(document).ready(function(){ var checkWidthofScreen = cfg.themes[ cfg.screenSize ]; var findYourJacketButtonClicked = 0; var previousBlockTwo = ""; var currentBlockTwo = ""; var triggerBySlider = 0; var flexsliderItemWidth = 197; if(checkWidthofScreen == "maxi"){ flexsliderItemWidth = 197; } if(checkWidthofScreen == "mini"){ flexsliderItemWidth = 135; } jQuery.getScript("http://demandware.edgesuite.net/aarq_prd/on/demandware.static/-/Sites-brggbgbp-Library/en_GB/v1480911528254/js/jquery-ui.min.js",function () { jQuery( "#waterproofingSlider" ).slider({ animate: "fast", value: 0, step : 100, min: 0, max: 100, disabled: true }); jQuery( "#waterproofingSlider .ui-slider-handle" ).css( "margin-left", "0em" ); jQuery( "#breathabilitySlider" ).slider({ animate: "fast", value: 0, step : 50, min: 0, max: 100, disabled: true }); jQuery( "#breathabilitySlider .ui-slider-handle" ).css( "margin-left", "0em" ); jQuery( "#weightSlider" ).slider({ animate: "fast", value: 0, step : 50, min: 0, max: 100, disabled: true}) ;jQuery( "#weightSlider .ui-slider-handle" ).css( "margin-left", "0em" ); }); var waterJacketDataJson ='{"man":["mountWalking","trekking","snowSports","climbing","running","biking","dogWalking","Travel"],"women":["mountWalking","trekking","snowSports","climbing","running","biking","dogWalking","Travel"],"man_mountWalking":"high_medium_high","man_snowSports":"high_medium_high","man_climbing":"high_medium_high","man_running":"low_medium_low","man_biking":"low_medium_low","man_trekking":"high_medium_medium","man_dogWalking":"low_low_medium","man_Travel":"low_low_medium","women_mountWalking":"low_medium_high","women_snowSports":"low_medium_high","women_climbing":"low_medium_high","women_running":"low_high_low","women_biking":"low_high_low","women_trekking":"high_medium_medium","women_dogWalking":"low_low_medium","women_Travel":"low_low_medium","Search_Criteria":{"man_mountWalking_low_low_low":"ERRORMSG:For your chosen activity we recommend you look for more protection against the elements. ","man_mountWalking_low_low_medium":"ERRORMSG:For your chosen activity we recommend you look for more protection against the elements.","man_mountWalking_low_low_high":"ERRORMSG:Change your setting to stormproof to see the range","man_mountWalking_low_medium_low":"ERRORMSG:Change your setting to stormproof to see the range","man_mountWalking_low_medium_medium":"ERRORMSG:Change your setting to stormproof to see the range","man_mountWalking_low_medium_high":"ERRORMSG:Change your setting to stormproof to see the range","man_mountWalking_low_high_low":"ERRORMSG:Change your setting to stormproof to see the range","man_mountWalking_low_high_medium":"ERRORMSG:","man_mountWalking_low_high_high":"ERRORMSG:","man_mountWalking_high_low_low":"ERRORMSG:No products found","man_mountWalking_high_low_medium":"ERRORMSG:No products found","man_mountWalking_high_low_high":"ERRORMSG:No products found","man_mountWalking_high_medium_low":"ERRORMSG:No products found","man_mountWalking_high_medium_medium":"ERRORMSG:No products found","man_mountWalking_high_medium_high":"ERRORMSG:No products found","man_mountWalking_high_high_low":"ERRORMSG:No products found","man_mountWalking_high_high_medium":"ERRORMSG:No products found, try changing your settings","man_mountWalking_high_high_high":"4-21903BP6,4-21903Z69,4-21905BP6,4-21905Z69,4-21905P12,4-21909BP6,4-21909Z70,4-21909Z78,ERRORMSG:","man_snowSports_low_low_low":"ERRORMSG:For your chosen activity we recommend you look for more protection against the elements. ","man_snowSports_low_low_medium":"ERRORMSG:For your chosen activity we recommend you look for more protection against the elements. ","man_snowSports_low_low_high":"ERRORMSG:Change your setting to stormproof to see the range","man_snowSports_low_medium_low":"ERRORMSG:For your chosen activity we recommend you look for more protection against the elements. ","man_snowSports_low_medium_medium":"ERRORMSG:For your chosen activity we recommend you look for more protection against the elements. ","man_snowSports_low_medium_high":"ERRORMSG:Change your setting to stormproof to see the range","man_snowSports_low_high_low":"ERRORMSG:For your chosen activity we recommend you look for more protection against the elements. ","man_snowSports_low_high_medium":"ERRORMSG:","man_snowSports_low_high_high":"ERRORMSG:","man_snowSports_high_low_low":"ERRORMSG:No products found","man_snowSports_high_low_medium":"ERRORMSG:No products found, try changing your settings","man_snowSports_high_low_high":"ERRORMSG:No products found, try changing your settings","man_snowSports_high_medium_low":"ERRORMSG:No products found","man_snowSports_high_medium_medium":"ERRORMSG:No products found, try changing your settings","man_snowSports_high_medium_high":"ERRORMSG:","man_snowSports_high_high_low":"ERRORMSG:No products found","man_snowSports_high_high_medium":"ERRORMSG:No products found, try changing your settings","man_snowSports_high_high_high":"4-21903BP6,4-21903Z69,4-21905BP6,4-21905Z69,4-21905P12,4-21909BP6,4-21909Z70,4-21909Z78,ERRORMSG:","man_climbing_low_low_low":"ERRORMSG:You~singlequote~re going to need a bit more protection against the elements ","man_climbing_low_low_medium":"ERRORMSG:You~singlequote~re going to need a bit more protection against the elements ","man_climbing_low_low_high":"ERRORMSG:Change your setting to stormproof to see the range","man_climbing_low_medium_low":"ERRORMSG:Change your setting to stormproof to see the range","man_climbing_low_medium_medium":"ERRORMSG:Change your setting to stormproof to see the range","man_climbing_low_medium_high":"ERRORMSG:Change your setting to stormproof to see the range","man_climbing_low_high_low":"ERRORMSG:Change your setting to stormproof to see the range","man_climbing_low_high_medium":"ERRORMSG:No products found","man_climbing_low_high_high":"ERRORMSG:No products found","man_climbing_high_low_low":"ERRORMSG:No products found","man_climbing_high_low_medium":"ERRORMSG:No products found","man_climbing_high_low_high":"ERRORMSG:No products found, try changing your settings","man_climbing_high_medium_low":"ERRORMSG:No products found","man_climbing_high_medium_medium":"ERRORMSG:No products found","man_climbing_high_medium_high":"ERRORMSG:No products found","man_climbing_high_high_low":"ERRORMSG:No products found","man_climbing_high_high_medium":"ERRORMSG:No products found, try changing your settings","man_climbing_high_high_high":"4-21903BP6,4-21903Z69,4-21905BP6,4-21905Z69,4-21905P12,4-21909BP6,4-21909Z70,4-21909Z78,ERRORMSG:","man_running_low_low_low":"4-21595U48,4-21818V02,4-21818Z07,ERRORMSG:","man_running_low_low_medium":"4-21191BP6,4-21191U46,4-21191R14,4-21191X96,ERRORMSG:","man_running_low_low_high":"ERRORMSG:No products found, try changing your settings","man_running_low_medium_low":"4-21595U48,4-21686W44,4-21191BP6,4-21191U46,4-21191R14,ERRORMSG:","man_running_low_medium_medium":"4-21694X88,4-21694C63,4-21191BP6,4-21191U46,4-21191R14,4-21191X96,4-21694R14,ERRORMSG:","man_running_low_medium_high":"ERRORMSG:No products found, try changing your settings","man_running_low_high_low":"4-21595U48,4-21191BP6,4-21191U46,4-21191R14,4-21191X96,4-21686W44,4-21694X88,4-21694R14,4-21694C63,4-20838V78,4-20838V80,ERRORMSG:","man_running_low_high_medium":"4-21694X88,4-21694R14,4-21694C63,4-21191BP6,4-21191U46,4-21191R14,4-21191X96,ERRORMSG:","man_running_low_high_high":"ERRORMSG:No products found, try changing your settings","man_running_high_low_low":"4-21595U48,4-20838V78,4-20838V80,ERRORMSG:","man_running_high_low_medium":"4-21694X88,4-21694R14,4-21694C63,ERRORMSG:","man_running_high_low_high":"ERRORMSG:No products found, try changing your settings","man_running_high_medium_low":"4-21595U48,4-20838V78,4-20838V80,ERRORMSG:","man_running_high_medium_medium":"4-21694X88,4-21694R14,4-21694C63,ERRORMSG:","man_running_high_medium_high":"ERRORMSG:No products found, try changing your settings","man_running_high_high_low":"4-21595U48,4-20838V78,4-20838V80,ERRORMSG:","man_running_high_high_medium":"4-21694X88,4-21694R14,4-21694C63,ERRORMSG:","man_running_high_high_high":"ERRORMSG:No products found, try changing your settings","man_biking_low_low_low":"ERRORMSG:","man_biking_low_low_medium":"ERRORMSG:","man_biking_low_low_high":"ERRORMSG:No products found,try changing your settings","man_biking_low_medium_low":"ERRORMSG:","man_biking_low_medium_medium":"ERRORMSG:","man_biking_low_medium_high":"ERRORMSG:No products found,try changing your settings","man_biking_low_high_low":"ERRORMSG:","man_biking_low_high_medium":"ERRORMSG:","man_biking_low_high_high":"ERRORMSG:No products found, try changing your settings","man_biking_high_low_low":"ERRORMSG:","man_biking_high_low_medium":"ERRORMSG:","man_biking_high_low_high":"ERRORMSG:No products found,try changing your settings","man_biking_high_medium_low":"4-21534R14,4-21534U66,ERRORMSG:","man_biking_high_medium_medium":"ERRORMSG:","man_biking_high_medium_high":"ERRORMSG:No products found, try changing your settings","man_biking_high_high_low":"ERRORMSG:","man_biking_high_high_medium":"ERRORMSG:","man_biking_high_high_high":"ERRORMSG:No products found, try changing your settings","man_trekking_low_low_low":"ERRORMSG:","man_trekking_low_low_medium":"4-21031BP6,4-21031K05,4-21031R14,ERRORMSG:","man_trekking_low_low_high":"ERRORMSG:","man_trekking_low_medium_low":"ERRORMSG:","man_trekking_low_medium_medium":"ERRORMSG:","man_trekking_low_medium_high":"ERRORMSG:","man_trekking_low_high_low":"ERRORMSG:","man_trekking_low_high_medium":"ERRORMSG:","man_trekking_low_high_high":"ERRORMSG:","man_trekking_high_low_low":"ERRORMSG:","man_trekking_high_low_medium":"ERRORMSG:","man_trekking_high_low_high":"ERRORMSG:","man_trekking_high_medium_low":"4-21534R14,4-21534U66,4-21533C63,4-21533IBT,4-21533Z04,ERRORMSG:","man_trekking_high_medium_medium":"4-21878BP6,4-21878BP6,4-21878Z91,4-21879Z69,4-21879D90,4-21877D90,4-21877AB2,ERRORMSG:","man_trekking_high_medium_high":"4-21695Z64,4-21695W44,4-21695U66,4-21695C63,4-21015Z92,4-21015R14,4-21016Z75,4-21016BP6,4-21016R14,4-21693Y03,4-21693Z70,4-21370C63,4-21370IBT,4-21370U66,4-21694R14,4-21694C63,ERRORMSG:","man_trekking_high_high_low":"ERRORMSG:","man_trekking_high_high_medium":"ERRORMSG:","man_trekking_high_high_high":"4-21909BP6,4-21909Z70,4-21909Z78,ERRORMSG:","man_dogWalking_low_low_low":"4-21191BP6,4-21191R14,4-21191Z04,4-21191Y96,ERRORMSG:","man_dogWalking_low_low_medium":"4-21031BP6,4-21031K05,4-21031R14,4-21029BP6,4-21029EH7,4-21029IN7,4-21033BP6,4-21033IN7,4-21033EH7,4-21033R65,4-21840Z04,4-21840BP6,4-21840CI4,ERRORMSG:","man_dogWalking_low_low_high":"ERRORMSG:No products found, try changing your settings","man_dogWalking_low_medium_low":"ERRORMSG:","man_dogWalking_low_medium_medium":"4-21389BP6,4-21389EH7,ERRORMSG:","man_dogWalking_low_medium_high":"ERRORMSG:No products found, try changing your settings","man_dogWalking_low_high_low":"ERRORMSG:No products found, try changing your settings","man_dogWalking_low_high_medium":"ERRORMSG:No products found, try changing your settings","man_dogWalking_low_high_high":"ERRORMSG:No products found, try changing your settings","man_dogWalking_high_low_low":"ERRORMSG:","man_dogWalking_high_low_medium":"ERRORMSG:","man_dogWalking_high_low_high":"ERRORMSG:No products found, try changing your settings","man_dogWalking_high_medium_low":"4-21534R14,4-21534U66,ERRORMSG:","man_dogWalking_high_medium_medium":"4-21877D90,4-21877AB2,ERRORMSG:","man_dogWalking_high_medium_high":"4-21015Z92,4-21015R14,4-21016Z75,4-21016BP6,4-21016R14,ERRORMSG:","man_dogWalking_high_high_low":"ERRORMSG:No products found, try changing your settings","man_dogWalking_high_high_medium":"ERRORMSG:No products found, try changing your settings","man_dogWalking_high_high_high":"ERRORMSG:No products found, try changing your settings","man_Travel_low_low_low":"4-21191BP6,4-21191R14,4-21191Z04,4-21191Y96,ERRORMSG:","man_Travel_low_low_medium":"4-21840Z04,4-21840BP6,4-21840CI4,ERRORMSG:","man_Travel_low_low_high":"ERRORMSG:No products found, try changing your settings","man_Travel_low_medium_low":"ERRORMSG:","man_Travel_low_medium_medium":"4-21389BP6,4-21389EH7,ERRORMSG:No products found, try changing your settings","man_Travel_low_medium_high":"ERRORMSG:No products found, try changing your settings","man_Travel_low_high_low":"ERRORMSG:No products found, try changing your settings","man_Travel_low_high_medium":"ERRORMSG:No products found, try changing your settings","man_Travel_low_high_high":"ERRORMSG:No products found, try changing your settings","man_Travel_high_low_low":"ERRORMSG:","man_Travel_high_low_medium":"ERRORMSG:No products found, try changing your settings","man_Travel_high_low_high":"ERRORMSG:No products found, try changing your settings","man_Travel_high_medium_low":"4-21534R14,4-21534U66,ERRORMSG:","man_Travel_high_medium_medium":"ERRORMSG:No products found, try changing your settings","man_Travel_high_medium_high":"ERRORMSG:No products found, try changing your settings","man_Travel_high_high_low":"ERRORMSG:No products found, try changing your settings","man_Travel_high_high_medium":"ERRORMSG:No products found, try changing your settings","man_Travel_high_high_high":"ERRORMSG:No products found, try changing your settings","women_mountWalking_low_low_low":"ERRORMSG:No products found, try changing your settings","women_mountWalking_low_low_medium":"ERRORMSG:","women_mountWalking_low_low_high":"ERRORMSG:","women_mountWalking_low_medium_low":"ERRORMSG:No products found, try changing your settings","women_mountWalking_low_medium_medium":"ERRORMSG:","women_mountWalking_low_medium_high":"ERRORMSG:","women_mountWalking_low_high_low":"ERRORMSG:No products found, try changing your settings","women_mountWalking_low_high_medium":"ERRORMSG:","women_mountWalking_low_high_high":"ERRORMSG:","women_mountWalking_high_low_low":"ERRORMSG:No products found, try changing your settings","women_mountWalking_high_low_medium":"ERRORMSG:","women_mountWalking_high_low_high":"ERRORMSG:","women_mountWalking_high_medium_low":"ERRORMSG:No products found, try changing your settings","women_mountWalking_high_medium_medium":"ERRORMSG:No products found, try changing your settings","women_mountWalking_high_medium_high":"ERRORMSG:No products found, try changing your settings","women_mountWalking_high_high_low":"ERRORMSG:No products found, try changing your settings","women_mountWalking_high_high_medium":"ERRORMSG:No products found, try changing your settings","women_mountWalking_high_high_high":"4-21906R51,4-21910Z77,4-21910Z66,ERRORMSG:No products found, try changing your settings","women_snowSports_low_low_low":"ERRORMSG:You~singlequote~re way off piste, try changing your settings","women_snowSports_low_low_medium":"ERRORMSG:","women_snowSports_low_low_high":"ERRORMSG:","women_snowSports_low_medium_low":"ERRORMSG:You~singlequote~re way off piste, try changing your settings","women_snowSports_low_medium_medium":"ERRORMSG:","women_snowSports_low_medium_high":"ERRORMSG:","women_snowSports_low_high_low":"ERRORMSG:You~singlequote~re way off piste, try changing your settings","women_snowSports_low_high_medium":"ERRORMSG:","women_snowSports_low_high_high":"ERRORMSG:","women_snowSports_high_low_low":"ERRORMSG:You~singlequote~re way off piste, try changing your settings","women_snowSports_high_low_medium":"ERRORMSG:You~singlequote~re way off piste, try changing your settings","women_snowSports_high_low_high":"ERRORMSG:You~singlequote~re way off piste, try changing your settings","women_snowSports_high_medium_low":"ERRORMSG:You~singlequote~re way off piste, try changing your settings","women_snowSports_high_medium_medium":"ERRORMSG:You~singlequote~re way off piste, try changing your settings","women_snowSports_high_medium_high":"ERRORMSG:You~singlequote~re way off piste, try changing your settings","women_snowSports_high_high_low":"ERRORMSG:You~singlequote~re way off piste, try changing your settings","women_snowSports_high_high_medium":"ERRORMSG:You~singlequote~re way off piste, try changing your settings","women_snowSports_high_high_high":"4-21906R51,4-21910Z77,4-21910Z66,ERRORMSG:","women_climbing_low_low_low":"ERRORMSG:No products found, try changing your settings","women_climbing_low_low_medium":"ERRORMSG:","women_climbing_low_low_high":"ERRORMSG:","women_climbing_low_medium_low":"ERRORMSG:No products found, try changing your settings","women_climbing_low_medium_medium":"ERRORMSG:","women_climbing_low_medium_high":"ERRORMSG:","women_climbing_low_high_low":"ERRORMSG:No products found, try changing your settings","women_climbing_low_high_medium":"ERRORMSG:","women_climbing_low_high_high":"ERRORMSG:","women_climbing_high_low_low":"ERRORMSG:No products found, try changing your settings","women_climbing_high_low_medium":"ERRORMSG:No products found, try changing your settings","women_climbing_high_low_high":"ERRORMSG:No products found, try changing your settings","women_climbing_high_medium_low":"ERRORMSG:No products found, try changing your settings","women_climbing_high_medium_medium":"ERRORMSG:No products found, try changing your settings","women_climbing_high_medium_high":"ERRORMSG:No products found, try changing your settings","women_climbing_high_high_low":"ERRORMSG:No products found, try changing your settings","women_climbing_high_high_medium":"ERRORMSG:No products found, try changing your settings","women_climbing_high_high_high":"4-21906R51,4-21910Z77,4-21910Z66,ERRORMSG:No products found, try changing your settings","women_running_low_low_low":"4-21199I69,4-21199R18,4-21199W13,4-21552R18,4-21552BP6,4-21552W13,4-21551R18,4-21551U53,4-21828R18,4-21828Z33,ERRORMSG:","women_running_low_low_medium":"4-21199I69,4-21199R18,4-21552R18,4-21552BP6,4-21552W13,4-21551R18,4-21551U53,ERRORMSG:","women_running_low_low_high":"4-21551R18,4-21551U53,ERRORMSG:","women_running_low_medium_low":"4-21199I69,4-21199R18,4-21552R18,4-21552BP6,4-21552W13,4-21551R18,4-21551U53,ERRORMSG:","women_running_low_medium_medium":"4-21199I69,4-21199R18,4-21552R18,4-21552BP6,4-21552W13,4-21551R18,ERRORMSG:","women_running_low_medium_high":"4-21551R18,4-21551U53,ERRORMSG:","women_running_low_high_low":"4-21199I69,4-21199R18,4-21552R18,4-21552BP6,4-21552W13,4-21551R18,4-21551U53,4-20856W08,ERRORMSG:","women_running_low_high_medium":"4-21199I69,4-21199R18,4-21552R18,4-21552BP6,4-21552W13,4-21551R18,4-21551R18,ERRORMSG:","women_running_low_high_high":"4-21551R18,4-21551U53,ERRORMSG:","women_running_high_low_low":"4-21552R18,4-21552BP6,4-21552W13,4-21551R18,4-21551U53,4-20856W08,ERRORMSG:","women_running_high_low_medium":"4-21552R18,4-21552BP6,4-21552W13,4-21551R18,4-21551U53,ERRORMSG:","women_running_high_low_high":"4-21551R18,4-21551U53,ERRORMSG:","women_running_high_medium_low":"4-21552R18,4-21552BP6,4-21552W13,4-21551R18,4-21551U53,4-20856W08,ERRORMSG:","women_running_high_medium_medium":"4-21552R18,4-21552BP6,4-21552W13,4-21551R18,4-21551U53,ERRORMSG:","women_running_high_medium_high":"4-21551R18,4-21551U53,ERRORMSG:","women_running_high_high_low":"4-21552R18,4-21552BP6,4-21552W13,4-21551R18,4-21551U53,4-20856W08,ERRORMSG:","women_running_high_high_medium":"4-21552R18,4-21552BP6,4-21552W13,4-21551R18,4-21551U53,ERRORMSG:","women_running_high_high_high":"4-21551R18,4-21551U53,ERRORMSG:","women_biking_low_low_low":"ERRORMSG:","women_biking_low_low_medium":"ERRORMSG:","women_biking_low_low_high":"ERRORMSG:","women_biking_low_medium_low":"ERRORMSG:","women_biking_low_medium_medium":",ERRORMSG:","women_biking_low_medium_high":"ERRORMSG:","women_biking_low_high_low":"ERRORMSG:","women_biking_low_high_medium":"ERRORMSG:","women_biking_low_high_high":"ERRORMSG:","women_biking_high_low_low":"ERRORMSG:","women_biking_high_low_medium":"ERRORMSG:","women_biking_high_low_high":"ERRORMSG:","women_biking_high_medium_low":"4-21552R18,4-21552BP6,4-21552S94,ERRORMSG:","women_biking_high_medium_medium":"ERRORMSG:","women_biking_high_medium_high":"ERRORMSG:","women_biking_high_high_low":"ERRORMSG:","women_biking_high_high_medium":"ERRORMSG:","women_biking_high_high_high":"ERRORMSG:","women_trekking_low_low_low":"ERRORMSG:","women_trekking_low_low_medium":"ERRORMSG:","women_trekking_low_low_high":"ERRORMSG:No products found, try changing your settings","women_trekking_low_medium_low":"ERRORMSG:","women_trekking_low_medium_medium":"4-21394R18,4-21394S94,4-21394R51,ERRORMSG:","women_trekking_low_medium_high":"ERRORMSG:No products found, try changing your settings","women_trekking_low_high_low":"ERRORMSG:","women_trekking_low_high_medium":"ERRORMSG:","women_trekking_low_high_high":"ERRORMSG:No products found, try changing your settings","women_trekking_high_low_low":"ERRORMSG:","women_trekking_high_low_medium":"ERRORMSG:","women_trekking_high_low_high":"ERRORMSG:No products found, try changing your settings","women_trekking_high_medium_low":"4-21552R18,4-21552BP6,4-21552S94,4-21551R18,4-21551U53,4-21551W13,ERRORMSG:","women_trekking_high_medium_medium":"4-21882Z62,4-21882NB2,4-21882Z62,4-21882Z77,ERRORMSG:","women_trekking_high_medium_high":"4-21037R14,4-21037Z62,4-21037R91,4-21704R18,4-21704R51,4-21704S94,ERRORMSG:","women_trekking_high_high_low":"ERRORMSG:","women_trekking_high_high_medium":"ERRORMSG:","women_trekking_high_high_high":"4-21910Z77,4-21910Z66,ERRORMSG:","women_dogWalking_low_low_low":"4-21199I69,4-21199Z62,4-21199R18,ERRORMSG:","women_dogWalking_low_low_medium":"4-21045BP6,4-21045R18,4-21049BP6,4-21049S94,4-21719R65,4-21719O86,4-21843Y93,4-21843R14,ERRORMSG:","women_dogWalking_low_medium_low":"ERRORMSG:No products found, try changing your settings","women_dogWalking_low_medium_medium":"4-21394R18,4-21394S94,4-21394R51,ERRORMSG:","women_dogWalking_low_medium_high":"ERRORMSG:","women_dogWalking_low_high_low":"ERRORMSG:No products found, try changing your settings","women_dogWalking_low_high_medium":"ERRORMSG:No products found, try changing your settings","women_dogWalking_low_high_high":"ERRORMSG:No products found, try changing your settings","women_dogWalking_high_low_low":"ERRORMSG:No products found, try changing your settings","women_dogWalking_high_low_medium":"ERRORMSG:","women_dogWalking_high_low_high":"ERRORMSG:","women_dogWalking_high_medium_low":"4-21552R18,4-21552BP6,4-21552S94,ERRORMSG:","women_dogWalking_high_medium_medium":"ERRORMSG:","women_dogWalking_high_medium_high":"ERRORMSG:","women_dogWalking_high_high_low":"ERRORMSG:No products found, try changing your settings","women_dogWalking_high_high_medium":"ERRORMSG:No products found, try changing your settings","women_dogWalking_high_high_high":"ERRORMSG:No products found, try changing your settings","women_Travel_low_low_low":"4-21199I69,4-21199Z62,4-21199R18,ERRORMSG:","women_Travel_low_low_medium":"4-21719R65,4-21719O86,4-21843Y93,4-21843R14,ERRORMSG:","women_Travel_low_low_high":"ERRORMSG:No products found, try changing your settings","women_Travel_low_medium_low":"ERRORMSG:No products found, try changing your settings","women_Travel_low_medium_medium":"4-21394R18,4-21394S94,4-21394R51,ERRORMSG:No products found, try changing your settings","women_Travel_low_medium_high":"ERRORMSG:No products found, try changing your settings","women_Travel_low_high_low":"ERRORMSG:No products found, try changing your settings","women_Travel_low_high_medium":"ERRORMSG:No products found, try changing your settings","women_Travel_low_high_high":"ERRORMSG:No products found, try changing your settings","women_Travel_high_low_low":"ERRORMSG:No products found, try changing your settings","women_Travel_high_low_medium":"ERRORMSG:","women_Travel_high_low_high":"ERRORMSG:","women_Travel_high_medium_low":"4-21552R18,4-21552BP6,4-21552S94,ERRORMSG:","women_Travel_high_medium_medium":"ERRORMSG:","women_Travel_high_medium_high":"ERRORMSG:","women_Travel_high_high_low":"ERRORMSG:No products found, try changing your settings","women_Travel_high_high_medium":"ERRORMSG:No products found, try changing your settings","women_Travel_high_high_high":"ERRORMSG:No products found, try changing your settings"},"mountWalking_descriptionTextArray":["The key features to consider when buying a jacket are waterproofness, breathability,durability and weight.~~~We recommend the settings below to ensure you get the best results for mountaineering.","If you are going to be in environments with harsh weather conditions, look for stormproof weather protection.","Elevated breathability will enhance your comfort and performance.","You can’t afford for your gear to fail you.Look to our highly durable waterproof fabrics for excellent protection that can withstand abrasion and tough treatment."],"snowSports_descriptionTextArray":["The key features to consider when buying a jacket are waterproofness, breathability,durability and weight.~~~We recommend the settings below to ensure you get the best results for snow sports.","Be prepared for that unexpected blizzard with stormproof weather protection.","Elevated breathability will enhance your comfort and performance.","Excellent durability is essential if you use and abuse your gear on the pistes."],"trekking_descriptionTextArray":["The key features to consider when buying a jacket are waterproofness, breathability,durability and weight.~~~We recommend the settings below to ensure you get the best results for hiking & trekking.","Not afraid to shy away from a heavy downpour?Then you will want stormproof weather protection.","If you’re out for most of the day in unpredictable weather,you will want to layer up.A good level of breathability helps you to hike without overheating.","For hiking, look for a waterproof that’s light for stuffing in your pack when you don’t need it,but durable enough to withstand a lot of use."],"running_descriptionTextArray":["The key features to consider when buying a jacket are waterproofness, breathability,durability and weight.~~~We recommend the settings below to ensure you get the best results for running.","Not afraid to shy away from a downpour?Then you will want rainproof weather protection.","A highly breathable fabric will help to regulate your body temperature and not overheat.","During high energy activities, you don~singlequote~ need your gear to add to your load. A lightweight waterproof will help you keep up the pace."],"dogWalking_descriptionTextArray":["The key features to consider when buying a jacket are waterproofness, breathability,durability and weight.~~~We recommend the settings below to ensure you get the best results for everyday use.","If you want to be prepared in unpredictable weather and not let the rain spoil your day,look to our rainproof range for the right level of protection for you.","With a good level of breathability you will have a nice skin-to-fabric feel and an overall comfortable wear.","Mid-weight offers the best balance of weight and durability for a comfortable waterproof you know will last the test of time"],"climbing_descriptionTextArray":["The key features to consider when buying a jacket are waterproofness, breathability,durability and weight.~~~We recommend the settings below to ensure you get the best results for climbing.","When you’re climbing, staying dry and protected is important.Stormproof weather protection means you can think about your climb and not the weather.","A highly breathable fabric will help to regulate your body temperature and not overheat.","When doing activities that are close to rock in harsh conditions,you want a highly durable fabric that can withstand abrasion and rough treatment."],"biking_descriptionTextArray":["The key features to consider when buying a jacket are waterproofness, breathability,durability and weight.~~~We recommend the settings below to ensure you get the best results for biking.","Not afraid to shy away from a downpour? Then you will want rainproof weather protection.","A highly breathable fabric will help to regulate your body temperature and not overheat.","During high energy activities, you don~singlequote~ need your gear to add to your load.A lightweight waterproof will help you keep up the pace."],"Travel_descriptionTextArray":["The key features to consider when buying a jacket are waterproofness, breathability,durability and weight.~~~We recommend the settings below to ensure you get the best results for travel.","If you want to be prepared in unpredictable weather and not let the rain spoil your day, look to our rainproof range for the right level of protection for you.","With a good level of breathability you will have a nice skin-to-fabric feel and an overall comfortable wear.","Mid-weight offers the best balance of weight and durability,for a comfortable waterproof you know will last the test of time."]}'; var waterJacketData = jQuery.parseJSON(waterJacketDataJson); var activityBlockArray = ["mountWalking","snowSports","climbing","running","biking","trekking","dogWalking","Travel"]; var waterJacketDataGenderSearchString = ""; var waterJacketDataActivitySearchString = ""; var waterJacketLevelValuesArray = []; waterJacketLevelValuesArray["high"] = 100; waterJacketLevelValuesArray["medium"] = 50; waterJacketLevelValuesArray["low"] = 0; var waterJacketLevelKeysArray = []; waterJacketLevelKeysArray[100] = "high"; waterJacketLevelKeysArray[50] = "medium"; waterJacketLevelKeysArray[0] = "low"; resetWaterProofJacketFinder(); jQuery('.man, .women').click(function() { resetAdventures(); findYourJacketButtonClicked = 0; jQuery( "#waterproofingSlider" ).slider( "option", "value", 0); jQuery( "#waterproofingSlider .ui-slider-handle" ).css( "margin-left", "0em" ); jQuery( "#waterproofingSlider" ).slider( "disable" ); jQuery( "#breathabilitySlider" ).slider( "option", "value", 0); jQuery( "#breathabilitySlider .ui-slider-handle" ).css( "margin-left", "0em" ); jQuery( "#breathabilitySlider" ).slider( "disable" ); jQuery( "#weightSlider" ).slider( "option", "value", 0); jQuery( "#weightSlider .ui-slider-handle" ).css( "margin-left", "0em" ); jQuery( "#weightSlider" ).slider( "disable" ); jQuery('.recommendation').css('display', 'none'); if(jQuery(this).hasClass('man')) { waterJacketDataGenderSearchString = "man"; jQuery(this).addClass('manActive'); jQuery('.women').removeClass('womenActive'); } if(jQuery(this).hasClass('women')) { waterJacketDataGenderSearchString = "women"; jQuery(this).addClass('womenActive'); jQuery('.man').removeClass('manActive'); } activateActivityBlockOne(waterJacketData); activateActivityBlockTwo(); jQuery('.findYourJacket').unbind( "click"); }); jQuery('.explained').click(function() { closeVideo(); jQuery('.explained').addClass( "explainedActive" ); jQuery('.feature').removeClass( "featureActive" ); jQuery('.watchVideo').removeClass( "watchVideoActive" ); jQuery('.hoverBlockOne').toggle(); jQuery('.hoverBlockTwo').css( "display", "none" ); jQuery('.hoverBlockThree').css( "display", "none" ); }); jQuery('.feature').click(function() { closeVideo(); jQuery('.explained').removeClass( "explainedActive" ); jQuery('.feature').addClass( "featureActive" ); jQuery('.watchVideo').removeClass( "watchVideoActive" ); jQuery('.hoverBlockOne').css( "display", "none" ); jQuery('.hoverBlockTwo').toggle(); jQuery('.hoverBlockThree').css( "display", "none" ); }); jQuery('.watchVideo').click(function() { closeVideo(); jQuery('.explained').removeClass( "explainedActive" ); jQuery('.feature').removeClass( "featureActive" ); jQuery('.watchVideo').addClass( "watchVideoActive" ); jQuery('.hoverBlockOne').css( "display", "none" ); jQuery('.hoverBlockTwo').css( "display", "none" ); jQuery('.hoverBlockThree').toggle(); }); jQuery('.hoverBlockOne .closeIcon, .hoverBlockOne .close').click(function() { closeVideo(); jQuery('.hoverBlockOne').toggle(); }); jQuery('.hoverBlockTwo .closeIcon, .hoverBlockTwo .close').click(function() { closeVideo(); jQuery('.hoverBlockTwo').toggle(); }); jQuery('.hoverBlockThree .closeIcon').click(function() { closeVideo(); jQuery('.hoverBlockThree').toggle(); }); function closeVideo() { /* code for stopping video */ /* var div = document.getElementById("video"); var iframe = div.getElementsByTagName("iframe")[0].contentWindow; func = 'stopVideo'; iframe.postMessage('{"event":"command","func":"' + func + '","args":""}', '*'); */ /* code for stopping video */ } function resetWaterProofJacketFinder() { jQuery('.man').removeClass('manActive'); jQuery('.women').removeClass('womenActive'); jQuery('.recommendation').css('display', 'none'); var i = 0; while(i < activityBlockArray.length) { jQuery('.' + activityBlockArray[i]).css('display', 'inline-block'); i = i + 1; } jQuery('.activityBlockTwo').css( "opacity", "0.4" ); jQuery('.activityBlockThree').css( "opacity", "0.4" ); jQuery('.activityBlockTwo').removeClass( "activityBlockTwoActivated" ); jQuery('.activityBlockThree').removeClass( "activityBlockThreeActivated" ); waterJacketDataGenderSearchString = ""; waterJacketDataActivitySearchString = ""; jQuery('.flexslider').flexslider('destroy'); } function resetAdventures() { jQuery('.mountWalking').removeClass('mountWalkingActive'); jQuery('.snowSports').removeClass('snowSportsActive'); jQuery('.climbing').removeClass('climbingActive'); jQuery('.running').removeClass('runningActive'); jQuery('.biking').removeClass('bikingActive'); jQuery('.trekking').removeClass('trekkingActive'); jQuery('.dogWalking').removeClass('dogWalkingActive'); jQuery('.Travel').removeClass('TravelActive'); } function activateActivityBlockOne(waterJacketData) { var i = 0; jQuery('.activityBlockTwo').addClass( "activityBlockTwoActivated" ); if(jQuery('.man').hasClass('manActive')) { while(i < activityBlockArray.length) { if(waterJacketData.man.indexOf(activityBlockArray[i]) == -1) { jQuery('.' + activityBlockArray[i]).css('display', 'none'); } else { jQuery('.' + activityBlockArray[i]).css('display', 'inline-block'); } i = i + 1; } } if(jQuery('.women').hasClass('womenActive')) { while(i < activityBlockArray.length) { if(waterJacketData.women.indexOf(activityBlockArray[i]) == -1) { jQuery('.' + activityBlockArray[i]).css('display', 'none'); } else { jQuery('.' + activityBlockArray[i]).css('display', 'inline-block'); } i = i + 1; } } jQuery('.activityBlockTwo').css( "opacity", "" ); jQuery('.activityBlockThree').css( "opacity", "0.4" ); jQuery('.activityBlockThree').removeClass( "activityBlockThreeActivated" ); jQuery('.findYourJacket').unbind( "click"); } function activateActivityBlockTwo() { jQuery('.activityBlockTwoActivated .mountWalking, .activityBlockTwoActivated .snowSports, .activityBlockTwoActivated .climbing, .activityBlockTwoActivated .running, .activityBlockTwoActivated .biking, .activityBlockTwoActivated .trekking, .activityBlockTwoActivated .dogWalking, .activityBlockTwoActivated .Travel').unbind("click").bind( "click", function() { currentBlockTwo = $(this).attr("class"); jQuery('.activityBlockThree').addClass( "activityBlockThreeActivated" ); jQuery('.activityBlockThree').css( "opacity", "" ); if(jQuery(this).hasClass('mountWalking')) { changeText('mountWalking'); waterJacketDataActivitySearchString = "mountWalking"; jQuery(this).addClass('mountWalkingActive'); jQuery('.snowSports').removeClass('snowSportsActive'); jQuery('.climbing').removeClass('climbingActive'); jQuery('.running').removeClass('runningActive'); jQuery('.biking').removeClass('bikingActive'); jQuery('.trekking').removeClass('trekkingActive'); jQuery('.dogWalking').removeClass('dogWalkingActive'); jQuery('.Travel').removeClass('TravelActive'); } if(jQuery(this).hasClass('snowSports')) { changeText('snowSports'); waterJacketDataActivitySearchString = "snowSports"; jQuery(this).addClass('snowSportsActive'); jQuery('.mountWalking').removeClass('mountWalkingActive'); jQuery('.climbing').removeClass('climbingActive'); jQuery('.running').removeClass('runningActive'); jQuery('.biking').removeClass('bikingActive'); jQuery('.trekking').removeClass('trekkingActive'); jQuery('.dogWalking').removeClass('dogWalkingActive'); jQuery('.Travel').removeClass('TravelActive'); } if(jQuery(this).hasClass('climbing')) { changeText('climbing'); waterJacketDataActivitySearchString = "climbing"; jQuery(this).addClass('climbingActive'); jQuery('.mountWalking').removeClass('mountWalkingActive'); jQuery('.snowSports').removeClass('snowSportsActive'); jQuery('.running').removeClass('runningActive'); jQuery('.biking').removeClass('bikingActive'); jQuery('.trekking').removeClass('trekkingActive'); jQuery('.dogWalking').removeClass('dogWalkingActive'); jQuery('.Travel').removeClass('TravelActive'); } if(jQuery(this).hasClass('running')) { changeText('running'); waterJacketDataActivitySearchString = "running"; jQuery(this).addClass('runningActive'); jQuery('.mountWalking').removeClass('mountWalkingActive'); jQuery('.snowSports').removeClass('snowSportsActive'); jQuery('.climbing').removeClass('climbingActive'); jQuery('.biking').removeClass('bikingActive'); jQuery('.trekking').removeClass('trekkingActive'); jQuery('.dogWalking').removeClass('dogWalkingActive'); jQuery('.Travel').removeClass('TravelActive'); } if(jQuery(this).hasClass('biking')) { changeText('biking'); waterJacketDataActivitySearchString = "biking"; jQuery(this).addClass('bikingActive'); jQuery('.mountWalking').removeClass('mountWalkingActive'); jQuery('.snowSports').removeClass('snowSportsActive'); jQuery('.climbing').removeClass('climbingActive'); jQuery('.running').removeClass('runningActive'); jQuery('.trekking').removeClass('trekkingActive'); jQuery('.dogWalking').removeClass('dogWalkingActive'); jQuery('.Travel').removeClass('TravelActive'); } if(jQuery(this).hasClass('trekking')) { changeText('trekking'); waterJacketDataActivitySearchString = "trekking"; jQuery(this).addClass('trekkingActive'); jQuery('.mountWalking').removeClass('mountWalkingActive'); jQuery('.snowSports').removeClass('snowSportsActive'); jQuery('.climbing').removeClass('climbingActive'); jQuery('.running').removeClass('runningActive'); jQuery('.biking').removeClass('bikingActive'); jQuery('.dogWalking').removeClass('dogWalkingActive'); jQuery('.Travel').removeClass('TravelActive'); } if(jQuery(this).hasClass('dogWalking')) { changeText('dogWalking'); waterJacketDataActivitySearchString = "dogWalking"; jQuery(this).addClass('dogWalkingActive'); jQuery('.mountWalking').removeClass('mountWalkingActive'); jQuery('.snowSports').removeClass('snowSportsActive'); jQuery('.climbing').removeClass('climbingActive'); jQuery('.running').removeClass('runningActive'); jQuery('.biking').removeClass('bikingActive'); jQuery('.trekking').removeClass('trekkingActive'); jQuery('.Travel').removeClass('TravelActive'); } if(jQuery(this).hasClass('Travel')) { changeText('Travel'); waterJacketDataActivitySearchString = "Travel"; jQuery(this).addClass('TravelActive'); jQuery('.mountWalking').removeClass('mountWalkingActive'); jQuery('.snowSports').removeClass('snowSportsActive'); jQuery('.climbing').removeClass('climbingActive'); jQuery('.running').removeClass('runningActive'); jQuery('.biking').removeClass('bikingActive'); jQuery('.trekking').removeClass('trekkingActive'); jQuery('.dogWalking').removeClass('dogWalkingActive'); } var waterJacketLevelValues = waterJacketData[waterJacketDataGenderSearchString + "_" + waterJacketDataActivitySearchString].split("_"); dataLayer.push({"recommendation":waterJacketDataGenderSearchString +"-"+ waterJacketDataActivitySearchString}); //========================== jQuery('.findYourJacket').unbind("click").bind( "click", function(event) { var activeElement = $(document.activeElement.tagName); if (activeElement.selector == "SPAN" || previousBlockTwo == '') { clickedByUser = 1; } else{ clickedByUser = 0; } if (clickedByUser == 1) { var waterJacketWaterproofingSliderLevelKey = $( "#waterproofingSlider" ).slider( "option", "value" ); var waterJacketBreathabilitySliderLevelKey = $( "#breathabilitySlider" ).slider( "option", "value" ) var waterJacketWeightSliderLevelKey = $( "#weightSlider" ).slider( "option", "value" ); var waterJacketLevelKeys = waterJacketLevelKeysArray[waterJacketWaterproofingSliderLevelKey] + "_" + waterJacketLevelKeysArray[waterJacketBreathabilitySliderLevelKey] + "_" + waterJacketLevelKeysArray[waterJacketWeightSliderLevelKey]; }else{ var waterJacketWaterproofingSliderLevelKey = waterJacketLevelValues[0]; var waterJacketBreathabilitySliderLevelKey = waterJacketLevelValues[1]; var waterJacketWeightSliderLevelKey = waterJacketLevelValues[2]; var waterJacketLevelKeys = waterJacketData[waterJacketDataGenderSearchString + "_" + waterJacketDataActivitySearchString]; } if(previousBlockTwo != currentBlockTwo || findYourJacketButtonClicked == 0 || clickedByUser == 1) { findYourJacketButtonClicked = 1; clickedByUser = 0; previousBlockTwo = currentBlockTwo; jQuery('.recommendation').css('display', 'block'); //if(typeof(waterJacketData.Search_Criteria[waterJacketDataGenderSearchString + "_" + waterJacketDataActivitySearchString + "_" + waterJacketLevelKeys]) == "undefined") if(waterJacketData.Search_Criteria[waterJacketDataGenderSearchString + "_" + waterJacketDataActivitySearchString + "_" + waterJacketLevelKeys].substring(0,9) == "ERRORMSG:") { var errorMessage = waterJacketData.Search_Criteria[waterJacketDataGenderSearchString + "_" + waterJacketDataActivitySearchString + "_" + waterJacketLevelKeys]; //jQuery('.ourRecommendationTitle span').text("no products found"); jQuery('.ourRecommendationTitle span').text(errorMessage.substring(9).replace("~singlequote~", "'")); jQuery('.titleTip').css("display","none"); jQuery('.recommendations').css("display","none"); } else { var recommendationProducts = waterJacketData.Search_Criteria[waterJacketDataGenderSearchString + "_" + waterJacketDataActivitySearchString + "_" + waterJacketLevelKeys].split(","); // CF code added to push variable to Google Tag manger, this is then used to track the optoins used var cfgtmstring = waterJacketDataGenderSearchString +"-"+ waterJacketDataActivitySearchString +"-"+waterJacketLevelKeys ; // CF code to send information to GTm dataLayer var cfgtmstring; dataLayer.push({"recommendation":cfgtmstring}); // remove the last item which is the ERRORMSG recommendationProducts.splice(-1,1); jQuery('.ourRecommendationTitle span').text("Our Recommendations"); jQuery('.titleTip').css("display","block"); jQuery('.recommendations').css("display","block"); jQuery('.flexslider').flexslider({ animation: "slide", animationLoop: true, itemWidth: flexsliderItemWidth, controlNav: false, itemMargin: 0 }); jQuery(".flexslider").data('flexslider').removeSlide(0); jQuery( "#productRecommandationData .sildediv" ).each(function( index ) { if(jQuery( "#slide" + this.id ).length == 0) { jQuery(".flexslider").data('flexslider').addSlide('
  • ' + jQuery("#" + this.id).html() + '
  • '); } if(recommendationProducts.indexOf(this.id) == -1) { if(jQuery( "#slide" + this.id ).length > 0) { jQuery(".flexslider").data('flexslider').removeSlide(jQuery("#slide" + this.id)); } } jQuery('.flexslider').flexslider(0); }); //jQuery(".flexslider").data('flexslider').addSlide("
  • abc
  • "); //jQuery(".flexslider").data('flexslider').removeSlide(jQuery("#a2")); //jQuery(".flexslider").data("flexslider").flexAnimate(0, true, true); jQuery('.flexslider').flexslider(); if (recommendationProducts.length <= 4) { $('#home_rr').css('display', 'inline-block'); $('#home_rr').css('width', 'auto'); } else { $('#home_rr').width('2000%'); } } } }); jQuery( "#waterproofingSlider" ).slider( "enable" ); if(waterJacketLevelValuesArray[waterJacketLevelValues[0]] == 50) { jQuery( "#waterproofingSlider .ui-slider-handle" ).css( "margin-left", "-0.6em" ); } else if(waterJacketLevelValuesArray[waterJacketLevelValues[0]] < 50) { jQuery( "#waterproofingSlider .ui-slider-handle" ).css( "margin-left", "0em" ); } else if(waterJacketLevelValuesArray[waterJacketLevelValues[0]] > 50) { jQuery( "#waterproofingSlider .ui-slider-handle" ).css( "margin-left", "-1.6em" ); } jQuery( "#waterproofingSlider" ).slider( "option", "value", waterJacketLevelValuesArray[waterJacketLevelValues[0]] ); updateWaterproofingSliderBottomText(); jQuery( "#waterproofingSlider" ).on( "slidechange", 1, function( event, ui) { if(jQuery( "#waterproofingSlider" ).slider( "option", "value" ) == 50 ) { jQuery( "#waterproofingSlider .ui-slider-handle" ).css( "margin-left", "-0.6em" ); } else if(jQuery( "#waterproofingSlider" ).slider( "option", "value" ) < 50) { jQuery( "#waterproofingSlider .ui-slider-handle" ).css( "margin-left", "0em" ); } else if(jQuery( "#waterproofingSlider" ).slider( "option", "value" ) > 50) { jQuery( "#waterproofingSlider .ui-slider-handle" ).css( "margin-left", "-1.6em" ); } if(findYourJacketButtonClicked == 1) { jQuery( '.findYourJacket' ).trigger( "click", 0 ); //clickFindMyJacket(); } updateWaterproofingSliderBottomText(); }); jQuery( "#breathabilitySlider" ).slider( "enable" ); if(waterJacketLevelValuesArray[waterJacketLevelValues[1]] == 50) { jQuery( "#breathabilitySlider .ui-slider-handle" ).css( "margin-left", "-0.6em" ); } else if(waterJacketLevelValuesArray[waterJacketLevelValues[1]] < 50) { jQuery( "#breathabilitySlider .ui-slider-handle" ).css( "margin-left", "0em" ); } else if(waterJacketLevelValuesArray[waterJacketLevelValues[1]] > 50) { jQuery( "#breathabilitySlider .ui-slider-handle" ).css( "margin-left", "-1.6em" ); } jQuery( "#breathabilitySlider" ).slider( "option", "value", waterJacketLevelValuesArray[waterJacketLevelValues[1]] ); updateBreathabilitySliderBottomText(); jQuery( "#breathabilitySlider" ).on( "slidechange", function( event, ui ) { if(jQuery( "#breathabilitySlider" ).slider( "option", "value" ) == 50 ) { jQuery( "#breathabilitySlider .ui-slider-handle" ).css( "margin-left", "-0.6em" ); } else if(jQuery( "#breathabilitySlider" ).slider( "option", "value" ) < 50) { jQuery( "#breathabilitySlider .ui-slider-handle" ).css( "margin-left", "0em" ); } else if(jQuery( "#breathabilitySlider" ).slider( "option", "value" ) > 50) { jQuery( "#breathabilitySlider .ui-slider-handle" ).css( "margin-left", "-1.6em" ); } if(findYourJacketButtonClicked == 1) { jQuery( '.findYourJacket' ).trigger( "click", 0 ); //clickFindMyJacket(); } updateBreathabilitySliderBottomText(); }); jQuery( "#weightSlider" ).slider( "enable" ); if(waterJacketLevelValuesArray[waterJacketLevelValues[2]] == 50) { jQuery( "#weightSlider .ui-slider-handle" ).css( "margin-left", "-0.6em" ); } else if(waterJacketLevelValuesArray[waterJacketLevelValues[2]] < 50) { jQuery( "#weightSlider .ui-slider-handle" ).css( "margin-left", "0em" ); } else if(waterJacketLevelValuesArray[waterJacketLevelValues[2]] > 50) { jQuery( "#weightSlider .ui-slider-handle" ).css( "margin-left", "-1.6em" ); } jQuery( "#weightSlider" ).slider( "option", "value", waterJacketLevelValuesArray[waterJacketLevelValues[2]] ); updateWeightSliderBottomText(); jQuery( "#weightSlider" ).on( "slidechange", function( event, ui ) { if(jQuery( "#weightSlider" ).slider( "option", "value" ) == 50 ) { jQuery( "#weightSlider .ui-slider-handle" ).css( "margin-left", "-0.6em" ); } else if(jQuery( "#weightSlider" ).slider( "option", "value" ) < 50) { jQuery( "#weightSlider .ui-slider-handle" ).css( "margin-left", "0em" ); } else if(jQuery( "#weightSlider" ).slider( "option", "value" ) > 50) { jQuery( "#weightSlider .ui-slider-handle" ).css( "margin-left", "-1.6em" ); } if(findYourJacketButtonClicked == 1) { jQuery( '.findYourJacket' ).trigger( "click" , 0); //clickFindMyJacket(); } updateWeightSliderBottomText(); }); jQuery('.resetFilter').click(function() { window.scrollTo(0,0); jQuery('.activityBlockTwoActivated .mountWalking, .activityBlockTwoActivated .snowSports, .activityBlockTwoActivated .climbing, .activityBlockTwoActivated .running, .activityBlockTwoActivated .biking, .activityBlockTwoActivated .trekking, .activityBlockTwoActivated .dogWalking, .activityBlockTwoActivated .Travel').unbind( "click"); findYourJacketButtonClicked = 0; jQuery( "#waterproofingSlider" ).slider( "option", "value", 0); jQuery( "#waterproofingSlider" ).slider( "disable" ); jQuery( "#breathabilitySlider" ).slider( "option", "value", 0); jQuery( "#breathabilitySlider" ).slider( "disable" ); jQuery( "#weightSlider" ).slider( "option", "value", 0); jQuery( "#weightSlider" ).slider( "disable" ); jQuery('.findYourJacket').unbind( "click"); resetAdventures(); resetWaterProofJacketFinder(); }); }); } function updateWaterproofingSliderBottomText() { if(jQuery( "#waterproofingSlider" ).slider( "option", "value" ) == 0) { jQuery( "#waterproofingLevels .sliderLevels" ).css("color", ""); jQuery( "#waterproofingLevels .low" ).css("color", "#333"); jQuery( "#waterproofingActivityTitleLow" ).css("display", "block"); jQuery( "#waterproofingActivityDescLow" ).css("display", "block"); jQuery( "#waterproofingActivityTitleMedium" ).css("display", "none"); jQuery( "#waterproofingActivityDescMedium" ).css("display", "none"); jQuery( "#waterproofingActivityTitleHigh" ).css("display", "none"); jQuery( "#waterproofingActivityDescHigh" ).css("display", "none"); } if(jQuery( "#waterproofingSlider" ).slider( "option", "value" ) == 50) { jQuery( "#waterproofingLevels .sliderLevels" ).css("color", ""); jQuery( "#waterproofingLevels .medium" ).css("color", "#333"); jQuery( "#waterproofingActivityTitleLow" ).css("display", "none"); jQuery( "#waterproofingActivityDescLow" ).css("display", "none"); jQuery( "#waterproofingActivityTitleMedium" ).css("display", "block"); jQuery( "#waterproofingActivityDescMedium" ).css("display", "block"); jQuery( "#waterproofingActivityTitleHigh" ).css("display", "none"); jQuery( "#waterproofingActivityDescHigh" ).css("display", "none"); } if(jQuery( "#waterproofingSlider" ).slider( "option", "value" ) == 100) { jQuery( "#waterproofingLevels .sliderLevels" ).css("color", ""); jQuery( "#waterproofingLevels .high" ).css("color", "#333"); jQuery( "#waterproofingActivityTitleLow" ).css("display", "none"); jQuery( "#waterproofingActivityDescLow" ).css("display", "none"); jQuery( "#waterproofingActivityTitleMedium" ).css("display", "none"); jQuery( "#waterproofingActivityDescMedium" ).css("display", "none"); jQuery( "#waterproofingActivityTitleHigh" ).css("display", "block"); jQuery( "#waterproofingActivityDescHigh" ).css("display", "block"); } } function updateBreathabilitySliderBottomText() { if(jQuery( "#breathabilitySlider" ).slider( "option", "value" ) == 0) { jQuery( "#breathabilityLevels .sliderLevels" ).css("color", ""); jQuery( "#breathabilityLevels .low" ).css("color", "#333"); jQuery( "#breathabilityActivityTitleLow" ).css("display", "block"); jQuery( "#breathabilityActivityDescLow" ).css("display", "block"); jQuery( "#breathabilityActivityTitleMedium" ).css("display", "none"); jQuery( "#breathabilityActivityDescMedium" ).css("display", "none"); jQuery( "#breathabilityActivityTitleHigh" ).css("display", "none"); jQuery( "#breathabilityActivityDescHigh" ).css("display", "none"); } if(jQuery( "#breathabilitySlider" ).slider( "option", "value" ) == 50) { jQuery( "#breathabilityLevels .sliderLevels" ).css("color", ""); jQuery( "#breathabilityLevels .medium" ).css("color", "#333"); jQuery( "#breathabilityActivityTitleLow" ).css("display", "none"); jQuery( "#breathabilityActivityDescLow" ).css("display", "none"); jQuery( "#breathabilityActivityTitleMedium" ).css("display", "block"); jQuery( "#breathabilityActivityDescMedium" ).css("display", "block"); jQuery( "#breathabilityActivityTitleHigh" ).css("display", "none"); jQuery( "#breathabilityActivityDescHigh" ).css("display", "none"); } if(jQuery( "#breathabilitySlider" ).slider( "option", "value" ) == 100) { jQuery( "#breathabilityLevels .sliderLevels" ).css("color", ""); jQuery( "#breathabilityLevels .high" ).css("color", "#333"); jQuery( "#breathabilityActivityTitleLow" ).css("display", "none"); jQuery( "#breathabilityActivityDescLow" ).css("display", "none"); jQuery( "#breathabilityActivityTitleMedium" ).css("display", "none"); jQuery( "#breathabilityActivityDescMedium" ).css("display", "none"); jQuery( "#breathabilityActivityTitleHigh" ).css("display", "block"); jQuery( "#breathabilityActivityDescHigh" ).css("display", "block"); } } function updateWeightSliderBottomText() { if(jQuery( "#weightSlider" ).slider( "option", "value" ) == 0) { jQuery( "#weightLevels .sliderLevels" ).css("color", ""); jQuery( "#weightLevels .low" ).css("color", "#333"); jQuery( "#weightActivityTitleLow" ).css("display", "block"); jQuery( "#weightActivityDescLow" ).css("display", "block"); jQuery( "#weightActivityTitleMedium" ).css("display", "none"); jQuery( "#weightActivityDescMedium" ).css("display", "none"); jQuery( "#weightActivityTitleHigh" ).css("display", "none"); jQuery( "#weightActivityDescHigh" ).css("display", "none"); } if(jQuery( "#weightSlider" ).slider( "option", "value" ) == 50) { jQuery( "#weightLevels .sliderLevels" ).css("color", ""); jQuery( "#weightLevels .medium" ).css("color", "#333"); jQuery( "#weightActivityTitleLow" ).css("display", "none"); jQuery( "#weightActivityDescLow" ).css("display", "none"); jQuery( "#weightActivityTitleMedium" ).css("display", "block"); jQuery( "#weightActivityDescMedium" ).css("display", "block"); jQuery( "#weightActivityTitleHigh" ).css("display", "none"); jQuery( "#weightActivityDescHigh" ).css("display", "none"); } if(jQuery( "#weightSlider" ).slider( "option", "value" ) == 100) { jQuery( "#weightLevels .sliderLevels" ).css("color", ""); jQuery( "#weightLevels .high" ).css("color", "#333"); jQuery( "#weightActivityTitleLow" ).css("display", "none"); jQuery( "#weightActivityDescLow" ).css("display", "none"); jQuery( "#weightActivityTitleMedium" ).css("display", "none"); jQuery( "#weightActivityDescMedium" ).css("display", "none"); jQuery( "#weightActivityTitleHigh" ).css("display", "block"); jQuery( "#weightActivityDescHigh" ).css("display", "block"); } // set the hight of the div to the hightest height. var maxHeight = 0; $(".activityDesc").each(function(){ if ($(this).height() > maxHeight) { maxHeight = $(this).height(); } }); $(".activityDesc").height(maxHeight); } function changeText(activity){ if(activity!=null){ jQuery("#stepThreeTitle").html(waterJacketData[activity + "_descriptionTextArray"][0].replace("~~~", '
    ')); jQuery("#waterproofingText").text(waterJacketData[activity + "_descriptionTextArray"][1].replace("~singlequote~", "'")); jQuery("#breathabilityText").text(waterJacketData[activity + "_descriptionTextArray"][2].replace("~singlequote~", "'")); jQuery("#weightText").text(waterJacketData[activity + "_descriptionTextArray"][3].replace("~singlequote~", "'")); } } }); /* js code for jacket finder page ends*/