Navigation hover elements using jQuery lavalamp
<p>If you see <a href="http://cavc.ac.uk" rel="nofollow">this website</a></p>

<p>When you hover over the child unordered lists the bottom border dosn't align properly. Only on the 14-19 does this happen.</p>

<p>Here is the code:</p>

<pre><code>(function($) {
$.fn.lavaLamp = function(o) {
    o = $.extend({ fx: "linear", speed: 500, click: function(){} }, o || {});
    return this.each(function() {
        var me = $(this), noop = function(){},
            $back = $('&lt;li class="back"&gt;&lt;div class="left"&gt;&lt;/div&gt;&lt;/li&gt;').appendTo(me),
            $li = $("li", this), 
            curr = $("li.active", this)[0] || $($li[0]).addClass("active")[0];

        $li.not(".back").hover(function() {
            move(this);
        }, noop);

        $(this).hover(noop, function() {
            move(curr);
        });

        $li.click(function(e) {
            setCurr(this);
            return o.click.apply(this, [e, this]);
        });

       setCurr(curr);

        function setCurr(el) {
            $back.css({ "left": el.offsetLeft+"px", "width": el.offsetWidth+"px", "border-bottom-color": $(el).css("border-bottom-color") });
            curr = el;
        };
        function move(el) {
            $back.each(function() {
                $(this).dequeue(); }
            ).animate({
                width: el.offsetWidth,
                left: el.offsetLeft
            }, o.speed, o.fx).css({"border-bottom-color": $(el).css("border-bottom-color")});
        };
    });
};
})(jQuery);
</code></pre>

<p>Could someone please explain what is going on here and how I can ammend the above to work.</p>

<p>Thanks</p>
