$(document).ready(function(){function i(){$(".navigation span").find("a").removeClass("selected");$(this).parents("div:first").find("a").removeClass("selected").end().end().addClass("selected")}function j(a){a=$(".pane .navigation").find('a[href$="'+a.id+'"]').get(0);i.call(a)}if($(".other_product").length!=0){var l=Math.round(Math.random()*$(".panel").length),k=0;$(".panel").each(function(){k==l&&$(".scrollContainer").prepend($(this));k++})}if($("#accordion").length!=0){var d=0;$("#accordion").find(".pane").each(function(){var a= $(this).find("span").length,a=Math.ceil(parseInt(a)/5);d=a*120>d?a*120:d});$("#accordion div.pane").css("display","none");$("#accordion").tabs("#accordion div.pane",{tabs:"h2",effect:"slide",initialIndex:1E4});var a=$("#content").height();$("#content").height(parseInt(d)+parseInt(a))}var a=$("#slider .scrollContainer > div"),e=$("#slider .scrollContainer");a.css({"float":"left",position:"relative"});e.css("width",a[0].offsetWidth*a.length);var f=$("#slider .scroll").css("overflow","hidden");$(".other_product").length!= 0?f.before('<img class="scrollButtons left" alt="<" src="../../build/client/images/components/slide/prev.png" />').before('<img class="scrollButtons right" alt=">" src="../../build/client/images/components/slide/next.png" />'):f.before('<img class="scrollButtons left" alt="<" src="../../build/client/images/home/aw-follow2.png" />').before('<img class="scrollButtons right" alt=">" src="../../build/client/images/home/aw-follow.png" />');$(".pane .navigation").find("a").click(i);window.location.hash? j({id:window.location.hash.substr(1)}):$("ul.navigation a:first").click();e=parseInt(e.css("paddingTop")||0)*-1;a={target:f,items:a,navigation:".navigation a",prev:"img.left",next:"img.right",axis:"xy",onAfter:j,offset:e,duration:500,constant:!1,lock:!1,easing:"swing"};$("#slider").serialScroll(a);$.localScroll(a);a.duration=1;$.localScroll.hash(a);var b=0;$(".other_product").length!=0?($(".content_panel").each(function(){$(this).height()>b&&(b=$(this).height())}),$(".content_panel").css("height", b+"px")):($(".panel p").each(function(){$(this).height()>b&&(b=$(this).height())}),b+=140,b>500&&$(".scroll").css("height",b+"px"));var g=$(".other_product").find(".scroll").find(".panel").length-1,c=0,h=!1;$(".other_product").find(".left").click(function(){h||(c=c-1<0?g:(c-1)%(g+1))});$(".other_product").find(".right").click(function(){h||(c=(c+1)%(g+1))});$(".other_product").mouseout(function(){}).mouseover(function(){clearInterval(void 0);h=!1})});
