// -----------------------------------------------------------------------------------
//
// Note this script is dependent on jquery
//
// -----------------------------------------------------------------------------------


// A general mouse tracker class, maintains the position of the mouse cursor relative to the viewport
function MouseTracker() {
  // Mouse tracking
  this.mouseX = 0;
  this.mouseY = 0;

  // Constructor
  this.init = function() {
    // Set up mouse pointer tracking
    $().bind( 'mousemove', {tracker: this}, function(e){
      e.data.tracker.mouseX = e.pageX - $(window).scrollLeft();;
      e.data.tracker.mouseY = e.pageY - $(window).scrollTop();;
    });
  };

  // Call the constructor function
  this.init();
};

mouse_tracker = new MouseTracker();
