jQuery(document).ready(function(){	
	top_streamer = jQuery('#interface-header-right div.interface-header-right-item:first'); // Initiate the 'showing' variable as the first rotating_item
	bottom_streamer = jQuery('#interface-footer-left div.interface-footer-left-item:first'); // Initiate the 'showing' variable as the first rotating_item
	
	top_streamer.siblings('div').hide(); // Hide all other rotating_items
	bottom_streamer.siblings('div').hide(); // Hide all other rotating_items
	
	setInterval("show_next_rotating_item(top_streamer)", 8000); // delay
	setInterval("show_next_bottom_rotating_item(bottom_streamer)", 6000); // delay
});
 
// Below is the code that picks an item at random to display
jQuery.jQueryRandom = 0;  
jQuery.extend(jQuery.expr[":"],  
{  
	random: function(a, i, m, r) 
	{  
        if (i == 0) {  
            jQuery.jQueryRandom = Math.floor(Math.random() * r.length);  
        };  
        return i == jQuery.jQueryRandom;  
    }  
}); 
 
function show_next_rotating_item(t)
{
	jQuery(t).fadeOut('slow');
	var next_rotating_item = jQuery(t).siblings('.interface-header-right-item:random');
	
	if(!next_rotating_item.attr('class'))
	{
		next_rotating_item = jQuery('#interface-header-right div.interface-header-right-item:first');
	}
	next_rotating_item.fadeIn(1600);
	top_streamer = next_rotating_item;	
}

function show_next_bottom_rotating_item(t)
{
	jQuery(t).fadeOut('slow');
	var next_rotate_item = jQuery(t).siblings('.interface-footer-left-item:random');
	
	if(!next_rotate_item.attr('class'))
	{
		next_rotate_item = jQuery('#interface-footer-left div.interface-footer-left-item:first');
	}
	next_rotate_item.fadeIn(1600);
	bottom_streamer = next_rotate_item;	
}
