(function(e){var a,d=[];function c(i,h,g){var f;f=e.fn[h];e.fn[h]=function(){var j;if(i!=="after"){j=g.apply(this,arguments);if(j!==undefined){return j}}j=f.apply(this,arguments);if(i!=="before"){g.apply(this,arguments)}return j}}e.fn.tinymce=function(k){var j=this,i,f="",h;if(!j.length){return}if(!k){return tinyMCE.get(this[0].id)}function g(){if(b){b();b=null}j.each(function(l,o){var p,m=o.id||tinymce.DOM.uniqueId();o.id=m;p=new tinymce.Editor(m,k);p.render()})}if(!window.tinymce&&!a&&(i=k.script_url)){a=1;if(/_(src|dev)\.js/g.test(i)){f="_src"}window.tinyMCEPreInit={base:i.substring(0,i.lastIndexOf("/")),suffix:f,query:""};e.getScript(i,function(){tinymce.dom.Event.domLoaded=1;a=2;g();e.each(d,function(m,l){l()})})}else{if(a===1){d.push(g)}else{g()}}};e.extend(e.expr[":"],{tinymce:function(f){return f.id&&!!tinyMCE.get(f.id)}});function b(){function f(){this.find("span.mceEditor,div.mceEditor").each(function(i,j){var h;if(h=tinyMCE.get(j.id.replace(/_parent$/,""))){h.remove()}})}function g(i){var h;if(i!==undefined){f.call(this);this.each(function(j,k){var l;if(l=tinyMCE.get(k.id)){l.setContent(i)}})}else{if(this.length>0){if(h=tinyMCE.get(this[0].id)){return h.getContent()}}}}c("both","text",function(h){if(h!==undefined){return g.call(this,h)}if(this.length>0){if(ed=tinyMCE.get(this[0].id)){return ed.getContent().replace(/<[^>]+>/g,"")}}});e.each(["val","html"],function(i,h){c("both",h,g)});e.each(["append","prepend"],function(i,h){c("before",h,function(j){if(j!==undefined){this.each(function(l,m){var k;if(k=tinyMCE.get(m.id)){if(h==="append"){k.setContent(k.getContent()+j)}else{k.setContent(j+k.getContent())}}})}})});c("both","attr",function(h,i){if(h&&h==="value"){return g.call(this,i)}});e.each(["remove","replaceWith","replaceAll","empty"],function(i,h){c("before",h,f)})}})(jQuery);
