// JavaScript Document
// As of 11/24/09

var _x;

$(document).ready(function(){

	// Correct PNG Transparencies
	$(document).pngFix();
	
	
	// Collapsible Events
	$(".collapsible").next().hide();
	$(".collapsible a").click(function(){
		$(this).parent().next().slideToggle("slow");
		return false;
	});
	// END Collapsible Events
	
	// Table Styling - Zebra Striping
	$("table").each(function(){
		$(this).find("tbody tr:odd").addClass("even");
		$(this).find("thead td:odd").addClass("even");
		$(this).find("tbody td:first").addClass("first");
	});
	$("table tbody tr").hover(function(){
		$(this).addClass("over");
	}, function(){
		$(this).removeClass("over");
	});
	// END Table Styling


	// Home Page Feature Javascript
	$("#t_l,#t_r,#b_l,#b_r,#t_lc,#t_rc,#b_lc,#b_rc").animate({ marginTop: "0" }, 500); // Animate in the content divs
	$(".feature-thumb").click(function(){
		var _currentFeatureMargin = "-" + ((parseInt($(this).attr("href").substr(8)) - 1) * 900) + "px";
		$("#slide").animate({ marginLeft: _currentFeatureMargin }, 500);
		return false;
	});
	$(".thumbs img").hover(function(){
		_x = $(this).attr("src");
		var _ext = _x.substring(_x.length-4, _x.length);
		var _y = _x.substring(0, _x.length-4) + "-hover" + _ext;
		$(this).attr("src", _y);
	}, function(){
		$(this).attr("src", _x);
	});
	// END Home Page JS
	
});