function zoomPreload(from) {

	var theimage = from.getAttribute("href");

	// Only preload if we have to, i.e. the image isn't this image already

	if (imgPreload.src.indexOf(from.getAttribute("href").substr(from.getAttribute("href").lastIndexOf("/"))) == -1) {
		preloadActive = true;
		imgPreload = new Image();

		// Set a function to fire when the preload is complete, setting flags along the way.

		imgPreload.onload = function() {
			preloadActive = false;
		}

		// Load it!
		imgPreload.src = theimage;
	}
}
// Preloaded image is stored in imgPreload and swapped out in the zoom function.
Preloaded image is stored in imgPreload and swapped out in the zoom function.
Preloaded image is stored in imgPreload and swapped out in the zoom function .
function zoomPreload(from) {
	var theimage = from.getAttribute("href");
	if (imgPreload.src.indexOf(from.getAttribute("href").substr(from.getAttribute("href").lastIndexOf("/"))) == -1) {
		preloadActive = true;
		imgPreload = new Image();
		imgPreload.onload = function() {
			preloadActive = false;
		}
		imgPreload.src = theimage;
	}
}
function zoomPreload ( from ) { var theimage = from . getAttribute ( "href" ) ; if ( imgPreload . src . indexOf ( from . getAttribute ( "href" ) . substr ( from . getAttribute ( "href" ) . lastIndexOf ( "/" ) ) ) == - 1 ) { preloadActive = true ; imgPreload = new Image ( ) ; imgPreload . onload = function ( ) { preloadActive = false ; } imgPreload . src = theimage ; } }
Preloaded image is stored in imgPreload and swapped out in the zoom function.
Preloaded image is stored in imgPreload and swapped out in the zoom function .
// Only preload if we have to, i.e. the image isn't this image already // Set a function to fire when the preload is complete, setting flags along the way. // Load it!