title: Image swap jquery mouseover
body: <p>I am currently having some problems getting a mouseover and mouseout function to work in jquery. I have two images called 'images/doomsday.jpg' and the other called 'keep_calm.png' which i want to swap when the mouse is over them and then swap back when it is not. I have included the code I am currently trying to use, can anybody see any problems with it and where I am going wrong?</p>
  
  <pre><code>$(function() {
  $("images/doomsday.jpg")
      .mouseover(function() { 
          var src = $(this).attr("src").match(/[^\.]+/) + "images/keep_calm.png";
          $(this).attr("src", src);
      })
      .mouseout(function() {
          var src = $(this).attr("src").replace("images/keep_calm.png");
          $(this).attr("src", src);
      });
  </code></pre>
  
  <p>});</p>