var j$ = jQuery;

/*==================================================
 *
 * Button ”ページトップヘ” 配置設定
 *
 ==================================================*/
j$(function(){
	j$('#pagetopAnchor').exFixed({
	    baseNode:'#pagelead', top:'70%', right:0, fixedX:false
	});
});


/*==================================================
 *
 * Button ”ページトップヘ”- '#pagelead'で終わる値をクリックすると処理
 *
 ==================================================*/
j$(function(){ 
	j$('a[href$=#pagelead]').click(function(){ 
		var $target = j$(this.hash);
		if($target.size()){ 
			var top = $target.offset().top;
			j$(j$.browser.safari ? 'body' : 'html').animate({scrollTop:top}, 800, 'swing');
		}
		return false;
	});
});


/*==================================================
 *
 * サイドメニューのアコーディオン - .locationで現在の場所（TAG：ul）を展開
 *
 ==================================================*/
j$(function(){
	j$("#sideMenu").each( function(){
		j$("dd > a", this).each( function(){
				var $this = j$(this);
				$this.next().hide();
				j$("dd.location > a").next().show();
				$this.click( function(){
						var params = { height:"toggle", opacity:"toggle" };
						$this.next().animate(params).parent().siblings().children("ul:visible").animate(params);
						return false;
				});
		});
	});
});


/*==================================================
 *
 * ポップアップウィンドウで開きます
 *
 ==================================================*/
function popup(openURL) {
	subWin = window.open(openURL,"","left=0,top=0,width=970,height=640,status=0,scrollbars=1,menubar=1,location=0,toolbar=0,resizable=1");
//	subWin.focus();
//	return false;
}



/*
============================================================
	ShowNowYear
============================================================
*/
function ShowNowYear() {
   var now = new Date();
   var year = now.getFullYear();
   document.write(year);
}

