/**
 * The only difference between this and the given YUI version is 
 * we can prevent the tooltip automatically hiding itself by setting
 * the config property 'autodismissdelay' to -1.
 *
 * Also Requires:
 *	yahoo-dom-event/yahoo-dom-event.js
 * 	container/container-min.js
 */
YAHOO.widget.TooltipEx = function(el, userConfig) {
    if(userConfig)
    {
        try
        {
            userConfig.autodismissdelay = -1;
        }
        catch(e){}
    }
	YAHOO.widget.TooltipEx.superclass.constructor.call(this, el, userConfig);
};

YAHOO.extend(YAHOO.widget.TooltipEx, YAHOO.widget.Tooltip, {

    doHide: function () {

		var me = this;
		var delay = this.cfg.getProperty("autodismissdelay");
		if(delay < 0)
			return null;

		return setTimeout(function () {

			me.hide();

		}, this.cfg.getProperty("autodismissdelay"));

	}
});

