Index: nice_menus.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nice_menus/nice_menus.install,v
retrieving revision 1.2
diff -u -p -r1.2 nice_menus.install
--- nice_menus.install	4 Dec 2008 00:42:49 -0000	1.2
+++ nice_menus.install	6 Feb 2009 15:16:12 -0000
@@ -15,3 +15,14 @@ function nice_menus_update_6000() {
   $ret[] = update_sql("UPDATE {blocks} SET cache = -1 WHERE module = 'nice_menus'");
   return $ret;
 }
+
+/**
+ * Implementation of hook_update_N().
+ */
+function nice_menus_update_6001() {
+  // Switch the JS toggle variable name.
+  $old_setting = variable_get('nice_menus_ie', 1);
+  variable_set('nice_menus_js', $old_setting);
+  variable_del('nice_menus_ie');
+  return array();
+}
\ No newline at end of file
Index: nice_menus.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nice_menus/nice_menus.js,v
retrieving revision 1.16
diff -u -p -r1.16 nice_menus.js
--- nice_menus.js	4 Aug 2008 23:45:22 -0000	1.16
+++ nice_menus.js	6 Feb 2009 15:16:12 -0000
@@ -1,48 +1,23 @@
 // $Id: nice_menus.js,v 1.16 2008/08/04 23:45:22 add1sun Exp $
 
-// We need to do some browser sniffing to weed out IE 6 only
-// because only IE6 needs this hover hack.
-if (document.all && !window.opera && (navigator.appVersion.search("MSIE 6.0") != -1) && $.browser.msie) {
-  function IEHoverPseudo() {
-      $("ul.nice-menu li.menuparent").hover(function(){
-          $(this).addClass("over").find("> ul").show().addShim();
-        },function(){
-          $(this).removeClass("over").find("> ul").removeShim().hide();
-        }
-      );
-      // Add a hover class to all li for CSS styling. Silly naming is done
-      // so we don't break CSS compatibility for .over class already in use
-      // and due to the fact that IE6 doesn't understand multiple selectors.
-      $("ul.nice-menu li").hover(function(){
-          $(this).addClass("ie-over");
-        },function(){
-          $(this).removeClass("ie-over");
-        }
-      );
-    }
+// This uses Superfish 1.4.8
+// (http://users.tpg.com.au/j_birch/plugins/superfish)
 
-    // This is the jquery method of adding a function
-    // to the BODY onload event.  (See jquery.com)
-    $(document).ready(function(){ IEHoverPseudo() });
-}
-
-$.fn.addShim = function() {
-  return this.each(function(){
-	  if(document.all && $("select").size() > 0) {
-	    var ifShim = document.createElement('iframe');
-	    ifShim.src = "javascript:false";
-			ifShim.style.width=$(this).width()+1+"px";
-      ifShim.style.height=$(this).find("> li").size()*23+20+"px";
-			ifShim.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
-		  ifShim.style.zIndex="0";
-    $(this).prepend(ifShim);
-      $(this).css("zIndex","99");
-		}
-	});
-};
-
-$.fn.removeShim = function() {
-  return this.each(function(){
-	  if (document.all) $("iframe", this).remove();
-	});
-};
+// Add Superfish to all Nice menus with some basic options.
+$(document).ready(function() {
+  $('ul.nice-menu').superfish({
+    // Add the legacy hover class added for IE.
+    hoverClass: 'ie-over',
+    // Disable generation of arrow mark-up.
+    autoArrows: false,
+    // Disable drop shadows.
+    dropShadows: false,
+    // Mouse delay.
+    delay: Drupal.settings.nice_menus_options.delay,
+    // Animation speed.
+    speed: Drupal.settings.nice_menus_options.speed
+  });
+  // Add in Brandon Aaron’s bgIframe plugin for IE select issues.
+  // http://plugins.jquery.com/node/46/release
+  $('ul.nice-menu').superfish().find('ul').bgIframe({opacity:false}); 
+});
Index: nice_menus.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nice_menus/nice_menus.module,v
retrieving revision 1.58
diff -u -p -r1.58 nice_menus.module
--- nice_menus.module	6 Feb 2009 14:40:37 -0000	1.58
+++ nice_menus.module	6 Feb 2009 15:16:14 -0000
@@ -89,12 +89,34 @@ function nice_menus_admin_settings() {
     '#default_value' => variable_get('nice_menus_number', '2'),
     '#size' => 2,
   );
-  $form['nice_menus_ie'] = array(
+  $form['nice_menus_js'] = array(
     '#type' => 'checkbox',
-    '#title' => t('Enable IE support'),
-    '#description' => t('This will add necessary JavaScript for Nice menus to work properly in Internet Explorer.'),
-    '#default_value' => variable_get('nice_menus_ie', 1),
+    '#title' => t('Use JavaScript'),
+    '#description' => t('This will add Superfish Jquery to Nice menus. This is required for Nice menus to work properly in Internet Explorer.'),
+    '#default_value' => variable_get('nice_menus_js', 1),
   );
+  $form['nice_menus_sf_options'] = array(
+    '#type' => 'fieldset',
+    '#title' => t('Advanced: Superfish options'),
+    '#description' => t('You can change the default Superfish options by filling out the desired values here. These only take effect if the Use JavaScript box above is checked.'),
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+  );
+  $form['nice_menus_sf_options']['nice_menus_sf_delay'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Mouse delay'),
+    '#description' => t('The delay in milliseconds that the mouse can remain outside a submenu without it closing.'),
+    '#default_value' => variable_get('nice_menus_sf_delay', 800),
+    '#size' => 5,
+  );
+  $form['nice_menus_sf_options']['nice_menus_sf_speed'] = array(
+    '#type' => 'select',
+    '#title' => t('Animation speed'),
+    '#multiple' => FALSE,
+    '#description' => t('Speed of the menu open/close animation.'),
+    '#options' => array(t('slow'), t('normal'), t('fast')),
+    '#default_value' => variable_get('nice_menus_sf_speed', 1),
+     );
 
   // Custom validation to make sure the user is entering numbers.
   $form['#validate'][] = 'nice_menus_settings_validate';
@@ -241,8 +263,19 @@ function nice_menus_theme() {
  * and the menus are unstyled.
  */
 function nice_menus_init() {
-  // Add JavaScript, if enabled.
-  if (variable_get('nice_menus_ie', 1) == 1) {
+  // Add Superfish JavaScript, if enabled.
+  if (variable_get('nice_menus_js', 1) == 1) {
+    // The script, from http://users.tpg.com.au/j_birch/plugins/superfish.
+    drupal_add_js(drupal_get_path('module', 'nice_menus') .'/superfish/js/superfish.js');
+    // Add the Superfish options variables.
+    drupal_add_js(array(
+      'nice_menus_options' => array(
+        'delay' => variable_get('nice_menus_sf_delay', 800),
+        'speed' => variable_get('nice_menus_sf_speed', 1),
+        )),'setting');
+    // Add the bgIframe plugin.
+    drupal_add_js(drupal_get_path('module', 'nice_menus') .'/superfish/js/jquery.bgiframe.min.js');
+    // The Nice menus implementation.
     drupal_add_js(drupal_get_path('module', 'nice_menus') .'/nice_menus.js');
   }
 
