Added code for the image transition.