
dojo.provide('artifactory.Tooltip');
dojo.require('dijit.Tooltip');
dojo.require('dojo.parser');
dojo.declare('artifactory.Tooltip', dijit.Tooltip, {
postCreate: function() {

if (!dijit._masterTT) {
dijit._masterTT = new dijit._MasterTooltip();
}
dijit._masterTT.connect(dijit._masterTT.domNode, 'onmouseover', this.ttPersist);
dijit._masterTT.connect(dijit._masterTT.domNode, 'onmouseout', this.ttFade);
this.inherited('postCreate', arguments);
},
ttPersist: function (e) {
this.fadeOut.stop();
this.fadeIn.play();
},
ttFade: function (e) {
this.fadeOut.play();
}
});
artifactory.Tooltip.create = function (bubbleId, enabled) {
var bubble = dijit.byId(bubbleId);
if (bubble) {
bubble.destroy();
}
if (enabled) {
dojo.parser.instantiate([dojo.byId(bubbleId)]);
}
};
