$(document).ready(function(){$("div#categoryFeatureHolder").categoryHome()});(function(c){c.fn.categoryHome=function(e){var f=c.extend({},c.fn.categoryHome.defaults,e);b(c(this));a(c(this));d()};c.fn.categoryHome.defaults={maxCategories:10};function b(e){var f=true;c("ul#categoryList li.hide").each(function(g){c(this).removeClass("hide")});c("ul#categoryList li").each(function(j){var h=c(this).children("div.categoryItem");var g=h.find("div.textBox").height();var i=c(this).children("div.categoryItem").children("div.itemOverlay").children("div.textBox");h.hover(function(l){if(!c(this).find("div.textBox").hasClass("open")){var m=e.find("div.open");m.stop().animate({height:"0px"});m.removeClass("open");var k=c(this).find("div.textBox");k.stop().animate({height:g});k.addClass("open")}},function(k){});if(f){f=false;i.addClass("open")}else{i.css("height","0px")}})}function a(e){var g=4;var k=c("ul#categoryList li").size();var f='<div id="slider"><div id="handle" class="ui-slider-handle"></div></div>';var h='<span id="left"></span><span id="center"></span><span id="right"></span>';var l,n;var j="";if(c("body.libertyoflondon").length>0){j="_LOL"}l='<div id="slideLeft"><img src="/pws/images/arrow-left'+j+'.gif" width="7" height="11" /></div>';n='<div id="slideRight"><img src="/pws/images/arrow-right'+j+'.gif" width="7" height="11" /></div>';e.wrap('<div id="adCont"></div>');c("div#adCont").append('<div id="sliderCont"></div>');c("div#sliderCont").append(f);c("div#handle").append(h);if(k>g){var m=c("ul#categoryList li:first").width();var i=(m*(k-g));c("ul#categoryList").css("width",(m*k)+"px");c("#slider").slider({startValue:0,min:0,max:i,step:m,slide:function(p,o){c("ul#categoryList").stop().animate({left:"-"+o.value+"px"})},change:function(p,o){c("ul#categoryList").stop().animate({left:"-"+o.value+"px"})}});c("div#slideLeft img").click(function(o){var p=c("#slider").slider("value",0);if(p<=180){c("#slider").slider("moveTo",p-m+1,0)}else{c("#slider").slider("moveTo",p-m,0)}});c("div#slideRight img").click(function(o){var p=c("#slider").slider("value",0);c("#slider").slider("moveTo",p+m,0)})}}function d(){c("div#slideLeft img").hover(function(f){if(c("body.libertyoflondon").length>0){c("div#slideLeft").css("backgroundColor","#333")}else{c("div#slideLeft").css("backgroundColor","#E7DEE7")}},function(f){if(c("body.libertyoflondon").length>0){c("div#slideLeft").css("backgroundColor","#666")}else{c("div#slideLeft").css("backgroundColor","#9F8DA1")}});c("div#slideRight img").hover(function(f){if(c("body.libertyoflondon").length>0){c("div#slideRight").css("backgroundColor","#333")}else{c("div#slideRight").css("backgroundColor","#E7DEE7")}},function(f){if(c("body.libertyoflondon").length>0){c("div#slideRight").css("backgroundColor","#666")}else{c("div#slideRight").css("backgroundColor","#9F8DA1")}});var e="";if(c("body.libertyoflondon").length>0){e="_LOL"}if(!c.browser.msie){c("div#handle").hover(function(f){c(this).find("span#left").css("backgroundImage","url('/pws/images/img_bgScrollbarHoverL"+e+".png')");c(this).find("span#center").css("backgroundImage","url('/pws/images/img_bgScrollbarHoverC"+e+".png')");c(this).find("span#right").css("backgroundImage","url('/pws/images/img_bgScrollbarHoverR"+e+".png')")},function(f){c(this).find("span#left").css("backgroundImage","url('/pws/images/background-knob-left"+e+".png')");c(this).find("span#center").css("backgroundImage","url('/pws/images/background-knob"+e+".png')");c(this).find("span#right").css("backgroundImage","url('/pws/images/background-knob-right"+e+".png')")})}else{c("div#handle").hover(function(i){var g="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/pws/images/img_bgScrollbarHoverL"+e+".png')";var f="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/pws/images/img_bgScrollbarHoverC"+e+".png', sizingMethod='scale')";var h="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/pws/images/img_bgScrollbarHoverR"+e+".png')";c(this).find("span#left").css({backgroundImage:"none",filter:g});c(this).find("span#center").css({backgroundImage:"none",filter:f});c(this).find("span#right").css({backgroundImage:"none",filter:h})},function(i){var g="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/pws/images/background-knob-left"+e+".png')";var f="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/pws/images/background-knob"+e+".png', sizingMethod='scale')";var h="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/pws/images/background-knob-right"+e+".png')";c(this).find("span#left").css({backgroundImage:"none",filter:g});c(this).find("span#center").css({backgroundImage:"none",filter:f});c(this).find("span#right").css({backgroundImage:"none",filter:h})})}}})(jQuery);