/*************************************************　表示コンテンツの高さ指定およびヘッダ位置指定用　01　基本指定　　　01　基本調整　　　02　content高さ調整　読込　　　03　content幅調整　読込　　　04　各部レイヤー化　　　05　基本構造　位置指定　　　06　content_sub位置設定　読込　　　07　レポート写真設定　読込　　　0x　リサイズ対応　02　各関数　　　01　content高さ調整　　　02　content幅調整　　　03　content_sub位置設定　　　04　レポート写真設定*************************************************/$(function() {/*─────────01　基本指定────────*///01-01　基本調整	$("html").css("overflow","hidden");	$("#header").css("overflow","hidden");	$("#content").css("overflow-y","auto");	$("#content_sub,#subtitle_b,#sub_slide").css("display","block");//──01-02　content高さ調整　→02-01	content_height_adjust();//──01-03　content幅調整　→02-02	content_width_adjust();//──01-04　レイヤー化	$("#header").css("z-index","50");	$("#subtitle_b").css("z-index","54");	$("#content_sub").css("z-index","53");	$("#sub_bottom").css("z-index","52");	$("#sub_bg").css("z-index","51");	$("#members").css("z-index","101");	$("#content").css("z-index","1");	$(".content_main").css("z-index","80");//──01-05　基本構造　位置指定	$("#header").css("position","absolute")							.css("bottom","0");	$("#content").css("position","absolute");//──01-06　content_sub　位置設定　→02-03	content_sub_adjust();//──01-07　レポート写真　読込　→02-04	photoY_margin_adjust();	photoT_margin_adjust();//──01-0x　リサイズ対応	$(window).wresize( function() {		content_height_adjust();		content_sub_adjust();		content_width_adjust();		photoY_margin_adjust();		photoT_margin_adjust();	});/*─────────02　各関数─────────*///──02-01　content高さ調整	function content_height_adjust() {		var content_height = $(window).height();		$("#content").css("height",content_height-80);	}//──02-02　content幅調整	function content_width_adjust() {		var win_width = $(window).width();		if (win_width < 1000){			content_width = win_width;			subtitle_width = 630;		} else {			content_width = win_width;			content_main_p_margin = (win_width - 1000)/2;			subtitle_width = 630 + (win_width - 1000)/2;		}		$("#header").css("width",content_width);		$("#content").css("width",content_width);		$(".content_main").css("display","block");		$(".content_main").css("margin-right",content_main_p_margin);		$(".content_emergency").css("margin-right","0px");		$(".content_emergency").css("width",subtitle_width);		$("p#footer_menu").css("margin-right",content_main_p_margin);		$("#content div.list").css("margin-right",content_main_p_margin);		$("#content h2").css("width",subtitle_width);		$("#content h3").css("width",subtitle_width);		$(".mainmenu").css("width",subtitle_width-75);	}//──02-03　content_sub　位置設定	function content_sub_adjust() {		var win_size = $(window).height();		var content_main_down = (win_size - 80) /3;		var sub_size_total = $("#content_sub").css("height");//高さ判定		if (content_main_down >= sub_size_total){			content_main_down = sub_size_total;		} else {			content_main_down = (win_size - 80) /3;		}//ブロック指定		$("#content_sub").css("position","absolute")										.css("margin-left",40)										.css("width",290)										.css("overflow-y","auto")										.css("bottom",80);		$("#content_sub").css("display","block")										.css("height",content_main_down);//背景指定		$("#sub_bg").css("position","absolute")										.css("display","block")										.css("margin-left",30)										.css("width",320)										.css("bottom",80);		$("#sub_bg").css("height",content_main_down);//ヘッダ指定		var content_sub_width = $("#sub_bg").width();		$("#subtitle_b").css("position","absolute")										.css("display","block")										.css("width",content_sub_width + 30)										.css("bottom",content_main_down + 80);//フッダ指定		$("#sub_bottom").css("position","absolute")										.css("display","block")										.css("bottom",60)										.css("width",content_sub_width + 30);//スライド（開かないバグあり）	$("#sub_slide").click( function() {		var slide_judge = $("#subtitle_b").css("bottom");		if (slide_judge != 80) {			$("#subtitle_b").animate({bottom:80},1000);			$("#sub_bg").animate({height:0,bottom:80},1000);			$("#content_sub").css("display","none");			slide_judge = 80;		}		return slide_judge;	});	}//──02-04　レポート写真設定//横写真	function photoY_margin_adjust() {		var win_width = $(window).width();		var photoY_width = $("#content p.photo-Y").width();		var photoY_margin_total = 600 - photoY_width;		if (win_width < 1000){			photoY_margin_right = photoY_margin_total /2;		} else {			content_margin_plus = (win_width-1000)/2;			photoY_margin_right = photoY_margin_total /2 + content_margin_plus;		}		$("#content p.photo-Y").css("margin-right",photoY_margin_right);	}//縦写真	function photoT_margin_adjust() {		var win_width = $(window).width();		var photoT_width = $("#content p.photo-T").width();		var photoT_margin_total = 600 - photoT_width;		if (win_width < 1000){			photoT_margin_right = photoT_margin_total /5*2;		} else {			content_margin_plus = (win_width-1000)/5*2;			photoT_margin_right = photoT_margin_total /2 + content_margin_plus;		}		$("#content p.photo-T").css("margin-right",photoT_margin_right);	}});//不具合告知用$(function() {	$("ul+#sub_txt").append("<br /><span style='font-size:9px;' class='gray2'>※現在、このサブメニューはいったん折りたたむと、再読込もしくはウィンドウ自体のリサイズをするまで再度表示できない不具合があります。</span>");	$("ul+#sub_txt+#sub_txt").append("<br /><span style='font-size:9px;' class='gray2'>※現在、このサブメニューはいったん折りたたむと、再読込もしくはウィンドウ自体のリサイズをするまで再度表示できない不具合があります。</span>");});
