adding handlers to photo links as they are added to DOM