function initLightboxWithOptions() {
  myLightbox = new Lightbox({ timedGallery:   	true, 
							  autostart:      	false,
							  poll_for_new:	  	false,
							  start_by_polling: true,
							  all_medias_url: 	document.location,
							  autoloop:			true,
							  before_renew_all:	function(){$('slideshowStart').hide()},
							  after_renew_all:	function(){
							  	if (imageArray.length > 0) {
								  $('slideshowStart').show();
								}
							  }
							 });
}

Event.stopObserving(window, 'load', initLightbox, false);
Event.observe(window, 'load', initLightboxWithOptions, false);
