// JavaScript Document

$ (document).ready(function(){
	$('#tabs div').hide();                                              //hide all divs
	$('#tabs div:first').show();                                        //show first div
	$('#tabNavigation ul li:first').addClass('active');                 // Set the class of the first link to active

	//show the other divs within the tabs section
	$('#slider').show();
	$('.nivo-directionNav').show();
	$('.nivo-caption').show();
	$('#options').show();
	$('.acc-section').show();
	$('.acc-content').show();
	$('.choice').show();
	$('.judgePanel').show();
	$('#ticketsDisplayBox').show();
	$('.rowcontainer').show();
	$('.colcontainer').show();
	$('.thumb').show();
	$('.thumb_2').show();
	$('.winners').show();
		$('.loader').show();
	
	
	$('a').click(function(event) {
	    var i = event.target.id;
	    $('#tabNavigation ul li').removeClass('active');                //remove active class from all dics
	    $('#tabNavigation ul li:nth-child('+i+')').addClass('active');  //set clicked class to active
	    $('#tabs div').hide();                                          //hide all divs
	    $('#tabs div:nth-child('+i+')').show();                         //show relevant tab
		
		
		//show the other divs within the tabs section
		$('#slider').show();
		$('.nivo-directionNav').show();
		$('.nivo-caption').show();
		$('#options').show();
		$('.acc-section').show();
		$('.acc-content').show();
		$('.judgePanel').show();
		$('.choice').show();
		$('#ticketsDisplayBox').show();
		$('.rowcontainer').show();
		$('.colcontainer').show();
	});
	
});


/*$(document).ready(function(){
			
		$('#tabs > div').hide(); // Hide all divs
		var panelLocation = window.location.hash;
			
		if(panelLocation != ""){
			$(panelLocation).show();
			$('#tabNavigation ul li').removeClass('active');
			$(panelLocation).parent().addClass('active');
			$('#slider').show();
			$('.nivo-directionNav').show();
			$('.nivo-caption').show();
			$('#options').show();
			$('.acc-section').show();
			$('.acc-content').show();
			//$('#tabNavigation ul li:panelLocation').addClass('active');
			
		}else{
		$('#tabs div:first').show(); // Show the first div
		$('#slider').show();
		$('.nivo-directionNav').show();
		$('.nivo-caption').show();
		$('#options').show();
		$('.acc-section').show();
		$('.acc-content').show();
		$('#tabNavigation ul li:first').addClass('active'); 
		}
	
	$('a#tabtest').click(function(){ //When any link is clicked
	$('#tabNavigation ul li').removeClass('active'); // Remove active class from all links
	$(this).addClass('active');//Set clicked link class to active
		var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link
			$('#tabs > div').hide(); // Hide all divs
			$(currentTab).show(); // Show div with id equal to variable currentTab
			$('#slider').show();
			$('.nivo-directionNav').show();
			$('.nivo-caption').show();
			$('#options').show();
			$('.acc-section').show();
			$('.acc-content').show();
		return false;
		
	});
	
});*/
/*$(document).ready(function() {
    $("a").click(function(event) {
        alert(event.target.id);
    });
});*/
/*
$(document).ready(function(){
	
	$('#tabs div').hide(); // Hide all divs
	
		$("a").click(function(event) {
			var i = event.target.id;
			alert(i);
    	});	
		/*alert(event.target.id);*/
	/*$('#tabs div:nth-child(1)').show(); // Show the first div
	
	
	
	$('#slider').show();
	$('.nivo-directionNav').show();
	$('.nivo-caption').show();
	$('#options').show();
	$('.acc-section').show();
	$('.acc-content').show();
	$('#tabNavigation ul li:nth-child(1)').addClass('active'); // Set the class of the first link to active
	
	
	$('#tabNavigation ul li a').click(function(){ //When any link is clicked
		$('#tabNavigation ul li').removeClass('active'); // Remove active class from all links
		$(this).parent().addClass('active'); //Set clicked link class to active
			var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link
				$('#tabs div').hide(); // Hide all divs
				$(currentTab).show(); // Show div with id equal to variable currentTab
				
				
				
				$('#slider').show();
				$('.nivo-directionNav').show();
				$('.nivo-caption').show();
				$('#options').show();
				$('.acc-section').show();
				$('.acc-content').show();
		return false;
	});
	/*$('a#tabtest').click(function(){
	$('#tabNavigation ul li').removeClass('active'); // Remove active class from all links
	$(this).parent().addClass('active');//Set clicked link class to active
		var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link
			$('#tabs > div').hide(); // Hide all divs
			$(currentTab).show(); // Show div with id equal to variable currentTab
			$('#slider').show();
			$('.nivo-directionNav').show();
			$('.nivo-caption').show();
			$('#options').show();
			$('.acc-section').show();
			$('.acc-content').show();
		return false;							  
	});
});*/
