added click function to images in carousel