/*
	title:			コアjavascript
	author:		T.Nagayama (WITHWIND)
	description:	サイト全体で共通の処理をおこなう。
	history:		
	required:		jquery.js(jQuery core)
					jquery.cookie.js(Cookie処理)
*/

/*jQueryのおまじない*/
var wwjq=jQuery.noConflict();
/*コアクラスの設定*/
var wwcore;
if(!wwcore)wwcore={};


/*
	javascript ON/OFFクラス設定
	wwcore.json
*/
if(!wwcore.json)wwcore.json={};
wwcore.json.set = function() {
	wwjq("body").removeClass("js_off");
	wwjq("body").addClass("js_on");
	return ;
}

/*
	navigation画像切り替え
	wwcore.navi_img
*/
if(!wwcore.navi_img)wwcore.navi_img={};
wwcore.navi_img.set = function(){
	
	wwjq("img[ref='over']")
			.bind('mouseover', this.enter)
			.bind('mouseout', this.exit)
			.each(this.preload);
}
wwcore.navi_img.enter = function(){
	this.src = this.src.replace(/^(.+)(\.[a-z]+)$/, "$1_over$2");
}
wwcore.navi_img.exit = function(){
	this.src = this.src = this.src.replace(/^(.+)_over(\.[a-z]+)$/, "$1$2");
}
wwcore.navi_img.preload = function(){
	this.preloaded = new Image;
	this.preloaded.src = this.src.replace(/^(.+)(\.[a-z]+)$/, "$1_over$2");
}

/*
	アクセス解析への通信
	wwcore.AnaryzeAccess
*/
/*
if(!wwcore.AnaryzeAccess)wwcore.AnaryzeAccess={};

wwcore.AnaryzeAccess.init = function(){
	this.anaryzer_url = "http://www.isc-world.jp/cgi-bin/acc/acclog.cgi";
}
wwcore.AnaryzeAccess.set = function(){
	this.init();
	try{
		wwjq.get( this.anaryzer_url,
			{
				referrer:document.referrer ,
				width:screen.width ,
				height:screen.height ,
				color:screen.colorDepth
			}
		);
	} catch(e){
		//alert("error HTTP Connect.(wwcore.AnaryzeAccess)\n");
	}
}
*/

/*
	表示･非表示ブロック処理
	wwcore.showblock
*/
/*
if(!wwcore.showblock)wwcore.showblock={};
*/

/*処理実行*/
wwjq(function (){
	wwcore.json.set();
	wwcore.navi_img.set();
//	wwcore.AnaryzeAccess.set();
});
