
$.fn.Tween={Linear:{easeIn:function(t,b,c,d){return c*t/d+b;},easeOut:function(t,b,c,d){return c*t/d+b;},easeInOut:function(t,b,c,d){return c*t/d+b;}},Quad:{easeIn:function(t,b,c,d){return c*(t/=d)*t+b;},easeOut:function(t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOut:function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((t)*(t-2)-1)+b;}},Cubic:{easeIn:function(t,b,c,d){return c*(t/=d)*t*t+b;},easeOut:function(t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOut:function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;}},Quart:{easeIn:function(t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOut:function(t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOut:function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;}},Quint:{easeIn:function(t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOut:function(t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOut:function(t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;}},Sine:{easeIn:function(t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOut:function(t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOut:function(t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;}},Expo:{easeIn:function(t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOut:function(t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOut:function(t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*t)+2)+b;}},Circ:{easeIn:function(t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOut:function(t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOut:function(t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;}},Elastic:{easeIn:function(t,b,c,d,a,p){if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOut:function(t,b,c,d,a,p){if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return(a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b);},easeInOut:function(t,b,c,d,a,p){if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;}},Back:{easeIn:function(t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOut:function(t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOut:function(t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;}},Bounce:{easeIn:function(t,b,c,d){return c-$.fn.Tween.Bounce.easeOut(d-t,0,c,d)+b;},easeOut:function(t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOut:function(t,b,c,d){if(t<d/2)return $.fn.Tween.Bounce.easeIn(t*2,0,c,d)*.5+b;else return $.fn.Tween.Bounce.easeOut(t*2-d,0,c,d)*.5+c*.5+b;}}}
var focusimg=[];function focusimgstart(obj)
{var num=obj.data("num");if(obj.attr("src").indexOf("void(0)")>-1||obj.attr("src")=="")
{obj.load(function(){var n=$(this).data("num");if(focusimg[n+1])
{focusimgstart(focusimg[n+1]);}}).attr("src",obj.attr("org"));}
else
{if(focusimg[num+1])
{focusimgstart(focusimg[num+1]);}}}
$.fn.move=function(opts){var me=$.fn.move.prototype;me.opts=$.extend({target:$("#col_focusbig_div"),computefunc:$.fn.Tween.Cubic.easeOut,start:0,distance:300,direction:1,step:1,interval:8},opts||{});me.opts.offset=me.opts.target.scrollTop();me.opts.end=me.opts.step*me.opts.distance-me.opts.offset;me.run=function(){var o=$.fn.move.prototype.opts;var c=$.fn.move.prototype.count;if(c<o.interval)
{if(o.direction==1)
{o.target.scrollTop(Math.ceil(o.computefunc(c,o.offset,o.end,o.interval)));}
if(o.direction==2)
{o.target.css("left",Math.ceil(o.computefunc(c,o.offset,o.end,o.interval))+"px");}}
else
{if(o.direction==1)
{o.target.scrollTop(me.opts.step*me.opts.distance);}
if(o.direction==2)
{o.target.css("left",me.opts.step*me.opts.distance+"px");}
clearInterval($.fn.move.prototype._t);}
$.fn.move.prototype.count++;}
me.count=0;clearInterval(me._t);me._t=setInterval($.fn.move.prototype.run,10);}
function movenext()
{var func=$.fn.Tween["Circ"]["easeInOut"];var n=$("#col_focussmall_div").data("step");$.fn.move({step:n,computefunc:func});var next=(parseInt(n)+1)%3;$("#col_focussmall_div").data("step",next);$("#col_focussmall_div a").removeClass("col_focussmallfocus_a");$("#col_focussmall_div li").removeClass("col_focussmallfocus_li");$("#col_focussmall_div font").removeClass("col_focussmallfocus_img");var me=$("#col_focussmall_div li:eq("+n+")");me.addClass("col_focussmallfocus_li");me.find("a:eq(0)").addClass("col_focussmallfocus_a");me.find("font:eq(0)").addClass("col_focussmallfocus_img");}
$.fn.createReflexion=function(cont,img){var flx=false;var canvas=document.createElement("canvas");if(canvas.getContext){flx=canvas;flx.width=img.width;flx.height=img.height;var context=flx.getContext("2d");context.translate(0,img.height);context.scale(1,-1);context.drawImage(img,0,0,img.width,img.height);context.globalCompositeOperation="destination-out";var gradient=context.createLinearGradient(0,0,0,img.height*2);gradient.addColorStop(1,"rgba(255, 255, 255, 0)");gradient.addColorStop(0,"rgba(255, 255, 255, 1)");context.fillStyle=gradient;context.fillRect(0,0,img.width,img.height*2);}else{flx=document.createElement('img');flx.src=img.src;flx.style.filter='flipv progid:DXImageTransform.Microsoft.Alpha('+'opacity=50, style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy=125)';flx.width=img.width;flx.className="ls_focusimg_img";flx.height=img.height;}
flx.style.position='absolute';flx.style.left='0';flx.style.top=img.height+'px';cont.appendChild(flx);return flx;}
$.fn.picbind=function(){$("#tbl_imgfocuswrap_table img").unbind("mouseover");var flag="";if(jQuery.browser.msie)
{flag=":even";}
$("#tbl_imgfocuswrap_table img"+flag).bind("mouseover",function(){if($(this).attr("clicked")=="true")
{return true;}
$("#tbl_imgfocuswrap_table").data("obj",$(this)).data("_t",setTimeout(function(){var obj=$("#tbl_imgfocuswrap_table").data("obj");$.fn.picfocusmove(obj);},100));});}
$.fn.picfocusstart=function(){$.fn.picfocusstart.prototype.t=setInterval(function(){var i=($.fn.picfocusstart.prototype.position+1)%11;$(".col_scrollbarcontrol_div:eq("+i+")").click();$.fn.picfocusstart.prototype.position=i;},5000);}
$.fn.picfocusmove=function(obj){$.fn.picfocusstop();$.fn.picfocusset(obj.data("count"));if(jQuery.browser.msie)
{$(".col_scrollbarcontrol_div").html('<span class="col_scrollbarcontrol_span" id="col_scrollbarcontrol_span">这是一张图片</span>');$(".col_scrollbarcontrol_div:eq("+obj.data("count")+")").html('');}
$("#blo_imgfocuswrap_div").stop();$("#tbl_imgfocuswrap_table td:last").width(0);$("#tbl_imgfocuswrap_table img[clicked=true]").attr("clicked","false").animate({width:"112px",height:"75px"},800).next().animate({width:"112px",top:"75px"},800);obj.attr("clicked","true");obj.animate({width:"450px",height:"300px"},800).next().animate({width:"450px",top:"300px"},800);var c=250-obj.data("count")*112;$("#blo_imgfocuswrap_div").animate({marginLeft:c+"px"},800,function(){$.fn.picfocusstart();$.fn.picbind();});$("#img_scrollbarbar_img").css("left",82*obj.data("count")+25+"px");}
$.fn.picfocusstart.prototype.position=0;$.fn.picfocusstop=function(){clearInterval($.fn.picfocusstart.prototype.t);}
$.fn.picfocusset=function(i){$.fn.picfocusstart.prototype.position=i;}
