// jQuery Gallery

$(document).ready(
			function(){
				$(".smallImage img").click(function() {
				var url = $(this).attr("src").replace("_t", "");
				var bigImage = $("#carBigImage").fadeTo("fast");
				
				// the large image
				var img = new Image();

				// call this function after it's loaded
				img.onload = function() {

					// make wrapper fully visible
					bigImage.fadeTo("fast", 1);

					// change the image
					bigImage.find("img").attr("src", url);			
					
				};	
				
				// begin loading the image from flickr
				img.src = url;

// when page loads simulate a "click" on the first image
}).filter(":first").click();
});

				
					
					

