<script type='text/javascript' src='http://code.jquery.com/jquery-1.4.4.min.js'></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js"> </script>
<script type='text/javascript'>
$(document).ready(function(){
if($("#navlist li").height() > 7){
$("#navlist li").hover(
function() { $(this).stop().animate({ top: '15px' }, 200, 'swing'); },
function() { $(this).stop().animate({ top: '0px' }, 200, 'swing'); }
);
}
else{}
$('#navlist li').click(function(){
$('#navcontainer').animate({opacity: 1,"marginTop": 0,duration: "slow",easing: "easein"}, 1000 );
$('#navlist li').animate({ height: "7", opacity: 0.4 }, 1000 );
$(this).stop().animate({ opacity: 1 });
$('#navlist li a').hide();
$(this).find('a').stop().animate({ opacity: 1 });
$(this).find('a').show('slide',1000);
});
});
</script>
<div id="navcontainer">
<ul id="navlist">
<li><a href="#" class="current"><span>Home</span></a></li>
<li><a href="#"><span>About</span></a></li>
<li><a href="#"><span>Contact</span></a></li>
<li><a href="#"><span>Item four</span></a></li>
<li><a href="#"><span>Item five</span></a></li>
</ul>
</div>