$(function(){
		   
	//メニュー　ロールオーバー
    $('#menu li a').hover(
        function() {
            $(this).stop().animate({"opacity":0},{"duration":0});
        },
        function() {
            $(this).stop().animate({"opacity":1},{"duration":"normal"});
        }
    );
	
	//言語切り替えボタン　ロールオーバー
	$('#lang li a').hover(
        function() {
            $(this).stop().animate({"opacity":0},{"duration":0});
        },
        function() {
            $(this).stop().animate({"opacity":1},{"duration":"normal"});
        }
    );
	
	
	//prev
	$('#content_header #prev a').hover(
        function() {
            $(this).stop().animate({"opacity":0},{"duration":100});
        },
        function() {
            $(this).stop().animate({"opacity":1},{"duration":"normal"});
        }
    );
	//next
	$('#content_header #next a').hover(
        function() {
            $(this).stop().animate({"opacity":0},{"duration":100});
        },
        function() {
            $(this).stop().animate({"opacity":1},{"duration":"normal"});
        }
    );
	//pdf
	$('#content_header #pdf a').hover(
        function() {
            $(this).stop().animate({"opacity":0},{"duration":100});
        },
        function() {
            $(this).stop().animate({"opacity":1},{"duration":"normal"});
        }
    );

	//プロジェクトページ　PDFダウンロード　サムネイル　ロールオーバー
	$('#content_left .pdf-block a').css({"opacity":0.3});
	$('#content_left .pdf-block a').hover(
        function() {
            $(this).stop().animate({"opacity":0.6},{"duration":"normal"});
        },
        function() {
            $(this).stop().animate({"opacity":0.3},{"duration":"normal"});
        }
    );

	//プロジェクトページ　サムネイル　ロールオーバー
	var postfix = '_r';
	$('#architecture li a img').not('[src*="'+ postfix +'."]').each(function() {
		var img = $(this);
		var src = img.attr('src');
		var src_on = src.substr(0, src.lastIndexOf('.'))
		           + postfix
		           + src.substring(src.lastIndexOf('.'));
		$('<img>').attr('src', src_on);
		img.hover(
			function() {
				img.attr('src', src_on);
			},
			function() {
				img.attr('src', src);
			}
		);
	});
	$('#urbanresearch li a img').not('[src*="'+ postfix +'."]').each(function() {
		var img = $(this);
		var src = img.attr('src');
		var src_on = src.substr(0, src.lastIndexOf('.'))
		           + postfix
		           + src.substring(src.lastIndexOf('.'));
		$('<img>').attr('src', src_on);
		img.hover(
			function() {
				img.attr('src', src_on);
			},
			function() {
				img.attr('src', src);
			}
		);
	});
	$('#lecture li a img').not('[src*="'+ postfix +'."]').each(function() {
		var img = $(this);
		var src = img.attr('src');
		var src_on = src.substr(0, src.lastIndexOf('.'))
		           + postfix
		           + src.substring(src.lastIndexOf('.'));
		$('<img>').attr('src', src_on);
		img.hover(
			function() {
				img.attr('src', src_on);
			},
			function() {
				img.attr('src', src);
			}
		);
	});
	
});

