﻿// Register the menu
jQuery(function(){
	// Add the click event handler on the list item with sub list
	jQuery('li:has(ul)').click(function(event){
		if (this == event.target) {
		   // Hide all the children of the other lists
		   //jQuery('li:has(ul)').children().hide('medium'); 
		   // Make the animation
		   jQuery(this).children().animate({opacity:'toggle',height:'toggle'},'medium'); 
		}

	})

	// Change the cursor.
	jQuery('li:has(ul)').css({cursor:'pointer'})
	// Hide all the nested lists (on the first tinm only).
	jQuery('li:has(ul)').children().hide();
});

