//pour Moo 1.11, remplacer Morph par Style ou Styles, fx.cancel par fx.stop
//window.addEvent('domready', function(){


var tooltipClass = new Class({
                        Implements: Options,
						
                        options: {  
                            largeur : '150px'
                        },
			initialize: function(element,options)
			{
			this.setOptions(options); //enregistre les options utilisateur
			var largeur = this.options.largeur;
			
			
element.each(function(el) {

	
	
var elspan= el.getElementsByTagName("span");
var elspanop = new Fx.Style(elspan[0], 'opacity').set(0);

var fxw = new Fx.Style(elspan[0],'width', {duration:300, wait:false});
var fxtop = new Fx.Style(elspan[0],'top', {duration:300, wait:false});
var fx = new Fx.Styles(elspan[0], {duration:300, wait:false});
var fx2 = new Fx.Styles(elspan[0], {duration:300, wait:false});

el.addEvent('mouseenter', function(){
el.className+=" sfhover";
fxtop.start(0,-elspan[0].clientHeight+10);
fxw.start(0,50); // largeur
fx.start({
'opacity': '1',
'padding':'5px'
});
fx2.stop();

});

el.addEvent('mouseleave', function(){
el.className.replace(new RegExp(" sfhover\\b"), "")
fx2.start({
'opacity': '0',
'padding':'0px'
});
 fx.stop();

});


});
}
});

tooltipClass.implement(new Options);


