jQuery: menu/dropdown behaviour tweak

I have a single rollover menu (kinda like the one on theme forest) and its working but the mouseover behaviour isnt optimal.

-If you mouseover the button, it pops down (good)
-If you mouseout the dropdown menu, it should go away (needs work)
-With the menu already down, if you mouseover the main button, the menu should stay out, instead of closing. (needs work)

Here is a link:
http://psylicyde.com/misc/slider

Here is the code.

$(document).ready(function () {
    $('img.menu_class').hover(function () {
		$('ul.the_menu').slideToggle('fast');
    })

	$('ul.the_menu').mouseleave(function(){
      $('ul.the_menu').slideToggle('fast');
    });
});