$(function(){

// ページ内移動制御
$("a[href*='#']").easingScroll({easing:"easeOutCubic", duration:"300"});

$("#changeEasing").change(function(){
	$("a[href*='#']").easingScroll({
	easing: this.value,
	duration: parseInt($("#duration").val())
	});
});
$("#duration").keyup(function(){
	$("a[href*='#']").easingScroll({
		easing: $("#changeEasing").val(),
		duration: parseInt(this.value)
	});
}).blur(function(){
	$("a[href*='#']").easingScroll({
		easing: $("#changeEasing").val(),
		duration: parseInt(this.value)
	});
});

// relで別窓
$('a[rel="external"]').click(function() {
	$(this).attr("target","_blank");
});

// アンカーの点線消し
$('a').focus(function(){this.blur();});

// 最初の見出しのマージン
$("#content h2:first-child").css("margin-top","1px");
$("#main h2:first-child").css("margin-top","1px");
$(".boxGray h2:first-child").css("margin-top","0");
$(".boxGray h3:first-child").css("margin-top","0");
$(".boxGray div.boxDownload:first-child").css("margin-top","0");
$(".sectL h2:first-child").css("margin-top","0");
$(".sectR h2:first-child").css("margin-top","0");
$(".sectL h3:first-child").css("margin-top","0");
$(".sectR h3:first-child").css("margin-top","0");
$(".sectL p:first-child").css("margin-top","0");
$(".sectR p:first-child").css("margin-top","0");

// その他マージン制御
$("h1+h2").css("margin-top","5px");
$("h1+h3").css("margin-top","5px");
$("h2+h3").css("margin-top","10px");
$("h6+p").css("margin-top","5px");
$(".boxGray h3+p").css("margin-top","10px");
$("#content .contentsYougo h2:first-child").css("margin-top","0");

// 初期値すべて非表示
$("#lNav dd").addClass("dN");
// .hereの親ddを開き、その兄dtに.downを追加
$("dd:has(.here)").css("display","block").prev("dt").addClass("down");
// ローカルナビ開閉
$("#lNav dt.parent").toggle(
function() { $(this).addClass("down").next("dd").slideDown("fast"); },
function() { $(this).removeClass("down").next("dd").slideUp("fast"); }
);

// 高さを揃える
$(".flatH").flatHeights();
// 高さを揃える（ページ内で複数設定）
$(".flatH1").flatHeights1();
$(".flatH2").flatHeights2();
$(".flatH3").flatHeights3();


// tblAdmin
$(".tblAdmin_L tr:even").addClass("evn");
$(".tblAdmin_L tr:odd").addClass("odd");
$(".tblAdmin_S tr:even").addClass("evn");
$(".tblAdmin_S tr:odd").addClass("odd");
$(".tblAdmin_L tr th:first-child").addClass("firstChild");
$(".tblAdmin_L tr td:first-child").addClass("firstChild");
$(".tblAdmin_S tr th:first-child").addClass("firstChild");
$(".tblAdmin_S tr td:first-child").addClass("firstChild");


}); // jQuery終了

function winOpen(tool,url,W,H){
if(tool==""){
 tool="1";
}
Win_op=window.open(url,'','scrollbars=yes,toolbar='+tool+',width='+W+',height='+H+',top=**,left=**,resizable=yes');
}
