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

	/* idList */
	
	var list = $$('#menu a','.elenco_sitemap li a','li.titolo a');
	list.each(function(element) {
	 
		var fx = new Fx.Styles(element, {duration:200, wait:false});
	 
		element.addEvent('mouseenter', function(){
			fx.start({
				'background-color': '#f2f2f2',
				'color': '#C00'
			});
		});
	 
		element.addEvent('mouseleave', function(){
			fx.start({
				'background-color': '#fff',
				'color': '#000'
			});
		});
	 
	});
	
	/* idList Libro */
	
	var list_2 = $$('#menu_libro a');
	list_2.each(function(element) {
	 
		var fx = new Fx.Styles(element, {duration:200, wait:false});
	 
		element.addEvent('mouseenter', function(){
			fx.start({
				'background-color': '#f2f2f2',
				'color': '#065192'
			});
		});
	 
		element.addEvent('mouseleave', function(){
			fx.start({
				'background-color': '#fff',
				'color': '#000'
			});
		});
	 
	});		
	
	
	/* Tips */

	var tip = new Tips($$('.tip'), {
		initialize:function(){
			this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 400, wait: false}).set(0);
		},
		onShow: function(toolTip) {
			this.fx.start(1);
		},
		onHide: function(toolTip) {
			this.fx.start(0);
		}
	});
 

	// ricerca & newsletter
	 
	var mySlide1 = new Fx.Slide('ricerca').hide();
	
		$('n_ricerca').addEvent('click', function(e){
		e = new Event(e);
		mySlide1.toggle();
		e.stop();
	});	

		$('n_ricerca2').addEvent('click', function(e){
		e = new Event(e);
		mySlide1.toggle();
		e.stop();
	});	
	
	var mySlide2 = new Fx.Slide('newsletter').hide();
	
		$('n_newsletter').addEvent('click', function(e){
		e = new Event(e);
		mySlide2.toggle();
		e.stop();
	});			

		$('n_newsletter2').addEvent('click', function(e){
		e = new Event(e);
		mySlide2.toggle();
		e.stop();
	});		

})