title: Function to preload images?
body: <p>I'm successfully pre-loading an image on my website with this JavaScript:</p>
  
  <pre><code>loveHover = new Image();
  loveHover.src = "http://mypage.com/images/love-hover.png";
  </code></pre>
  
  <p>Is there an easy an good way to pack this thing into a function? Something like:</p>
  
  <pre><code>function preloadImage(image) {
      var image = new Image();
      var path = "http://mypage.com/images/";
      image.src = path + image;
  }
  </code></pre>