//ロールオーバー
(function(onLoad) {
	try {
		window.addEventListener('load', onLoad, false);
	} catch (e) {
		window.attachEvent('onload', onLoad);
	}
})(function() {
	var tags = ["img","input"];
	for( var i=0, len=tags.length; i<len; i++ ) {
		var over = function() { this.src = this.src.replace('_off.', '_on.'); };
		var out	= function() { this.src = this.src.replace('_on.', '_off.'); };
		var el = document.getElementsByTagName(tags[i]);
		for (var j=0, len2=el.length; j<len2; j++) {
			var attr = el[j].getAttribute('src');
			if (!el[j].src.match(/_off\./)&&attr) continue;
			el[j].onmouseover = over;
			el[j].onmouseout	= out;
		}
	}
});


//別ウィンドウ
$(function() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") &&
		anchor.getAttribute("rel") == "external")
		anchor.target = "_blank";
	}
});


//開閉メニュー
$(function() {
	$(".guide").hover(function(){
		$(this).css("cursor","pointer");
	},function(){
		$(this).css("cursor","default");
	});
	$(".acmenu").css("display","none");
	$(".guide").hover(function(){
		$(this).addClass('active').children("ul").slideDown("fast");
	},function(){
		$(this).removeClass('active').children("ul").slideUp("fast");
	});
});


//開閉FAQ
$(function() {
	$(".acblock dt").hover(function(){
		$(this).css("cursor","pointer");
	},function(){
		$(this).css("cursor","default");
	});
	$(".acblock dd").css("display","none");
	$(".acblock dt").click(function(){
		$(this).toggleClass('active').next().slideToggle("fast");
	});
});


