/**
 * @author Tomohiro Tsutsumi @team-chan3.com
 */


function URLTracker(){
	this._past = $.cookie(PAST_URL_COOKIE_KEY);
	this.isShowOpening = this._check();
}

URLTracker.prototype._check = function(){
	if(!this._past) return true;
	var past = this._past.replace('http://', '');
	if(this._past){
		var tmpCList = past.split('/');
		
		//index
		if(!tmpCList.length) return true;
		var tmpC = tmpCList[1];
		
		if(tmpC == controller) return false;
		else return true;
		
	}else{
		return true;
	}
}

URLTracker.prototype.init = function(){
	var date=new Date();
	//有効期限は1時間
	date.setTime(date.getTime()+(1*60*60*1000));
	$.cookie(PAST_URL_COOKIE_KEY, location.href, {
		path : '/', expires : date
	});
}
