/* JavaScript Document
==============================================
Title:				Zebra Strible Table Script
Filename:			zebra-stripe-table.js
Description:	jQuery script to automatically add zebra-striping to tables
Version:			2009.0319
Author:				Marc Cepeda

NOTES:				Styles in 'medschool\Design\css\add-ons\zebra-stripe-table\zebra-stripe-table.css'
============================================== */
$(document).ready(function()
	{
		// Add class to column headings
		$('table.zebra thead th').addClass('column-heading');
		$('table.zebra th[scope="col"]').addClass('column-heading');
		
		// Specify which rows are odd/even
		$('table.zebra tbody tr:not():odd').addClass('odd-row');
		$('table.zebra tbody tr:not():even').addClass('even-row');
		
		// Add class to subheading rows
		$('table.zebra tbody th').not('th[scope]').addClass('column-subheading');
		
		// Separate content cells from heading cells
		$('table.zebra tbody td').not('td[colspan]').addClass('content');
		
		$('table.zebra tbody tr:has(td.content)').hover(function() {
																													 $(this).addClass('highlight');
																													 },function() {
																														 $(this).removeClass('highlight');
																														 }
																													 );
	}
);