state = up ? 'end' : (!info.started ? 'start' : 'move');
        info.started = true;
        self.fire(t, e, state);
        e.preventDefault();
      };
      var upfn = function upfn(e) {
        // call mousemove function with 'end' state
        movefn(e, true);
        info.started = false;
        // remove the temporary listeners
        document.removeEventListener('mousemove', movefn);
        document.removeEventListener('mouseup', upfn);
      };
      // add temporary document list