!function(){function e(e,n,d){var i,t;(d="string"==typeof d?NEW_CKEDITOR.document.getById(d):new NEW_CKEDITOR.dom.element(d))&&(i=e.fire("uiSpace",{space:n,html:""}).html)&&(e.on("uiSpace",(function(e){e.data.space==n&&e.cancel()}),null,null,1),t=d.append(NEW_CKEDITOR.dom.element.createFromHtml(a.output({id:e.id,name:e.name,langDir:e.lang.dir,langCode:e.langCode,space:n,spaceId:e.ui.spaceId(n),content:i}))),d.getCustomData("edi_hasshared")?t.hide():d.setCustomData("edi_hasshared",1),t.unselectable(),t.on("mousedown",(function(e){(e=e.data).getTarget().hasAscendant("a",1)||e.preventDefault()})),e.focusManager.add(t,1),e.on("focus",(function(){for(var e,a=0,n=d.getChildren();e=n.getItem(a);a++)e.type==NEW_CKEDITOR.NODE_ELEMENT&&!e.equals(t)&&e.hasClass("edi_shared")&&e.hide();t.show()})),e.on("destroy",(function(){t.remove()})))}var a=NEW_CKEDITOR.addTemplate("sharedcontainer",'<div id="edi_{name}" class="edi {id} edi_reset_all edi_chrome edi_editor_{name} edi_shared edi_detached edi_{langDir} '+NEW_CKEDITOR.env.cssClass+'" dir="{langDir}" title="'+(NEW_CKEDITOR.env.gecko?" ":"")+'" lang="{langCode}" role="presentation"><div class="edi_inner"><div id="{spaceId}" class="edi_{space}" role="presentation">{content}</div></div></div>');NEW_CKEDITOR.plugins.add("sharedspace",{init:function(a){a.on("loaded",(function(){var n=a.config.sharedSpaces;if(n)for(var d in n)e(a,d,n[d])}),null,null,9)}})}();