title: preload image and show a spinner while loading
body: <p>Hy,</p>
  
  <p>i use uploadify to upload some images, after i display all the images thumbs in a list, when i click on a image thumb a bigger image it's open in a div with this function</p>
  
  <pre><code>$(".thumbs li a").click(function(){
      var largePath = $(this).attr("href");
      $('.thumbs li').removeClass('thumbac');
      $(this).parent().addClass('thumbac');
      $("#largeImg").attr({ src: largePath });
      return false;
  });
  </code></pre>
  
  <p>here is my list of photos:</p>
  
  <pre><code>&lt;div class="upimage"&gt;
    &lt;ul id="upimagesQueue" class="thumbs"&gt;
      &lt;li id="liupimages"&gt;
        &lt;a href="uploads/0001.jpg"&gt;&lt;img src="uploads/0001.jpg" alt="0001.jpg" id=""&gt;&lt;/a&gt;
      &lt;/li&gt;
      &lt;li id="liupimages"&gt;
        &lt;a href="uploads/0002.jpg"&gt;&lt;img src="uploads/0002.jpg" alt="0002.jpg" id=""&gt;&lt;/a&gt;
      &lt;/li&gt;
      &lt;li id="liupimages"&gt;
        &lt;a href="uploads/0003.jpg"&gt;&lt;img src="uploads/0003.jpg" alt="0003.jpg" id=""&gt;&lt;/a&gt;
      &lt;/li&gt;
  &lt;script&gt;
  $(".thumbs li a").click(function(){
      var largePath = $(this).attr("href");
      $('.thumbs li').removeClass('thumbac');
      $(this).parent().addClass('thumbac');
      $("#largeImg").attr({ src: largePath });
      return false;
  });
  &lt;/script&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>this is the div where the images appear</p>
  
  <pre><code>&lt;div class="largeImg" &gt;     
      &lt;img id="largeImg" src="" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>how i can preload the image before it display?</p>