/*
###### NOTICE ######
# This script was written by terabit.ca. All rights reserved.
# You are not authorized to sell/trade or give away this script
# without the prior written consent of terabit.ca.  
#
# To contact the developers of this script please visit 
# http://www.terabit.ca or send an email to sales@terabit.ca.
###### NOTICE ######

Version 0.1.0

ChangeLog
0.1.0
	- initial version

*/


//$(document).ready(function (){ var mouse = new Mouse(); } );


function Mouse(){
	this.init(this);
	var x;
	var y;
	
	var lastTarget;
}

Mouse.prototype.init = function(me){
	this.x = 0;
	this.y = 0;
	$(document).bind('mousemove', function (e){ me.track(e); } );
}

Mouse.prototype.track = function(e){
	this.lastTarget = e.target;
	this.x = e.pageX;
	this.y = e.pageY;
	//document.title = this.x + ', ' + this.y;
}

Mouse.prototype.getTarget = function(){
	return this.lastTarget;
}
