/*
             * Droppy 0.1.2
             * (c) 2008 Jason Frame (jason@onehackoranother.com)
             */
             jQuery.noConflict();
            jQuery.fn.droppy = function(options) {

              options = jQuery.extend({speed: 1}, options || {});

              this.each(function() {

                var root = this, zIndex = 1000;

                function getSubnav(ele) {
                  if (ele.nodeName.toLowerCase() == 'li') {
                    var subnav = jQuery('> ul', ele);
                    return subnav.length ? subnav[0] : null;
                  } else {
                    return ele;
                  }
                }

                function getActuator(ele) {
                  if (ele.nodeName.toLowerCase() == 'ul') {
                    return jQuery(ele).parents('li')[0];
                  } else {
                    return ele;
                  }
                }

                function hide() {
                  /* mod by endryu, usuniecie clasy hover z elementu glownego (background z naglowka) */
                  jQuery(this).parent('li').removeClass('hover');
                  jQuery(this).removeClass('hover');
                  jQuery('> a', this).removeClass('hover');
                  /* ------ */
                  var subnav = getSubnav(this);
                  if (!subnav) return;
                  jQuery.data(subnav, 'cancelHide', false);
                  setTimeout(function() {
                    if (!jQuery.data(subnav, 'cancelHide')) {
                      jQuery(subnav).slideUp(options.speed);
                    }
                  }, 200);
                }

                function show() {
                  var subnav = getSubnav(this);
                  if (!subnav) return;
                  jQuery.data(subnav, 'cancelHide', true);
                  jQuery(subnav).css({zIndex: zIndex++}).slideDown(options.speed);
                  jQuery(this).parent('li').addClass('hover');
                  jQuery(this).addClass('hover');
                  jQuery('> a', this).addClass('hover');
                }
                jQuery('ul, li', this).hover(show, hide);
              });
            };
