jQuery.noConflict();

function setWidthSubMenus() {
	jQuery.each(jQuery("#headerMenu2Box table td .subMenu"), function() {
		jQuery(this).width(jQuery(this).parent().width());
    });
}

function setTopMarginSubMenus() {
	jQuery.each(jQuery("#headerMenu2Box table td .subMenu"), function() {
		jQuery(this).css("margin-top","-"+(jQuery(this).parent().height()+7)+"px");
    });
}

var obj = null;

function checkHover() {
	if (obj) {
		obj.find('.subMenu').animate({height: "hide"}, 1000);
	}
}


function onHoverMenu() {
	jQuery("#headerMenu2Box table td").hover(function() {
		if (obj) {
			obj.find('.subMenu').animate({height: "hide"}, 1000);
			obj = null;
		}

		jQuery(this).find('.subMenu').animate({height: "show"}, 1000);

	}, function() {
		obj = jQuery(this);
		setTimeout("checkHover()",400);
	});
}

jQuery(document).ready(function(){
    setWidthSubMenus();
    setTopMarginSubMenus();
    onHoverMenu();
});

