//This operates the whole top-level navigation.
	//When the cursor hovers over any <li> in the class "top-nav"
	//a class "hover" is added and changes the css from 
	//visibility:none to visibility:visible
	//The class is then removed goes back to visibility:none 
	//when the mouse has left the <li> tag in the class "top-nav"
	//Only the pseudoclass :first is supported in IE, in case anyone
	//was wondering. The :last pseudoclass doesn't work for some stupid reason.
	//At the end of the function, we check to see if a third level <li> 
	//has a <ul> tag inside of it; if it does, then add a >> to the 
	//element to notify the user.

$(function(){
	
    $("ul.top-nav li").hover(function(){
    
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    
    }, function(){
  
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    
    });
    
    $("ul.top-nav li ul li:has(ul)").find("a:first").append(" &raquo; ");

});

	//$("ul.top-nav li ul li:has(ul)").find("a:first").append(" &raquo; ");


	$('.sub_menu li a').click(function () { 
		$(this).parent().parent().css('visibility','hidden');     
		$(this).parent().parent().parent().hover(function(){
        	$(this).addClass("hover");
        	$('ul:first',this).css('visibility', 'visible');
    	}, function(){
        	$(this).removeClass("hover");
        	$('ul:first',this).css('visibility', 'hidden');
	    });  
	
	});
