
$(document).ready(function () {
//get the default top value
	var top_val = $('#menu li a').css('top');
	//animate the selected menu item
		$('#menu li.selected').children('a').stop().animate({top:0}, {easing: 'easeOutQuad', duration:300});
		$('#menu li').hover(
	function () {				
	//animate the menu item with 0 top value
		$(this).children('a').stop().animate({top:0}, {easing: 'easeOutQuad', duration:300});		
				},
	function () {
	//set the position to default
		$(this).children('a').stop().animate({top:top_val}, {easing: 'easeOutQuad', duration:300});
		//always keep the previously selected item in fixed position			
		$('#menu li.selected').children('a').stop().animate({top:0}, {easing: 'easeOutQuad', duration:300});
				}		
			);
		});

