(function($) {
	$("body").addClass("jsEnabled");
	
	// Make legends into H2s for easier styling, while maintaining semantic markup.
	$("legend").each(function(){
		var $this = $(this); 
		var legendText = $this.text();
		$this.parent("fieldset")
			.before("<h2>" + legendText + "</h2>")
			.end()
			.remove();
	});
	
	// Adding hover in IE for non-anchor elements
	$(".hoverEnabled").hover(
		function() {
			$(this).addClass("hover");
		},
		function(){
			$(this).removeClass("hover");
		}
	);
	
	//Add zebra-striping to tables
	if ( !$("table").hasClass("noStripe") ) {
		$("table tr:odd").addClass("odd");
	}
	
	//Automatically selects focused field text and adds class for styling
	$('input[type="text"]').focus(function(){
		$(this).select().addClass("focused");
	});
	$('input[type="text"]').blur(function(){
		$(this).removeClass("focused");
	});
	
})(jQuery); 
