ColourRotator = new Class({
	Implements: [Options],
	
	options: {
		duration: 700,
		colours: ['#ffffff','#000000']
	},
	
	initialize: function(options) {
		this.setOptions(options);
		this.fx = new Fx.Tween(document.body, {duration: this.options.duration, onComplete: this.next.bind(this)});
		
		this.at = 0;
		this.fx.set('background-color',this.options.colours[0]);
		this.next();
	},
	
	next: function() {
		this.at++;
		if (this.at >= this.options.colours.length) this.at = 0;
		this.fx.start('background-color',this.options.colours[this.at]);
	}
	
});