$(document).ready(function(){
$('#tabs div').hide(); // Hide all divs
$('#tabs div:first').show(); // Show the first div
$('#tabs ul li:first').addClass('active'); // Set the class of the first link to active
$('#tabs ul li a').click(function(){ //When any link is clicked
$('#tabs ul li').removeClass('active'); // Remove active class from all links
$(this).parent().addClass('active'); //Set clicked link class to active
var currentTab = $(this).attr('id'); // Set variable currentTab to value of href attribute of clicked link
$("#tabs div:visible").fadeOut("slow",function(){ //fade out visible div
$(currentTab).fadeIn("slow"); //fade in target div
});return false; 
});
});