/*
 * a jQuery Drop Down menu
 * Copyright 2010
 *
 * Author : Nicholas Ortenzio
 * Created : 2010/03/26
 * Last Modified : 2010/03/26
 *
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */


(function($){

  $.fn.DropDownMenu = function(options) {

    var defaults = $.extend({itemSelector:'li'}, options);
  
    return this.each(function(){
      var $this = $(this);
      var $navs = $this.children('ul').addClass('ui-dropdown-nav').children(defaults.itemSelector);
      $navs.children('ul').addClass('ui-dropdown-sub').hide();
      $navs.hover(
        function(){$(this).addClass('ui-dropdown-active')}, 
        function(){$(this).removeClass('ui-dropdown-active')}
      );
    }).addClass('dropdownmenu');

  };

})(jQuery);

