/**
* Tyni MC nastaví editor tiny pro všechyn textareas s třídou tyni
*/

tinyMCE.init({
    language: "cs",
    mode : "textareas",
    theme : "advanced",
    plugins : "insertdatetime",
    entity_encoding : "raw",   //zakáže převod diakritických znaků na entity
    editor_selector : "tyni", //vybere požadovaný class
    theme_advanced_toolbar_location : "top",
    theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,hr,formatselect,forecolor,backcolor,|,insertdate,|,bullist,numlist,link,unlink,|,search,replace,|,code",
    theme_advanced_buttons2 : "",
    theme_advanced_buttons3 : "",
    theme_advanced_buttons4 : "",
    theme_advanced_statusbar_location : "bottom",
    theme_advanced_resizing : true
});

function toggleEditor(id) {
    if (!tinyMCE.get(id))
        tinyMCE.execCommand('mceAddControl', false, id);
    else
        tinyMCE.execCommand('mceRemoveControl', false, id);
}

//---Datepicker pro formuláře nette----------------------------------------------------------------------
    $(document).ready(function(){
        $('input.datepicker').datepicker({
            duration: 'fast',
            showButtonPanel: true,
            changeMonth: true,
            changeYear: true
        });
    });

//---Gridito---------------------------------------------------------------------------------------------

$(function () {
    $("div.gridito").gridito();
});
//---UI Tabs --------------------------------------------------------------------------------------------
$(function() {
    $( "#tabs,#tabs2" ).tabs();
});
//---UI acordion ----------------------------------------------------------------------------------------
$(function() {
		$( "#accordion" ).accordion({
			
		});

	});
//---LightBox jQuery-------------------------------------------------------------------------------------
$(function() {
        $('.pravySloupec a ').lightBox();
    });



