
$(document).ready(function() {
   
 	
	$("#panel").hide();

 var a = $("<a>more info</a>").attr('href','#').addClass("btn-slide");
 $('#wrapper').before(a);


   $(".btn-slide").click(function(){

      if ($("#panel").is(":hidden")) {
        $("#panel").slideDown("slow");
	$(this).addClass("active");
         //$.cookie('showTop', 'collapsed');
	return false;
	
      } else {
        $("#panel").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') {
	//$("#panel").show();
	//$(".btn-slide").addClass("active");
	
    //};
 
});
