
$(function() {

	if ($('.robe_intro').css('display') != 'none')
		setTimeout(intro, 500);
	else
		$('#introcover').css('display', 'none');

});


// TODO: Make sure all the neded images are loaded first so it looks nice n' pretty

function intro() {
	$('#introcover').css('display', 'none');

	setTimeout(function() {
		
		$('.intro_cover').animate({
			'opacity': 0
		}, 1500, 'easeOutExpo', function() {
			$(this).css('display', 'none');
		}).mouseover(function() {
			// This is to avoid the awkward delay when the cover is still fading out
			// and you want to click the nav, but can't.
			$(this).css('display', 'none');
		});
	}, 2000);
	
	setTimeout(function() { animate.line({ newId: 'home' }); }, 300);
	setTimeout(function() { animate.open({ intro: true }, 1000) }, 1000);
	
}