window.addEvent('domready', function() {
																		 

  var newsBox = new multiBox('newslink', {overlay: new overlay()});
  var newsBox2 = new multiBox('newslink2', {overlay: new overlay()});
  if ($$('img.lightbox')) {
      var box = new CustomedMultiBox('lightbox', {overlay: new overlay()});
	  $$('img.lightbox').each(function(el) {
	  var lightboxwrapper  = new Element('span', {'class': 'lightboxwrapper'});
	  var lightboxbt  = new Element('a', {'href': '#','class': 'lightboxbt',
				'events': {
					'click': function(){
						box.open(el);
						return false;
					}
				}});
	    lightboxwrapper.wraps(el);
	    lightboxwrapper.setStyle('width',el.getStyle('width'));
		lightboxbt.inject(lightboxwrapper);
		if ($('images-gallery')) {
			var lightboxtxt = new Element('a', {
				'href': '#',
				'class': 'lightboxlink',
				'html': 'Plus de photos',
				'events': {
					'click': function(){
						box.open($('images-gallery').getFirst('li').getFirst('a'));
						return false;
					}
				}
			});
		  lightboxtxt.inject(lightboxwrapper);
		}
	  });
	  
	}

	
});
