$(document).ready(function(){
$('#mainContentBody div').hide(); // Hide all divs
$('#mainContentBody div:first').show(); // Show the first div
$('#subtabs ul li:first').addClass('selected'); // Set the class of the first link to active
$('#subtabs ul li a').click(function(){ //When any link is clicked
$('#subtabs ul li').removeClass('selected'); // Remove active class from all links
$(this).parent().addClass('selected'); //Set clicked link class to active
var currentTab = $(this).attr('href'); // Set variable currentTab to value of href attribute of clicked link
$('#mainContentBody div').hide(); // Hide all divs
$(currentTab).show(); // Show div with id equal to variable currentTab
return false;
});
});

