/* Flipbook JS: Requires Yeti Reporting Module */
if(typeof logoonline=="undefined"){
	var logoonline=function(){
		return{
			flipbooks:{}
		};
	}();
}
logoonline.flipbooks={
	sendPageCall: function(){
		try{
			var call=MTVi.reporting.Dispatcher;
			call.config();
			call.setAttribute("pageName",this.getPageName());
			call.setAttribute("hier2",this.getHierarchy());
			call.setAttribute("prop22","flipbook");
			call.send();
		}catch(e){}
	},
	sendLinkEvent: function(o){
		try{
			var call=MTVi.reporting.Dispatcher;
		//	call.config();
			call.setAttribute("pageURL",window.location.href);
			call.setAttribute("pageName",this.getPageName()+"#"+o.destination+"_"+o.slide);
			call.sendLinkEvent("Next/Previous Image");
		}catch(e){}
	},
	getPageName: function(){
		try{
			var location=window.location.href;
			var urlParms=location.split(".jhtml");
			var pageName="";
			if(location.indexOf("auxPage")!=-1){
				pageName=urlParms[0]+"/"+urlParms[1].split("=")[1]+".jhtml";
			}else{
				pageName=urlParms[0]+"/index.jhtml";
			}
			return pageName;
		}catch(e){}
	},
	getHierarchy: function(){
		try{
			return this.getPageName().replace(/^\//g,"");
		}catch(e){}
	}
};
