$(function() {
	$("#bk_assistlinks dd:eq(1)").hide();
	$("#allowed_xhtml").wrap('<a href="#"></a>').click(function() {
		$("#bk_assistlinks dd:eq(1)").slideToggle("normal");
		return false;
	});
	
	$(".emote_list img").click(function() {
		emote($(this).attr("title"));
	});

	$("input[@name=answer]").after('<input type="hidden" name="flood_time" value="" />');
	captcha();
	
	$("#comment").blur(captcha);
});

function captcha () {
	$.get('captcha.php', function (server_time) {
		$("input[@name=flood_time]").val(server_time);
	});
}

function emote (smilie) {
	$("#comment").val($("#comment").val() + smilie);
	$("#comment").focus();
}
