(function(){
	function sidebarToggle(){
		var that = this;
		if($(".sidebar").is(":hidden")){
			$("#postContainer").animate({"width":"610px"}, function(){ 
				$(".sidebar").fadeToggle("fast");
				$(that).text("->");
			});
		}else{
			$(".sidebar").fadeToggle("fast", function(){
				$("#postContainer").animate({"width":"950px"});
				$(that).text("<-");
			});
		}
	}
	$(function(){
		var pc = $("#postContainer"),
			side = $(".sidebar");
		if(pc.height() < side.height()){
			pc.css({"min-height":side.height()});
		}
		$("#sidebarHider").bind("click", sidebarToggle);
	});
})(jQuery)

$.fn.fadeToggle = function(speed, easing, callback) { 
	return this.animate({opacity: 'toggle'}, speed, easing, callback); 
};