 /* EXAMPLE TWO  */

$(document).ready(function() {
  // Handler for .ready() called.


$(function(){

    var $el, leftPos, newWidth,
        $mainNav = $("#main_menu"),
        $mainNav2 = $("#main_menu"),
		$hash = '#';
		$code= $hash 
    
    $mainNav2.append("<li id='magic-line-two'></li>");
    
    var $magicLineTwo = $("#magic-line-two");
    
    $magicLineTwo
        .width($(".current-menu-item").width())
        .height(25)
        .css("left", $(".current-menu-item a").position().left)
        .data("origLeft", $(".current-menu-item a").position().left)
        .data("origWidth", $magicLineTwo.width())
        .data("origColor", $(".current-menu-item a").attr("rel"));
                
   
    $("#main_menu li").find("a").hover(function() {
        
		
		$el = $(this);
		
        leftPos = $el.position().left;
        newWidth = $el.parent().width();
        $magicLineTwo.stop().animate({
            left: leftPos,
            width: newWidth,
            backgroundColor:  $el.attr("rel"),
			
        })
		
		
		
    }, function() {
        $magicLineTwo.stop().animate({
            left: $magicLineTwo.data("origLeft"),
            width: $magicLineTwo.data("origWidth"),
            backgroundColor: $magicLineTwo.data("origColor")
        }); 
		
    });
});
});

