title: Active state on jquery hover code
body: <p>I have the following code that, superbly, changes my image name from image_off.jpg to image_on.jpg on hover. I am using it for a gallery.</p>
  
  <pre><code>    $(function(){
       $(".img-swap").hover(
            function(){this.src = this.src.replace("_off","_on");},
            function(){this.src = this.src.replace("_on","_off");
       });
  });
  </code></pre>
  
  <p>However I want the image name to stay on image_on.jpg when I click one of the images. Is this possible and is it possible to have it swap back to off when I click another?</p>
  
  <p>Thanks</p>