﻿var currentId="thumb01";

$(function () {
	$("#thumb li").not("#"+currentId).fadeTo(0,0.5);
	$("#thumb").delegate("li img","click", function(e) {
		var imgId = $(this).parent().attr("id");		
		if(currentId!=imgId) {
			$("#enlargement img").attr("src",$(this).attr("src"));
			$("#enlargement img").attr("alt",$(this).attr("alt"));
			currentId=imgId;
			$("#thumb li").not("#"+currentId).fadeTo(0,0.5);
			$("#"+currentId).fadeTo(500,1.0);
		}
	});
})
