$(function(){
	/* remove bg from topnav last-child */
	$('.top-level:last-child').css({'background': 'none'});
	
	/* add/remove class */
	$('#menu li').hover(function() {
		$(this).addClass("over");
	},function(){
		$(this).removeClass("over");
	});
	
	/* assigns ids to quick links */
	$('#quicklinks li').each(function(i) {
		var n = i + 1;
		$(this).attr('id', 'quicklink-' + n);
	});
	
	/* assigns ids to topnav */
	var t = 0;
	$('#topnav > li').each(function(i) {
		t++;
		$(this).attr('id', 'top-' + t);
	});
	
	/* fades each drop down menu */
	$('nav li').each(function(){
		$(this).find('ul').css({ 'opacity': '0' });
		$(this).mouseover(function(){
			$(this).find('ul:eq(0)').stop().fadeTo('fast', 1);
		});
		$(this).mouseout(function(){
			$(this).find('ul:eq(0)').stop().fadeTo('fast', 0);
		});
	});
	
	
});
