fixed jquery mouse event functions so they don't throw errors