jQuery(document).ready( function () {
tinyMCE.init({
	mode : "textareas",
	plugins : "safari,iespell,paste,fullscreen",
	theme : "advanced",
	theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,bullist,numlist,|,undo,redo,pastetext,pasteword,cleanup,|,link,unlink,|,blockquote,acdattachment,|,fullscreen",
	theme_advanced_buttons2 : "",
	theme_advanced_buttons3 : "",
	
	//tab_focus : ":prev,:next", //Nah. It screws up tabbing in lists... 

	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "bottom",

	theme_advanced_resizing : true,
	theme_advanced_resize_horizontal : false,
	theme_advanced_resizing_min_height : 200,
	theme_advanced_resizing_max_height : 600,


	extended_valid_elements : "a[name|href|title],img[class|src|border=0|alt|title|width|height|align|name],span[class|align|style]",
	invalid_elements : "xml,style,comment",

	setup : function(ed) {
		// Register attachment button
		ed.addButton('acdattachment', {
			title : 'Attach Images',
			image : ''
		});
		
		// Initialze SWFUpload once the editor has been rendered
          ed.onInit.add(function(ed) {
		  
			if (typeof acd_initSWFUpload == "function")
              setTimeout('acd_initSWFUpload()', 100);
          });

   },
    
    gecko_spellcheck : true,

	
	paste_remove_styles : true

});
});
