$(document).ready(
	function () {
		var navItems = $("#nav li:has(ul) > a:first-child");
		navItems.bind(
			'click',
			function (e) {
				var list = $(this).next('ul');
				if (list.is(':visible')){$(list).slideUp(500);}
				else {$(list).slideDown(500);}
				e.preventDefault();
			}
		);
	}
);
