/*--------------------------------------------------
show/hide layer
--------------------------------------------------*/
$(function(){
	$(".showHideBox").addClass("hideLayer")
	function showLayer(){
		$(".showHideBox").removeClass("hideLayer");
		$(this).replaceWith("<p class='closeBox'>" + "<img src='/image/kids/top/close-description.gif' alt='詳しい内容を閉じる'>" + "</p>");
		$(".closeBox").click(hideLayer);
	}
	function hideLayer(){
		$(".showHideBox").addClass("hideLayer")
		$(".closeBox").replaceWith("<p class='openBox'>" + "<img src='/image/kids/top/read-description.gif' alt='詳しい内容を読む'>" + "</p>");
		$(".openBox").click(showLayer);
	}
	$(".openBox").click(showLayer);
});


/*--------------------------------------------------
show/hide layer
--------------------------------------------------*/
function exText(mName,iName)
{
	obj = document.getElementById(mName).style;
	img = document.images[iName];
	f   = obj.display;
	if (f == 'none')
	{
		obj.display = "block";
		img.src = '/image/kids/top/close-description.gif';
	}else{
		obj.display = "none";
		img.src = '/image/kids/top/read-description.gif';
	}
}

/*--------------------------------------------------
font size change / do print
--------------------------------------------------*/
$(function(){
	//font size chance	
	$("img#textSizeChange").click(function(){
		var image_base = "/image/kids/common/";
		var kids_image_big = "text-large";
		var kids_image_small = "text-small";

		if(this.src.indexOf(kids_image_small) == -1){
			$(".kidsMain").css("fontSize","114%");
			this.src = image_base + kids_image_small + ".gif";
		}else{
			$(".kidsMain").css("fontSize","100%");
			this.src = image_base + kids_image_big + ".gif";
		}
	});
	$("img#textSizeChangeJack").click(function(){
		var image_base = "/image/kids/jack/";
		var kids_image_big = "text-large";
		var kids_image_small = "text-small";

		if(this.src.indexOf(kids_image_small) == -1){
			$(".kidsMain").css("fontSize","114%");
			this.src = image_base + kids_image_small + ".gif";
		}else{
			$(".kidsMain").css("fontSize","100%");
			this.src = image_base + kids_image_big + ".gif";
		}
	});


	//do print
	$("img#doPrint").click(function(){print();})

	//height adjust
	var show_height = $("div#showManner").height();
	if(navigator.userAgent.indexOf("IE 6") != -1)
		show_height = show_height + 10;
	$("div#calenderBox").css("height",show_height);

});