
/**** DropDown Menu ****/

$(function() {
	//Drop-Down Menus
	
	$('#AboutKKR').mouseenter(function(){$('.menu_aboutkkr').show();});
	$('.menu_aboutkkr').mouseleave(function(){$(this).hide();})	
	
	$('#Home').mouseenter(function(){$('.menu_theknights').show();});
	$('.menu_theknights').mouseleave(function(){$(this).hide();})
	
	$('#Matches').mouseenter(function(){$('.menu_matches').show();});
	$('.menu_matches').mouseleave(function(){$(this).hide();})
	
	$('#Fanzone').mouseenter(function(){$('.menu_fanzone').show();});
	$('.menu_fanzone').mouseleave(function(){$(this).hide();})
});

/**** Tab 1 ****/

$(function () {
	var tabContainers = $('div.tabs1 > div');
	tabContainers.hide().filter(':#second').show();
	
	$('div.tabs1 ul.tabNavigation a').click(function () {
		tabContainers.hide();
		tabContainers.filter(this.hash).show();
		/*$('div.tabs1 ul.tabNavigation a').each(function(){removeClass('selected'+$(this).attr('href').substring(1)}));*/
		$('div.tabs1 ul.tabNavigation a.firstTab').removeClass('selectedfirst');
		$('div.tabs1 ul.tabNavigation a.secondTab').removeClass('selectedsecond');
		$('div.tabs1 ul.tabNavigation a.thirdTab').removeClass('selectedthird');
		$(this).addClass('selected'+$(this).attr('href').substring(1));
		Cufon.replace('h2');
		return false;
	}).filter(':#second').click();
});


/**** Tab 2 ****/

$(function () {
	var tabContainers = $('div.tabs2 > div');
	tabContainers.hide().filter(':#first').show();
	
	$('div.tabs2 ul.tabNavigation2 a').click(function () {
		tabContainers.hide();
		tabContainers.filter(this.hash).show();
		//$('div.tabs2 ul.tabNavigation2 a').removeClass('selected'+$(this).attr('href').substring(1));
		$('div.tabs2 ul.tabNavigation2 a.firstTab').removeClass('selectedfirst');
		$('div.tabs2 ul.tabNavigation2 a.secondTab').removeClass('selectedsecond');
		$('div.tabs2 ul.tabNavigation2 a.thirdTab').removeClass('selectedthird');		
		$(this).addClass('selected'+$(this).attr('href').substring(1));
		Cufon.replace('h2');
		return false;
	}).filter(':#first').click();
});


/**** Jump to Player  ****/

function player_links(valof)
{	
	if (valof!="")
	{
	document.getElementById('playerlist').value="";
	//document.form1.playerlist.value="";
	location.href=valof;
	}
}

/**** Jump to Match  ****/
function match_links()
{	
	
	if (document.getElementById('matchreport').options[document.getElementById('matchreport').selectedIndex].value!="")
	{
	//document.getElementById('matchreport').value="";
	//document.form1.playerlist.value="";
	var url=document.getElementById('matchreport').options[document.getElementById('matchreport').selectedIndex].value;
	location.href=url;
	}
}

