$(document).ready(function() {
	document.title = "Fastcase + Dakota Disc - Member Login";
	var queryhash = window.location.hash
	switch (queryhash) {
		case "#about":
			document.title = "Fastcase + Dakota Disc - About";
			initialShowAbout();
			break;
		case "#contact":
			document.title = "Fastcase + Dakota Disc - Contact";
			initialShowContact();
			break;
		case "#memberLogin":
			document.title = "Fastcase + Dakota Disc - Networks";
			initialShowLogin();
			break;
		default:
			initialShowLogin();
			break;
	}
	$("h2").hide();
	$("#nav-about a").click(showAbout);
	$("#nav-login a").click(showNetworks);
	$("#nav-contact a").click(showContact);
});


function initialShowLogin() {
	$("#content").hide();
	$("#fcLogin").removeClass();
	$("#fcLogin").addClass("networks");
	$(".node").hide();
	$("#memberLogin").show();
	setTimeout("$('#content').slideDown('slow');", 1000);
}

function initialShowAbout() {
	$("#content").hide();
	$("#fcLogin").removeClass();
	$("#fcLogin").addClass("about");
	$(".node").hide();
	$("#about").show();
	setTimeout("$('#content').slideDown('slow');", 1000);
}

function initialShowContact() {
	$("#content").hide();
	$("#fcLogin").removeClass();
	$("#fcLogin").addClass("contact");
	$(".node").hide();
	$("#contact").show();
	setTimeout("$('#content').slideDown('slow');", 1000);
}

function showAbout() {
	if ($("#fcLogin").hasClass("about")){ }
	else {
		document.title = "Fastcase + Dakota Disc - About";
		$("#content").slideUp(500);
		$(".node").fadeOut(500);
		setTimeout("$('.node').hide();", 500);
		setTimeout("$('#about').show();", 500);
		$("#content").slideDown(500);
		$("#fcLogin").removeClass();
		$("#fcLogin").addClass("about");
	}
}

function showNetworks() {
	document.title = "Fastcase + Dakota Disc - Member Login";
	if ($("#fcLogin").hasClass("networks")){ }
	else {
		$("#content").slideUp(500);
		$(".node").fadeOut(500);
		setTimeout("$('.node').hide();", 500);
		setTimeout("$('#memberLogin').show();", 500);
		$("#content").slideDown(500);
		$("#fcLogin").removeClass();
		$("#fcLogin").addClass("networks");
	}
}

function showContact() {
	if ($("#fcLogin").hasClass("contact")){ }
	else {
		document.title = "Fastcase + Dakota Disc - Contact";
		$("#content").slideUp(500);
		$(".node").fadeOut(500);
		setTimeout("$('.node').hide();", 500);
		setTimeout("$('#contact').show();", 500);
		$("#content").slideDown(500);
		$("#fcLogin").removeClass();
		$("#fcLogin").addClass("contact");
	}
}
