$(document).ready(function(){

	$(".daylist").hide()
	//hide all session details
	$(".details").hide();
	
	//toggle days listings
	$(".day").click(function(){
	  $(this).next(".daylist").toggle()
	  $(this).toggleClass("expanded")
	  return false;
	});
	

	//toggle session details
	$(".title").click(function(){
	  $(this).next(".details").slideToggle(200)
	  return false;
	});
	
	//show all messages
	$(".show_all").click(function(){
	 // $(this).hide()
	 // $(".hide_all").show()
	  $(".daylist").show()
	  $(".details").show()
	  $(".expand").hide();
	  $(".hide").show();
	  return false;
	});

	//hide all
	$(".hide_all").click(function(){
	 // $(this).hide()
	 // $(".show_all").show()
	  $(".daylist").hide()
	  $(".details").hide()
	  $(".hide").hide();
	  $(".expand").show();
	  return false;
	});
	
	//append show/hide
	$(".multiple").append("<span class='expand'><a href='#'>[+]</a></span><span class='hide'><a href='#'>[-]</a></span>");
	
	//show timeslot listings
	$(".expand").click(function(){
	  $(this).parent().parent().children(".session-list").children(".session").children(".details").show()
	  $(this).next(".hide").show()
	  $(this).hide()
	return false;
	});
	
	$(".hide").hide();
	
	//hide timeslot listings
	$(".hide").click(function(){
	  $(this).parent().parent().children(".session-list").children(".session").children(".details").hide()
	  $(this).siblings(".expand").show()
	  $(this).hide()
	  return false;
	});
	
	
	
	//show all print sessions
	$(".show_print").click(function(){
		$(".daylist").show()
		$(".print").show()
		
	  return false;
	});
	
	//hide all print sessions
	$(".hide_print").click(function(){
	  $(".print").hide()
	  return false;
	});
	
});