
// removes html text element and replaces with an image tag
function loadImageHeader(cssClass, size, color){		
	items = $(cssClass);
	
	
	
	items.each(function(){
		txtString = $(this).html();
		
		
		width = $(this).innerWidth();
		txtString = escape(txtString);
		if (txtString.length > 0) {
			$(this).after("<img  class='blocked' src='/image.php?color=" + color +"&text=" + txtString +"&size=" + size +"&width="+width+"&caps="+caps+ "'>").remove();	
		}
	});
	
}

// Reads text from inside HTML tag and puts image inside, without removing
function loadImageLink(cssClass, size, color, font, caps, bgc){		
	items = $(cssClass);
	
	items.each(function(){
		txtString = $(this).html();
	
		
		
		width = $(this).innerWidth();
		txtString = escape(txtString);
		if (txtString.length > 0) {
			$(this).html("<img class='blocked' src='/image.php?color=" + color +"&text=" + txtString +"&size=" + size +"&width="+width+"&caps="+caps+"&font="+font+ "&bgc="+bgc+"'>");	
		}	
	});
	
}


$(document).ready(function(){
	loadImageLink(".headerFrase","19","dc176d","normal",true, "#FFF");
	//loadImageLink(".blockTitle","14","FFF","book",false, "dc176d");
	loadImageLink(".colunaMeioTitulo","13","dc176d","black",false, "#FFF");
	loadImageLink(".subH2","12","dc176d","medium",false, "#FFF");
});

