jQuery(function(){

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