Function inOutElastic