$(document).ready(function(){
 
	// Add the .alt class to every td of every even tr row
	// Remember that table rows are zero-indexed
	$('table tr:nth-child(even) td').addClass('alt'); 


	// Remove the last border from each td of each row
	$('table#border tr th:last-child, table#border tr td:last-child')
		.css('border','none');
	
	
	// Highlight a single column
	$('table#highlight tr td:nth-child(2)').addClass('highlight');
	
	
	// Remove the last border from a nav list
	$('ul#nav li:last').css('border','none');
	
	
	// Style links that point to external sites
	$('a[href^="http"]').addClass('external');
	
	
	// Style links based on the type of file they link to 
	$('a[href$="pdf"]').addClass('pdf');
	
	
	// Style form buttons
	$('input[type="button"]').addClass('btn');
	
	
	// Add the URL after the link title in printed CSS
	$('a.print').each(function(){
		$(this).after('<span class="printlink">(' + $(this).attr('href') + ')</span>');
	});
	
	
	// Add Content Before or After An element 
	$('h3').prepend('My Great Blog :: ');
	
	
	// Create a caption from an image's 'alt' data
	$('img.cover').each(function() {
		$(this).after('<br />' + $(this).attr('alt'));
	});


});