$(document).ready(function(){

$('.module-more').hide(); 									//Hides the additional module info on page load
$('.expand-less').hide();

	$('#module-contacts div.expand-bar').click(
		function() {											// On click, expand the module list
		$('#module-contacts div.module-more').slideToggle(650);
		$('#module-contacts div.expand-bar').toggle();
		}
	);

	$('#module-calendar div.expand-bar').click(
		function() {											// On click, expand the module list
		$('#module-calendar div.module-more').slideToggle(650);
		$('#module-calendar div.expand-bar').toggle();
		}
	);

	$('#module-tasks div.expand-bar').click(
		function() {											// On click, expand the module list
		$('#module-tasks div.module-more').slideToggle(650);
		$('#module-tasks div.expand-bar').toggle();
		}
	);

	
	// Old code, with the expand bar content swap
	///////////////
	//$('#module-memos div.expand-bar').click(
	//	function() {											// On click, expand the module list
	//	$('#module-memos div.module-more').slideToggle(650);
	//	$('#module-memos span.expand-more').toggle();
	//	$('#module-memos span.expand-less').toggle();
	//	$('html, body').animate({
	//		scrollTop: $("#module-memos").offset().top
	//		}, 650);
	//	}
	//);
	
	$('.toTop').click(
		function() {											// On click, jump to top
		$('html, body').animate({
			scrollTop: $("#container").offset().top
			}, 650);
		}
	);

});


// $(".hover-expand").hover(
    // function() {
	// $(this).animate({
	// "width": "480px",
	// "height": "800px"
	// }, 1000);},
	// function() {
	// $(this).animate({
	// "width": "160px",
	// "height": "266px"
	// }, 1000);}
// );
