			var Carousel = new Class({
				Implements: Options,

				options: {
					speed: 3500,
					delay: 1000,
					direction: 'horizontal',
					auto: 0,
					num_els: 3,
					move: ['prev', 'next'],
					transition: Fx.Transitions.linear
				},

				initialize: function(el, options){
					this.setOptions(options);
					this.el = $(el);
					this.basic_pos = {left:this.el.offsetLeft};
					this.items = this.el.getElements('li');

					this.setPos();
					this.setFx();

					this.current = 0;
					if(this.options.auto){
						this.el.addEvents({
							'mouseover': function(){ this.fx.pause() }.bind(this),
							'mouseout': function(){ this.fx.resume() }.bind(this)
						});
						this.move();
					}else{
						$(this.options.move[0]).addEvent('click', function(){ this.move(1); }.bind(this));
						$(this.options.move[1]).addEvent('click', function(){ this.move(-1); }.bind(this));
					}
				},

				setPos: function(){
					var w = 0, h = 0;
					if(this.options.direction.toLowerCase()=='horizontal') {
						h = this.el.getSize().y;
						this.items.each(function(li,index) {
							w += li.getSize().x;
						});
					}
					this.el.setStyles({width:2000, height:h});
				},

				setFx: function(){
					this.fx = new Fx.Morph(this.el, {
						"duration": this.options.speed,
						"onComplete": function(){
							if(this.options.auto){
								var i = (this.current==0) ? this.items.length : this.current;
								this.items[i-1].injectInside(this.el);
								this.el.setStyles({left:0, top:0});
								this.move.delay(this.options.delay, this);
							}
						}.bind(this),
						"transition": this.options.transition
					});
				},

				checkPos: function(){
					if(this.options.auto) return true;
					if(this.current<0 || this.items.length<=this.options.num_els){ this.current=0; return false; }
					if((this.current+this.options.num_els) > this.items.length){ this.current=this.items.length-this.options.num_els; return false; }
					return true;
				},
				
				move: function(todo) {
					if(!$defined(todo)) todo=-1;
					this.current -= todo*(!this.options.auto ? this.options.num_els : 1);
					this.checkPos();
					if (this.current >= this.items.length) this.current = 0;
					else if(this.current<0) this.current = this.items.length-1;
					var pos = this.items[this.current];
					this.fx.start({left:(this.basic_pos.left-pos.offsetLeft)});
				}
			});
