if(top != self){	top.location.href = self.location.href;	}

/**
window.onload = function(){
	if(window.innerHeight != undefined){
		var tmp = window.innerHeight - document.getElementById("wrapper").offsetHeight;
		if(tmp > 20){
			document.getElementById("wrapper_bottom").style.height = tmp + "px";
		}else{
			document.getElementById("wrapper_bottom").style.height = 20 + "px";
		}
	}else{
		var tmp = document.body.clientHeight - document.getElementById("wrapper").offsetHeight;
		if(tmp > 20){
			document.getElementById("wrapper_bottom").style.height = tmp + "px";
		}else{
			document.getElementById("wrapper_bottom").style.height = 20 + "px";
		}
	}
}
**/

$(function(){
	$("table#obi_table tr td div.hover_thumbnail").hover(function(){
		$("div.bigthumbnail", $(this)).css({ display: "block" });
	}, function(){
		$("div.bigthumbnail", $(this)).css({ display: "none" });
	});

	$("table#obi_table tr").hover(function(){
		$(this).addClass("hover");
	}, function(){
		$(this).removeClass("hover");
	});

	$("table#obi_table tr").click(function(){
		var gohref = $("td > div > a[@href]", this).get();
		if(gohref != ""){
			window.location.href = gohref;
		}
	});

	$("table#obi_table2 tr td div.hover_thumbnail").hover(function(){
		$("div.bigthumbnail", $(this)).css({ display: "block" });
	}, function(){
		$("div.bigthumbnail", $(this)).css({ display: "none" });
	});

	$("table#obi_table2 tr").hover(function(){
		$(this).addClass("hover");
	}, function(){
		$(this).removeClass("hover");
	});

	$("table#obi_table2 tr").click(function(){
		var gohref = $("td > div > a[@href]", this).get();
		if(gohref != ""){
			window.location.href = gohref;
		}
	});

	$("table#obi_table3 tr td div.hover_thumbnail").hover(function(){
		$("div.bigthumbnail", $(this)).css({ display: "block" });
	}, function(){
		$("div.bigthumbnail", $(this)).css({ display: "none" });
	});

	$("table#obi_table3 tr").hover(function(){
		$(this).addClass("hover");
	}, function(){
		$(this).removeClass("hover");
	});

	$("table#obi_table3 tr").click(function(){
		var gohref = $("td > div > a[@href]", this).get();
		if(gohref != ""){
			window.location.href = gohref;
		}
	});

	$("table#obi_table4 tr td div.hover_thumbnail").hover(function(){
		$("div.bigthumbnail", $(this)).css({ display: "block" });
	}, function(){
		$("div.bigthumbnail", $(this)).css({ display: "none" });
	});

	$("table#obi_table4 tr").hover(function(){
		$(this).addClass("hover");
	}, function(){
		$(this).removeClass("hover");
	});

	$("table#obi_table4 tr").click(function(){
		var gohref = $("td > div > a[@href]", this).get();
		if(gohref != ""){
			window.location.href = gohref;
		}
	});

	var tmp;
	var tmp2;
	$("div[@class='oyakudachi'] div div div a").hover(function(){
		//tmp = $(this).css("background-image").substr(5, 44);
		//tmp = new String($(this).css("background-image"));
		tmp = $(this).css("background-image");
		tmp = tmp.replace('url("', "");
		tmp = tmp.replace('url(', "");
		tmp = tmp.replace('")', "");
		tmp = tmp.replace(')', "");
		tmp2 = $(this).css("background-image");
		var filename = tmp.substr(38, 6);
		var path = tmp.replace(filename, "");
		var num = filename.substr(0, 2) - 0;
		num = (num + 20) % 40 + 1;
		if(num < 10){
			num = "0" + num + "";
		}
		var new_img = path + num + ".gif"
		$(this).css("background-image", "url('"+new_img+"')");
	}, function(){
		$(this).css("background-image", tmp2);
	});
});

