var obj = null;

function checkHover() {
	if (obj) {
		obj.removeClass("hover");
		obj.find('ul.ddown:not(.active)').fadeOut('fast');	
	} //if
} //checkHover

$(document).ready(function() {
	$('li.drop:not(.active)').hover(function() {
		if (obj) {
			obj.removeClass("hover");
			obj.find('ul.ddown:not(.active)').fadeOut('fast');
			obj = null;
		} //if
		
		$(this).addClass("hover");
		$(this).find('ul.ddown:not(.active)').fadeIn('fast');
	}, function() {
		obj = $(this);
		setTimeout(
			"checkHover()",
			400);
	});

	$('.tooltip').each(function() {
		var tipText;
//		$(this).addClass("hover");
		tipText = $(this).attr('title');
		$('<span class="ztips">'+tipText+'</span>').css({zIndex: 100}).appendTo($(this));
		$(this).attr('title','');

	});
	
	$('#gettips').click(function() {
		$(this).toggleClass("hilight");
		$('.ztips').toggleClass("tipshown");	
	});

});