$(document).ready(function(){
	$(".post_list").mouseover(function(){
		$(this).addClass("selected");
	});
	$(".post_list").mouseout(function(){
		$(this).removeClass("selected");
	});
	$(".post_list").click(function(){
		var link = $(this).find("span.permalink").text();
		location.href = link;
	});
	
	$("#wrap").corner('20px');
/*	resize();
	
	$("#change_sidebar").click(function(){
		var display = $("#sidebar").css("display");
		
		if (display == "none") {
			$("#sidebar").show();
			$("#content").css("width", "590px");
			
		} else {
			$("#sidebar").hide();
			$("#content").css("width", "790px");
		}
		
		resize();
	});
	
	$("#change_sidebar").hover(
		function(){ $("#change_sidebar").attr("class", "hover"); },
		function(){	$("#change_sidebar").attr("class", ""); }
	);
	*/
});

/* onload() after ready() */
$.event.add(window, "load", function(){
	$(".post").each(function(){
		var height = $(this).height();
		
		var post = $(this).position();
		var top = post.top;
		var left = post.left;
		
		var post_date = $(this).find('.post_date');
		post_date.css('top', top);
		post_date.css('left', left + 20);
		post_date.css('height', height - 6);
	});
});
/*
function resize(){
	var content_height = $("#content").css("height");
	$("#change_sidebar").css("height", content_height);
}

*/