title: remove class from current group
body: <p>The easiest way to see the problem is checking the code here: <a href="http://www.studioimbrue.com/beta" rel="nofollow noreferrer">http://www.studioimbrue.com/beta</a></p>
  
  <p>What I need to do is once a thumbnail is clicked, to removed the "selected" class from all other thumbnails that are in this same  or  without removing them from the other galleries on the page. Right now, I have everything working except the class removal. Someone helped me in another question but wasn't quite specific enough (my javascript skills aren't all that great!) I'm using jQuery. Thanks for the help.</p>
  
  <p>Well in that case, I'm not sure why this doesn't work properly:</p>
  
  <pre><code>$(document).ready(function(){ 
      var activeOpacity   = 1.0,
          inactiveOpacity = 0.6,
          fadeTime = 100,
          clickedClass = "selected",
          thumbs = ".thumbscontainer ul li img";
  
      $(thumbs).fadeTo(1, inactiveOpacity);
  
      $(thumbs).hover(
          function(){
              $(this).fadeTo(fadeTime, activeOpacity);
          },
          function(){
              // Only fade out if the user hasn't clicked the thumb
              if(!$(this).hasClass(clickedClass)) {
                  $(this).fadeTo(fadeTime, inactiveOpacity);
              }
          });
       $(thumbs).click(function() {
           // Remove selected class from any elements other than this
           var previous = $(thumbs+'.'+clickedClass).eq();
           var clicked = $(this);
           if(clicked !== previous) {
               previous.removeClass(clickedClass);
           }
           clicked.addClass(clickedClass).fadeTo(fadeTime, activeOpacity);
       });
  });
  </code></pre>