// JavaScript Document for Image schmooing

var imgObjects = [];
for (var i=0; i<imgNames.length; i++)
{
	imgObjects[i] = new Image();
	imgObjects[i].src = imgNames[i];
}

// handy bendy-blendy swap-fop master foo
function swapImage(thumb) {
var img = document.getElementById('bigimage');
var imgold = document.getElementById(thumb);
// get the right path for placing the clicked thumbnail into the large image box
var oldsource = imgold.src;
var badpath = "/scripts/IM96.php?image=..";
var empty = "";
var imgstripped = oldsource.replace(badpath,empty);
// change the thumbnail now to what was the large image
var orgbig = img.src;
//alert(orgbig);
var resized = orgbig.replace("http://www.vintage-vanity.co.uk", "..");
//alert(resized);
var resizedfinal = "http://www.vintage-vanity.co.uk/scripts/IM96.php?image=" + resized;
//alert(resizedfinal);
// swap dem foohs
img.src = imgstripped;
//Effect.Appear(img, { duration:1.0, from:0.0, to:1.0 });
$(img).fadeOut(0.01); // fading
$(img).fadeIn(1500); // fading
imgold.src = resizedfinal;
}