tinyMCE.init({
    setup : function(ed) 
    {
		ed.onPostProcess.add(function(ed, o) 
		{
			if (o.get) {
				//remove curly braces from content so that it doesn't break 
				//our templates
				o.content = o.content.replace(/\{/g, '').replace(/\}/g, '');
			}
		});
    },
    
	theme : "advanced",
	mode : 'none',
	plugins: 'preview, accepte_image, acceptelink, emotions, acceptetags, accepte_media',
	
	theme_advanced_disable: 'styleselect',
	theme_advanced_buttons1 : "bold,italic,|,link,unlink,|,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|",
	theme_advanced_buttons1_add : "cut,copy,paste,pastetext,pasteword,|,bullist,numlist",
	theme_advanced_buttons2 : "undo,redo,|,accepte_media,image,|,code",
	theme_advanced_buttons3 : "",
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_resizing : true,
	
	convert_fonts_to_spans : true,
	content_css: '/assets/skins/frontoffice/stylesheets/tinymce.css',
	relative_urls: false,
	fix_list_elements : true, //fixes list to be valid xhtml
	fix_table_elements : true, //fixes tables to be valid xhtml
	
	doctype: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
	
	plugin_preview_width : "800",
    plugin_preview_height : "600",
    plugin_preview_pageurl : "/assets/widgets/tinymce/jscripts/tiny_mce/plugins/preview/example.html",
    
    height: "400",
    width: "100%",
    inline_styles : false,
    cleanup_on_startup : true,
    
    valid_elements : "@[title],a[rel|rev|charset|hreflang|href|title],strong/b,em/i,strike,u,"
    	+ "#p,-ol,-ul,-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,"
    	+ "-blockquote,-code,-pre,address,hr[size|noshade],dd,dl,dt,cite,abbr,acronym,"
    	+ "del[datetime|cite],ins[datetime|cite],"
    	+ "object[classid|width|height|codebase|*],param[name|value|_value],embed[type|width"
    	+ "|height|src|*],map[name],area[shape|coords|href|alt|target],bdo,"
    	+ "button,dfn,kbd,q[cite],samp,small,tt,var,big"
    	
});
