$(document).ready(function() {
	$("form.poll-form").submit(function() {
		$("input[type=submit]", this).attr('disabled',true);
		var inputs = $("input[name][type!=checkbox][type!=radio], input[name][type=checkbox][checked], input[name][type=radio][checked], textarea[name], select[name]", this);
		values = Object();
		inputs.each(function(i)
			{
			values[$(this).attr('name')] = $(this).val();
			});
		values['ajax'] = true;
		var form = this;
		$.post(location.href, values, function(data) {
			//var ddd = data+"1";
			$(form).replaceWith(data);
			//alert(typeof(data));
			});
		return false;
		});
	});
