// Demo, <http://www.electricprism.com/aeron/slideshow>. Copyright (c) 2008 Aeron Glemann, <http://www.electricprism.com/aeron>, Creative Commons license.


window.addEvent("domready",function(){ if($('show')) window.galleria=new galleria()});

//classe per photogallery

	
var galleria = new Class({
	    initialize: function(){
	      this.el = $('show');
  		  // Start our default galleria.
	      this.start();
	    },
	    
	    start: function(p){
        if (this.show)
        this.show.destroy('empty');
		this.show = new Slideshow.KenBurns(this.el, data, { captions: false, controller: true, delay: 5000, duration: 6000, height: hDiv, hu: '../../upload/'+dir+'/immagini/', thumbnails: true, width: wDiv, zoom: 0, linked: true  });
		
      	this.show.slideshow.retrieve('images').getElements('a').set('rel', 'lightbox');
		
		var box = new Lightbox({ 
      			  'onClose': function(){ this.pause(false); }.bind(this.show), 
      			  'onOpen': function(){ this.pause(true); }.bind(this.show) 
      			});
      			box.image.addEvent('click', function(){ this.close(); }.bind(box));	
				
  	    // This last little bit just inserts our thumbnails "fuzzy edge" overlays.
		
	    }/**/
	  })		
