(function(){CKEDITOR.plugins.add("image",{requires:"dialog",lang:"af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en-au,en-ca,en-gb,en,eo,es,et,eu,fa,fi,fo,fr-ca,fr,gl,gu,he,hi,hr,hu,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt-br,pt,ro,ru,sk,sl,sr-latn,sr,sv,th,tr,ug,uk,vi,zh-cn,zh",icons:"image",init:function(c){var d="image";CKEDITOR.dialog.add(d,this.path+"dialogs/image.js");c.addCommand(d,new CKEDITOR.dialogCommand(d));c.ui.addButton&&c.ui.addButton("Image",{label:c.lang.common.image,command:d,toolbar:"insert,10"});c.on("doubleclick",function(e){var f=e.data.element;if(f.is("img")&&!f.data("cke-realelement")&&!f.isReadOnly()){e.data.dialog="image"}});if(c.addMenuItems){c.addMenuItems({image:{label:c.lang.image.menu,command:"image",group:"image"}})}if(c.contextMenu){c.contextMenu.addListener(function(e,f){if(a(c,e)){return{image:CKEDITOR.TRISTATE_OFF}}})}},afterInit:function(d){c("left");c("right");c("center");c("block");function c(e){var f=d.getCommand("justify"+e);if(f){if(e=="left"||e=="right"){f.on("exec",function(g){var h=a(d),i;if(h){i=b(h);if(i==e){h.removeStyle("float");if(e==b(h)){h.removeAttribute("align")}}else{h.setStyle("float",e)}g.cancel()}})}f.on("refresh",function(g){var h=a(d),i;if(h){i=b(h);this.setState((i==e)?CKEDITOR.TRISTATE_ON:(e=="right"||e=="left")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);g.cancel()}})}}}});function a(d,c){if(!c){var e=d.getSelection();c=e.getSelectedElement()}if(c&&c.is("img")&&!c.data("cke-realelement")&&!c.isReadOnly()){return c}}function b(c){var d=c.getStyle("float");if(d=="inherit"||d=="none"){d=0}if(!d){d=c.getAttribute("align")}return d}})();CKEDITOR.config.image_removeLinkByEmptyURL=true;