// JavaScript Document

//遅延させる関数
$.fn.wait = function(time, type) {
	time = time || 600;
	type = type || "fx";
	return this.queue(type, function() {
		var self = this;
		setTimeout(function() {
			$(self).dequeue();
							}, time);
									 });
};

//サムエル画面をクリックすると、該当画面と「戻る」ボタンがが表示される
$(function(){
	$("#photo3-3 a").click(function(){						 
		$("#hidden img").before("<img src='"+$(this).attr("href")+"'>");
		$("#hidden img:last").remove();		
		$("#hidden").css("left", "40px");			
		$("#btn").css("display", "none").css("left", "644px");
		$("#btn").wait().show(3);
			return false;
									});
		   });


//「戻る」ボタンをクリックすると、該当画面が消え、サムエル画面が表示される
$(function(){
	$("#btn").click(function(){
		$("#hidden img").hide("slow");
		$("div #hidden").css({
						 left : "-2000px"
						 });		
		$("#btn").css({
					  left : "-2644px"
					  });		
			return false;		
							 });
//ボタンにマウスオーバーの時、マウスアウトの時、ボタンの色を変える	
	$("#btn").mouseover(function(){
		$("#btn img").attr("src", "parts/btn_modoru_f02.png");
			}).mouseout(function(){
		$("#btn img").attr("src", "parts/btn_modoru_f01.png");
			});
	});
	
