having trouble mixing hover add remove class functions with an "active" state for links

having trouble mixing hover add remove class functions with an "active" state for links

  1.  <script type="text/javascript">
  2.      $(document).ready(function(){
  3.     var classes;
  4.     $('span a').hover(function(e){
  5.       // hover on 
  6.   classes = $(this).attr('class').split(" ");
  7. for(var i in classes){
  8.  $('a.' + classes[i]).addClass('sibling').show('slow');
  9. }
  10. $(this).addClass('selected');
  11. $('a:not(.selected, .sibling)').addClass('fade').show('slow'); 
  12. }, function(e){
  13. $('a').removeClass('selected sibling fade').show('slow');
  14.     });
  15.   });
  16. </script> 
in the aforementioned code I am trying to associate links that are related by class type. this is working. But Im trying to add an "active" state function similar to a:active and it's not flying.  I tried the following:

  1. $('span a').click(function(){
  2. $(this).addClass('active').show('slow');
  3. });
it doesnt seem to do anything...and I'm not sure why. I have a class .active which has a different colour set for it, and even a different font size just for debugging purposes...where Im going with this is to instead of just having this dynamic association work by hover also have it by state - so when one link is "active" regardless of where the mouse is, related links are tagged and highlighted appropriately. can anyone help with this?