// JavaScript Document

$(function(){
	 var parentID = $("body").attr("id");
	
	  $("#nav li").each(function() {
	  		var myID = $(this).attr("id");
			
			 if (myID != "n-" + parentID) {				
				$(this).children("a").hover(function() 
				{
                // add a class to the list item so that additional styling can be applied to the <em> and the text
                $(this).addClass('over');
                // add in the span that will be faded in and out
                $(this).append("<span></span>");
                $(this).find("span").fadeIn(300);
            }, function() {
                $(this).removeClass('over');
                // fade out the span then remove it completely to prevent the animations from continuing to run if you move over different items quickly
                $(this).find("span").fadeOut(300, function() {
                    $(this).remove();
                });
            	});				
			}; 
		  });


});
