tx_croot = function(itemsArr, interval, speed) {
	this.INTERVAL = interval ? interval : 10000;
	this.SPEED = speed ? speed : 50;
	
	if (!typeof itemsArr == 'object') {
		//console.log('tx_croot: itemsArr isnt object!');
		return;
	}
	
	this.items = new Array();
	for (var i in itemsArr) {
		if (typeof itemsArr[i] !== 'string') continue;
		
		this.items.push( itemsArr[i] );
		if (i > 0) {
			YAHOO.util.Dom.setStyle(itemsArr[i], 'opacity', 0);
		}
	}
	
	if (this.items.length <= 1) {
		//console.log('tx_croot: items must contain two or more elements!');
		return;
	}
	
	this.current = 0;

	var crot = this;
	this._intervalID = setInterval(function(){crot.animate()}, this.INTERVAL);
}

tx_croot.prototype = {
	animate:function() {
		var anim1 = new YAHOO.util.Anim(
			this.items[this.current],
			{ opacity: {from:.999, to:0} },
			this.SPEED,
			YAHOO.util.Easing.easeOut
		);
		anim1.useSeconds = false;
		anim1.animate();
		
		var anim2 = new YAHOO.util.Anim(
			this.items[this._getNextID()],
			{ opacity: {from:0, to:.999} },
			this.SPEED,
			YAHOO.util.Easing.easeOut
		);
		anim2.useSeconds = false;
		anim2.animate();
		
		this.current = this._getNextID();
	},
	_getNextID:function() {
		var nextID = this.current + 1;
		if (nextID >= this.items.length) {
			nextID = 0;
		}
		return nextID;
	}
}