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


// YUI RTE options
var editor_options = {
	height: '150px',
	width: '580px',
	dompath: false, //Turns on the bar at the bottom
	animate: true, //Animates the opening, closing and moving of Editor windows
	toolbar: {
		collapse: false,
		titlebar: '',
		draggable: false,
		buttons: [
		    { group: 'textstyle', label: 'Font Style',
		        buttons: [
		            { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
		            { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
		            { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
		            { type: 'separator' },
		            { type: 'push', label: 'Subscript', value: 'subscript', disabled: true },
		            { type: 'push', label: 'Superscript', value: 'superscript', disabled: true },
		            { type: 'separator' },
		            { type: 'push', label: 'Remove Formatting', value: 'removeformat', disabled: true },
		            { type: 'push', label: 'Show/Hide Hidden Elements', value: 'hiddenelements' }
		        ]
		    },
		    { type: 'separator' },
		    { group: 'alignment', label: 'Alignment',
		        buttons: [
		            { type: 'push', label: 'Align Left CTRL + SHIFT + [', value: 'justifyleft' },
		            { type: 'push', label: 'Align Center CTRL + SHIFT + |', value: 'justifycenter' },
		            { type: 'push', label: 'Align Right CTRL + SHIFT + ]', value: 'justifyright' },
		            { type: 'push', label: 'Justify', value: 'justifyfull' }
		        ]
		    },
		    { type: 'separator' },
		    { group: 'indentlist', label: 'Indenting and Lists',
		        buttons: [
		            { type: 'push', label: 'Indent', value: 'indent', disabled: true },
		            { type: 'push', label: 'Outdent', value: 'outdent', disabled: true },
		            { type: 'push', label: 'Create an Unordered List', value: 'insertunorderedlist' },
		            { type: 'push', label: 'Create an Ordered List', value: 'insertorderedlist' }
		        ]
		    },
		    { type: 'separator' },
		    { group: 'insertitem', label: 'Insert',
		        buttons: [
		            { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true }
		        ]
		    }
		]

	}
	}
	
/*var myEditor = new YAHOO.widget.Editor('school_description', editor_options);
myEditor.render();

YAHOO.util.Event.on('school_form', 'submit', function(ev){
	YAHOO.util.Event.stopEvent(ev);
	myEditor.saveHTML();
	YAHOO.util.Dom.get('school_form').submit();
})
*/