(function(){var d=["click","keydown","mousedown","keypress","mouseover","mouseout"];function c(j){var i=j.getElementsByTag("*"),h=i.count(),b;for(var a=0;a<h;a++){b=i.getItem(a);(function(f){for(var e=0;e<d.length;e++){(function(l){var g=f.getAttribute("on"+l);if(f.hasAttribute("on"+l)){f.removeAttribute("on"+l);f.on(l,function(A){var z=/(return\s*)?CKEDITOR\.tools\.callFunction\(([^)]+)\)/.exec(g),y=z&&z[1],x=z&&z[2].split(","),w=/return false;/.test(g);if(x){var v=x.length,k;for(var D=0;D<v;D++){x[D]=k=CKEDITOR.tools.trim(x[D]);var C=k.match(/^(["'])([^"']*?)\1$/);if(C){x[D]=C[2];continue}if(k.match(/\d+/)){x[D]=parseInt(k,10);continue}switch(k){case"this":x[D]=f.$;break;case"event":x[D]=A.data.$;break;case"null":x[D]=null;break}}var B=CKEDITOR.tools.callFunction.apply(window,x);if(y&&B===false){w=1}}if(w){A.data.preventDefault()}})}})(d[e])}})(b)}}CKEDITOR.plugins.add("adobeair",{init:function(a){if(!CKEDITOR.env.air){return}a.addCss("body { padding: 8px }");a.on("uiReady",function(){c(a.container);if(a.sharedSpaces){for(var b in a.sharedSpaces){c(a.sharedSpaces[b])}}a.on("elementsPathUpdate",function(f){c(f.data.space)})});a.on("contentDom",function(){a.document.on("click",function(b){b.data.preventDefault(true)})})}});CKEDITOR.ui.on("ready",function(h){var g=h.data;if(g._.panel){var b=g._.panel._.panel,a;(function(){if(!b.isLoaded){setTimeout(arguments.callee,30);return}a=b._.holder;c(a)})()}else{if(g instanceof CKEDITOR.dialog){c(g._.element)}}})})();CKEDITOR.dom.document.prototype.write=CKEDITOR.tools.override(CKEDITOR.dom.document.prototype.write,function(d){function c(l,k,j,i){var b=l.append(k),a=CKEDITOR.htmlParser.fragment.fromHtml(j).children[0].attributes;a&&b.setAttributes(a);i&&b.append(l.getDocument().createText(i))}return function(h,g){if(this.getBody()){var b=this,a=this.getHead();h=h.replace(/(<style[^>]*>)([\s\S]*?)<\/style>/gi,function(j,f,e){c(a,"style",f,e);return""});h=h.replace(/<base\b[^>]*\/>/i,function(e){c(a,"base",e);return""});h=h.replace(/<title>([\s\S]*)<\/title>/i,function(f,e){b.$.title=e;return""});h=h.replace(/<head>([\s\S]*)<\/head>/i,function(f){var e=new CKEDITOR.dom.element("div",b);e.setHtml(f);e.moveChildren(a);return""});h.replace(/(<body[^>]*>)([\s\S]*)(?=$|<\/body>)/i,function(l,k,f){b.getBody().setHtml(f);var e=CKEDITOR.htmlParser.fragment.fromHtml(k).children[0].attributes;e&&b.getBody().setAttributes(e)})}else{d.apply(this,arguments)}}});