// searchField makes text hiding on search fields.
function searchField(id) {
	var str = $(id).attr("value");
	
	$(id).focus(function() {
		if ($(this).attr("value") == str) {
			$(this).attr("value", "");
		}
	});
	
	$(id).blur(function() {
		if ($(this).attr("value") == "") {
			$(this).attr("value", str);
		}
	});
}

$(function() {
	// Menu.
	$("ul.menu ul").hide();
	$("ul.menu li").hover(
		function() { $(this).children("ul").show(); },
		function() { $(this).children("ul").hide(); }
	);
	
	// Add text hiding on search fields.
	searchField("input#loginText");
	
	// Add row handles to tables.
	$("tr:odd").attr("class", "odd");
	$("tr:even").attr("class", "even");
});
