RISE.MMouse = SZN.ClassMaker.makeClass({
	NAME: "MMouse",
	VERSION: "1.0",
	CLASS: "class",
	EXTEND: RISE.Module
});
RISE.MMouse.prototype.$constructor = function(mid,mn,mp) {
	this.Module(mid,mn,mp);
	var self = this;
	self.mouse = $('#'+self.mid);

	self.hideEvent = function(event){ return self.hide(this,event); }
	self.showEvent = function(event){ return self.show(this,event); }
	self.loadingEvent = function(event){ return self.loading(this,event); }
	self.moveEvent = function(event){ return self.move(this,event); }

	$(document.body).bind('mousemove',self.moveEvent);
	$(window).bind('scroll',self.moveEvent);
	
}

RISE.MMouse.prototype.loading = function(elm,event){
	this.clear(elm,event);
	this.mouse.addClass(this.mn+'-loading');
	this.move(elm,event);
	this.show(elm,event);
}
RISE.MMouse.prototype.clear = function(elm,event){
	this.mouse.removeClass();
	this.mouse.addClass(this.moduleName);
}

RISE.MMouse.prototype.show = function(elm,event){
	this.mouse.fadeIn('normal');
}
RISE.MMouse.prototype.hide = function(elm,event){
	this.mouse.fadeOut('normal');
}
RISE.MMouse.prototype.move = function(elm,event){
	if(this.mouse.css('display')=='block'){
		var top = RISE.intval(event.pageY)+16;
		var left = RISE.intval(event.pageX)+14;
		this.mouse.css('top',top+'px');
		this.mouse.css('left',left+'px');
	}
}

