jQuery.fx.interval = 40;
Cufon.replace('.greensubtitle, h2, h2.blurb_large, h2.blurb_small, h1.pgheader, h1');
	
$(document).ready(function(){
		
	// handle hover states of primary buttons
	$('.fancybutton').hover(
		function() { $('.hover', this).stop().animate({opacity:1},100); },
		function() { $('.hover', this).stop().animate({opacity:0},200); }
	);
		
	// start animation loops
	animateDownload();

	
});

$(window).load(function() {
	$('.fancybutton .hover').animate({opacity:0},200);
	$('#index_content').hide().removeClass('show');
	
	/*
	var total = $('#splash>#slider img').length;
	if (total > 1 && window.disableSlider != true) {
		var rand = Math.floor(Math.random()*total);
		$('#splash>#slider').nivoSlider({
			effect:'fade',
			animSpeed:1000,
			pauseTime:4000,
			startSlide:rand,
			directionNav:false,
			controlNav:false,
			keyboardNav:false,
			pauseOnHover:true,
			manualAdvance:false			
		});
	} else if (total == 1 && window.disableSlider != true) {
		$('#splash>#slider img').show();
	} else {
		$('#splash>#slider img:first').show();
	}
	*/
	$('#splash>#slider img:first').show();
});

function animateDownload() {
	var topPos = 355 - 113; // image height - viewport height
	$('#button_download .anim img, #button_download_inside .anim img').css({'top':'0'}).animate({top:'-'+topPos+'px'},20000,'linear',animateDownload);
}
