var slideJC=new Class({Implements:[Options,Events],getOptions:function(){return{box:false,duration:400,showItems:1,showSlide:5,classItems:"item",autoComplete:true,infinite:true}},initialize:function(a){this.setOptions(this.getOptions(),a);if(!this.options.box){return false}if($$("."+this.options.classItems).length<=0){return false}this.items=this.options.box.getElements("."+this.options.classItems);this.itemSize=this.options.box.getElement("."+this.options.classItems).getSize().x;if(this.options.autoComplete){var c=this.items.length%this.options.showItems;if(c>0){var e=this.options.showItems-c;for(var b=0;b<e;b++){var d=this.items[b].clone();this.items.include(d);d.inject(this.options.box)}}}if(this.options.infinite){this.items.each(function(f){var g=f.clone();this.items.include(g);g.inject(this.options.box)}.bind(this))}this.options.box.setStyle("width",(this.itemSize*this.items.length)+"px");this.itemsShowSize=this.options.showItems*this.itemSize;this.total=(this.items.length/this.options.showItems).round(0);this.current=0;this.fx=new Fx.Tween(this.options.box,{property:"left",duration:this.options.duration,wait:false})},previous:function(a){if(this.options.infinite){if(this.current>0){this.walk(this.current-1)}else{this.current=(this.total/2);this.options.box.setStyle("left",(this.itemsShowSize*-this.current)+"px");this.walk(this.current-1)}}else{this.walk(((this.current>0)?this.current-1:this.total-1))}},next:function(){if(this.options.infinite){if(this.current<(this.total-1)){this.walk(this.current+1)}else{this.current=(this.total/2)-1;this.options.box.setStyle("left",(this.itemsShowSize*-this.current)+"px");this.walk(this.current+1)}}else{this.walk(((this.current<(this.total-1))?(this.current+1):0))}},walk:function(a){this.current=a;if(this.fx){this.fx.cancel()}this.fx.start(this.itemsShowSize*-this.current)}});