//ポップアップウィンドウ
function OpenWin(c) {
	window.open(c,'','width=520, height=510, menubar=0, toolbar=0, location=0, scrollbars=1, resizable=1, directories=0, status=0');
}
function OpenPic(c) {
	window.open(c,'','width=343, height=270, menubar=0, toolbar=0, location=0, scrollbars=0, resizable=0, directories=0, status=0');
}
function OpenMail(c) {
	window.open(c,'email','width=500, height=542, menubar=0, toolbar=0, location=0, scrollbars=1, resizable=1, directories=0, status=0, copyhistory=0');
}

//ロールオーバー
if (navigator.appVersion.charAt(0) >= 3) {
	var img_swap = new Array();
	img_swap[11] = new Image(); img_swap[11].src = "../imgs/design_outline/policy_eyecatch_sub1.jpg";
	img_swap[12] = new Image(); img_swap[12].src = "../imgs/design_outline/policy_eyecatch_sub2.jpg";
	img_swap[13] = new Image(); img_swap[13].src = "../imgs/button_close1.jpg";
	img_swap[14] = new Image(); img_swap[14].src = "../imgs/button_close2.jpg";
}
function HRSwap(nam,num) {
	if (navigator.appVersion.charAt(0) >= 3) {
		document.images[nam].src = img_swap[num].src;
	}
}
function HRSwapOff(nam,num) {
	document.images[nam].src = img_swap[num].src;
}


// ▼jQueryライブラリ ////////////////////////////////////////////////////////////////////////

//win/ie、firefox active解除ハック
$(document).ready(function() {
	$('a').each(function() {
		var myAddspan = $(this);
		myAddspan.click(function() { this.blur(); });
	});
});

//▼jQueryライブラリ2：『$』を無効化 ///////////////////////////////////////////////////////////
$(document).ready(function() {

	//『$』を無効化
	var $jqry = jQuery.noConflict();

	//自動スクロール
	$jqry('a[href*=#]').click(function() {					//href属性が『#』を含むa要素だけ選択

		var target;																	// ターゲットがない場合
		target = $jqry( $jqry(this).attr('href') );
		if (target.length == 0) {
			return;
		}

		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
		&& location.hostname == this.hostname) {
			var $target = $jqry(this.hash);
			$target = $target.length && $target || $jqry('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				$jqry('html,body').animate({scrollTop: targetOffset}, 1000);
				return false;
			}
		}
	});

	//table背景色設定
	$jqry('#fee table tr:odd td').addClass('odd-row');
	$jqry('#fee table tr:even td').addClass('even-row');
	$jqry('#fee table td:nth-child(1)').addClass('fee-first-td');
	$jqry('#fee table td:nth-child(2)').addClass('fee-second-td');


//fancybox(jQueryプラグイン)
	$jqry(".boxpop1").fancybox({
		'titlePosition'		: 'inside',
		'transitionIn'		: 'none',
		'transitionOut'		: 'none'
	});

});

