$(document).ready(function() {
	$('#top5 ul li').mouseenter(function(){
		var className = $(this).find('a').attr('class');
		$('#top5 ol').each(function(){
			if ($(this).hasClass(className)) {
				$(this).fadeIn('fast');
			}
			else {
				$(this).hide();
			}
		})
	});
	
	var wrapped = false;
	$('#top5').mouseenter(function(){
		if (!wrapped) {
			$(this).wrap('<div id="top5Container"></div>').css('position', 'absolute');
			wrapped = true;
		};
	})
	.mouseleave(function(){
		$(this).find('ol').each(function(){
			$(this).slideUp('fast');
		});
	});
	
});