title: Swap an image for swf file using Jquery
body: <p>I have some thumbnails + a camera icon on a page and a main image, currently you click the thumbnail and the main image fades out and a full size version fades in of the thumbnail.</p>
  
  <p>Now if a user clicks the camera icon the full image should fade out and a swf video should fade in, how can I achieve this?</p>
  
  <p>Here is the current code i'm using for the images:</p>
  
  <pre>
  $('a.thumbnail').click(function(){
      var src = $(this).attr('href');
  
      if (src != $('img#full_image').attr('src').replace(/\?(.*)/,'')){
          $('img#full_image').stop().animate({
              opacity: '0'
          }, function(){
              $(this).attr('src', src+'?'+Math.floor(Math.random()*(10*100)));
          }).load(function(){
              $(this).stop().animate({
                  opacity: '1'
              });
          });
      }
      return false;
  });
  
  </pre>
  
  <h2>Thanks</h2>