(function(){var a={toolbarFocus:{editorFocus:false,readOnly:1,exec:function(c){var d=c._.elementsPath.idBase,e=CKEDITOR.document.getById(d+'0');e&&e.focus(CKEDITOR.env.ie||CKEDITOR.env.air);}}},b='<span class="cke_empty">&nbsp;</span>';CKEDITOR.plugins.add('elementspath',{requires:['selection'],init:function(c){var d='cke_path_'+c.name,e,f=function(){if(!e)e=CKEDITOR.document.getById(d);return e;},g='cke_elementspath_'+CKEDITOR.tools.getNextNumber()+'_';c._.elementsPath={idBase:g,filters:[]};c.on('themeSpace',function(l){if(l.data.space=='bottom')l.data.html+='<span id="'+d+'_label" class="cke_voice_label">'+c.lang.elementsPath.eleLabel+'</span>'+'<div id="'+d+'" class="cke_path" role="group" aria-labelledby="'+d+'_label">'+b+'</div>';});function h(l){c.focus();var m=c._.elementsPath.list[l];if(m.is('body')){var n=new CKEDITOR.dom.range(c.document);n.selectNodeContents(m);n.select();}else c.getSelection().selectElement(m);};var i=CKEDITOR.tools.addFunction(h),j=CKEDITOR.tools.addFunction(function(l,m){var n=c._.elementsPath.idBase,o;m=new CKEDITOR.dom.event(m);var p=c.lang.dir=='rtl';switch(m.getKeystroke()){case p?39:37:case 9:o=CKEDITOR.document.getById(n+(l+1));if(!o)o=CKEDITOR.document.getById(n+'0');o.focus();return false;case p?37:39:case CKEDITOR.SHIFT+9:o=CKEDITOR.document.getById(n+(l-1));if(!o)o=CKEDITOR.document.getById(n+(c._.elementsPath.list.length-1));o.focus();return false;case 27:c.focus();return false;case 13:case 32:h(l);return false;}return true;});c.on('selectionChange',function(l){var m=CKEDITOR.env,n=l.data.selection,o=n.getStartElement(),p=[],q=l.editor,r=q._.elementsPath.list=[],s=q._.elementsPath.filters;while(o){var t=0,u;if(o.data('cke-display-name'))u=o.data('cke-display-name');else if(o.data('cke-real-element-type'))u=o.data('cke-real-element-type');else u=o.getName();for(var v=0;v<s.length;v++){var w=s[v](o,u);if(w===false){t=1;break;}u=w||u;}if(!t){var x=r.push(o)-1,y='';if(m.opera||m.gecko&&m.mac)y+=' onkeypress="return false;"';if(m.gecko)y+=' onblur="this.style.cssText = this.style.cssText;"';var z=q.lang.elementsPath.eleTitle.replace(/%1/,u);p.unshift('<a id="',g,x,'" href="javascript:void(\'',u,'\')" tabindex="-1" title="',z,'"'+(CKEDITOR.env.gecko&&CKEDITOR.env.version<10900?' onfocus="event.preventBubble();"':'')+' hidefocus="true" '+' onkeydown="return CKEDITOR.tools.callFunction(',j,',',x,', event );"'+y,' onclick="CKEDITOR.tools.callFunction('+i,',',x,'); return false;"',' role="button" aria-labelledby="'+g+x+'_label">',u,'<span id="',g,x,'_label" class="cke_label">'+z+'</span>','</a>');
}if(u=='body')break;o=o.getParent();}var A=f();A.setHtml(p.join('')+b);q.fire('elementsPathUpdate',{space:A});});function k(){e&&e.setHtml(b);delete c._.elementsPath.list;};c.on('readOnly',k);c.on('contentDomUnload',k);c.addCommand('elementsPathFocus',a.toolbarFocus);}});})();
