$(document).ready(function(){
	$("#header ul li a").append("<em></em>");
	$("#header ul li a").hover(function() {
		$(this).find("em").animate({opacity: "show", top: "-25"}, "slow");
		var hoverText = $(this).attr("title");
	    $(this).find("em").text(hoverText);
	}, function() {
		$(this).find("em").animate({opacity: "hide", top: "-50"}, "fast");
	});

	$('#sidebar .directory h4').click(
		function() {
			var checkElement = $(this).next();
			if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
				return false;
			}
			if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
				$('#sidebar .directory ul:visible').slideUp('normal');
				checkElement.slideDown('normal');
				return false;
			}
		}
	);
});

