function homePageRotator() {
	
	// Main Canvas
	$('div#canvas div').hide();
	$('div#canvas div:first').show();
	setInterval('rotate1()',8600);
	
	// Block 1
	$('div#block1 div').hide();
	$('div#block1 div:first').show();
	setInterval('rotate2()',5623);
}

function rotate1() {	
	var current = ($('div#canvas div.show') ?  $('div#canvas div.show') : $('div#canvas div:first'));
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div#canvas div:first') :current.next()) : $('div#canvas div:first'));
	current.removeClass('show').fadeOut(1000).queue(function(){
		next.fadeIn(1000).addClass('show');
		$(this).dequeue();
	});
};

function rotate2() {	
	var current = ($('div#block1 div.show') ?  $('div#block1 div.show') : $('div#block1 div:first'));
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div#block1 div:first') :current.next()) : $('div#block1 div:first'));
	current.removeClass('show').fadeOut('slow').queue(function(){
		next.fadeIn('slow').addClass('show');
		$(this).dequeue();
	});
};



/* Document Ready */
$(document).ready(function() {
	
	homePageRotator();

});

