Function inOutBounce