(function (c) { c.fn.stickyfloat = function (o) { function i() { a.stop(); j = d.scrollTop() > b.startOffset; k = a.offset().top > g; l = a.outerHeight() < c(window).height(); if ((j || k) && l) e = d.scrollTop() - g + b.offsetY, e > f && (e = f), d.scrollTop() < b.startOffset && (e = h), a.delay(b.delay).animate({ top: e }, b.duration, b.easing) } var a = this, d = c(document), b, f, j, k, l, e, m, n = d.scrollTop(), h = parseInt(a.parent().css("padding-top")), g = a.parent().offset().top; c.extend(c.fn.stickyfloat.opts, o, { startOffset: g, offsetY: h }); b = c.fn.stickyfloat.opts; a.css({ position: "absolute" }); b.lockBottom && (f = a.parent().height() - a.outerHeight() + h, f < 0 && (f = 0)); c(window).scroll(function () { b.duration > 40 ? (clearTimeout(m), m = setTimeout(function () { Math.abs(d.scrollTop() - n) > 0 && (n = d.scrollTop(), i()) }, 40)) : i() }) }; c.fn.stickyfloat.opts = { duration: 200, lockBottom: !0, delay: 0, easing: "linear"} })(jQuery);
