///Here are bunch of clean up functions
//the correct ones should get called determined by tinymce setup

function lficustomcleanup_fiserv_home_regional(type, value,inst) {
	
	switch (type) {
		case "get_from_editor":
		//iterate incase we put extra divs in there somehow.
		  while(value.match(/^<div id=\"regionalHomeContent\">/g)){
			value = value.replace(/^<div id="regionalHomeContent">/g, "");
			value = value.replace(/<\/div>$/g, "");
			}
			
      
			// Do custom cleanup code here
			break;

		case "insert_to_editor": 
		  
		  value = "<div id=\"regionalHomeContent\">"+value+"</div>";
			// Do custom cleanup code here
			break;
	}

	return value;
}

function lficustomcleanup_fiserv_solutions_global(type, value) {
	switch (type) {
		case "get_from_editor":
		  // Do custom cleanup code here
		  while(value.match(/^<div id="columnListMiddle">/g)){
			value = value.replace(/^<div id="columnListMiddle">/g, "");
			value = value.replace(/<\/div>$/g, "");
		  }
			break;

		case "insert_to_editor": 
		  value = "<div id=\"columnListMiddle\">"+value+"</div>";
			break;

		case "get_from_editor_dom": 
			// Do custom cleanup code here
			break;

		case "insert_to_editor_dom":  
			// Do custom cleanup code here
			break;
	}

	return value;
}


function lficustomcleanup_fiserv_left_nav_pressrelease_events(type, value) {
	switch (type) {
		case "get_from_editor":
		 while(value.match(/^<div class="content">/g)){
			value = value.replace(/^<div class="content">/g, "");
			value = value.replace(/<\/div>$/g, "");
			// Do custom cleanup code here
		 }
			break;

		case "insert_to_editor": 
		  value = "<div class=\"content\">"+value+"</div>";
			// Do custom cleanup code here
			break;

		case "get_from_editor_dom": 
			// Do custom cleanup code here
			break;

		case "insert_to_editor_dom":  
			// Do custom cleanup code here

			break;
	}

	return value;
}


function lficustomcleanup_fiserv_left_nav_global(type, value) {
	switch (type) {
		case "get_from_editor":
			while(value.match(/^<div id="leftNavContent">/g)){
			value = value.replace(/^<div id="leftNavContent">/g, "");
			value = value.replace(/<\/div>$/g, "");
		  }
		  
			break;

		case "insert_to_editor": 
		
		  value = "<div id=\"leftNavContent\">"+value+"</div>";
			// Do custom cleanup code here

			break;

		case "get_from_editor_dom": 
			// Do custom cleanup code here

			break;

		case "insert_to_editor_dom":  
			// Do custom cleanup code here

			break;
	}

	return value;
}


function lficustomcleanup_fiserv_home_global(type, value) {
	switch (type) {
		case "get_from_editor":
			while(value.match(/^<div class="content">/g)){
			value = value.replace(/^<div class="content">/g, "");
			value = value.replace(/<\/div>$/g, "");
		  }
		  
		  /*while(value.match(/^<div id="quickSummary" class="content">/ig)){
			value = value.replace(/^<div id="quickSummary" class="content">/ig, "");
			value = value.replace(/<\/div>$/g, "");
		  }*/
		  
			break;

		case "insert_to_editor": 
		  value = "<div class=\"content\">"+value+"</div>";
		  /*value = "<div id=\"quickSummary\" class=\"content\">"+value+"</div>";*/
		  
			break;

		case "get_from_editor_dom": 
			break;

		case "insert_to_editor_dom":  
			break;
	}

	return value;
}

function lficustomcleanup_fiserv_fullpage_global(type, value) {
	switch (type) {
		case "get_from_editor":
		 while(value.match(/^<div id="columnFullPage">/g)){
			value = value.replace(/^<div id="columnFullPage">/g, "");
			value = value.replace(/<\/div>$/g, "");
		}
			break;

		case "insert_to_editor": 
		  value = "<div id=\"columnFullPage\">"+value+"</div>";
			break;

		case "get_from_editor_dom": 
			break;

		case "insert_to_editor_dom":  
			break;
	}

	return value;
}


function LFICustomCleanup(type, value) {
	switch (type) {
		case "get_from_editor":
		  
			break;

		case "insert_to_editor": 

			break;

		case "get_from_editor_dom": 
		  
			break;

		case "insert_to_editor_dom":  

			break;
	}

	return value;
}