﻿$(document).ready(function(){
	$('div.mainpic div').hide(); // Hide all divs
	$('div.mainpic div:first').show(); // Show the first div
	$('div.mainpic ul li:first').addClass('active'); // Set the class of the first link to active
	$('div.mainpic ul li a').click(function(){ //When any link is clicked
		$('div.mainpic 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
		$('div.mainpic div').hide(); // Hide all divs
		$(currentTab).show(); // Show div with id equal to variable currentTab
		return false;
	});
});