// MenuTip.
(function($) {
	var hideDelay=0;
	
	$.fn.menuTip = function() {
		$(this).each(function(){
			var el = $(this);
			var elMenu = $('#'+$(this).attr('rel'));
			var hideTimer=null;
						
			var posicion = $(this).offset();
			
			elMenu.css({
				left: (posicion.left + 20) + 'px',
				top: (posicion.top + 5) + 'px'
			});
															
			el.mouseover(function(){
				if (hideTimer) clearTimeout(hideTimer);
				elMenu.show();
			});
			
			el.mouseout(function(){
				if (hideTimer) clearTimeout(hideTimer);
				hideTimer = setTimeout(function(){
					elMenu.hide();
				}, hideDelay);
			});
			
			elMenu.mouseover(function(){
				if (hideTimer) clearTimeout(hideTimer);
			});
			
			elMenu.mouseout(function(){
				if (hideTimer) clearTimeout(hideTimer);
				hideTimer = setTimeout(function(){
					elMenu.hide()
				}, hideDelay);
				
			});			
		});
	};
})(jQuery);
