$(function(){
  
  // The container for the large image should have an id of "imageswitchframe"
  // All images which are included in the effect should be in a container with a class of "imageswtich"
  
  // Example "imageswtich"
  
  /*****
  Example "imageswtich"
  
  <div class ="imageswtich">
    <a href="http://url/to/large/image">
      <img src="http://url/to/thuumbnail" />
    </a>
  </div>
  */
  
  /*****
  Example imageswitchframe
  
  <div id="imageswitchframe">
    <img src="http://url/to/first/image" />
  </div>
  */
  
  var $imageswitch = $(".imageswitch a");
  var $imageswitchframe = $("#imageswitchframe img");
  
  // Switch function
  $imageswitch.click(function(e){
	e.preventDefault();
    var large_img = $(this).attr("href");
    $imageswitchframe.attr("src", large_img);
    // Cancel link being followed
    return false;
  });
});
