/* ROTATOR */			

function theRotator() {
	$('div.contacts ul li').css({opacity: 0.0});
	$('div.contacts ul li:first').css({opacity: 1.0});	
	setInterval('rotate()',5000);
}

function rotate() {	
	var current = ($('div.contacts ul li.show')?  $('div.contacts ul li.show') : $('div.contacts ul li:first'));	
    if ( current.length == 0 ) current = $('div.contacts ul li:first');
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div.contacts ul li:first') :current.next()) : $('div.contacts ul li:first'));

	/* Random order start */
	var sibs = current.siblings();
    var rndNum = Math.floor(Math.random() * sibs.length );
    var next = $( sibs[ rndNum ] );
    /* Random order end */

	next.css({opacity: 0.0})
	.addClass('show')
	.animate({opacity: 1.0}, 800);

	current.animate({opacity: 0.0}, 800)
	.removeClass('show');
	
};
