            
            this.find("> li").each(function() {
                e = $(this)
                var subtree = e.find('> ul');

                if (subtree.length > 0) {
                    e.removeClass('tree-opened');
                    e.addClass('tree-closed');

                    subtree.slideUp(options.delay);
                    subtree.hide(options.delay);

                    subtree.collapse(options);
                } 
            });
            return true;
        }

    $.fn.treemen