Separate on and off transitions
Implemented transition on and off animations