/**********************************************************************************************

/libs/js/labels.js © 2009 berloth.net / André Berloth

Usage: 

	<style type="text/css">
		.label {
			display: none;
		}
	</style>

	<script type="text/javascript" src="/libs/js/labels.js"></script>

	<h1 class="label" id="titel"><$title></h1>
	
	
************************************************************************************************/


jQuery(document).ready(function(){
	jQuery('.label').each(function (i) {
        	text = jQuery(this).text();
        	size = parseInt(jQuery(this).css('fontSize'));
        	color = jQuery(this).css('color').replace('rgb(','').replace(')','').replace(/ /g,'');
        	color = jQuery(this).css('color').replace(/ /g,'');
        	bgcolor = jQuery(this).css('backgroundColor').replace('rgb(','').replace(')','').replace(/ /g,'');
        	bgcolor = jQuery(this).css('backgroundColor').replace(/ /g,'');
        	size = parseInt(jQuery(this).css('fontSize'));
        	id = jQuery(this).attr('id');
        	filename = '/images/labels/' + id  + '_' + text.replace(/[^a-z]/g, '_' ) + '.png';
        	post2div('/libs/label.php', id, { label: text, fontfile: 'MISTRAL.TTF', pointsize: size, filename: filename, refresh: 'true', forced: 'true', color: color, bgcolor: bgcolor});
		
	});
});



