// inicializamos el tinymce

tinyMCE.init({
   mode: 'none',
   height: '300px',
   theme: 'advanced',
   plugins : "spellchecker,advimage,media",
   theme_advanced_buttons1 : "caronte_content,|,bold,italic,underline,strikethrough,|,bullist,numlist,blockquote,|,justifyleft,justifycenter,justifyright,|,link,unlink,pagebreak,|,spellchecker,|,fullscreen,forecolorpicker,backcolorpicker,|,code",
   theme_advanced_buttons2 : "image,media",
   theme_advanced_buttons3 : "",
   theme_advanced_buttons4 : "",
   theme_advanced_toolbar_location : "top",
   theme_advanced_toolbar_align : "left",
   theme_advanced_statusbar_location : "none",
   theme_advanced_resizing : true,
   setup : function (ed) {
      //agregamos el boton de caronte

      ed.addButton('caronte_content', {
         title: 'Adjuntar Contenido',
         height: "500",
         image: '/images/icons/attach.png',
         onclick : function() {
            try {
               CaronteContent.init('event_description');
            }
            catch (e) {
               alert('El administrador de contenidos no se encuentra disponible.');
            }
         }
      });
   }
});

// ONDOMREADY! :O

window.addEvent('domready', function() {
   try {
      tinyMCE.execCommand('mceAddControl', true, 'event_description');
   }
   catch (e) { }
   
   
});
