window.addEvent("domready",function(){if($("blog-comment-form")){$$(".purpleinput").each(function(a){a.getChildren().addEvent("focus",function(){a.addClass("piactive")});a.getChildren().addEvent("blur",function(){a.removeClass("piactive")})});$("response_response").addEvent("focus",function(){$("response_response").getParent().addClass("ptactive")});$("response_response").addEvent("blur",function(){$("response_response").getParent().removeClass("ptactive")});$("response_website").addEvent("focus",function(){if(this.get("value")==""){this.set("value","http://")}});$("response_website").addEvent("blur",function(){if(this.get("value")=="http://"){this.set("value","")}});$("blog-comment-form").addEvent("submit",function(a){a.stop();if($("response_response").get("value")==""){$("response_response").getParent().addClass("ptmissing");$("formerror").set("html","You must enter a comment first!");$("formerror").setStyle("display","block");$("response_response").focus()}else{$("formerror").setStyle("display","none");$("response_response").getParent().removeClass("ptmissing");$("blog-comment-submit").setProperty("disabled",true);$("blog-comment-submit").addClass("purpledisabled");this.set("send",{onComplete:function(b){$("blog-comment-response").set("html",b);Cufon.refresh("h2");new Fx.Morph($("blog-comment-form"),{wait:false,duration:1500,transition:Fx.Transitions.Quart.easeInOut,onComplete:function(){$("blog-comment-response").setStyle("display","block");$("blog-comment-submit").setProperty("disabled",false);$("blog-comment-submit").removeClass("purpledisabled");$("blog-comment-form").reset();(function(){$("blog-comment-form").setStyle("opacity","1");$("blog-comment-response").setStyle("display","none");$("blog-comment-response").set("html","")}).delay(7000)}}).start({opacity:0})}});this.send()}})}});
