var to, to2;
function startFade() {
	// set intitial delay
	//console.log('startFade() start');
	to = setTimeout("fadeOne()",1500);
}
function fadeOne() {
	//console.log('fadeOne() start');
	// fade in header and content, call second delay
	$('#header h1, ul#nav, #homeTouts, #footer').fadeIn(2000)
	to2 = setTimeout("fadeTwo()",2500);
}
function fadeTwo() {
	// fade out center logo, fade in callout
	$('#homeLogo').fadeOut(1000, function(){
		$('#homeH2').fadeIn(1000);
	});
	// clear timeouts
	clearTimeout(to);
	clearTimeout(to2);
}




$(document).ready(function(){
	$('body').removeClass('jsOff').addClass('jsOn');
	
	if (!$.browser.msie && !($.cookie('shownIntro'))) {
		$('#header h1, ul#nav, #homeH2, #homeTouts, #footer').hide();
		startFade();
		$.cookie('shownIntro', true, { expires: 1 });
	} else {
		$('#homeLogo').hide();
	}
	
	$('#rotatingNews').cycle({ 
	    timeout: 8000,
		speed: 1000,
		sync: 0,
		delay: 1500
	});
	
	
});
