// $Id: nice_menus.js,v 1.21 2010/06/18 06:14:12 vordude Exp $

/*
window.onload = function() {
      if (document.all) {
    var targetZIndex = 1000;
    var parent = document.getElementById('nice-menu-1');
    var children = parent.getElementsByTagName('li');
    for (var i = 0; i < children.length; i++) {
         children[i].style.zIndex = targetZIndex;
          targetZIndex--;
    }
  }
}
*/

// This uses Superfish 1.4.8
// (http://users.tpg.com.au/j_birch/plugins/superfish)

// Add Superfish to all Nice menus with some basic options.
(function ($) {


  $(document).ready(function() {
    $('ul.nice-menu').superfish({
      // Apply a generic hover class.
      hoverClass: '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
    }).find('ul').bgIframe({opacity:false});
    $('ul.nice-menu ul').css('display', 'none');
  });
})(jQuery);

