Three blocks of code that do almost the same thing. How can I reduce these to the one block using 'this'?
<p>I am a real novice when it comes to jQuery.  I don't really understand how to use 'this' correctly.  I have three blocks of code that do almost the same thing but for a different element.  I was wondering if it was possible to cut this code down using 'this'.  Here is my code.</p>

<p>Any help would be greatly appreciated!!</p>

<pre><code>    $(".shop-links1:contains('Tops')").click(function(){//Sort by tops
        $(".tops").show().appendTo("#tabs-1");
        $(".tunics").hide();
        $(".dresses").hide();
        $("#tabs ul li.a:not(:first)").animate
          ({height:'hide'}, 'slow') 
    });

    $(".shop-links1:contains('Tunics')").click(function(){//Sort by tunics
        $(".tops").hide();
        $(".tunics").show().appendTo("#tabs-1");
        $(".dresses").hide();
        $("#tabs ul li.a:not(:first)").animate
          ({height:'hide'}, 'slow') 
    });

    $(".shop-links1:contains('Dresses')").click(function(){//Sort by dresses
        $(".tops").hide();
        $(".tunics").hide();
        $(".dresses").show().appendTo("#tabs-1");
        $("#tabs ul li.a:not(:first)").animate
          ({height:'hide'}, 'slow') 
    });
</code></pre>

<p>Thanks</p>

<p>Chris</p>
