$(document).ready(function() {
	
	$('.scrollpane').jScrollPane({showArrows:true});
	
	$('tr:not([th]):even').addClass('even');
	$('tr:not([th]):odd').addClass('odd');
	
	$('table tr').hover(function() {
		$(this).addClass('hover');
		
	}, function() {
		$(this).removeClass('hover');
	});
	
	$('#support-your-team').hover(function() {
		$(this).css('cursor', 'pointer');
	}, function() {
		$(this).css('cursor', 'normall');
	});
	
/*	$('#support-your-team').click(function() {
		window.open("/boosters", "_top");
	});*/
	
	// Border around Thumbs
	
	$('.border-holder').hover(function() {
		$(this).addClass('border');	
	}, function() {
		if(!this.selected){
			$(this).removeClass('border');
		}
	});
	
	
	$('#nav ul li ul').hover(function() {
		var li_parent = $(this).parent();
	//	alert(li_parent.get(0).innerHTML);
		$(li_parent).addClass('sub_hover');
	}, function() {
		var li_parent = $(this).parent();
		$(li_parent).removeClass('sub_hover');
		$(li_parent).removeClass('onhover');
	});
	
	
		
	$('#nav ul li ul.teams li ul').hover(function() {
		var li_parent = $(this).parent();
		$(li_parent, "a").addClass('subsub_hover');
	}, function() {
		var li_parent = $(this).parent();
		$(li_parent, "a").removeClass('subsub_hover');
		$(li_parent).removeClass('onhover');
	});
	
	$('ul.teams li').hover(function() {
		if(this.getElementsByTagName("UL")[0]) {
			this.getElementsByTagName("UL")[0].style.display = "block";
		}
		
	}, function() {
		if(this.getElementsByTagName("UL")[0]) {
			this.getElementsByTagName("UL")[0].style.display = "none";
		}
	});
	
	
	// Player Hover, add blue background
	
	$('#players .player-row .player').hover(function() {
		$(this).addClass('hover');
	}, function() {
		$(this).removeClass('hover');
	});

});