if(!window.sdg){sdg={};}$sd=jQuery.noConflict();$sd(function(){var b=$sd("#header");
var c=$sd("#productsNav");var h=$sd("#productDetails");var j=$sd("#topNav").height()-7;
var e=$sd("#topNav li");e.find("a").height(j);e.find(".subNav li a").removeAttr("style");
if($sd.browser.mozilla){var a=navigator.userAgent.toLowerCase();var i=new RegExp("mac");
var g=i.test(a);if(g){e.find("a").css("letter-spacing","-0.007em");}}if($sd.browser.msie&&parseInt($sd.browser.version)==6){try{document.execCommand("BackgroundImageCache",false,true);
}catch(d){}}if($sd("#headerContent form input[type=text]").val()=="Search or enter catalogue number"){if(!$sd("#headerContent form input[type=text]").hasClass("empty")){$sd("#headerContent form input[type=text]").addClass("empty");
}}$sd("#headerContent form input[type=text]").focus(function(){if($sd(this).val()=="Search or enter catalogue number"){$sd(this).val("");
$sd(this).toggleClass("empty");}});$sd("#headerContent form input[type=text]").blur(function(){if($sd(this).val()==""){$sd(this).toggleClass("empty");
$sd(this).val("Search or enter catalogue number");}});$sd("#keywordSearchForm").submit(function(){var m=$sd("#keywordSearchForm input[type=text]").val();
var k=/ /gi;var l=m.replace(k,"");if($sd("#keywordSearchForm input[type=text]").val()=="Search or enter catalogue number"||l==""){alert("You must enter a search description, please try again!");
return false;}if($sd("#keywordSearchForm input[type=text]").val().match(/[^-& \w]/)){alert("Your search contains illegal characters");
return false;}});if($sd("#footer form input[type=text]").val()=="Enter e-mail address"){if(!$sd("#footer form input[type=text]").hasClass("empty")){$sd("#footer form input[type=text]").addClass("empty");
}}$sd("#footer form input[type=text]").focus(function(){if($sd(this).val()=="Enter e-mail address"){$sd(this).val("");
$sd(this).toggleClass("empty");}});$sd("#footer form input[type=text]").blur(function(){if($sd(this).val()==""){$sd(this).toggleClass("empty");
$sd(this).val("Enter e-mail address");}});$sd(".actions .close").click(function(){window.close();
});$sd(".logoffLink").live("click",function(){$sd("#headerContent ul #logoffButton").click();
return false;});$sd("#forgetMeLink").click(function(){$sd("#forgetMeButton").click();
return false;});var f;$sd("#topNav > li").hover(function(){var k=$sd(this);f=setTimeout(function(){var l=$sd(k);
l.addClass("hover");l.children(".subNav").each(function(){var n=$sd(this);if(n.children().length==0){menuOptionListRelValue=n.closest("li").find("a").attr("rel").split("-");
menuItemId=menuOptionListRelValue[0];sourcePageId=menuOptionListRelValue[1];$sd.ajax({async:false,type:"GET",url:"/content/menu/mainMenuDropDownMenu.jsp",data:"menuItemId="+menuItemId+"&sourcePageId="+sourcePageId,success:function(p){n.html(p);
sdg.setDropDownWidth(n);}});}var o=(b.width()-(n.width()+l.position().left))+1;if(o<0){n.css("margin-left",o+"px");
}n.css("top",(l.height()+1)+"px");n.show();if($sd.browser.msie){if(c.length){var m=(c.position().top);
c.data("position",{right:c.css("right"),top:c.css("top")});b.append(c);c.css({top:b.outerHeight()+m,right:"6px"});
}b.css("z-index","1");if(parseInt($sd.browser.version)==6){if(n.height()){n.prepend('<iframe src="#none" style="position:absolute; z-index:-1;">&nbsp;</iframe>');
}n.children("iframe").css({display:"block",top:0,height:n.height()+"px",width:(n.width()+1)+"px",margin:"0 0 0 -1px"});
}}});},700);},function(){clearTimeout(f);$sd(this).removeClass("hover");if($sd.browser.msie){if(c.length){h.prepend(c);
c.css(c.data("position"));}b.css("z-index","0");}});});sdg.setDropDownWidth=function(a){var b=0;
a.find("div .col").each(function(c,g){var f=$sd(g);var d=f.width();d=150;f.width(d);
b+=d+24;});a.children("div").width(b);return true;};jQuery.fn.blink=function(b){start=1;
finish=b;var a=function(d,e,c){$sd(d).fadeOut(200).fadeIn(200);if(e!=c){e=e+1;a(d,e,c);
}};return this.each(function(){a(this,start,finish);});};sdg.launchPopup=function(b,d,a,c){window.open(b,null,(c?c:"location=no,scrollbars=yes")+",width="+d+",height="+a+",left="+(screen.width/2-d/2)+",top="+Math.abs((screen.height/2-a/2)-40));
return false;};sdg.limitChars=function(a,b){var d=a.val();var c=d.length;if(c>b){alert("This field cannot exceed "+b+" characters");
a.val(d.substr(0,b));return false;}else{return true;}};sdg.hoverInfo=function(a,b){offset=a.offset();
$sd("body").append(b);b.css({position:"absolute",left:"-9999px",display:"block"});
height=b.outerHeight();b.css({left:offset.left-160,top:offset.top-height});b.mousemove(function(){clearTimeout(hoverInfoTimeout);
hoverInfoTimeout=setTimeout(function(){b.hide();},1500);});hoverInfoTimeout=setTimeout(function(){b.hide();
},5000);};function CountText(c,b,a){if(c.value.length>a){c.value=c.value.substring(0,a);
}else{b.value=a-c.value.length;}}