$(document).ready(function() {
	var queryhash = window.location.hash
	switch (queryhash) {
		case "#about":
			document.title = "About Stacey Cordoni - Vancouver Front-End Web Developer";
			initialShowAbout();
			break;
		case "#networks":
			document.title = "Network with Stacey Cordoni on Facebook, Twitter, LinkedIn & Last.fm";
			initialShowNetworks();
			break;
		case "#contact":
			document.title = "Contact Stacey Cordoni - Vancouver Front-End Web Developer";
			initialShowContact();
			break;
		default:
			initialShowAbout();
			break;
	}
	$("h2").hide();
	$("#nav-about a").click(showAbout);
	$("#nav-networks a").click(showNetworks);
	$("#nav-contact a").click(showContact);
});

function initialShowNetworks() {
	$("#content").hide();
	$("#container").removeClass();
	$("#container").addClass("networks");
	$(".section").hide();
	$("#networks").show();
	setTimeout("$('#content').slideDown('slow');", 1000);
}

function initialShowAbout() {
	$("#content").hide();
	$("#container").removeClass();
	$("#container").addClass("about");
	$(".section").hide();
	$("#about").show();
	setTimeout("$('#content').slideDown('slow');", 1000);
}

function initialShowContact() {
	$("#content").hide();
	$("#container").removeClass();
	$("#container").addClass("contact");
	$(".section").hide();
	$("#contact").show();
	setTimeout("$('#content').slideDown('slow');", 1000);
}

function showAbout() {
	if ($("#container").hasClass("about")){ }
	else {
		document.title = "About Stacey Cordoni - Vancouver Front-End Web Developer";
		$("#content").slideUp(500);
		$(".section").fadeOut(500);
		setTimeout("$('.section').hide();", 500);
		setTimeout("$('#about').show();", 500);
		$("#content").slideDown(500);
		$("#container").removeClass();
		$("#container").addClass("about");
	}
}

function showNetworks() {
	document.title = "Network with Stacey Cordoni on Facebook, Twitter, LinkedIn & Last.fm";
	if ($("#container").hasClass("networks")){ }
	else {
		$("#content").slideUp(500);
		$(".section").fadeOut(500);
		setTimeout("$('.section').hide();", 500);
		setTimeout("$('#networks').show();", 500);
		$("#content").slideDown(500);
		$("#container").removeClass();
		$("#container").addClass("networks");
	}
}

function showContact() {
	if ($("#container").hasClass("contact")){ }
	else {
		document.title = "Contact Stacey Cordoni - Vancouver Front-End Web Developer";
		$("#content").slideUp(500);
		$(".section").fadeOut(500);
		setTimeout("$('.section').hide();", 500);
		setTimeout("$('#contact').show();", 500);
		$("#content").slideDown(500);
		$("#container").removeClass();
		$("#container").addClass("contact");
	}
}

Cufon.replace('h1', { textShadow: '2px 2px black'} );
Cufon.replace('.intro p');

if (typeof DD_belatedPNG != 'undefined') {
  DD_belatedPNG.fix('.links a, #footer .download-vcard a');
}
