/**
 * @author Remy Sharp
 * @date 2008-02-25
 * @url http://remysharp.com/2008/01/21/fixing-ie-overflow-problem/
 * @license Creative Commons License - ShareAlike http://creativecommons.org/licenses/by-sa/3.0/
 *
 * Usage: $('pre').fixOverflow(); -- only runs code if in IE
 */

(function ($) {
    $.fixOverflow = function (padding) {
        if (!$.browser.msie) {
            return this;
        } else {
            return this.each(function () {
                if (this.scrollWidth > this.offsetWidth) {
                    $(this).css({ 'overflow-y' : 'hidden', 'padding-bottom' : padding + 'px' });
                }
            });
        }      
    };
})(jQuery);

