function PhotoPage() {
    this.bind = function _bind() {
        var photoGrid = document.getElementById('photo_grid');
        if (!photoGrid) {
            return;
        }

        var photoGroups = getElementsByClassName('photos', photoGrid);
        if (!photoGroups) {
            return;
        }

        for (var groupIndex = 0; groupIndex < photoGroups.length; groupIndex++) {
            var photoGroup = photoGroups[groupIndex];
            var photos = photoGroup.getElementsByTagName('li');
            for (var i = 0; i < photos.length; i++) { 
                var photo = photos[i];

                photo.onmouseover = function() {
                    var popups = getElementsByClassName('info_popup');
                    // hide any popup that is currently displayed
                    for (var i = 0; i < popups.length; i++) {
                        var popup = popups[i];
                        popup.style.display = 'none';
                    }
    
                    popup = this.getElementsByTagName('div')[0];
                    // if the popup has content to show
                    if (!arrayContains(popup.className.split(' '), 'no_data')) {
                        popup.style.display = 'block';
                    }
                }
    
                photo.onmouseout = function() {
                    var popup = this.getElementsByTagName('div')[0];
                    popup.style.display = 'none';
                }
                
                var imageLinks = photo.getElementsByTagName('a');
                if (imageLinks) {
                    var imageLink = imageLinks[0];
                    imageLink.onclick = function() {
                        var imageSpan = this.getElementsByTagName('span')[0];
                        var largeImageMarkup = imageSpan.innerHTML;
                        // note: we have to use the image's span width instead of the image's width due to incorrect
                        // width values returned in Firefox
                        addEmbeddedObject(largeImageMarkup, 'photoHolder', true, true, {'objectWidth': $(imageSpan).width()});
                    return false;
                    }
                }
            }
        }
    }
}
