This is a very simple way to create a basic accordion menu for Joomla 1.7 with mootools using the standart joomla menu modul. On the righthandside you can see how it works.

At the moment there is a lack of free accoridion menus for Joomla.  As a quick solution I've modified the template for the mod_menu.

There are no extra Pramateres to personalise the Menu, and it will not work with nested menus(just two levels). The styling has to be done with CSS.

Howto

First of all you have to activate mootools, with the following line of code. I usually place it on the second line in the templates/your_template/index.php file.

<?php JHTML::_('behavior.framework', true); ?>

Download the following mod_menu override. Extract it, and place all files in the templates/your_template/html/mod_menu folder

{phocadownload view=file|id=1|target=s}

This is an exact copy of the default mod_menu template, I've just added following code in templates/your_template/html/mod_menu/default.php

<script language="javascript" >
   function addAccordion() {
      var togglers =  '.menu<?php echo $class_sfx; ?> li.parent';
      var elements =  '.menu<?php echo $class_sfx; ?> .parent ul';
      var currentIndex = $$(togglers).indexOf( $(document.body).getElement( 'li.current' ).getParent( 'li' ) );
      var accordion = new Fx.Accordion(
         togglers, 
         elements, 
         { opacity:   false, 
           display:   -1, 
           openClose: true,  
           trigger:   'mouseenter'            
         } );
      accordion.display(currentIndex);
   }    
   window.addEvent('domready', addAccordion );   
</script>

And finally make sure you have "Show Sub-menu Items" turned on in your Basic Modul Parameters.