jQuery extension for flipping a element