$(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"));
    }).mousedown(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"));
    })

	
	//角丸の設定    
	//DD_roundies.addRule('.green_box' , '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;
    });
});

function pulldown(action,target){
	
	listthis=document.getElementById(target);
	//document.getElementById("固有のＩＤ").style.スタイル要素=変更後の値;
	if(action=="over"){
		//listthis.style.visibility='visible';
		document.getElementById("mouseover_menu").style.zIndex = '2';
		//listthis.style.zIndex = '2';
		//listthis.style.display.left='0'
		listthis.style.display='block';
		
	}else if(action=="out"){
		document.getElementById("mouseover_menu").style.zIndex = '0';
		//listthis.style.zIndex = '0';
		//listthis.style.display.left='-2000px'
		listthis.style.display='none';
		//listthis.style.visibility='hidden';
	}
	
}

//バナー類のロールオーバ（画像1枚）
$(function() {
	var images = $("img");
	for(var i=0; i < images.size(); i++) {
		if(images.eq(i).attr("src").match("_btn.")) {
			$("img").eq(i).hover(function() {
				$(this).stop().animate({"opacity":0.5});
				//$(this).css('opacity', '0.6');
			}, function() {
				$(this).stop().animate({"opacity":1});
				//$(this).css('opacity', '1');
			});
		}
	}
});



//トップ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/image/point/p_new.gif' width='32' height='16' alt='New' /></span>");
}
//Window open
function MM_openBrWindow(theURL,winName,features) { //v2.0
  var win = window.open(theURL,winName,features);
  win.focus();

}
