Ajax.InPlaceEditorWithEmptyText=Class.create(Ajax.InPlaceEditor,{initialize:function($super,C,B,A){if(!A.emptyText){A.emptyText="click to edit..."}if(!A.emptyClassName){A.emptyClassName="inplaceeditor-empty"}$super(C,B,A);this.checkEmpty()},checkEmpty:function(){if(this.element.innerHTML.length==0&&this.options.emptyText){this.element.appendChild(new Element("span",{className:this.options.emptyClassName}).update(this.options.emptyText))}},getElementText:function($super){if(empty_span=this.element.select("."+this.options.emptyClassName).first()){empty_span.remove()}return $super()},leaveEditMode:function($super,A){this.checkEmpty();return $super(A)}})