var large_images = [];

$(document).ready(function() {
	
	//Set event handlers for images in "View More Images"
	$('#ImageSlideshowThumbs img').each(function() {
		large_images[large_images.length] = $(this).attr('src');
		$(this).mouseover(function() {
			if( $(this).attr('src') == 'images/banners/thumbs/thumb1.png' )
				return false;
			$('#main_image').attr('src', get_large_image($(this).attr('src')));
		});
	});
	
});

var o = window.onload;
window.onload = function() {
	if( typeof o == 'function' ) {
		o();
	}
	for( var x = 0; x < large_images.length; x++ ) {
		var img = new Image();
		img.src = large_images[x];
	}
};

function get_large_image( thumb_src ) {
	return thumb_src.replace('/thumbs','');
}