A little bit down on this blog (scroll down) there is an implementation of how to implement MouseEnter/MouseLeave cross browser. Without this then due to "event bubbling" you will get false positives on MouseOver/Out which means that your trapping of mouseover/out will fail...!
If you implement the above check however in MouseOver/Out you will have a perfect valid starting point for setting some sort of flag in event handlers which makes it possible for you to at an arbitrage time check those flags to see if mouse is "over or out" of specific DOM element...
Also your "menu hiding/showing" will mostly work with the above check, however if all you want to do is show and hide there exists perfectly valid pure CSS solutions for that ;)
(Google for them)