$(document).ready(
	function()
	{
		
		//$('#hash input[type="submit"]').hide();
		
		// On hash function name click
		$('#hash input[type="radio"]').click(
			function()
			{
				var id = $(this).attr('id').substr(7);
				
				$.post('/en/toolkit/hash/' + id,
					{
						string: $('#string').attr('value')
					},
					function(html)
					{
						$('#hash_result').text(html);
					}
				);
				
			}
		);
		
		// On submit button click
		$('#hash input[type="submit"]').click(
			function ()
			{
				var id = $('input:checked').val();
				if (id == undefined)
				{
					return false;
				}
				
				$.post('/en/toolkit/hash/' + id,
					{
						string: $('#string').attr('value')
					},
					function(html)
					{
						$('#hash_result').text(html);
					}
				);
				
				return false;
			}
		);
	}
);