////$.fn.tinymce = function(options){
////   return this.each(function(){
////      tinyMCE.execCommand("mceAddControl", true, this.id);
////   });
////}

tinyMCE.init({
	mode : "specific_textareas",
	editor_selector : "editor",
  theme : "advanced",
  plugins : "safari,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",
  
  //force_br_newlines : true,
  //forced_root_block : '', // Needed for 3.x
  
  content_css : "/tiny_mce/themes/advanced/skins/default/custom_content.css",

	// Theme options
	//theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,fontselect,fontsizeselect",
	theme_advanced_buttons1 : "bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,fontselect",
	theme_advanced_buttons2 : "",
	theme_advanced_buttons3 : "",			
	theme_advanced_toolbar_location : "top",
	theme_advanced_toolbar_align : "left",
	theme_advanced_statusbar_location : "none",
	//theme_advanced_text_colors : "ba1014,8e001d,0076b8,18b7b8,006628,555555,798eb8,704206,007ead,003683,ea3286,000000",
	//theme_advanced_more_colors : false,
	theme_advanced_resizing : false,
	theme_advanced_fonts : 	"Times New Roman=times new roman;Helvetica=helvetica"
		//theme_advanced_font_sizes : "8=8px,9=9px,10=10px,11=11px,12=12px,13=13px,14=14px,15=15px,16=16px"

});




//$.editable.addInputType('mce', {
//   element : function(settings, original) {
//      var textarea = $('<textarea id="'+$(original).attr("id")+'_mce"/>');
//      if (settings.rows) {
//         textarea.attr('rows', settings.rows);
//      } else {
//         textarea.height(settings.height);
//      }
//      if (settings.cols) {
//         textarea.attr('cols', settings.cols);
//      } else {
//         textarea.width(settings.width);
//      }
//      $(this).append(textarea);
//         return(textarea);
//      },
//   plugin : function(settings, original) {
//      tinyMCE.execCommand("mceAddControl", true, $(original).attr("id")+'_mce');
//      },
//   submit : function(settings, original) {
//      tinyMCE.triggerSave();
//      tinyMCE.execCommand("mceRemoveControl", true, $(original).attr("id")+'_mce');
//      },
//   reset : function(settings, original) {
//      tinyMCE.execCommand("mceRemoveControl", true, $(original).attr("id")+'_mce');
//      original.reset();
//   }
//});
