// JavaScript Document
window.addEvent('domready',function(){
	$$('ul.menun1 li').each(function(e){
		  var fade = new Fx.Style(e, 'opacity', {wait:false});
		  fade.set(1);
		  // .001 (not .0)) so the element stays visible and is still able to be mouse-entered
		  e.addEvent('mouseover', function(){
			fade.start(.9);
		  });
		  e.addEvent('mouseout', function(){
			fade.start(1);
		  });
		});

	$$('a.cliente').each(function(e){
		  var fade = new Fx.Style(e, 'opacity', {wait:false});
		  fade.set(1);
		  // .001 (not .0)) so the element stays visible and is still able to be mouse-entered
		  e.addEvent('mouseover', function(){
			fade.start(.8);
		  });
		  e.addEvent('mouseout', function(){
			fade.start(1);
		  });
		});
		
	$$('a.highslide').each(function(e){
		  var fade = new Fx.Style(e, 'opacity', {wait:false});
		  fade.set(.8);
		  fade.start(1);
		});
		
	$$('#badges a').each(function(e){
		  var fade = new Fx.Style(e, 'opacity', {wait:false});
		  fade.set(.01);
		  // .001 (not .0)) so the element stays visible and is still able to be mouse-entered
		  e.addEvent('mouseover', function(){
			fade.start(1);
		  });
		  e.addEvent('mouseout', function(){
			fade.start(.01);
		  });
		});

	/*
	$$('#thbcn').each(function(e){
		  var fade = new Fx.Style($('imagenmapa'), 'opacity', {wait:false});

		  fade.set(1);
		  // .001 (not .0)) so the element stays visible and is still able to be mouse-entered
		  e.addEvent('mouseover', function(){
			fade.start(.01);
			$('imagenvisor').className = 'imagenbcn';
		  });
		  e.addEvent('mouseout', function(){
			fade.set(1);
			// $('imagenvisor').className = 'imagennula';
		  });
		});

	$$('#thmadrid').each(function(e){
		  var fade = new Fx.Style($('imagenmapa'), 'opacity', {wait:false});

		  fade.set(1);
		  // .001 (not .0)) so the element stays visible and is still able to be mouse-entered
		  e.addEvent('mouseover', function(){
			$('imagenvisor').className = 'imagenmadrid';
			fade.start(.01);
		  });
		  e.addEvent('mouseout', function(){
			fade.set(1);
			// $('imagenvisor').className = 'imagennula';
		  });
		});
	*/

	$$('#thbcn').each(function(e){
		  var fade = new Fx.Style($('imagenmapa'), 'opacity', {wait:false});
		  fade.set(1);
		  // .001 (not .0)) so the element stays visible and is still able to be mouse-entered
		  e.addEvent('mouseover', function(){
				$('imagenvisor').className = 'imagenbcn';
				fade.set(.01).chain(function(){
					$('thmadrid').setOpacity(0);												   
 			    });
		  });
		  e.addEvent('mouseout', function(){
				fade.set(1).chain(function(){
					$('thmadrid').setOpacity(1);										 
				});
		  });
		});

	$$('#thmadrid').each(function(e){
		  var fade = new Fx.Style($('imagenmapa'), 'opacity', {wait:false});
		  fade.set(1);
		  // .001 (not .0)) so the element stays visible and is still able to be mouse-entered
		  e.addEvent('mouseover', function(){
				$('imagenvisor').className = 'imagenmadrid';
				fade.set(.01).chain(function(){
					$('thbcn').setOpacity(0);												   
 			    });
 		  });
		  e.addEvent('mouseout', function(){
				fade.set(1).chain(function(){
					$('thbcn').setOpacity(1);										 
				});										  
		  });
		});
		
	$$('#imagenvisor').each(function(e){
		  e.addEvent('mouseout', function(){
			/*
			var fade = new Fx.Style($('imagenmapa'), 'opacity', {wait:false});
			$('thbcn').setOpacity(1);
			$('thmadrid').setOpacity(1);
			*/
		  });
	});
});
