<?php
include "../../../config.php";

$znakova_sada = mysql_query("SELECT hodnota2 FROM jtcms_nastaveni WHERE typ='znakova_sada' LIMIT 1");
$znakova_sada = mysql_fetch_array($znakova_sada);
$znakova_sada = $znakova_sada['hodnota2'];

$jazyk_query = mysql_query("SELECT hodnota FROM jtcms_nastaveni WHERE typ='jazyk' LIMIT 1");
$jazyk_result = mysql_fetch_array($jazyk_query);
$jazyk = $jazyk_result['hodnota'];
 
  header('Expires: ' . gmdate('D, d M Y H:i:s') . '  GMT');
  header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . '  GMT');
  header('Content-Type: text/javascript; charset='.$znakova_sada);
?>
$().ready(function() {
	$('#cl_perex, #cl_obsah, #st_obsah').tinymce({

		script_url : './stuff/tools/tinymce/tiny_mce.js',
    language : '<?php echo $jazyk; ?>',
    mode : 'exact',

		theme : "advanced",
		plugins : "table,advimage,inlinepopups,media,searchreplace,paste,fullscreen,visualchars",
  
    convert_fonts_to_spans : true,
    relative_urls : false,
    remove_script_host : false,

		theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,charmap,hr,sub,sup,|,forecolor,backcolor,|,link,unlink,image,media,|,formatselect,fontselect,fontsizeselect,|,fullscreen,code",
		theme_advanced_buttons2 : "tablecontrols,|,cut,copy,paste,pastetext,pasteword,selectall,|,search,replace,|,outdent,indent,blockquote,|,undo,redo,|,visualchars,anchor,cleanup,removeformat",
		theme_advanced_buttons3 : "",
		theme_advanced_buttons4 : "",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,
	});
});