window.addEvent('domready', function(){
	var accordion = new Accordion('h2.atStart', 'div.atStart', {
		opacity: true,
		//show: 0,
		display: 100,
		onActive: function(toggler, element){
			toggler.setStyle('padding-bottom', '4px');
			toggler.setStyle('padding-top', '0');
		},
				
		onBackground: function(toggler, element){
			toggler.setStyle('padding-top', '0');
			toggler.setStyle('padding-bottom', '4px');

		}
	}, $('accordion'));


	//immagini thumb referenze
	var imgAcc = $$('.toggler img');
	imgAcc.each(function(element, index) {
		var fxLoad = new Fx.Style(element, 'opacity');
		var fx = new Fx.Styles(element, {duration:340, wait:false});
		var opacity = '0.99';
		fxLoad.set(opacity);
		element.addEvent('mouseenter', function(){
			fx.start({
				'opacity': '0.55'
			});
		});
		element.addEvent('mouseleave', function(){
			fx.start({
				'opacity': opacity
			});
		});
	});


});

/*function apriProve() {
	window.addEvent('domready', function(){
		var accordion = new Accordion('h2.atStart', 'div.atStart', {
			opacity: true,
			//show: 0,
			display: 8,
			onActive: function(toggler, element){
				toggler.setStyle('padding-bottom', '13px');
				toggler.setStyle('padding-top', '13px');
				toggler.setStyle('font-size', '18px');
			},
					
			onBackground: function(toggler, element){
				toggler.setStyle('padding-top', '8px');
				toggler.setStyle('padding-bottom', '0');
				toggler.setStyle('font-size', '12px');
			}
		}, $('accordion'));
	});
}*/

