//-----------------------------------------------------------------------------
function swapThumbnail(swappingInElement,fullsizeImage)
{
  // Replace the large image with the large image of our thumbnail
  $j('.imageBigPic').get(0).src = fullsizeImage;
  $j("#photoThumbs .photoSmallOn").each(function() { 
    if($j(this).hasClass('photoSmallOn'))
    {
      $j(this).removeClass('photoSmallOn');
      $j(this).addClass('photoSmall');
    }
  });

  $j(swappingInElement).addClass('photoSmallOn');
  $j(swappingInElement).removeClass('photoSmall');
  
}

//-----------------------------------------------------------------------------
// Show a full size version of the image
function showFullSizeImage(largeImage,fullSizeContainer,fullSizeImageElement,IMAGE_URLS)
{
  var selectedThumbnail = $j("#photoThumbs .photoSmallOn")[0];
  var image_index = selectedThumbnail.id.match(/\d/);
  var index = parseInt(image_index)

 	$j(fullSizeContainer).show();  
	fullSizeImageElement.src = IMAGE_URLS[index];
	fullSizeContainer.style.width = largeImage.style.width;
	fullSizeContainer.style.height = largeImage.style.height;
}
