$(function() {

	$('<div id="cursor-wrapper"/>').
	html('<div id="cursor"/>').
	appendTo('#navigation');

	$('li', '#nav').each(function() {
	
		var $li = $(this);
		var $a = $('a', $li);
		var left = $li.position().left;
		var width = $a.outerWidth();
		var cursor = $('#cursor');
		
		$a.hover(function() {
		
			cursor.stop(true, true).animate({
				width: width,
				visibility: 'show',
				left: left
			}, 'slow');	
		
		
		}, function() {
		
			cursor.stop(true, true).animate({
				visibility: 'hide'
			}, 'slow');	
		
		
		
		});
		
	
	
	});	


});
