var obj = null;

if (!console) {
	var console = {
		log: function (msg) { /* Ignore */ }
	};
}

function checkHover() {
	//console.log('in checkHover');
	if (obj) {
		//console.log('obj found, fading it out');
		obj.find('ul').fadeOut('fast');	
	} //if
} //checkHover

$(document).ready(function() {
	$('#NavList > li').hover(function() {
		/*if (obj) {
			obj.find('ul').fadeOut('fast');
			obj = null;
		} //if
		*/
		//console.log('Hovering');
		// fade other menus out
		checkHover();
		$(this).find('ul').fadeIn('fast');
	}, function() {
		//console.log('UnHovering');
		obj = $(this);
		//console.log('Setting timeout');
		setTimeout(
			checkHover,
			300);
	});
});