$(document).ready(function() {   	
	$("#moreinfo").hide();	
	
	var a = $("<a>More Information?</a>").attr('href','#').addClass("btn-slide");
	
	$('#moreinfo').after(a);
	$(".btn-slide").click(function(){	
		if ($("#moreinfo").is(":hidden")) {
			$("#moreinfo").slideDown("slow");
			$(this).addClass("active");
			$.cookie('showTop', 'collapsed');
			return false;		
		} else {
			$("#moreinfo").slideUp("slow");
			$(this).removeClass("active");
			$.cookie('showTop', 'expanded');
			return false;		
		}	
 	});
    // cookies header state
    var showTop = $.cookie('showTop');
    // Set the user's selection for the Header State
    if (showTop == 'collapsed') {
		$("#moreinfo").show();
		$(".btn-slide").addClass("active");	
    };
 
});