$(document).ready(function() {						   
	// Rounded Corners					 
	
	// Plug holes in CSS Cross browser selectors to save using additional classes in markup		 
	$('#contentMain h1 + p').addClass("highlight-intro"); // This may not be necessary, it applys a class to the first paragrah on each page.
	$('#sNavigation li:last-child,body.faqs dl dd:last-child,ul.files li:last-child').addClass("last"); // adds slass of last to last element
	
	// Add closing quote to blockquotes
	$("#contentMain blockquote cite").after("<img src=\"images/quote-close.gif\" alt=\"\" class=\"blockquoteClose\" /> ");
	
	// Display Image Captions
	$("img.caption").load( function() { 
		$(this).removeClass('caption');
		var thisClass = $(this).attr("class"); // finds out if image is left or right aligned
		var theCaptionText = $(this).attr("alt");
		var captionClass = thisClass;
		var captionWidth = $(this).width();
		var theCaption = ("<div>" + theCaptionText + "</div>");
		$(this).wrap("<div class='captionBlock " + captionClass +  "'></div>").addClass(captionClass);
		$(this).after(theCaption);
		$('.captionBlock div').width(captionWidth);
		$(this).removeClass(thisClass);
	 });
	
	// Faq's Q & A 
	$('body.faqs dt').prepend("<span>Q: </span>");
	$('body.faqs dd').prepend("<span>A: </span>");
	
	// Form Field Focussing
	$('input[type=text],textarea').focus(function(){ $(this).addClass("focusField"); }).blur(function(){ $(this).removeClass("focusField"); });
	
	
});
		   

