(function(){
	var vbulletin;
	Event.observe(window, 'load', function(){
		vbulletin = new VBulletin();
	});
	var VBulletin = function() {
		return new VBulletin.fn.init();
	};
	VBulletin.fn = {
		init: function() {
			this.next();
		},
		next: function() {
			$$('.vbulletin ol').each(function(e) {
				new Effect.Morph(e, {
					style:'margin-left: -600px;', 
					sync:false,
					delay: 10.0,
					duration: 2.0,
					afterFinish: function(){
						var titleList = $$('.vbulletin li');
                        var firstTitle = titleList[0];
                        titleList[0].remove();
                        e.setStyle({margin:'0px'});
                        new Insertion.Bottom(e, firstTitle);
						vbulletin.next();
					}.bind(this)
			     });
			});
		}
	};
	VBulletin.fn.init.prototype = VBulletin.fn;
})();
