Made the cookie set if image is clicked