$(document).ready(function(){if(!(edit_area_lang in {bg:1,cs:1,de:1,dk:1,en:1,eo:1,es:1,fi:1,fr:1,hr:1,it:1,ja:1,mk:1,nl:1,pl:1,pt:1,ru:1,sk:1,zh:1})){edit_area_lang="en"}do_initEditArea("css");$("#fileselect").change(function(){var a;a=$(this).val();loadfile("cssfile",a);do_initEditArea(a.split(".").pop())})});function loadfile(b,a){$.ajax({url:"apps_v/fileedit_get.php",type:"get",data:{file:a},success:function(c){if(c!=""){editAreaLoader.setValue(b,c)}}})}function savefile(b,a){$.ajax({url:"apps_v/fileedit_v.php",type:"post",data:{content:a,file:$("#fileselect").val(),csrf_token:csrf_token_get()},success:function(d){if(d!=""){var c=500;$.blockUI.defaults.growlCSS.width="auto";$.blockUI.defaults.growlCSS.left="10px";$.blockUI.defaults.growlCSS.right="";$.blockUI.defaults.growlCSS.opacity=0.9;$.blockUI.defaults.growlCSS.backgroundColor="#000";if(mydbr_loc.MYDBR_FILEEDIT_SAVED!=d){c=2500;$.blockUI.defaults.growlCSS.backgroundColor="red"}$.growlUI(null,d,c)}}})}function do_initEditArea(b){var a="verdana, monospace";if($.browser.msie){a="monospace"}editAreaLoader.init({id:"cssfile",start_highlight:true,font_family:a,EA_load_callback:"file_edit_loaded",allow_resize:"y",allow_toggle:false,language:edit_area_lang,syntax:b,show_line_colors:true,toolbar:"save, search, |, undo, redo, |, word_wrap, fullscreen",save_callback:"savefile",smooth_selection:true,word_wrap:true})}function file_edit_loaded(){resize_edit_area("frame_cssfile","cssfile")};