$(document).ready(function() {
	
	$('div#menu > ul > li > a').bind('click', function(ev) {
		
		el = $(this);
		if(el.next('ul').length == 0) return true;
		
		ev.preventDefault();
		submenu = el.next('ul');
		if(submenu.is(':visible')) {
			$(this).next('ul').slideUp( 500 );
		} else {
			$(this).next('ul').slideDown( 500 );
		}
	
			
	});
});
