function OldIE(){return $("html").is(".ie6, .ie7, .ie8")?!0:!1}function addClickEvent(n,t){$(n).click(function(){$(n).attr("href",t)})}function iOS(){return navigator.userAgent.indexOf("iPad")!=-1?!0:navigator.userAgent.indexOf("iPod")!=-1?!0:navigator.userAgent.indexOf("iPhone")!=-1?!0:!1}function checkDisplaySize(){viewportWidth=document.compatMode==="BackCompat"?document.body.clientWidth:document.documentElement.clientWidth;viewportWidth<=530?loadMobileMenu():loadDesktopMenu()}function loadDesktopMenu(){$("#shopnav li").unbind("mouseover");$("#shopnav li").unbind("mouseout");$("#shopnav li").unbind("click");$(".menu").unbind("click");$("#container").unbind("click");$(".menu").hide();$("#shopnav").show();$("#shopnav ul").hide();is_touch==!0?($("#container").click(function(n){$(n.target).parent().parent().attr("id")!="shopnav"&&$("#shopnav li").children("ul").hide()}),$("#shopnav li").click(function(n){$("#shopnav li").children("ul").hide();$(n.target).parent().parent().attr("id")=="shopnav"&&lastobj!=n.target&&(event.preventDefault(),$(this).children("ul").show(),lastobj=n.target)})):($("#shopnav li").mouseover(function(){$(this).children("ul").attr("z-index",9999);$(this).children("ul").show()}),$("#shopnav li").mouseout(function(){$(this).children("ul").hide()}))}function loadMobileMenu(){$("#shopnav li").unbind("mouseover");$("#shopnav li").unbind("mouseout");$("#shopnav li").unbind("click");$(".menu").unbind("click");$("#shopnav").hide();$(".menu").show();$(".menu").click(function(){$("#shopnav").slideToggle(300)})}function closeimagebox(){$("#imageboxframe").fadeOut("fast",function(){$("#imageboxframe").remove()})}var is_mobile=!1,is_touch=!1,viewportWidth,lastobj;$(document).ready(function(){if(OldIE())for(var t=document.getElementsByTagName("img"),n=0,i=t.length;n!=i;++n)t[n].src.match(/.*\.svg$/)&&(t[n].src=t[n].src.slice(0,-3)+"png");/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&(is_touch=!0);Modernizr.touch&&(is_touch=!0);checkDisplaySize();$(".imagebox").click(function(){var n='<div id="imageboxframe"><div class="imageboxcontent"><a id="close" href="javascript:closeimagebox();" title="Close">',t,i;return n+='<img src="/ssi/imagebox/close.png" alt="close" /><\/a>',t=$(this).prop("href"),n+='<img src="'+t+'" id="targetimage" alt="close" /><\/div><\/div>',$("body").prepend(n),i=$("#targetimage"),i.load(function(){var n=document.getElementById("targetimage"),t,i;$(".imageboxcontent").css("width",n.clientWidth+"px");$(".imageboxcontent").css("height",n.clientHeight+"px");t=($(window).height()-n.clientHeight)/2+"px";i=($(window).width()-n.clientWidth)/2+"px";$(".imageboxcontent").css("top",t);$(".imageboxcontent").css("left",i);$(".imageboxcontent").css("visibility","visible");$("#imageboxframe").click(function(){closeimagebox()});$(".imageboxcontent").click(function(){closeimagebox()})}),!1})});window.onresize=function(){checkDisplaySize()};