// JavaScript Document

$(document).ready(function(){
$('#video-list div').hide(); // Hide all divs
$('#video-list div:first').show(); // Show the first div
$('#video-list ul li a:first').addClass('active'); // Set the class for active state
$('#video-list ul li a.tab').click(function(){ // When link is clicked
	$('#video-list ul li a').removeClass('active'); // Remove active class from links
	$(this).addClass('active'); //Set parent of clicked link class to active
	var currentTab = $(this).attr('href'); // Set currentTab to value of href attribute
	$('#video-list div').hide(); // Hide all divs
	$(currentTab).show(); // Show div with id equal to variable currentTab
	return false;
	});
$('#video-list .videos ul li a').click(function(){ // When link is clicked
	$('#video-list .videos ul li a').removeClass('selected'); // Remove active class from links
	$(this).addClass('selected'); //Set parent of clicked link class to active
	return false;
	});
$('#answers p').hide(); // Hide all divs
$('#answers p:first').show(); // Show the first div
$('#questions ul li a:first').addClass('active'); // Set the class for active state
$('#questions ul li a').hover(function(){ // When link is clicked
	$('#questions ul li a').removeClass('active'); // Remove active class from links
	$(this).addClass('active'); //Set parent of clicked link class to active
	var currentTab = $(this).attr('href'); // Set currentTab to value of href attribute
	$('#answers p').hide(); // Hide all divs
	$(currentTab).show(); // Show div with id equal to variable currentTab
	return false;
	});
});
