$(document).ready(function() {
	
	$("#nav ul.topnav li a").hover(function() {
		
		if (!$(this).hasClass("on")) {
			var imgSrc = $(this).find("img").attr("src");			
			imgSrc = imgSrc.replace("-off", "-on");
			$(this).find("img").attr("src", imgSrc);
		}
		$(this).parent().find("ul.subnav").slideDown("fast").show();
		
		var thisJquery = $(this)
		
		$(this).parent().hover(function() {
		}, function() {
			if (!thisJquery.hasClass("on")) {
				var imgSrc = thisJquery.find("img").attr("src");			
				imgSrc = imgSrc.replace("-on", "-off");
				thisJquery.find("img").attr("src", imgSrc);
			}
			
			$(this).parent().find("ul.subnav").slideUp("slow");
			
		});
		
	}, function() {});
	
	$("#nav ul.topnav li a.topnav").click(function() {
		return false;
	});
	
});