$(document).ready(function(){
						   
	//Contact
	var contactOpen = "false";
	$("#ribbon").click(function(){
		if (contactOpen == "false"){
			$("#contact_form").slideDown('slow');
			contactOpen = "true";
		}
		else if (contactOpen == "true"){
			$("#contact_form").slideUp('slow');
			contactOpen = "false";
		}
	});
	
	//Tooltip for work :: not used
	$("#rec_work").hover(function() {
		$(this).find("#rec_work_tool").stop()
		.animate({left: "40", opacity:1}, "fast")
		.css("display","block")
	}, function() {
		$(this).find("#rec_work_tool").stop()
		.animate({left: "0", opacity: 0}, "fast")
	});
	//Tooltip for profile :: not used
	$("#view_profile").hover(function() {
		$(this).find("#view_profile_tool").stop()
		.animate({left: "40", opacity:1}, "fast")
		.css("display","block")
	}, function() {
		$(this).find("#view_profile_tool").stop()
		.animate({left: "0", opacity: 0}, "fast")
	});
	
	//Projects section
	var projectsOpen = "false";
	$("#rec_work").click(function(){
		//if (profileOpen == "true"){
		//	$("#profile").slideUp("slow");
		//	profileOpen  = "false";
		//}
		if (projectsOpen == "false"){
			$("#projects").slideDown("slow");
			projectsOpen = "true";
		}
		else if (projectsOpen == "true"){
			$("#projects").slideUp("slow");
			projectsOpen = "false";
		}
	});
	//Profile section
	var profileOpen = "false";
	$("#view_profile").click(function(){
		if (projectsOpen == "true"){
			$("#projects").slideUp("slow");
			projectsOpen = "false";
		}
		if (profileOpen == "false"){
			$("#profile").slideDown("slow");
			profileOpen  = "true";
		}
		else if (profileOpen == "true"){
			$("#profile").slideUp("slow");
			profileOpen  = "false";
		}
	});
	
	//Header click
	$("#bpHeader").click(function(){
		if (contactOpen == "true"){
			$("#contact_form").slideUp('slow');
			contactOpen = "false";
		}
		if (projectsOpen == "true"){
			$("#projects").slideUp("slow");
			projectsOpen = "false";
		}
		if (profileOpen == "true"){
			$("#profile").slideUp("slow");
			profileOpen  = "false";
		}
	});
	
	$("#sendContact").click(function(){
		if (contactOpen == "true"){
			$("#contact_form").slideUp('slow');
			contactOpen = "false";
		}
	});
	
	$("#twitterLink").hover(function(){
		$("#twitterslide").stop()
		.animate({opacity:1}, "fast")
		.css("display","block")
	}, function() {
		$("#twitterslide").stop()
		.animate({opacity: 0}, "fast")
		.css("display","none")
	});

});