var TimeAmount = 550;

jQuery(document).ready(function() {  

var IntroContentH = $("#IntroContent").height();
var IntroMiddleH = $("#IntroMiddle").height();

// <![CDATA[
	if (navigator.userAgent.indexOf("MSIE") != -1){
		$(".IntroLogo").css({top: "260px"});
		$("#IntroContent").css({height: "0px"});
		$("#IntroMiddle").css({height: "0px"});
	} else{
		$("#IntroContainer").css({opacity: "0"});
		$(".IntroLogo").css({opacity: "0",top: "360px"});
		$("#IntroContent").css({height: "0px"});
		$("#IntroMiddle").css({height: "0px"});
	}
// ]]>	

$(window).load(function() { StartThis(); });

function StartThis(){
	
	$("#TheLoader").remove();
	
	// <![CDATA[
	if (navigator.userAgent.indexOf("MSIE") != -1){
		$(".IntroLogo").animate({ top: "46px"}, TimeAmount*2, "easeOutQuad");
		$("#IntroContent").delay(TimeAmount/2).animate({height: IntroContentH}, TimeAmount, "easeOutQuad");
		$("#IntroMiddle").delay(TimeAmount/2).animate({height: IntroMiddleH}, TimeAmount*2, "easeOutQuad");
	} else{
		$("#IntroContainer").animate({ opacity: "1"}, TimeAmount*2, "easeOutQuad");
		$("#IntroContent").delay(TimeAmount/2).animate({height: IntroContentH}, TimeAmount, "easeOutQuad");
		$("#IntroMiddle").delay(TimeAmount/2).animate({height: IntroMiddleH}, TimeAmount*2, "easeOutQuad");
		$(".IntroLogo").delay(TimeAmount/2).animate({ opacity: "1", top: "-30px"}, TimeAmount*3, "easeOutQuad");
		
	}
	// ]]>	
}

//$(".TheButton p").mouseover(function(){RolloverButtonOver()}).mouseout(function(){RolloverButtonOut()})

jQuery.fn.center = function (TheOtherElement) {
    this.css("position","absolute");
    this.css("left", (($(TheOtherElement).width() - this.outerWidth()) / 2) + $(TheOtherElement).scrollLeft() + "px");
    return this;
}

$(".TheButton").center("#IntroBottom");

/*
function RolloverButtonOver(){
	$(".TheButton p").css({ backgroundColor: "#FFF"});
}
function RolloverButtonOut(){
	$(".TheButton p").css({ padding: "10px"});
}
*/

});
