/*------------------------------------------------------------------------------------------

	外部JSの呼び出し
document.write('<script type="text/javascript" src="/js/jquery.easingscroll.js"></script>');

------------------------------------------------------------------------------------------*/

//マウスオーバー(jquery.rollover)
//------------------------------------------------------------------------------------------
jQuery(function($) {
	$('#gNavi a img , #fNav a img , .moveUnit a img , .mOver, .imgBtn a img , form input:image').rollover();
});


//
//------------------------------------------------------------------------------------------
$(document).ready(function(){
	$(".newwin").click(function(){
		window.open(this.href,'_blank');
		return false;
	});
});


//selectリンク
//------------------------------------------------------------------------------------------

// 設定開始
// （フレームの場合は、表示先のフレーム名を設定してください）
// （top を指定すると、フレームの分割を廃止して画面全体で表示します）
// （blank を指定すると、新規ウィンドウで表示します）
var target = "";
// 設定終了

function jump(){
	var url = document.form1.select.options[document.form1.select.selectedIndex].value;
	if(url != "" ){
		if(target == 'top'){
			top.location.href = url;
		}
		else if(target == 'blank'){
			window.open(url, 'window_name');
		}
		else if(target != ""){
			eval('parent.' + target + '.location.href = url');
		}
		else{
			location.href = url;
		}
	}
}


//newマーク 時間指定（時間）：
//------------------------------------------------------------------------------------------
$(document).ready(function(){
    var currentDate = new Date();
    $('.newmarkList').each(function(){
        var pass       // passage time
             = 48;
        var content    // display content
             = '<span class="entryIcon"><img src="/share/img/ico_new_01.png" width="27" height="11" alt="New" title="New" class="newmark" /></span>';
        var newmarkAttr = $(this).attr('title');
        newmarkAttr = newmarkAttr.replace(/年|月|日|時|分/g,':');
        newmarkAttr = newmarkAttr.replace(/\s|秒.*/g,'');
        var time = newmarkAttr.split(":");
        var entryDate = new Date(time[0], time[1]-1, time[2], time[3], time[4], time[5]);
        var now = (currentDate.getTime() - entryDate.getTime())/(60*60*1000); 
        now = Math.ceil(now);
        if(now <= pass){
            $(this).before(content);
        }
    });
});

//Design Gallery: hover category link
//------------------------------------------------------------------------------------------

$(document).ready(function(){
    $('#designUnit .img').hover(function(){
        $(this).fadeTo(150,0.5); 
    },function() {
        $(this).fadeTo(150,1); 
    });
});

