(function(a){if(jHtmlArea){var c=jHtmlArea.fn.forecolor;jHtmlArea.fn.forecolor=function(f){if(f){c.call(this,f)}else{var e=this;var d=this.getRange();jHtmlAreaColorPickerMenu(a(".forecolor",this.toolbar),{colorChosen:function(g){e.previousRange=d;if($jhtmlarea.browser.msie===true&&$jhtmlarea.browser.version<11){d.execCommand("ForeColor",false,g)}else{e.forecolor(g)}}})}}}var b=window.jHtmlAreaColorPickerMenu=function(e,d){return new jHtmlAreaColorPickerMenu.fn.init(e,d)};b.fn=b.prototype={jhtmlareacolorpickermenu:"0.8",init:function(h,n){var d=a.extend({},b.defaultOptions,n);var j=this;var e=this.owner=a(h);var g=e.position();if(b.instance){b.instance.hide()}jHtmlAreaColorPickerMenu.instance=this;var k=this.picker=a("<div/>").css({position:"absolute",left:g.left+d.offsetLeft,top:g.top+e.height()+d.offsetTop,"z-index":d["z-index"]}).addClass("jHtmlAreaColorPickerMenu");for(var f=0;f<d.colors.length;f++){var l=d.colors[f];a("<div/>").css("background-color",l).appendTo(k).click((function(i){return function(){if(d.colorChosen){d.colorChosen.call(this,i)}j.hide()}})(l))}a("<div/>").html("<div></div>Automatic").addClass("automatic").appendTo(k).click(function(){if(d.colorChosen){d.colorChosen.call(this,null)}j.hide()});var m=false;k.appendTo(e.parent()).show().mouseout(function(){m=true;j.currentTimeout=window.setTimeout(function(){if(m===true){j.hide()}},1000)}).mouseover(function(){if(j.currentTimeout){window.clearTimeout(j.currentTimeout);j.currentTimeout=null}m=false})},hide:function(){this.picker.hide();this.picker.remove()}};b.fn.init.prototype=b.fn;b.defaultOptions={"z-index":0,offsetTop:0,offsetLeft:0,colors:["#ffffff","#cccccc","#c0c0c0","#999999","#666666","#333333","#000000","#ffcccc","#ff6666","#ff0000","#cc0000","#990000","#660000","#330000","#ffcc99","#ff9966","#ff9900","#ff6600","#cc6600","#993300","#663300","#ffff99","#ffff66","#ffcc66","#ffcc33","#cc9933","#996633","#663333","#ffffcc","#ffff33","#ffff00","#ffcc00","#999900","#666600","#333300","#99ff99","#66ff99","#33ff33","#33cc00","#009900","#006600","#003300","#99FFFF","#33FFFF","#66CCCC","#00CCCC","#339999","#336666","#003333","#CCFFFF","#66FFFF","#33CCFF","#3366FF","#3333FF","#000099","#000066","#CCCCFF","#9999FF","#6666CC","#6633FF","#6600CC","#333399","#330099","#FFCCFF","#FF99FF","#CC66CC","#CC33CC","#993399","#663366","#330033"],colorChosen:null}})(jQuery);