/**********************************
* Avoid namespace conflicts.  
* Instead of using the global '$' to define this jQuery function,
* use a variable and identify it as a jQuery function by using the .noConflict() method.
**********************************/
var $menu = jQuery.noConflict();  



$menu(function(){
        $menu('.menuli:has(ul)').click(function(event){
            if (this == event.target) {
              $menu(this).css('list-style-image',
                (!$menu(this).children().is(':hidden')) ?
                  'url(plus.gif)' : 'url(minus.gif)');
              $menu(this).children().toggle('slow');
			  $menu(".active").removeClass("active");//remove the active class from the old menu item
			  $menu(this).addClass("active");//change this one to the active class 
            }
            return false;
          })		  		  
          .css({cursor:'pointer',
                'list-style-image':'url(plus.gif)'})
          .children().hide();
        $menu('.menuli:not(:has(ul))').css({
          cursor: 'default',
          'list-style-image':'none'
        });
		
		
		 
		$menu('.active').children().show();//keep the current active menu open
      })(jQuery);	  

	  
