$(document).ready(function() {
	var currentTab = "history";

	$('#lovethetabs li a').click(function() {
		var temp = $(this).parent().attr("id");
		var tab = temp.substr(4);
		$("#"+currentTab).hide();
		$('#lovethetabs li#tab_'+currentTab).removeClass("selected");
		$("#"+tab).show();
		$('#lovethetabs li#tab_'+tab).addClass("selected");		
		currentTab = tab;
	})
	
	var lastRollover = "#timeline ul li#tl_1920";
	$('#timeline ul li').hover(function() {
		var temp = $(this).attr('id');
		var year = temp.substr(3);
		var file = '/images/timeline/'+year+'_desc.gif';
		$('#timeline_desc img').attr('src',file);
		var myid = '#tl_'+year+' a';
		//alert(myid)
		$(this).find('a').css("background-position", "0px -29px");
		$(lastRollover).find('a').css("background-position", "0px 0px");
			
	}, function() {		
		lastRollover = $(this);
	});
})
