	$(document).ready(function(){
//	if (jQuery.browser.msie && jQuery.browser.version<6.999) {
//	 	$(document).pngFix();	
//	}
	if (jQuery.browser.msie) {
	 	$(document).pngFix();	
	}
	$(".check").pngFix();
		$("#header, #sidebar ul li a, #footer, #mainContent h1").corner("5px");
		clickRows();
		hoverRows();
		paintRows();
	});
	function paintRows() {
	    $("#teams tr:even").addClass("evenRow");
	    $("#teams tr:odd").addClass("oddRow");;
	}
	function clickRows() {
		$('#teams tr').click(function() {
			$(this).siblings().removeClass("currentRow");
			paintRows();
			$(this).removeClass("evenRow oddRow hoverRow")
			$(this).addClass("currentRow");
			if($(this).children("td.roster").children("img").length==0) {
				$("#noRoster").siblings().fadeOut(function() {
					$("#noRoster").fadeIn();
				});
			} else showRoster($(this).attr('id'));		
		});
	}
	function hoverRows() {
	    $("#teams tr:even").hover(function(){

			if(! $(this).is('.currentRow'))
			$(this).addClass("hoverRow");
		}, function() {
			if(! $(this).is('.currentRow')) {
				$(this).removeClass("hoverRow");
				$(this).addClass("evenRow");
			}
		});
	    $("#teams tr:odd").hover(function(){
			if(! $(this).is('.currentRow'))
			$(this).addClass("hoverRow");
		}, function() {
			if(! $(this).is('.currentRow')) {
				$(this).removeClass("hoverRow");
				$(this).addClass("evenRow");
			}
		});
	}
	function showRoster(areaId) {
		var srclen = $('#'+areaId).attr('id').length-3;
		var rosterId =  $('#'+areaId).attr('id').substring(0, srclen) ;
		if($('#'+rosterId).length > 0) {
			$('#'+rosterId).siblings().fadeOut(function() {
				$('#'+rosterId).fadeIn();
			});
		} 
	}