$(document).ready(function(){

	if ($.browser.msie) {
		
		$("#recent-posts-menu div").find("li").mouseover( function() {
			if($(this).attr("class") != "selected") {
				$(this).css('background-color', '#222222');
			}
		}).mouseout( function() {
			if($(this).attr("class") != "selected") {
				$(this).css('background-color', '');
			}
		}).click( function() {
			
			$("#recent-posts-menu div").find("li.selected").css('background-color', '');
			$("#recent-posts-menu div").find("li.selected").removeClass("selected");
			
			$(this).addClass("selected");
			$("#recent-posts-menu div").find("li.selected").css('background-color', '#222222');
			
			var selectedId = $(this).find("a").attr("name");
			$("#recent-posts").find(".recent-post").hide();
			$("#recent-posts").find("#"+selectedId).fadeIn(100);
		});
		
	}
	else {

		$("#recent-posts-menu div").find("li.selected").corner();
		$("#recent-posts-menu div").find("li").mouseover( function() {
			if($(this).attr("class") != "selected") {
				$(this).css('background-color', '#222222');
				$(this).corner();
			}
		}).mouseout( function() {
			if($(this).attr("class") != "selected") {
				$(this).css('background-color', '');
				$(this).uncorner();
			}
		}).click( function() {
			
			$("#recent-posts-menu div").find("li.selected").uncorner();
			$("#recent-posts-menu div").find("li.selected").css('background-color', '');
			$("#recent-posts-menu div").find("li.selected").removeClass("selected");
			
			$(this).addClass("selected");
			$("#recent-posts-menu div").find("li.selected").corner();
			
			
			var selectedId = $(this).find("a").attr("name");
			$("#recent-posts").find(".recent-post").hide();
			$("#recent-posts").find("#"+selectedId).fadeIn(100);
		});

	}
});
