
	$().ready(function() {
		$('textarea.tinymce').tinymce({
					// General
					theme : "simple",
					mode : "exact",
					elements : "content",
					height: "300",
					// Cleanup/Output
					inline_styles : true,
					gecko_spellcheck : true,
					cleanup : true,
					cleanup_on_startup : false,
					entity_encoding : "raw",
					extended_valid_elements : "hr[id|title|alt|class|width|size|noshade|style],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|style],a[class|name|href|target|title|onclick|rel|style]",
					force_br_newlines : false,
					force_p_newlines : true,
					forced_root_block : 'p',
					invalid_elements : "applet",
					// URL
					relative_urls : true,
					remove_script_host : false,
					document_base_url : "http://localhost/",
					// Layout
					content_css : "http://localhost/templates/system/css/editor.css",
					// Advanced theme
					theme_advanced_toolbar_location : "top",
					theme_advanced_toolbar_align : "left",
					theme_advanced_source_editor_height : "700",
					theme_advanced_source_editor_width : "750"
					//theme_advanced_statusbar_location : "bottom",
					//theme_advanced_path : true




		});

		$('textarea.wordLimited').maxlength({
		'words': true,
		'feedback': '.wordsLeft'
		});

		/*$('textarea.tinymce').tinymce({

			// General options
			theme : "advanced",
			height: "300",
			mode : "exact",
			elements : "content",
			//all plugins
			//plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",
			plugins : "pagebreak,style,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",

			// Theme options
			//theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
			theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
			theme_advanced_buttons3 : "insertdate,inserttime,preview,|,forecolor,backcolor",
			//theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
			//theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			//theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : false,
			element_format : "html",
				// Layout
					content_css : "http://localhost/templates/system/css/editor.css",
			// Drop lists for link/image/media/template dialogs
			template_external_list_url : "lists/template_list.js",
			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js",
			media_external_list_url : "lists/media_list.js",


		});*/
	});


