combining similar click handlers in order to reduce code being used in jquery?
<p>I have 2 click events that go through a series of different actions, the only thing that is different between the 2 events though is 2 lines. Is there a way of combining these clicks in order to cut down the amount of code being used?</p>

<pre><code>$('a.register').click(function() {
                $('h4#registerHead').addClass('active');
                $('#registerMessage').show();
                $('#nav li span a').css({'color':'#8F8F8F'});
                $('#alertNav').css({'color':'#dedede'}).addClass('activeSub');
            });

            $('a.subscribe').click(function() {
                $('h4#subscribeHead').addClass('active');
                $('#subscribeMessage').show();
                $('#nav li span a').css({'color':'#8F8F8F'});
                $('#alertNav').css({'color':'#dedede'}).addClass('activeSub');
            });
</code></pre>

<p>All advice welcome on this, and thanks.</p>
