function ckeditor_fa_click(a){a.getAttribute("title");document.getElementsByClassName("fontawesomeClass")[0].getElementsByTagName("input")[0].value=a.getAttribute("title");for(var c=document.getElementById("ckeditor-fa-icons-select").getElementsByTagName("i"),d=0;d<c.length;d++)c[d].className=c[d].className.replace("active","");a.className+=" active"}
(function(a){CKEDITOR.dialog.add("ckeditorFaDialog",function(c){var d=function(){a.ajaxSetup({async:!1});var b=a.getJSON("/ajax/ckedtor-fa/get-icons");a.ajaxSetup({async:!0});return 200==b.status?b.responseJSON.html:"Icons not allowed"}();return{title:"FontAwesome Icons",minWidth:400,minHeight:200,contents:[{id:"font-awesome",label:"Add icon",elements:[{type:"text",id:"faicon",className:"fontawesomeClass",style:"display:none",validate:CKEDITOR.dialog.validate.notEmpty("Select fontAwesome icon")},
{type:"html",html:'\x3cdiv id\x3d"ckeditor-fa-icons"\x3e'+d+"\x3c/div\x3e"}]}],onOk:function(){for(var b=document.getElementById("ckeditor-fa-icons-select").getElementsByClassName("active"),a=0;a<b.length;a++)b[a].className=b[a].className.replace("active","");b=c.document.createElement("i");b.setAttribute("class","fa fa-"+this.getValueOf("font-awesome","faicon"));c.insertElement(b)}}})})(jQuery);