// JavaScript Document
$(document).ready( function(){
    $("#photolist img").hover(function(){
       $(this).fadeTo("normal", 0.6); // マウスオーバーで透明度を60%にする
    },function(){
       $(this).fadeTo("normal", 1.0); // マウスアウトで透明度を100%に戻す
    });
  });


$(document).ready( function() {   
	$(".gallery1 img")
	.hover(
		function(){
			$(this).fadeTo(500,0.5);
			//var changeSrc1 = this.href; →http://から取得する
			var hrefsrc =	$(this).attr("id");
			var imgsrc 	=	$(this).attr("src");
			
			if(typeof($(this).attr("alt"))=="undefined"){
				var textsrc	= "";
			}else{
				var textsrc	=	$(this).attr("alt");
			}
			
			$("#bigphoto img").fadeOut(   
				"slow",   
				function() {   
					$("#bigphoto img").attr("src", imgsrc);
					$(this).fadeIn();
				}
			);
			$("#jutakudata").fadeOut(   
				"slow",   
				function() {
					document.getElementById("jutakudata").innerHTML = "DATA　" + textsrc; 				
					
					$("#jutakudata").fadeIn();
				}
			);

		},function(){
			$(this).fadeTo(1,1);
		}
	)
});
$(document).ready( function() {   
	$(".gallery2 img")
	.hover(
		function(){
			$(this).fadeTo(500,0.5);
			//var changeSrc1 = this.href; →http://から取得する
			var imgsrc 	= $(this).attr("src");
			
			if(typeof($(this).attr("alt"))=="undefined"){
				var textsrc	= "";
			}else{
				var textsrc	= $(this).attr("alt");
			}
			
			if(typeof($(this).attr("title"))=="undefined"){
				var titlesrc	= "";
			}else{
				var titlesrc = $(this).attr("title");
			}

			$("#bigphoto img").fadeOut(   
				"slow",   
				function() {   
					$("#bigphoto img").attr("src", imgsrc);
					$(this).fadeIn();
				}
			);
			$("#jutakudata").fadeOut(   
				"slow",   
				function() {
					document.getElementById("jutakudata").innerHTML = titlesrc; 				
					
					$("#jutakudata").fadeIn();
				}
			);
			$("#jutakudata2").fadeOut(   
				"slow",   
				function() {
					if(typeof textsrc != "undifined"){
						document.getElementById("jutakudata2").innerHTML = textsrc;
					}else{
						document.getElementById("jutakudata2").innerHTML = "";	
					}
					$("#jutakudata2").fadeIn();
				}
			);

		},function(){
			$(this).fadeTo(1,1);
		}
	)
});
