You could Implement mouseleave like so
$("#menucontainer").mouseleave(function () {
$("#menu").slideUp('slow');
});
Working example here - http://jsfiddle.net/9yEHV/304/
In your code the mousehover event ends as soon as you move off the input. This is because the mousehove event isnt part of your menu code. To prevent the menu from disappearing you need to create a wrapper/container around your markup which encapsulates both the input and menu.
Hope this makes sense