//マウスオーバーで画像切換え
$(function(){
	$("img.rover").mouseover(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_o$2"));
	}).mouseout(function(){
		$(this).attr("src",$(this).attr("src").replace(/^(.+)_o(\.[a-z]+)$/, "$1$2"));
	}).each(function(){
		$("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_o$2"));
	});
});





$(document).ready(function(){
    $('a[href^=#]').click(function(){
        var target;
        target = $( $(this).attr('href') );
        if (target.length == 0) {
            return;
        }
        $('html, body').animate({scrollTop: target.offset().top});
        return false;
    });
});

$(function(){
	$(".acc dd").css("display","none");
	$(".acc dt").click(function(){
		if($("+dd",this).css("display")=="none"){
		$("+dd",this).slideDown("fast");
		$(this).addClass("selected");
		}else {
		$("+dd",this).slideUp("fast");
		$(this).removeClass("selected");
		}
	}).mouseover(function(){
		$(this).addClass("over");
	}).mouseout(function(){
		$(this).removeClass("over");
	});
});
	

$(function(){
	$("span.tooltip").css({
		opacity:"0.9",
		position:"absolute",
		display:"none"
	});
	$("a").mouseover(function(){
		$("+span.tooltip",this).fadeIn();
	}).mouseout(function(){
		$("+span.tooltip",this).fadeOut();
	}).mousemove(function(e){
		$("+span.tooltip",this).css({
			"top":e.pageY+10+"px",
			"left":e.pageX+10+"px"
		});
	});
});



