/*
*Gestion du survol de la souris par apparition/disparition de l'image supérieure
*/
window.addEvent('domready', function() {

	DDSector = new Class({
		initialize: function(IDObjet) {
			// Récupération des infos et stockage dans la classe
			this.ID=IDObjet;
			this.IMGSwitch=this.ID.getElement('.IMGSwitch');
                        this.IMGSwitch.setStyle('opacity',0);
//                        zob=new Fx.Tween(this.ID.getElement('.IMGSwitch'),{duration:1,link:'cancel'});
//                        zob.start('opacity',0);
			this.p=this.ID.getElements('p');
			this.EffetLeave = new Fx.Tween(this.ID.getElement('.IMGSwitch'),{duration:250,link:'cancel'});
			// Activation des evènements
			this.ID.addEvent('mouseenter', function(){
				this.EffetLeave.cancel();
				this.p.setStyle('color','white');
				this.IMGSwitch.setStyle('opacity','1');
			}.bind(this));
			this.ID.addEvent('mouseleave', function(){
				this.EffetLeave.start('opacity',0);
				this.p.setStyle('color','#7e7e7e');
			}.bind(this));
		}	
	});
	
	
	ID_Objets = $$('.SwitchOver');
	for (I=0; I<ID_Objets.length; I++) {
		new DDSector(ID_Objets[I]);

	}
});