$(document).ready(function() {
// LEFT COLUMN:
	// When the collapse button is clicked:
	$('.collapseLeft').click(function() {
		$('.collapseLeft').css("display","none");
		$('.expandLeft').css("display","block");
		$('#leftCol').css("height","11px");
		$.cookie('leftCol', 'collapsed', { expires: 365 });
	});
	// When the expand button is clicked:
	$('.expandLeft').click(function() {
		$('.expandLeft').css("display","none");
		$('.collapseLeft').css("display","block");
		$('#leftCol').css("height","341px");
		$.cookie('leftCol', 'expanded', { expires: 365 });
	});
// RIGHT COLUMN:
	// When the collapse button is clicked:
	$('.collapseRight').click(function() {
		$('.collapseRight').css("display","none");
		$('.expandRight').css("display","block");
		$('#rightCol').css("height","11px");
		$.cookie('rightCol', 'collapsed', { expires: 365 });
	});
	// When the expand button is clicked:
	$('.expandRight').click(function() {
		$('.expandRight').css("display","none");
		$('.collapseRight').css("display","block");
		$('#rightCol').css("height","341px");
		$.cookie('rightCol', 'expanded', { expires: 365 });
	});
// COOKIES
	// Left column state
	var leftCol = $.cookie('leftCol');
	// Right column state
	var rightCol = $.cookie('rightCol');
	// Set the user's selection for the left column
	if (leftCol == 'collapsed') {
		$('.collapseLeft').css("display","none");
		$('.expandLeft').css("display","block");
		$('#leftCol').css("height","11px");
	};
	// Set the user's selection for the right column
	if (rightCol == 'collapsed') {
		$('.collapseRight').css("display","none");
		$('.expandRight').css("display","block");
		$('#rightCol').css("height","11px");
	};
});