$(document).ready(function(){var d=$("div#sc_slidebox ul li").size();for(i=0;i<d;i++)if(box="div#sc_slidebox ul li:eq("+i+")",id=$(box).attr("id"),id!="sc_slidebox_max"){var e=$("div#sc_slidebox ul li").css("top"),a=$("div#sc_slidebox ul li").css("margin-right"),c=$("div#sc_slidebox ul li").css("width"),h=$("div#sc_slidebox ul li").css("height"),j=$("div#sc_slidebox ul li img").css("width"),f=$("div#sc_slidebox ul li img").css("height"),e=parseInt(e.replace("px","")),a=parseInt(a.replace("px","")),
c=parseInt(c.replace("px","")),h=parseInt(h.replace("px","")),j=parseInt(j.replace("px","")),f=parseInt(f.replace("px",""));break}var g=$("div#sc_slidebox ul").css("left"),g=parseInt(g.replace("px","")),o=$("div#sc_slidebox ul").css("top"),o=parseInt(o.replace("px","")),p=$("li#sc_slidebox_max").css("top"),p=parseInt(p.replace("px","")),q=$("li#sc_slidebox_max").css("left"),q=parseInt(q.replace("px","")),k=$("li#sc_slidebox_max").css("width"),k=parseInt(k.replace("px","")),l=$("li#sc_slidebox_max").css("height"),
l=parseInt(l.replace("px","")),m=$("li#sc_slidebox_max img").css("height"),m=parseInt(m.replace("px","")),n=$("li#sc_slidebox_max img").css("width"),n=parseInt(n.replace("px",""));for(i=0;i<d;i++)box="div#sc_slidebox ul li:eq("+i+")",id=$(box).attr("id"),img="div#sc_slidebox ul li img:eq("+i+")",id=="sc_slidebox_max"?(add_left=parseInt((k-c)/2),pos_left=i*(c+a),pos_left-=add_left,$(box).css({top:0,left:pos_left,width:k,height:l,"z-index":10}),tmp=box+"> p",$(tmp).css({visibility:"inherit"}),$(img).width(n),
$(img).height(m),def=now=i):(pos_left=i*(c+a),$(box).css({top:e,left:pos_left,width:c,height:h,"z-index":0}),$(img).width(j),$(img).height(f));var b=$("div#sc_slidebox").get(0);jQuery.data(b,"ul_left",g);$(b).css({position:"relative"});jQuery.data(b,"now",now);jQuery.data(b,"def",def);jQuery.data(b,"move_x",c+a);jQuery.data(b,"ul_top",o);jQuery.data(b,"m_top",e);jQuery.data(b,"m_right",a);jQuery.data(b,"max_top",p);jQuery.data(b,"max_left",q);jQuery.data(b,"max_width",k);jQuery.data(b,"max_height",
l);jQuery.data(b,"min_width",c);jQuery.data(b,"min_height",h);jQuery.data(b,"add_left",add_left);jQuery.data(b,"add_top",e);jQuery.data(b,"img_max_width",n);jQuery.data(b,"img_max_height",m);jQuery.data(b,"img_min_width",j);jQuery.data(b,"img_min_height",f);jQuery.data(b,"btnflag",0);$("div#sc_slidebox ul li > img").click(function(){var a=$("div#sc_slidebox ul li > img").index(this);b=$("div#sc_slidebox").get(0);now=jQuery.data(b,"now");def=jQuery.data(b,"def");d=-(now-a);sc_sildebox_lr(SC_SLIDEBOX_SPEED,
d)})});
function sc_sildebox_lr(d,e){var a=$("div#sc_slidebox").get(0),c=jQuery.data(a,"now"),h=jQuery.data(a,"btnflag"),j=c+e;if(h==0&&e!=0&&!(j<0)&&!(j>=$("div#sc_slidebox ul li").size())){h=jQuery.data(a,"def");jQuery.data(a,"btnflag",1);ul_left=jQuery.data(a,"ul_left");ul_top=jQuery.data(a,"ul_top");move_x=jQuery.data(a,"move_x");m_right=jQuery.data(a,"m_right");m_top=jQuery.data(a,"m_top");max_top=jQuery.data(a,"max_top");max_left=jQuery.data(a,"max_left");max_width=jQuery.data(a,"max_width");max_height=
jQuery.data(a,"max_height");min_width=jQuery.data(a,"min_width");min_height=jQuery.data(a,"min_height");add_left=jQuery.data(a,"add_left");add_top=jQuery.data(a,"add_top");img_max_width=jQuery.data(a,"img_max_width");img_max_height=jQuery.data(a,"img_max_height");img_min_width=jQuery.data(a,"img_min_width");img_min_height=jQuery.data(a,"img_min_height");move_left=move_x*(c+e)*-1+h*move_x+ul_left;$("div#sc_slidebox ul").animate({left:move_left,top:ul_top},{duration:d});move_left=pos_left=c*(min_width+
m_right);var f="div#sc_slidebox ul li:eq("+c+")";now_p=f+" > p";$(now_p).css({visibility:"hidden"});$(f).css({"z-index":3});$(f).animate({top:add_top,left:move_left,width:min_width,height:min_height},{duration:d,complete:function(){$(f).css({"z-index":0})}});now_img=f+"> img";$(now_img).css({"z-index":3});$(now_img).animate({width:img_min_width,height:img_min_width},{duration:d,complete:function(){$(now_img).css({"z-index":0})}});next=c+e;pos_left=next*(min_width+m_right);move_left=pos_left-add_left;
var g="div#sc_slidebox ul li:eq("+next+")";$(g).css({"z-index":5});$(g).animate({top:max_top,left:move_left,width:max_width,height:max_height},{duration:d,complete:function(){$(g).css({"z-index":10});next_p=g+" > p";$(next_p).css({visibility:"inherit"})}});next_img=g+"> img";$(next_img).css({"z-index":5});$(next_img).animate({width:img_max_width,height:img_max_height},{duration:d,complete:function(){$(next_img).css({"z-index":10});jQuery.data(a,"btnflag",0)}});jQuery.data(a,"now",next)}};
