jQuery functions inside click events
<p>The following works fine:</p>

<pre><code>    classes_tab.click(function(evt){
        evt.preventDefault();
        h_c.filter(':visible').fadeOut(fast, function(){
            disactive.removeClass('active');
            classes_tab.addClass('active');
            classes.fadeIn(fast);
        });
    });

    contacts_tab.click(function(evt){
        evt.preventDefault(evt);
        h_cl.filter(':visible').fadeOut(fast, function(){
            disactive.removeClass('active');
            contacts_tab.addClass('active');
            contacts.fadeIn(fast);
        });
    });

    home_tab.click(function(evt){
        evt.preventDefault();
        c_cl.filter(':visible').fadeOut(fast, function(){
            disactive.removeClass('active');
            home_tab.addClass('active');
            home.fadeIn(fast);
        });
    });
</code></pre>

<p>Is there a way of writing a function before this click events without repeating every time what is happening inside the click event? </p>

<p>Say I have something like:</p>

<pre><code>function tabs(x, y){
    x.fadeOut(fast);
            y.fadesIn(fast);
        }
</code></pre>

<p>than inside each click event I just call this function by changing parameters </p>
