////////////////////////////////////////////////////////////////////////////////
//
//	[ファイル名]	common.js
//	
//	[文字コード]	utf-8
//	
//	[概要]	
//
////////////////////////////////////////////////////////////////////////////////
(function(){

//
//	スクロール用スクリプト
//
var moveObject = function(){
	var y = (document.body.scrollTop || document.documentElement.scrollTop);
	var target = Math.max(Math.floor(y - (y/8)));
	scrollTo(0, target);
	if(target>0){
		setTimeout(moveObject,10);
	}
};



//
//	ポップアップリンク用
//
var win = null;
$(".popup").click(function(){
	var url = new URL(this.href);
	var winName = "win";
	if(this.href){
		if(url.search.hasParameters()){
			win = window.open(url.get(), winName, url.search.join(","));
		}else{
			win = window.open(url.get());
		}
		win.focus();
	}
	return false;
});





////////////////////////////////////////////////////////////////////////////////////////////////////
//
//	DOM読み込み完了後に実行
//
////////////////////////////////////////////////////////////////////////////////////////////////////
$(function(){

//
//	このページの先頭へボタン動作
//
$("p#toTop a").click(function(){
	moveObject();
	return false;
});










});
////////////////////////////////////////////////////////////////////////////////////////////////////


})();




/////////////////////// GOOGLE アナリティクス /////////////////////////////////////////////
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-4551702-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();



