$(function(){
	//ロールオーバー
    $("img.over").mouseover(function(){
        $(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_over$2"));
    }).mouseout(function(){
        $(this).attr("src",$(this).attr("src").replace(/^(.+)_over(\.[a-z]+)$/, "$1$2"));
    }).each(function(){
        $("<img>").attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_over$2"));
    })

    
	//現在位置の画像にstayをつける
	var url = document.URL.split('/');
	
    $('ul#navimage li a').each(function(){
    var gnavi_href = $(this).attr('href').split('/');
	//$('h1#check').text(gnavi_href[1]);
	if (gnavi_href[1] == url[3]&&url[3]!=false) {
		
		$(this).addClass("stay");

    /*var img = $(this).children().eq(0);
    img.attr('src', img.attr('src').replace(/^(.+)(\.[a-z]+)$/, "$1_stay$2"));
    img.unbind('mouseover');
    img.unbind('mouseout');*/
    }
 	});
	
	
	//角丸の設定    
    //DD_roundies.addRule('.message_box' , '5px' ,true);
	//DD_roundies.addRule('#footer_contact' , '5px' ,true);
//DD_roundies.addRule('.posted' , '5px' ,true);
	
});



//スムーズスクロール
$(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;
    });
});

//newアイコン
//function newM(y,m,d){
//newday=new Date(y+"/"+m+"/"+d);
//oldday= new Date();
//n=(oldday-newday)/(1000*60*60*24);
//if (n <=7)document.write("<span class='point_new'><img src='/common/images/new_icon.gif' width='32' height='20' alt='New' /></span>");
//}





