(function(){var B={};var A={};function D(E){E.button.click=CKEDITOR.tools.override(E.button.click,function(F){return function(G){if(!B[E.id]||new Date().getTime()-B[E.id]>1500){B[E.id]=new Date().getTime();F.call(E.button,G)}}})}function C(){for(var E in CKEDITOR.ui.button._.instances){if(!A[CKEDITOR.ui.button._.instances[E].id]){D(CKEDITOR.ui.button._.instances[E]);A[CKEDITOR.ui.button._.instances[E].id]=1}}}CKEDITOR.plugins.add("vbbutton",{requires:["button"],init:function(E){E.on("instanceReady",C,this);if(CKEDITOR.env.ie){CKEDITOR.ui.button.prototype.render=function(L,H){var M=CKEDITOR.env,G=this._.id=CKEDITOR.tools.getNextId(),I="",J=this.command,F,N;this._.editor=L;var P={id:G,button:this,editor:L,focus:function(){var Q=CKEDITOR.document.getById(G);Q.focus()},execute:function(){this.button.click(L)}};P.clickFn=F=CKEDITOR.tools.addFunction(P.execute,P);P.index=N=CKEDITOR.ui.button._.instances.push(P)-1;if(this.modes){var O={};L.on("beforeModeUnload",function(){O[L.mode]=this._.state},this);L.on("mode",function(){var Q=L.mode;this.setState(this.modes[Q]?O[Q]!=undefined?O[Q]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)},this)}else{if(J){J=L.getCommand(J);if(J){J.on("state",function(){this.setState(J.state)},this);I+="cke_"+(J.state==CKEDITOR.TRISTATE_ON?"on":J.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off")}}}if(!J){I+="cke_off"}if(this.className){I+=" "+this.className}H.push('<span class="cke_button'+(this.icon&&this.icon.indexOf(".png")==-1?" cke_noalphafix":"")+'">','<a id="',G,'" class="',I,'"',M.gecko&&M.version>=10900&&!M.hc?"":'" href="javascript:void(\''+(this.title||"").replace("'","")+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+G+'_label"'+(this.hasArrow?' aria-haspopup="true"':""));if(M.opera||(M.gecko&&M.mac)){H.push(' onkeypress="return false;"')}if(M.gecko){H.push(' onblur="this.style.cssText = this.style.cssText;"')}H.push(' onkeydown="return CKEDITOR.ui.button._.keydown(',N,', event);" onfocus="return CKEDITOR.ui.button._.focus(',N,', event);" onclick="CKEDITOR.tools.callFunction(',F,', this); return false;"><span class="cke_icon"');if(this.icon){var K=(this.iconOffset||0)*-16;H.push(' style="background-image:url(',CKEDITOR.getUrl(this.icon),");background-position:0 "+K+'px;"');H.push('><span class="cke_icon_image custom">&nbsp;</span></span><span id="',G,'_label" class="cke_label">',this.label,"</span>")}else{H.push('><span class="cke_icon_image">&nbsp;</span></span><span id="',G,'_label" class="cke_label">',this.label,"</span>")}if(this.hasArrow){H.push('<span class="cke_buttonarrow">'+(CKEDITOR.env.hc?"&#9660;":"&nbsp;")+"</span>")}H.push("</a>","</span>");if(this.onRender){this.onRender()}return P}}}})})();