jQuery(document).ready(function($){
	editAreaLoader.init({
		id: "css-editor"	// id of the textarea to transform	
		,start_highlight: true	
		,font_size: "8"
		,font_family: "verdana, monospace"
		,allow_resize: "y"
		,allow_toggle: false
		// ,language: "fr"
		,syntax: "css"	
		,toolbar: "save, |, charmap, |, search, go_to_line, |, undo, redo, |, select_font, |, change_smooth_selection, highlight, reset_highlight, |, help"
		// ,load_callback: "my_load"
		,save_callback: "my_save"
		,plugins: "charmap"
		,charmap_default: "arrows"
			
	});

	function my_save(id, content){
		// alert(content);
		$.ajax({
			type: "post",
			url: "app/includes/ajax.php",
			data: {action: "save_custom_css", content: content}
		}).done(function(data){
			$.notify("Done", {className: "success"});
		}).fail(function(){
			$.notify("Failed. Check your internet connection.", {className: "warning"});
		});
	}
})