JavaScript Redirect function setTimeout() Transition