var MoeCarousel = new Class({

	Implements: [Options,Chain],

	options: {
		direction:		1,
		el_ul:			null,
		pausetime:		5000
	},

	tween:		null,

	initialize: function(options) {
		this.setOptions(options);
		this.tween	= new Fx.Tween($(this.options.el_ul));
		this.repeater.delay(this.options.pausetime+3000, this);
	},

	repeater: function() {
		this.tween.start('opacity', 1, 0);
		this.moveItem.delay(1000, this);
	},

	moveItem: function() {
		if (this.options.direction == 1) {
			$(this.options.el_ul).getLast().injectBefore($(this.options.el_ul).getFirst());
		} else if (this.options.direction == -1) {
			$(this.options.el_ul).getFirst().injectAfter($(this.options.el_ul).getLast());
		}
		this.tween.start('opacity', 0, 1);
		this.repeater.delay(this.options.pausetime+3000, this);
	}

});

