(function($){
  $.fn.myAccordion = function(options) {
    // there's no need to do $(this) because
    // "this" is already a jquery object
    // $(this) would be the same as $($('#element'));
    var settings = {
        list_class: 'famiglia'
    };
    $.extend(settings, options);
    var openers=this;
    var enter_callback=function(){
        if($(this).find('ul.'+settings.list_class).is(':hidden')){
            openers.each(function(){
                $(this).find('ul.'+settings.list_class).hide(400);
            });
            $(this).find('ul.'+settings.list_class).show(300);
            
            return false;
        }
    };
    enter_callback=$.throttle(1000, true, enter_callback);
    return this.each(function(i, e){
        $(this).find('ul.'+settings.list_class).hide();
        $(this).mouseenter(enter_callback);
    });
  };
})( jQuery );

