How about using jquery delay for the mouse, so change it to:
function() {//hide tooltip when the mouse moves off of the element $('#' + $(this).attr("rel") + '-tip').delay(500).hide(); });
to delay the hover event is a bit trickier, you need to keep a timer. Something like that:
$(function() { var timer; $(".item-wrapper").hover(function() { if (timer) { clearTimeout(timer); timer=null; } timer = setTimeout(function() { $('#' + $(this).attr("rel") + '-tip').fadeIn("fast").show() },500); });
source share