Help - Changing object using a class identifier not working

Help - Changing object using a class identifier not working

Here is my code:
  1. <div id="GroupMenu">
  2.     <div id="navPremium2">
  3.         <ul id="ulList" >
  4.             <li id="liHome" class="GSTab" onclick="GSToggle(this)">
  5.             </li>
  6.             <li id="liAbout" class="GSTab" onclick="GSToggle(this)">
  7.             </li>
  8.         </ul>
  9.     </div>

  10. </div>

  11. <script type="text/javascript">

  12.     $(document).ready(function () {
  13.     });

  14.     function GSToggle(CurrentTab, Opt) {
  15.         $(".GSTab").removeClass("selected");
  16.         $('#liHome')[0].className = "GSTab";
  17.         $('#liAbout')[0].className = "GSTab";
  18.         $(CurrentTab)[0].className = "selected";
  19.     }
  20. </script>
My problem is that line 20 does not work, it does nothing.
All I am trying to do is set a "selected" class on the "li" object that has been clicked.
The next three lines seem to work/

I did try this:
  1. $(CurrentTab)[0].addClass("selected");

But I get this error: Object doesn't support property or method 'addClass'