//
// Copyright 2009 Paytronix Systems, Inc.
// All Rights Reserved
//
// Summary: Extension to the MooTools Tips class that does IFrame shimming
//

function augmentTips()
{
    var parentInitialize = Tips.prototype.initialize;
    var parentShow = Tips.prototype.show;
    var parentHide = Tips.prototype.hide;
    var parentPosition = Tips.prototype.position;

    Tips.implement({
            initialize: function()
            {
                parentInitialize.apply(this, arguments);
                this.tip.setStyle("zIndex", 1000);
                if (Browser.Engine.trident4) {
                    this.shim = new IframeShim(this.tip);
                }
            },

            show: function(el)
            {
                parentShow.call(this, el);
                if (Browser.Engine.trident4) {
                    this.shim.show();
                }
            },
                
                hide: function(el)
            {
                parentHide.call(this, el);
                if (Browser.Engine.trident4) {
                    this.shim.hide();
                }
            },

                position: function(event)
            {
                parentPosition.call(this, event);
                if (Browser.Engine.trident4) {
                    this.shim.position();
                }
            }
        });
}
augmentTips();
