$(document).ready(function() {	
						   

	

	
	 $('#blar').click(function() {			  
		  if ($('#details').is(":checked")){
			$(".details").show("fast");			
		  }
		  else {
			$(".details").hide("fast");
		  }
		});
	
	 $("#ed-desc").hover(
	  function () {
		$("#edit-ed", this).fadeIn();		
		  }, 
		  function () {
			$("#edit-ed", this).hide();			
		  }
		);
	 
	 $("#view").hover(
	  function () {
		$("#views", this).show();		
		  }, 
		  function () {
			$("#views", this).hide();			
		  }
		);
	 
	 
	 $('#view-details').click(function() {									   
			$(".details").toggle("fast");
		});
	 
	$(".event-list").hover(
	  function () {
		$(".tools", this).fadeIn();
		$(".displaydetails", this).fadeTo(100,0.2);
		$(".more", this).show();
		  }, 
		  function () {
			$(".tools", this).hide();
			$(".more", this).hide();
			$(".displaydetails", this).fadeTo(100,1);
		  }
		);
	
	 $('.event-list').click(function() {			  
		  $(".details",this).toggle("fast");
		  $(".event-list",this).css("background-image", "url(../gfx/bg-showless-bar.jpg)");
		});			  	 	 
	 
	$(".ed-list").hover(
	  function () {
		$(".tools", this).show();
		  }, 
		  function () {
			$(".tools", this).hide();
		  }
		);
	
	$("#addevent").hover(
	  function () {
		$("#addtype", this).show();
		  }, 
		  function () {
			$("#addtype", this).hide();
		  }
		);
	
	$("#status").hover(
	  function () {
		$("#statuses", this).show();
		  }, 
		  function () {
			$("#statuses", this).hide();
		  }
		);
	
	
	
	$('.ed-list').click(function() {			  
		  $(".details",this).toggle("fast");
		  $(".ed-list",this).css("background-image", "url(../gfx/bg-showless-bar.jpg)");
		});
	
	$('.filter-option').click(function() {
		  $(".filter-button", this).hide();				
		  $(".filter-input",this).css("display","inline");
		  $(".filter-submit").show();
		});
	
	$('.favs').click(function() {			  
		  $.ajax({
			  url: "index.php",
			  global: false,
			  type: "GET",
			  data: ({ed_id : this.getAttribute('id')}),
			  dataType: "html",
			  success: function(msg){
				 alert('This epicDay has been added to your favourites');
			  }
		   }
		)
		  
		});
 
});
