new function(){
	$().ready(function(){
		$("#pwin").append("<a class='close' title='(close)' href='#'>X</a>");
		$("#pwin a.close").bind("click",function(){
			$(".dropShadow").hide();
			$("#pwin").fadeOut("slow");
			return false;
		});
		$("a.win").bind("click",function(){
			$(".dropShadow").hide();
			$("#pwin").css({
				"top":(""+($("body").scrollTop() + 200)+"px")
			});
			$("#pwin-content").html("<em>loading page...</em>");
			$("#pwin-content").load(this.href + " #content-main");
			$("#pwin").fadeIn("slow",function(){
				$("#pwin").dropShadow({
					left: 18, 
					top: 20, 
					opacity: 0.9, 
					blur: 7
				});
			});
			return false;
		});
		$("form.cgimail").bind("submit",function(){
			var url = this.action;
			var d = $(this).serialize();
			var frm = this;
			$("input",frm).each(function(){this.disabled = true;});
			$.get(url , d,function(d,sts,x){
				if(x.status==200){
					alert("Thank you. We have received your information.");
					$("input",frm).each(function(){this.disabled = false;});
				}else{
					document.location.href = url + "?" + d;
				}
			});
			return false;
		});
	});	
}
