window.addEvent('domready', function(){
	var expanded = new Fx.Slide('expanded');
	if (location.href != "http://www.teatrofellinipontinia.com/babyparking.php"){
	expanded.slideOut();}
	$('expander').addEvent('click', function(e){
	e = new Event(e);
	expanded.toggle();
	e.stop();
	});
	
	var archive = new Fx.Slide('archived');
	if (location.href != "http://www.teatrofellinipontinia.com/archive.php"){
	archive.slideOut();}
	$('archive').addEvent('click', function(e){
	e = new Event(e);
	archive.toggle();
	e.stop();
	});
	
	var teatro = new Fx.Slide('teatroinside');
	if (location.href != "http://www.teatrofellinipontinia.com/quickreference.php" && location.href != "http://www.teatrofellinipontinia.com/storia.php" ){
	teatro.slideOut();}
	$('teatro').addEvent('click', function(e){
	e = new Event(e);
	teatro.toggle();
	e.stop();
	});


	$('newsletterform').addEvent('submit', function(e) {
		new Event(e).stop();
 		var nl = $('newsletterform-container');
 		this.send({
			update: nl,
			onComplete: function(){
				var fx = new Fx.Style(nl, 'background-color', {
					duration: 800,
					transition: Fx.Transitions.Quad.easeOut
				}).start('#e2e2e2', '#fff');
				}
		});
	});
	
	
	function startGallery() {
	var myGallery = new gallery($('myGallery'), {
	timed: true,
	showArrows: false,
	showCarousel: false,
	showInfopane: false
	});
	}
	startGallery()
});	

