if(typeof KIDS == "undefined" || !KIDS) var KIDS = {};

KIDS.namespace("reporting");

KIDS.reporting.config;
KIDS.reporting.dispatcher;
KIDS.reporting.qs;

Configuration.prototype.initialize = function(){
	this.init();
	this.setting["name"]="vianicktoons,nickvia";
	this.setting["dynamicAccountSelection"] = false;
	this.setting["dynamicAccountList"] = "";
	this.setting["linkInternalFilters"] = "javascript:,nicktoonsnetwork.com";
	this.setting["trackExternalLinks"] = true;
	this.setting["trackDownloadLinks"] = true;
	this.setting["trackInlineStats"] = true;
	if(!this.isLink()){
		this.setting.pageName = "nicktoons.nick.com" + location.pathname;
		this.setting.pageName = (this.setting.pageName.charAt(this.setting.pageName.length-1)=="/") ? this.setting.pageName+"index.html" : this.setting.pageName;
		if(this.setting.pageName.indexOf(".")<0){
			if(this.setting.pageName.lastIndexOf("/")!=this.setting.pageName.length-1) this.setting.pageName+="/";	
			this.setting.hier2 = this.setting.pageName.substr(1) + "index";
		}
		this.setting.hier2 = this.setting.pageName;
		this.setting.channel = "nicktoons.nick.com";
		this.setting.prop3 = location.search;
		this.setting.prop4 = (KIDS.get("type")=="game" && KIDS.get("isDetailPage")=="true") ? KIDS.get("urlAlias"):"";
		this.setting.prop11 = KIDS.get("fccRelatedShow");
		this.videoSuite = "viaturbonick";
	}
}
KIDS.reporting.init = function(){
	com.mtvi.reporting.Account={
		name:'vianicktoons,nickvia',
		dynamicAccountSelection:false,
		dynamicAccountList:'',
		linkInternalFilters:'javascript:,nicktoonsnetwork.com',
		trackInlineStats : true,
		trackExternalLinks: true,
		trackDownloadLinks: true
	};
	KIDS.reporting.dispatcher = new com.mtvi.reporting.Dispatcher();
	com.mtvi.config.qs=com.mtvi.util.queryStringToHash(window.location.search);
	KIDS.reporting.qs = com.mtvi.config.qs;
	KIDS.reporting.config = new Configuration();
	KIDS.reporting.config.initialize();
}
KIDS.reporting.firePageLoad = function(){
	KIDS.reporting.omnifunctions.sendReportingCall();
}
