/// <reference path="jquery-1.6.1-vsdoc.js" />

(function($) {
    $.fn.extend({
        showFaded: function(duration, callback) {
            if (typeof duration != "number") duration = 0;
            $(this).css("display", "block").stop(true, false).animate({ "opacity": 1 }, duration, function() {
                if (typeof callback == "function") {
                    callback.call(this);
                }
            });
            return this;
        },
        hideFaded: function(duration) {
            if (typeof duration != "number") duration = 0;
            $(this).stop(true, false).animate({ "opacity": 0 }, duration, function() {
                $(this).css("display", "none");
                if (typeof callback == "function") {
                    callback.call(this);
                }
            });
            return this;
        }
    });
})(jQuery);
 
