/*
 * dropmenu.js
 * (c) 2009 bruno desthuilliers / websiteburo
 * nécessite jquery.dropshadow.js http://eyebulb.com/dropshadow/
 */
(function($) { 
   
     
    $.fn.dropmenu = function() {
        var dm_show = function(evt) {
            var $this = $(this);
            if ($this.data('dropmenuCancel')) {
                return;
            }
            $this.data('dropmenuCancel', true);
            $("span.dropmenu-label a", this).addClass("hover");
            $("div.dropmenu-content", this).show().dropShadow({left: 1, top: 4, opacity: 0.6, blur: 4});
            $this.removeData('dropmenuCancel');
        };

        var dm_hide = function(evt) {
            var $this = $(this);
            if ($this.data('dropmenuCancel')) {
                return;
            }
            $this.data('dropmenuCancel', true);
            $("div.dropmenu-content", this).hide().removeShadow();
            $("span.dropmenu-label a", this).removeClass("hover");
            $this.removeData('dropmenuCancel');
        };
        
        $("> li.dropmenu-item", this).each(function() {
                $(this).hover(dm_show, dm_hide);
            });
            
            
    };
 })(jQuery);
