$(function(){
  // $("#wrap").hide();
  // $("#wrap").fadeIn(2000);
	$(".error,.client").hide()
	$("#past a").click(function(){
		var client = $(this).attr("href")
		if($(client).is(":hidden")){
			$("#content").prepend($(client).fadeToggle(300))
		}
		else{
			$(client).fadeToggle(300)
		}
		return false
	})
	$("#contact").submit(function(){
		$.post("contact.php",$("form").serialize(),function(response){
			$("#contact input:submit").attr("disabled",true)
			$("#contact").html(response)
		})
		return false
	});
})

jQuery.fn.fadeToggle = function(s,fn){
	return (this.is(":visible")) ? this.fadeOut(s,fn) : this.fadeIn(s,fn);
};