// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

/**
 * When called, finds all textareas in the DOM.  If the textarea is an FCKEditor, then
 * it cycles through the edit modes to 'wake up' the editor.
 */
function activateEditors() {
    if( /Gecko/.test(navigator.userAgent) ) {
      $$('textarea').each(function(ta) {
        editor = FCKeditorAPI.GetInstance(ta.id);
        if (editor && editor.EditorDocument && editor.EditMode == FCK_EDITMODE_WYSIWYG) {
           editor.SwitchEditMode();
           editor.SwitchEditMode();
        }
      });
    }
}

