// $Id: nice_menus.js,v 1.1.2.2 2006/08/06 10:16:20 jakeg Exp $

// We only do the javascript in IE.
// TODO: because we now only include the js file for IE, is this 'if' redundant?
if (document.all) {
  function IEHoverPseudo() {
    $("ul.nice-menu li.menuparent").hover(function(){
        // $(this).addClass("over").find("> ul").slideDown("fast");
        $(this).addClass("over").find("> ul").show();
      },function(){
        // $(this).removeClass("over").find("> ul").slideUp("fast");
        $(this).removeClass("over").find("> ul").hide();
      }
    );
  }

  // This is the jquery method of adding a function to the BODY onload event.  (See jquery.com)
  $(document).ready(function(){ IEHoverPseudo() });
}



/*
// $Id: nice_menus.js,v 1.2 2007/03/04 10:16:20 dlane Exp $

// updated for Drupal 5.1 with jQuery libraries by dave@egressive.com 20070304

Drupal.crapBrowserHoverPseudo = function() {
  // select all nice-menu list items that are menuparents...
  $("ul.nice-menu/li.menuparent").each(function() {
    $(this).mouseover(function() {
      $(this).addClass("over");
    });
    $(this).mouseout(function() {
      $(this).removeClass("over");
    });
  });
}

// add this to the page if Javascript is enabled...
if (Drupal.jsEnabled) {
 $(document).ready(Drupal.crapBrowserHoverPseudo);
}
*/