$(document).ready(function() {
	
	$('#nav > li > a').focus(
		function(){
			$(this).parent().addClass('nav_focus');
	});

	$('#nav > li > a').blur(
		function(){
			$(this).parent().removeClass('nav_focus');
	});
	
	$('#nav > li').hover(
		function() {

			$('ul', this).show();

		},
		function() {

			$('ul', this).hide();

		}
	);
	
	
	colour_table();
	
	function colour_table(){
		odd = $("table.menu tr:odd, table.members tr:odd")
		even = $("table.menu tr:even, table.members tr:even")
		
		odd.css("background-color", "#ddd");
		even.css("background-color", "#eee");
	}
	
	$("form#frm_contact #email").focus(function(){
		if($(this).val() === "E-mail address"){
			$(this).val("");
		}
	});
	
	$("form#frm_contact #email").blur(function(){
		if($(this).val() === ""){
			$(this).val("E-mail address");
		}
	});

	$("form#frm_contact #name").focus(function(){
		if($(this).val() === "Name"){
			$(this).val("");
		}
	});
	
	$("form#frm_contact #name").blur(function(){
		if($(this).val() === ""){
			$(this).val("Name");
		}
	});

	$("form#frm_contact #msg").focus(function(){
		if($(this).val() === "Message"){
			$(this).val("");
		}
	});
	
	$("form#frm_contact #msg").blur(function(){
		if($(this).val() === ""){
			$(this).val("Message");
		}
	});
	
});
