$(document).ready(function() {
	if (!($.browser.msie && $.browser.version == '6.0'))
	{
		showing = $('#block-node_rotate-0 li.node-rotate-item:first').show(); // Initiate the 'showing' variable as the first rotating_item
		//showing.siblings('li').hide(); // Hide all other rotating_items
		setInterval("show_next_rotating_item(showing)", 15000); // Set the rotate time to 15 seconds
	}
});
// Below is the code that picks an item at random to display
$.jQueryRandom = 0;
$.extend(jQuery.expr[":"],
{
	random: function(a, i, m, r) {
		if (i == 0) {
			$.jQueryRandom = Math.floor(Math.random() * r.length);
		};
		return i == $.jQueryRandom;
	}
});
// The below function repeatedly gets called, to do the rotating
function show_next_rotating_item(t){
	$(t).fadeOut('slow');
	var next_rotating_item = $(t).siblings('li.node-rotate-item:random');
	if(!next_rotating_item.attr('class')){
		next_rotating_item = $('#block-node_rotate-0 li.node-rotate-item:first');
	}
	next_rotating_item.fadeIn('slow', function () {this.style.filter = 'alpha(opacity=70)';});
	showing = next_rotating_item;
}