",d="focused",et="unselectable",fi="cleditorMain",ei="cleditorToolbar",at="cleditorGroup",vt="cleditorButton",yt="cleditorDisabled",oi="cleditorDivider",si="cleditorPopup",pt="cleditorList",hi="cleditorColor",g="cleditorPrompt",ci="cleditorMsg",v=navigator.userAgent.toLowerCase(),t=/msie/.test(v),li=/msie\s6/.test(v),ot=/(trident)(?:.*rv:([\w.]+))?/.test(v),ai=/webkit/.test(v),st=/iphone|ipad|ipod/i.test(v),f={},wt,o=n.cleditor.buttons;n.each(o.init.split("|"),function(n,t){var i=t.split(","),r=i[0];o[r]={stripIndex:n,name:r,title:i[1]===""?r.charAt(0).toUpperCase()+r.substr(1):i[1],command:i[2]===""?r:i[2],popupName:i[3]===""?r:i[3]}});delete o.init;cleditor=function(r,f){var s=this;s.options=f=n.extend({},n.cleditor.defaultOptions,f);var l=s.$area=n(r).hide().data(lt,s).blur(function(){ut(s,!0)}),v=s.$main=n(i).addClass(fi).width(f.width).height(f.height),y=s.$toolbar=n(i).addClass(ei).appendTo(v),h=n(i).addClass(at).appendTo(y),c=0;n.each(f.controls.split(" "),function(r,e){var w,l,p,v;if(e==="")return!0;e==="|"?(w=n(i).addClass(oi).appendTo(h),h.width(c+1),c=0,h=n(i).addClass(at).appendTo(y)):(l=o[e],p=n(i).data(a,l.name).addClass(vt).attr("title",l.title).bind(u,n.proxy(vi,s)).appendTo(h).hover(kt,dt),c+=24,h.width(c+1),v={},l.css?v=l.css:l.image&&(v.backgroundImage=wi(l.image)),l.stripIndex&&(v.backgroundPosition=l.stripIndex*-24),p.css(v),t&&p.attr(et,"on"),l.popupName&>(l.popupName,f,l.popupClass,l.popupContent,l.popupHover))});v.insertBefore(l).append(l);wt||(n(document).click(function(t){var i=n(t.target);i.add(i.parents()).is("."+g)||e()}),wt=!0);/auto|%/.test(""+f.width+f.height)&&n(window).bind("resize.cleditor",function(){ht(s)});ht(s)};y=cleditor.prototype;bt=[["clear",pi],["disable",ni],["execCommand",s],["focus",h],["hidePopups",e],["sourceMode",l,!0],["refresh",ht],["select",bi],["selectedHTML",ki,!0],["selectedText",ri,!0],["showMessage",rt],["updateFrame",ut],["updateTextArea",ct]];n.each(bt,function(n,t){y[t[0]]=function(){for(var u,n=this,r=[n],i=0;i