var TipsManager = new Class({
	options: {
		show: 0,
		duration: 300,
		minOpacity:0.9,
		maxOpacity:1
		
    },
    initialize: function() {
        //this.setTips();
    },
    setTips: function(element){
        sender = this;
        if (element){
            element.fx = new Fx.Style(element, 'opacity', {duration: sender.options.duration, wait: false}).set(sender.options.minOpacity);
            element.addEvent('mouseenter', function(){this.fx.start(sender.options.minOpacity,sender.options.maxOpacity);});
            element.addEvent('mouseleave', function(){this.fx.start(sender.options.maxOpacity,sender.options.minOpacity);});
		    var Tips1 = new Tips(element, {
		        fixed: true,
	            initialize:function(){this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: sender.options.duration, wait: false}).set(0);},
	            onShow: function(toolTip) {this.fx.start(1);},
	            onHide: function(toolTip) {this.fx.start(0);}
	            }
	        );
	        return element;
        }
        else
        {
		    // Tips Initialization
		    $$('.Tips').each(function(el){
		        el.fx = new Fx.Style(el, 'opacity', {duration: sender.options.duration, wait: false}).set(sender.options.minOpacity);
	            el.addEvent('mouseenter', function(){this.fx.start(sender.options.minOpacity,sender.options.maxOpacity);});
	            el.addEvent('mouseleave', function(){this.fx.start(sender.options.maxOpacity,sender.options.minOpacity);});
		    });
		    var Tips1 = new Tips($$('.Tips'), {
		        fixed: true,
	            initialize:function(){this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: sender.options.duration, wait: false}).set(0);},
	            onShow: function(toolTip) {this.fx.start(1);}
				,onHide: function(toolTip) {this.fx.start(0);}
	            }
	        );
	    }
    }

})
TipsManager.implement(new Events, new Options);
var tipper = new TipsManager();
