Jquery if statement for different classed buttons
<p>I have 5 buttons all with different classes (fancy images for each), I want to be able turn the particular active class on when the button is clicked and off when another is clicked.
`
--HTML for buttons--</p>

<pre><code> &lt;ul&gt;
 &lt;li class="home"&gt;
  &lt;a href="#home" class="buttonhome"&gt;HOME&lt;/a&gt;
 &lt;/li&gt;

 &lt;li class="about"&gt;
   &lt;a href="#about" class="buttonabout"&gt;ABOUT US&lt;/a&gt;
 &lt;/li&gt;

 &lt;li class="otres"&gt;
 &lt;a href="#otres" class="buttonotres"&gt;OTRES BEACH&lt;/a&gt;
 &lt;/li&gt;

 &lt;li class="rates"&gt;
   &lt;a href="#rates" class="buttonrates"&gt;FACILITIES &lt;br /&gt; &amp; RATES&lt;/a&gt;
 &lt;/li&gt;

 &lt;li class="contact"&gt;
  &lt;a href="#contact" class="buttoncontact"&gt;CONTACT US&lt;/a&gt;
 &lt;/li&gt;
 &lt;/ul&gt;
</code></pre>

<p>`</p>

<p>I can manage to get jQuery to switch the classes for one button, but am stuck either getting it into an if statement or better. </p>

<pre><code> --Jquery--

&lt;script type="text/javascript"&gt;
    $(".buttonhome").click( function() {
        $(".activehome").removeClass("activehome");
        $(this).parent("li").addClass("activehome");
    });
&lt;/script&gt;
</code></pre>
