var t;

$(document).ready(function () 
{
$("#tbl tr").css('background-color', '#525152');
$("#tbl tr:nth-child(odd)").css('background-color', '#6B696B');

$('#tbl tr').hover(
	function(){
		t = $(this).css('background-color');
		$(this).css('background-color', '#060');
	}, 
	function(){
		$(this).css('background-color', t);
	}
);

$("#tbl_small tr").css('background-color', '#525152');
$("#tbl_small tr:nth-child(odd)").css('background-color', '#6B696B');

$('#tbl_small tr').hover(
	function(){
		t = $(this).css('background-color');
		$(this).css('background-color', '#060');
	}, 
	function(){
		$(this).css('background-color', t);
	}
);
	
	//hide message_body after the first one
	$(".message_list .message_body:gt(0)").hide();
	
	//hide message li after the 5th
//	$(".message_list li:gt(4)").hide();
 
	
	//toggle message_body
	$(".message_head").click(function(){
		$(this).next(".message_body").slideToggle(500)
		return false;
	});
 
	//collapse all messages
	$(".collpase_all_message").click(function(){
		$(".message_body").slideUp(500)
		return false;
	});
 
	//show all messages
	$(".show_all_message").click(function(){
		$(this).hide()
		$(".show_recent_only").show()
		$(".message_list li:gt(4)").slideDown()
		return false;
	});
 
	//show recent messages only
	$(".show_recent_only").click(function(){
		$(this).hide()
		$(".show_all_message").show()
		$(".message_list li:gt(4)").slideUp()
		return false;
	});
 
    $(".content").mouseover
		(
		function() 
			{
			$(this).css("background-color", "#141414");
			}
		);
    $(".content").mouseout
		(
		
		function() 
			{
			$(this).css("background-color", "#09090A");
			}
		);

		
        // загрузку HTML кода из файла example.html
        $('#load_from_forum').load('/actions/action_load_from_forum.php');       
 
});
