title: jQuery, thumbnail opacity
body: <p>I want to do a photo gallery in jQuery, to do that I want the opacity of the first thumbnail in 1, and all the other thumbnails in 0.5, and as soon as my mouse is above a thumbnail, the opacity of this very one will be 1 and when my mouse will be out, the opacity will be back to 0.5.
  So I did all of that, the problem is that I don't want this "mouseover", "mouseout" code for the thumbnail i clicked in, so what i did is:</p>
  
  <pre><code>var selector = $('.thumb:first');
  </code></pre>
  
  <p>then</p>
  
  <pre><code> $('.thumb').click(function() {
      selector = $(this);
    $(this).css('opacity','1');
  </code></pre>
  
  <p>$('.thumb').css('opacity','0.5');
        });  </p>
  
  <p>and </p>
  
  <pre><code>$('.thumb').mouseover(function() {
      if($(this) != selector){
      $(this).css('opacity','1');
      }
  });
  
  $('.thumb').mouseout(function() {
      if($(this) != selector){
      $(this).css('opacity','0.5');
      }
  });
  </code></pre>
  
  <p>but it doesn't work, as soon as my mouse is leaving the last thumbnail i clicked on, the opacity of the thumbnail is going to 0.5 instead of staying to 1</p>