, . , , .:
(function($) {
$.fn.ClearTypeFadeTo = function(options) {
if (options)
$(this)
.show()
.each(function() {
if (jQuery.browser.msie) {
$(this).attr('oBgColor', $(this).css('background-color'));
$(this).css({ 'background-color': (options.bgColor ? options.bgColor : '#fff') })
}
})
.fadeTo(options.speed, options.opacity, function() {
if (jQuery.browser.msie) {
if (options.opacity == 0 || options.opacity == 1) {
$(this).css({ 'background-color': $(this).attr('oBgColor') }).removeAttr('oBgColor');
$(this).get(0).style.removeAttribute('filter');
}
}
if (options.callback != undefined) options.callback();
});
};
$.fn.ClearTypeFadeIn = function(options) {
if (options)
$(this)
.css({ opacity: 0 })
.ClearTypeFadeTo({ speed: options.speed, opacity: 1, callback: options.callback });
};
$.fn.ClearTypeFadeOut = function(options) {
if (options)
$(this)
.css({ opacity: 1 })
.ClearTypeFadeTo({ speed: options.speed, opacity: 0, callback: options.callback });
};
})(jQuery);