Javascript Mouse Event wrapper