// as of 1.4.2 the mobile safari reports wrong values on offset()
// http://dev.jquery.com/ticket/6446
// remove once it's fixed
if (/webkit.*mobile/i.test(navigator.userAgent)) {
    (function($) {
        $.fn.offsetOld = $.fn.offset;
        $.fn.offset = function() {
            var result = this.offsetOld();
            result.top -= window.scrollY;
            result.left -= window.scrollX;
            return result;
        };
    })(jQuery);
}
