Index: simplemenu.module
===================================================================
--- simplemenu.module	(revision 1671)
+++ simplemenu.module	(working copy)
@@ -104,9 +104,10 @@
   if (module_exists('menu')) {
     $form['default_menu']['simplemenu_menu'] = array(
       '#type' => 'select',
+      '#multiple' => true,
       '#title' => t('Menu'),
       '#options' => menu_parent_options(menu_get_menus(), array( 'mlid' => 0 )), // return complete tree;
-      '#default_value' => variable_get('simplemenu_menu', 'navigation:0'),
+      '#default_value' => variable_get('simplemenu_menu', array('navigation:0')),
       '#description' => t('Select the menu to display.')
     );
   }
@@ -226,22 +227,40 @@
 
   // if a user turned off menu module but SimpleMenu was previously set
   // reset variable so a menu appears
-  $menu_name = module_exists('menu') ? variable_get('simplemenu_menu', 'navigation:0') : 'navigation:0';
-  $menu = simplemenu_menu_tree($menu_name);
+  $menu_names = module_exists('menu') ? variable_get('simplemenu_menu', array('navigation:0')) : array('navigation:0');
+  $multiple = count($menu_names) > 1;
+  if ($multiple) {
+    $menu_titles = menu_parent_options(menu_get_menus(), array( 'mlid' => 0 ));
+  }
+  foreach ($menu_names as $menu_name) {
+    $menu = simplemenu_menu_tree($menu_name);
 
-  if (!$menu) {
-    $menu = '<li><a href="'. url('admin/settings/simplemenu') .'">'. t('No menu items found. Try a different menu as the default.') .'</a></li>';
+    if (!$menu && !$multiple) {
+      $menu = '<li><a href="'. url('admin/settings/simplemenu') .'">'. t('No menu items found. Try a different menu as the default.') .'</a></li>';
+    } else if (!$menu) {
+      continue;
+    }
+
+    // This is ugly, I know, but it is the only way I can see to get the additional
+    // links inside the <ul> tags
+    if($devel = simplemenu_get_devel()) {
+      $pos = strpos($menu, '>') + 1;
+      $menu = substr($menu, 0, $pos) . $devel .substr($menu, $pos);
+    }
+
+    // If we have more than one menu, display each menu under it's own item
+    if ($multiple) {
+      $title = preg_replace('/(^(<|-+)|>$)/', '', $menu_titles[$menu_name]);
+      $menu = preg_replace('/<\s*ul(\s.+?)?\s*>/', "<ul class='menu'>", $menu);
+      $menu = "<li class='expanded'><a href='#'>".htmlspecialchars($title)."</a>".$menu."</li>";
+    }
+
+    $output .= $menu;
   }
-  
-  // This is ugly, I know, but it is the only way I can see to get the additional 
-  // links inside the <ul> tags
-  if($devel = simplemenu_get_devel()) {
-    $pos = strpos($menu, '>') + 1;
-    $menu = substr($menu, 0, $pos) . $devel .substr($menu, $pos);
+
+  if ($multiple && $output) {
+    $output = "<ul id='simplemenu' class='menu clear-block superfish'>".$output."</ul>";
   }
-  
-  $output .= $menu;
-
   return $output;
 }
 
