simplify these jquery?
<p>how can i simplify these jquery code? any idea?     </p>

<pre><code>   $('#expand').click(function() {
            $('.bbit-tree-elbow-plus').addClass('bbit-tree-elbow-minus');
            $('.bbit-tree-elbow-minus').removeClass('bbit-tree-elbow-plus');
            $('ul.bbit-tree-node-ct .bbit-tree-elbow-end-plus').addClass('bbit-tree-elbow-end-minus');
            $('ul.bbit-tree-node-ct .bbit-tree-elbow-end-minus').removeClass('bbit-tree-elbow-end-plus')
            if ($("#preview_root").hasClass("bbit-tree-node-collapsed")) {
                $('#preview_root').removeClass('bbit-tree-node-collapsed');
                $('#preview_root').addClass('bbit-tree-node-expanded');
                $('ul.bbit-tree-root .bbit-tree-elbow-end-plus').addClass('bbit-tree-elbow-end-minus');
                $('ul.bbit-tree-root .bbit-tree-elbow-end-minus').removeClass('bbit-tree-elbow-end-plus')
                $('.bbit-tree-node-ct').show();
            }
            $(".bbit-tree-node-ct ul").show();
        });
        $('#collapse').click(function() {
            $('.bbit-tree-elbow-minus').addClass('bbit-tree-elbow-plus');
            $('.bbit-tree-elbow-plus').removeClass('bbit-tree-elbow-minus');
            $('ul.bbit-tree-node-ct .bbit-tree-elbow-end-minus').addClass('bbit-tree-elbow-end-plus');
            $('ul.bbit-tree-node-ct .bbit-tree-elbow-end-plus').removeClass('bbit-tree-elbow-end-minus')
            $(".bbit-tree-node-ct ul").hide('slow');
        });
</code></pre>
