var $j = jQuery.noConflict();
$j(function(){

    var $el, leftPos, newWidth,
        $mainNav = $j("#example-one");
        
    
    /*
        EXAMPLE ONE
    */
    $mainNav.append("<li id='magic-line'></li>");
    
    var $magicLine = $j("#magic-line");
    
    $magicLine
        .width($j(".current_page_item").width())
        .css("left", $j(".current_page_item a").position().left)
        .data("origLeft", $magicLine.position().left)
        .data("origWidth", $magicLine.width());
        
    $j("#example-one li").find("a").hover(function() {
        $el = $j(this);
        leftPos = $el.position().left;
        newWidth = $el.parent().width();
        
        $magicLine.stop().animate({
            left: leftPos,
            width: newWidth
        });
    }, function() {
        $magicLine.stop().animate({
            left: $magicLine.data("origLeft"),
            width: $magicLine.data("origWidth")
        });    
    });
    
    
   
});
