$(document).ready(function(){
	$("#navigation a,#footer a").click(function() {
		var linkURL = $(this);
		
		$("#navigation a.active,#footer a.active").removeClass("active").addClass("inactive");
		$(linkURL).addClass("active").removeClass("inactive");
		//$("#top").load("test.html #content");
		$("#top").animate({
			height:0,
			top:450
		}, "slow", "easeOutExpo", function() {
			/*$(this).load($(linkURL).attr("href") + " #content").delay(250).animate({
				height:450,
				top:0
			}, "slow", "easeOutExpo");*/
			window.location = $(linkURL).attr("href");
		});
		return false;
	});

	// Rollover effects
	var hoverSpeed = 500;
	var hoverColor = "#cc9900";
	$("#navigation a.inactive").hover(function() {
		$(this).stop().animate({"backgroundColor":hoverColor}, hoverSpeed);
	},function() {
		$(this).stop().animate({"backgroundColor":"#555"}, hoverSpeed);
	});
	$("#footer a.inactive").hover(function() {
		$(this).stop().animate({"color":hoverColor}, hoverSpeed);
	},function() {
		$(this).stop().animate({"color":"#fff"}, hoverSpeed);
	});
});
