var myLMightbox = {
    lightbox: null,
    init: function(){
		var lang = $$('html')[0].getAttribute('lang');
        this.lightbox = new Lightbox();
		if($('bottomNavClose')){
			$$('#bottomNavClose img')[0].setAttribute('src', '/images/closelabel_'+lang+'.gif');		
		}
    },
    openZoom: function(photo){
		new Ajax.Request('/xml/get_image_data.php?url='+encodeURIComponent(photo), {method: 'get', onSuccess: function(response){
			this.lightbox.start(Builder.node('a',{rel:'lightbox', href:photo, title: response.responseText}));
		}.bind(this)});
    }
}

function openZoom(photo){
    myLMightbox.openZoom(photo);
}
Event.observe(window, 'load', function (){myLMightbox.init();});
