// JavaScript Document
$(document).ready(function () {
	$("#content h2").not("#mini_sidebar h2").not("#calendar_wrapLarge h2").not("#in_the_spotlight h2").each(function () {
		var alt = $(this).html();
		
		// alphanumeric, replace spaces with -s, and we only want the first 27 characters for maximum compatibility
		var name = $(this).html().toLowerCase().replace(/[^a-zA-Z 0-9]+/g,'-').replace(/ /g, '-').substr(0, 27);

		name = name + '.gif';
		$(this).html('<img src="' + sd + '/images/heading/' + name + '" alt="' + alt + '" />&nbsp;');
		
		if(debug == true)
		{
			alert(sd + '/images/heading/' + name);	
		}
	});
});