//ポップアップウィンドウ
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 = "../src/design_outline/policy_eyecatch_sub1.jpg";
	img_swap[12] = new Image(); img_swap[12].src = "../src/design_outline/policy_eyecatch_sub2.jpg";
//	img_swap[11] = new Image(); img_swap[11].src = "http://hushrec.com/src/design_outline/policy_eyecatch_sub1.jpg";
//	img_swap[12] = new Image(); img_swap[12].src = "http://hushrec.com/src/design_outline/policy_eyecatch_sub2.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;
}



$(function () {

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

	//自動スクロール
	$('a[href*=#]').click(function() {
		if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
		&& location.hostname == this.hostname) {
			var $target = $(this.hash);
			$target = $target.length && $target
			|| $('[name=' + this.hash.slice(1) +']');
			if ($target.length) {
				var targetOffset = $target.offset().top;
				$('html,body')
				.animate({scrollTop: targetOffset}, 1000);
				return false;
			}
		}
	});

});
