// Fix cleartype bug in IE on fade in/out
jQuery.fn.fadeTo = function(speed, to, callback) {
    return this.filter(":hidden").css("opacity", 0).show().end().animate({opacity: to}, speed, function() {
        if (jQuery.browser.msie && to == 1)
            this.style.removeAttribute('filter');   
        if (jQuery.isFunction(callback))
            callback();
    });
};

jQuery.fn.fadeIn = function(speed, callback) {
    return this.animate({opacity: "show"}, speed, function() {
        if (jQuery.browser.msie)
            this.style.removeAttribute('filter');
        if (jQuery.isFunction(callback))
            callback();
    });
};

jQuery.fn.fadeOut = function(speed, callback) {
    return this.animate({opacity: "hide"}, speed, function() {
        if (jQuery.browser.msie)
            this.style.removeAttribute('filter');
        if (jQuery.isFunction(callback))
            callback();
    });
};
