How to implement jQuery Accordion for a Menu?
You have to include the accordion library by adding this line to your theme's template.php:

drupal_add_library('system', 'ui.accordion');


Then you trigger the accordion by adding this to yout template.php or an external js-file:

$( "#menu-container" ).accordion( {
  header: "li",
  collapsible: true
} );