$(document).ready(function() {    

	$('hr').replaceWith('<div class="hr"></div>');

	$('<img src="images/fancy_list_li_cap.jpg" class="fancy-cap" />').appendTo('ul.fancy-list > li');
	

	$('table.chart').each( function (){
		$(this).attr('cellspacing','0');
		$(this).attr('cellpadding','0');
		$(this).find('tr:nth-child(even)').children('td').addClass('even');
	});
	$('table.chart-small').each( function (){
		$(this).attr('cellspacing','0');
		$(this).attr('cellpadding','0');
		$(this).find('tr:nth-child(even)').children('td').addClass('even');
	});

// acronym
	
	// find the acronyms extract the title and store it in var acronymTITLE.
	$('body').find('acronym').each( function (){
		var acronymTITLE = $(this).attr('title');
		// then insert a span inside the acronym tag and write the value of var acronymTITLE inside the span.
		$(this).append('<span>'+acronymTITLE+'</span>');
	});

	// when your mouse is on an acronym fade in the span.
	$('acronym').mouseenter(function(){
		$(this).children('span').fadeIn(300);
	});
	
	// when your mouse comes off an acronym fade out the span.
	$('acronym').mouseleave(function(){
		$(this).children('span').fadeOut(300);
	});

	// clear the acronym titles.
	$('acronym').attr('title','');



// abbr

	// find the abbr extract the title and store it in var abbrTITLE.
	$('body').find('abbr').each( function (){
		var abbrTITLE = $(this).attr('title');
		// then insert a span inside the abbr tag and write the value of var abbrTITLE inside the span.
		$(this).append('<span>'+abbrTITLE+'</span>');
	});

	// when your mouse is on an abbr fade in the span.
	$('abbr').mouseenter(function(){
		$(this).children('span').fadeIn(300);
	});
	
	// when your mouse comes off an abbr fade out the span.
	$('abbr').mouseleave(function(){
		$(this).children('span').fadeOut(300);
	});

	// clear the abbr titles.
	$('abbr').attr('title','');
});

