implement image viewer animation