$(document).ready(function(){

	// Set the table header bg color to that of the section
	//var h1color is set by inline js injected into the header from the shop class
	$(".catTable tr:first td").css({
		"background-color": h1color,
		"color": "#fff"
	})

	//center text in durability(3rd) column
	$(".catTable tr td:nth-child(3)").css({
		"text-align": "center"
	})

	//center text in sawn(4th) column
	$(".catTable tr td:nth-child(4)").css({
		"text-align": "center"
	})

	//center text in drying(5th) column
	$(".catTable tr td:nth-child(5)").css({
		"text-align": "center"
	})

	//do table zebra striping
	$(".catTable tr:odd td").addClass("odd")

	//setup table row hovers
	$(".catTable tr:not(:first)").hover(function(){
		prevBgCol = $(this).children("td").css("background-color")
		$(this).children("td").addClass("hover");
	}, function(){
		$(this).children("td").removeClass("hover");
	})

	//replace yes's with ticks in durability(3rd) column
	$(".catTable tr td:nth-child(3)").each(function(){
		if ($(this).html() == "yes" || $(this).html() == "Yes" ) {
			$(this).addClass("tick")
		}
	})

	//replace no's with crosses in durability(3rd) column
	$(".catTable tr td:nth-child(3)").each(function(){
		if ($(this).html() == "no" || $(this).html() == "No" || $(this).html() == "X" || $(this).html() == "x" ) {
			$(this).addClass("cross")
		}
	})

	

});
