function loadPollMini() {
	window.$pollMini = {
		polls			: 	$("div.PollMini"),
		divIndex	:	0,
		count		: 	0,
		loadPolls	: function() {
			var $t = this;
			if (($t.polls.length > 0) && ($t.divIndex < $t.polls.length)) {
				var form = $($t.polls[$t.divIndex]).find("form.pollSource");
				var target = $($t.polls[$t.divIndex]).find("div.pollResult");
				$t.divIndex++;
				$(form).ajaxForm({
				success: function(r) {
					$(target).html(r);
					$t.count++;
					$t.loadPolls();
					}
				});
				$(form).submit();
			};
			$t.bindEvents();
		},
		bindEvents : function() {
			var $t = this;
			$($t.polls).each(function() {
				var $b = $(this).find(".pollSubmit");
				$($b).bind("click", function(e) {
					var poll = $($b).parents("div.PollMini:first");
					$t.submitPoll(poll);
				});
			});
		},
		submitPoll : function(p) {
			var form = $(p).find("form.pollForm");
			var target = $(p).find("div.pollResult");
			$(form).ajaxForm({
				beforeSend: function() { $(form).mask(); },
				success: function(r) {
					$(form).unmask();
					$(target).html(r);
				}
			});
			if (this.isValid(form)) {
				$(form).submit();
			} else {
				alert("Please select a response");
			};
		},
		isValid : function(f) {
			return $(f).find(":input:checked").length > 0;
		}
	};
	
	window.$pollMini.loadPolls();
};
