var onMouseOutOpacity = 1.0;
$(function(){
    $(".thumb img").css("opacity",onMouseOutOpacity).hover(
		function () {
			$(this).not('.selected').fadeTo("fast", 0.67);
		}, 
		function () {
			$(this).not('.selected').fadeTo("fast", onMouseOutOpacity);
		}).click(changePhoto);
  });

	
function changePhoto(){
	var setname = $(this).attr("rel");
	var panelID = $(this).parents('ul').prev().attr('id');
	if(panelID=='case1'){
		$("#case1 img").attr("src",setname);
		}else if(panelID=='case2'){
		$("#case2 img").attr("src",setname);
		}else if(panelID=='case3'){
		$("#case3 img").attr("src",setname);
	}else{
		return;
	}
}
