$(function(){  

  $('.trigger').mouseover(function(){
  $(this).css({'border': '1px solid #8f536a'}).mouseout(function(){
  $(this).css({'border': '1px solid #fff'});
  });});
  
  
  var bc_content  = $("#content").height(); // before changes
  var max_content  = 2500; 
  
  
  $(".trigger").click(function(){

  var actcontent = $("#content").height(); // returns height
  if(actcontent+600 > max_content){
  var new_content_height= max_content;
  }else{
  var new_content_height= actcontent+600;
  }
  $("#content").height(new_content_height); // returns height
  });
  
  $(".trigger_s").click(function(){$(".trigbox_s").toggle('slow');});
  $(".trigger_0").click(function(){$(".trigbox_0").toggle('slow');}); 
  $(".trigger_1").click(function(){
  $(".trigbox_1").toggle('slow');
  var content_height = $("#content").height(); // returns height
  $("#content").height(content_height+600); // returns height
  });
  $(".trigger_2").click(function(){$(".trigbox_2").toggle('slow');});
  $(".trigger_3").click(function(){$(".trigbox_3").toggle('slow');});
  
  
 	// Expand Panel
	$("#open").click(function(){
		$("div#panel").slideDown("slow");
	
	});	
	
	// Collapse Panel
	$("#close").click(function(){
		$("div#panel").slideUp("slow");	
	});		
	
	// Switch buttons from "Log In | Register" to "Close Panel" on click
	$("#toggle a").click(function () {
		$("#toggle a").toggle();
	});	 
  
  
  
});
