$(document).ready(function()
{
	$("textarea").focus(function() {
		$("input").show();
		$(".feedback").hide();
	});
	
	$("input").click(function() {
		$(".feedback").html("<img src=\"\images\/working.gif\">")
		var m = $("textarea").val();
		$(".feedback").load("contact", { mail: m }).show();
		$("input").hide();
		return false;
	});

	$('.active .switch').toggle();

	$('.active .attachment').slideDown(1000);
	
	$('.box a').click(function() {
		$(this).parent().parent().parent().children(".attachment").slideToggle(600);
		$(this).parent().children(".switch").toggle();
		return false;
	});

	$('a').focus(function() { if ($(this).blur()) { $(this).blur(); } } ); // outline fix
	
	if (document.all && document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i < navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className += " over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
	
});
