used style.transition to smooth the transition btw images and video