jQuery(document).ready(function($){	

//Add 'selected' classes to menu and submenu items
//var URL = location.href.substring(location.href.lastIndexOf('/') + 1);//+location.hash;
//	if ( URL ) {
//		$('#menu a[href$="' + URL + '"]').parent('li').addClass('selected');
//}

//Loop through all the Top Navigation lists in a specified area and add span tags before/after specified tags
var oTopNav = $('#menu').find('ul:first');
oTopNav.children().each(function(){
	$(this).find('a:first').html('<span>' + $(this).find('a:first').text() + '</span>');
});

//Menu Slide Up/Down
var oMenu = $('#menu').find('ul');
oMenu.children().hover(function(){
	$("ul:first", this).fadeIn(/*"fast"*/);
	}, function(){
		$("ul:first", this).fadeOut();
});

//Submenu Slide Up/Down
var oSubMenu = $('#menu ul').find('ul');
oSubMenu.hide();
oSubMenu.children().hover(function(){
	$("ul:first", this).fadeIn();
	}, function(){
		$("ul:first", this).fadeOut();
});

oSubMenu.each(function(){
	$(this).find('li a:first').css('border-top','1px solid #0079A8');
	$(this).find('li a:last').css('border-bottom','1px solid #0079A8');
});

//Menu > Submenu Hover Effect
//$('#menu ul').nmcDropDown();
	
});
