function installFilteredMouseMove(element) {
      element.bind("mousemove", function (e) {
            var lastpos = lastMousePosition;
            if (lastpos === undefined || lastpos.x !== e.pageX || lastpos.y !== e.pageY) {
                $(e.target).trigger("mousemove-filtered", e);
            }
        });
    }
filters mouse events so an event is fired only if the mouse moved.

filters out mouse events that occur when mouse is stationary but
the elements under the pointer are scrolled.