var Contacts=new Class({controller:"contacts_frontend",floatee:null,show:function(d,c){var a=this;this.floatee=new Floatee({relativeTo:c,isClosable:true});var b=new Request({url:"?run="+a.controller+".getForm&id="+d,method:"get",noCache:true,onComplete:function(e){a.floatee.update({content:e,onComplete:function(h){var i=h.floatee;var g=i.getElement("a.sendlink");g.addEvent("click",function(){a.sendForm();return false})}})}});b.send()},sendForm:function(){var a=this;this.hideError();var c=core.getFormData(this.floatee.floatee);var b=new Request({url:"?run="+a.controller+".sendForm",method:"post",noCache:true,async:false,onComplete:function(d){a.postSend(d)}});b.send(c.toQueryString())},postSend:function(b){var a=JSON.decode(b);if(a.error===true){this.showError(a.msg)}else{this.showSuccess()}},showSuccess:function(){var a=this;var b=new Request({url:"?run="+a.controller+".getSuccess",noCache:true,onComplete:function(c){a.floatee.update({content:c})}});b.send()},hideError:function(){this.getErrorElm().fade("hide")},showError:function(a){this.getErrorElm().set("html",a).fade("in")},getErrorElm:function(){return this.floatee.floatee.getElement("div.error")}});var contacts=new Contacts();