(function(a){a.fn.k3dCarousel=function(b){
return this.each(function(){var c=0,d,e,f,g,h,i=[],j=0,k=this.offsetWidth,l=a(this)
.css("position","relative")
.find("img")
.css({position:"absolute",opacity:0,display:"block"})
,m={r:k*0.3,cX:k/2,cY:this.offsetHeight/2,sT:1e3,wT:2e3};
b&&a.extend(m,b),l.each(function(b,c){c.oW=c.offsetWidth,c.oH=c.offsetHeight,a(c)
.css({left:m.cX-c.oH/2,top:0})}),g=l.length,h=Math.PI/(g/2);
for(;c<g;++c)d=Math.sin(h*c),i.push({l:m.cX+Math.cos(h*c)*m.r,z:parseInt(50*d+50),t:d*10+10,o:0.45*d+0.55,m:0.4*d+0.6}),l[c]=a(l[c]);
function n(){for(c=0;c<g;++c)e=i[c],f=e.m*l[c][0].oW,l[(c+j)%g].animate({left:e.l-f/2,opacity:e.o,top:e.t,width:f,height:e.m*l[c][0].oH},m.sT)
.css("z-index",e.z);j++,setTimeout(n,m.wT+m.sT)}n()})}})(jQuery)

