getElementsByClassName
takes one parameter, the class name and returns a node list
If you want <img> elements within 'photo_wrap' with class name 'photo_class' to take the same event handler you could do something like this
var container = document.getElementById('photo_wrap');
var elements = container.getElementsByTagName('photo_class');
for(var x = 0; x < elements.length; x++) {
// ignore anything which is not an <img>
if(elements[x].nodeName != "IMG") {
continue;
}
elements[x].addEventListener("click",function(){
// do something when element is clicked
this.style.backgroundColor = 'red'; // change element bgcolor to red
},false);
}