function isRetinaDevice(e){if(e.devicePixelRatio>1)return!0;if(e.matchMedia){var t=["only screen and (-webkit-min-device-pixel-ratio: 2)","only screen and (min-resolution: 2dppx)","only screen and (min-resolution: 192dpi)"].join(",");return e.matchMedia(t).matches}return!1}$(function(){function e(){$("#gn-menu-state").prop("checked")?$(".gn-list").addClass("click-closed"):$(".gn-list").removeClass("click-closed")}function t(){$("#gn-menu-state").prop("checked")||$("#sub-menu-state").prop("checked")||$("#sub-menu-location-state").prop("checked")&&!$("html").hasClass("no-scroll")?$("html").addClass("no-scroll"):$("html").removeClass("no-scroll")}function o(e){$("body").hasClass("responsive")||(e<0?e=0:e,$(".global-nav").css({position:"absolute",top:e}))}function n(){var e=$(".lc-bottom-arrow"),t=$(".gf-location-flag"),o=$(".location-changer").width(),n=$(".gf-baseline").width(),i=t.position();if(i&&$(window).width()>999){var a=i.left-(n-o)/2+5;e.css("left",Math.round(a))}}function i(e,t,o,n){if(t.length<2)return'
'+e+"
";var i=window.jsTranslation||{ImageXOfY:"Image {0} of {1}",Previous:"Previous",Next:"Next"},a=i.ImageXOfY.replace("{0}",""+(o+1)+"").replace("{1}",""+t.length+"");return['
',e," ","",a,"   ",'< ',i.Previous,""," | ",'',i.Next," >","","
"].join("")}if($("#gn-menu-state").on("click",function(){$("#sub-menu-state").is(":checked")&&$("#sub-menu-state").prop("checked",!1),t()}),$(window).resize(function(){$(window).width()>999&&($("#gn-menu-state").prop("checked",!1),$("#sub-menu-state").prop("checked",!1),$(".gn-list").removeClass("click-closed"),$(".sub-menu-location-state").prop("checked")&&$(".sub-menu-location-state").prop("checked",!1),t()),$(window).width()<=999&&($(".subnav-location-changer").hide(),t())}),$(".gn-burger").on("click",function(){e()}),$(".sub-content").on("click",function(){t()}),$(".gn-overlay, .sub-overlay").on("click",function(){e(),$("#gn-menu-state").prop("checked",!1),$("#sub-menu-state").prop("checked",!1),$("#sub-menu-location-state").prop("checked",!1),t()}),$("html").on("touchmove","no-scroll",function(e){e.preventDefault()}),$("footer.small .gf-links h1").click(function(e){$(this).parent().toggleClass("open")}),$(".sub-menu-location-dropdown").click(function(){var e=!1,o=!1;return $(".countries-state").prop("checked")&&($(".countries-state").prop("checked",!1),e=!0),$(".sub-menu-state").prop("checked")&&($(".sub-menu-state").prop("checked",!1),o=!0),o?setTimeout(function(){$(".sub-menu-location-state").prop("checked",function(e,t){return otherWasOpen=!1,!t})},300):e?(setTimeout(function(){$(".sub-menu-location-state").prop("checked",function(t,o){return e=!1,!o})},300),setTimeout(function(){t()},300)):($(".sub-menu-location-state").prop("checked",function(e,t){return!t}),setTimeout(function(){t()},300)),!1}),$(".image-sizer").css({height:"auto"}),window.screen.availWidth<1e3){if(!$("body").hasClass("responsive")){var a=$(window).scrollTop();o(a)}$(window).on("touchstart",function(e){var t=setInterval(function(){a>=window.pageYOffset+5&&(clearInterval(t),o(0)),a=window.pageYOffset},33)}),$(window).on("touchmove",function(e){a>=window.pageYOffset+10&&o(0)}),$(window).on("touchend",function(e){var t=0,n=setInterval(function(){a==window.pageYOffset?t++:(t=0,o(0)),3==t&&(clearInterval(n),o(a)),a=window.pageYOffset},150)}),$(window).on("gestureend",function(e){o(a)})}if($(".sub-menu-location-dropdown").click(function(){return $(".location-changer").is(":visible")&&$(".location-changer").toggle("blind",{direction:"down"},250),$(".subnav-location-changer").toggle("blind",{direction:"up"},250),!1}),$(".gf-location-changer-link").click(function(){return $(".subnav-location-changer").is(":visible")&&$(".subnav-location-changer").toggle("blind",{direction:"up"},250),$(".location-changer").toggle("blind",{direction:"down"},250),!1}),$(".sf-location-changer-link").click(function(){return $(".location-changer-new").addClass("location-changer-active"),$(".blackout").addClass("blackout-active"),!1}),$(".location-changer-close").click(function(){$(".location-changer-new").removeClass("location-changer-active"),$(".blackout").removeClass("blackout-active")}),$(".sub-dropdown").click(function(){var e=!1;return $(".sub-menu-location-state").prop("checked")&&($(".sub-menu-location-state").prop("checked",!1),e=!0),e?(setTimeout(function(){$(".sub-menu-state").prop("checked",function(t,o){return e=!1,!o})},300),setTimeout(function(){t()},300)):($(".sub-menu-state").prop("checked",function(e,t){return!t}),setTimeout(function(){t()},300)),!1}),$("footer.small .gf-location").click(function(e){$(".countries-state").prop("checked",!$(".countries-state").is(":checked")),$(".sub-menu-location-state").prop("checked")&&($(".sub-menu-location-state").prop("checked",!1),t())}),setTimeout(n,2e3),$(window).resize(function(){n()}),$().fancybox){var c=$("a.lightbox");if(null!=c&&c.length){var r=!!isRetinaDevice&&isRetinaDevice(window),s=/(\.(?:jpg|gif|png|bmp|jpeg)(.*)?)$/i;c.each(function(e,t){var o=$(t),n=r&&!o.hasClass("one-x");if(n){var a=o.attr("href");s.test(a)&&o.attr("href",a.replace(s,"@2x$1"))}o.fancybox({isRetina:n,padding:30,margin:20,overlayColor:"#FFF",hideOnContentClick:!1,showNavArrows:!1,showCloseButton:!0,cyclic:!0,titlePosition:"inside",titleFormat:i})})}}window.__bmdSetFooterHeight=function(){$("#global-footer").css("height","auto");var e=$(window).height(),t=$("body").height(),o=e-t;if(o<=0)return!1;var n=$("#global-footer").height()+o;return $("#global-footer").height(n),!0};var l=null,u=!1;window.__bmdDetermineFooterHeight=function(){null==l&&(l=setTimeout(function(){var e=window.__bmdSetFooterHeight();e?u||(u=!0,$("body").on("DOMSubtreeModified",window.__bmdDetermineFooterHeight)):u&&(u=!1,$("body").off("DOMSubtreeModified",window.__bmdDetermineFooterHeight))},500))},$(window).height()>$("body").height()&&(window.__bmdSetFooterHeight(),window.__bmdDetermineFooterHeight()),$(".product-grid-row").each(function(){var e=$(this).children(".product-grid-item").length;if(e>1){var t=0;$(this).children(".product-grid-item").each(function(){$(this).height()>t&&(t=$(this).height())}),$(this).children(".product-grid-item").each(function(){if($(this).height()0){d=$('
');var p=$('
');$("body").append(d).append(p);var m=function(e){$("html").css("overflow","hidden");var t,o="undefined"!=typeof $(e).attr("data-videoresponsive"),n=$(e).attr("rel"),i=$(e).attr("player")||"vimeo";if(o){var a=$('');switch($(".video-container").append(a),i){case"vimeo":t=[''].join("");break;case"youku":t=[''].join("");break;case"youtube":t=[''].join("")}}else{var c=$(e).data("width")||960,r=$(e).data("height")||540,s=c/2*-1,l=r/2*-1;switch(p.css({width:c,height:r,marginLeft:s,marginTop:l}),i){case"vimeo":t=[''].join("");break;case"youku":t=[''].join("");break;case"youtube":t=[''].join("")}}d.bind("mousewheel",function(e){e.preventDefault()}),$(".blackout").fadeIn(function(){p.fadeIn(function(){p.bind("mousewheel",function(e){e.preventDefault()}),p.append(['
',t,"
"].join("")),f=!0,o?$(".video-content").css({"box-shadow":"0 0 15px rgba(0,0,0,0.3)"}):p.css({"box-shadow":"0 0 15px rgba(0,0,0,0.3)"})})}),$(".blackout a, .blackout, .close-video").click(function(e){return $("html").css("overflow",""),!!f&&(f=!1,p.fadeOut(function(){d.fadeOut();var e=document.location.hash;e&&e.match(/play-(.*)/)&&(document.location.hash=""),p.empty(),p.unbind("mousewheel"),d.unbind("mousewheel")}),e.preventDefault(),void 0)})};h.click(function(e){e.preventDefault(),f||m($(this))});var b=function(){var e=document.location.hash;if(e){var t=e.match(/play-(.*)/);if(t){var o=t[1],n=$("#"+o+" .watch-video");n.length&&m(n)}}};b()}});