function prepareMouseOver(path)
{
	$("img:not(#img_large)").each(function() {
		//preload images
		//var img = new Image();
		//img.src = path + $(this).attr("id") + "_med.jpg";
	});
}

function switchImage(path, id)
{
	callback = function() {
		$(this).addClass("hidden");
		
		if ($("#loading_img").length == 0) {
			$(".aircraft_img").before("<div id=\"loading_img\">Loading Image... Please wait...</div>");
		} else {
			$("#loading_img").show();
		}
		
		$(this).parent().load("/getImage.aspx?src=" + path + id + "_med.jpg #img_large", {}, function() {
			$("#img_large").load(function() {
				$("#loading_img").hide();
				
				$("#img_large").fadeTo(0, 0, function() {
					$(this)
						.removeClass("hidden")
						.fadeTo("def", 1);
				});
			});
		});
	};
	
	$("#img_large").fadeTo("def", 0, callback);
}