<!--

$('#submitvote').live('click', function () {
	$.post("voting.html", $("#voting").serialize(), function (data) { 
		var daten = data.split("|");
		// preload next picture
		jQuery("<img>").attr("src", '../images/voting/'+daten[2]);
		$('#image').fadeOut('slow', function() {$('#image').attr('src', '../images/voting/'+daten[0]).fadeIn('slow');} );
		$('#voting input[type=radio]').each(function() {$(this).attr('checked', '');});
		$('#voting input#frage1').val('');
		$('#voting input#frage2').val('');
		$('#voting input#frage3').val('');
		$('#inputimage').val(daten[0]);
		if ( daten[1] == '1' ) {
			$('#votingform').hide();
			$('#submitvote').hide();
			$('#alreadyvoted').show();
		} else {
			$('#votingform').show();
			$('#submitvote').show();
			$('#alreadyvoted').hide();
		}
		if ( daten[2] == 'none' ) {
			$('#shownext').hide();
		} else
			$('#shownext').show();
	});
	return false;
});

$('#submitvoteno').live('click', function () {
	$('#voting input#frage1').val('0');
	$('#voting input#frage2').val('0');
	$('#voting input#frage3').val('0');
	/*
	if ( $('#wer').val() == '(Twitter-/Facebook-Alias angeben)' ) $('#wer').val('');
	$('#wen').val('');
	*/
	$('#submitvote').click();
	return false;
});

$('#submitvoteprev').live('click', function () {
	$.post("voting,prev.html", $("#voting").serialize(), function (data) { 
		var daten = data.split("|");
		$('#image').fadeOut('slow', function () { $('#image').attr('src', '../images/voting/'+daten[0]).fadeIn('slow'); });
		$('#voting input[type=radio]').each(function() {$(this).attr('checked', '');});
		$('#voting input#frage1').val('0');
		$('#voting input#frage2').val('0');
		$('#voting input#frage3').val('0');
		$('#inputimage').val(daten[0]);
		if ( daten[1] == '1' ) {
			$('#votingform').hide();
			$('#submitvote').hide();
			$('#alreadyvoted').show();
		} else {
			$('#votingform').show();
			$('#submitvote').show();
			$('#alreadyvoted').hide();
		}
		if ( daten[2] == 'none' ) {
			$('#shownext').hide();
		} else
			$('#shownext').show();
	});
	return false;
});

-->
