$(document).ready(function(){
	$test = "";
	$(".blog").children(".post").children(".entry").css('display','none')
	
	$(".post").mouseenter(function () {
		if ($(this).parent().hasClass('blog')) {

		$hold = $(this).children(".date").html();
		if ($(this).children(".entry").hasClass('open')) {
			$(this).children(".date").html('<a href="#" class="show down">Hide post</a>');
		} else {
			$(this).children(".date").html('<a href="#" class="show">Show Post</a>');
		}
		$(this).children(".date").children(".show").mousedown(function() {
			if ($(this).parent().parent().children(".entry").hasClass('open')) {
				$(".open").slideUp("slow").removeClass('open');
				$(this).removeClass('down').html('Show post');
				$(this).parent().parent().children(".entry").removeClass('open');
			} else {
				$(".open").slideUp("slow").removeClass('open');
				$(this).parent().parent().children(".entry").addClass('open').slideDown("slow");
				$(this).addClass('down').html('Hide post');
			}
		});
		}		
	});
	$(".post").mouseleave(function () {
		$(this).children(".date").html($hold);
		$test = $hold;
	});
});

$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)
  $('#commentform').hide();
 // shows the slickbox on clicking the noted link  
  $('a#slick-show').click(function() {
    $('#commentform').show('slow');
    return false;
  });
 // hides the slickbox on clicking the noted link  
  $('a#slick-hide').click(function() {
    $('#commentform').hide('fast');
    return false;
  });
 
 // toggles the slickbox on clicking the noted link  
  $('a#slick-toggle').click(function() {
    $('#commentform').toggle(400);
    return false;
  });
});
