$(document).ready(function(){
	//Change text to fancy helvetica
	if (typeof(Cufon) != "undefined")
		Cufon.replace("h1,h2,h3,h4");
	
	$("#nav > li").hover(
		function(){
			$(this).children("ul").stop(true, true);
			$(this).siblings().children("ul").hide();
			$(this).children("ul").fadeTo(100, 0.9).slideDown(100).css("opacity", .9);
			switch ($(this).children("a").children("img").attr("id")) {
				case "aboutkai":
					$("#aboutkai").attr("src", "http://www.kittelson.com/images/nav/aboutkai-hover.png");
					break;
				case "services":
					$("#services").attr("src", "http://www.kittelson.com/images/nav/services-hover.png");
					break;
				case "kaitoolbox":
					$("#kaitoolbox").attr("src", "http://www.kittelson.com/images/nav/kaitoolbox-hover.png");
					break;
				case "careers":
					$("#careers").attr("src", "http://www.kittelson.com/images/nav/careers-hover.png");	
					break;
				default:
					break;
			}
		},
		function(){
			$(this).children("ul").stop(true, true);
			$(this).siblings().children("ul").hide();
			$(this).children("ul").fadeTo(50, 0.9).slideUp(100);
			switch ($(this).children("a").children("img").attr("id")) {
				case "aboutkai":
					$("#aboutkai").attr("src", "http://www.kittelson.com/images/nav/aboutkai.png");
					break;
				case "services":
					$("#services").attr("src", "http://www.kittelson.com/images/nav/services.png");
					break;
				case "kaitoolbox":
					$("#kaitoolbox").attr("src", "http://www.kittelson.com/images/nav/kaitoolbox.png");
					break;
				case "careers":
					$("#careers").attr("src", "http://www.kittelson.com/images/nav/careers.png");	
					break;
				default:
					break;
			}
		}
	);
	
	// this converts bullets & numbering to fade back from the type
	$(".container > * > li").not(".container > #nav > li").wrapInner("<span></span>");
	
	
	
	$("#header-image").corner({
		tl: false,
		tr: false,
		bl: { radius: 10 },
		br: { radius: 10 }
	});
	$("#image").corner({
		tl: false,
		tr: false,
		bl: { radius: 10 },
		br: { radius: 10 }
	});
});