function vote(ids)
{
	var dot = '.'; 
	$(".links").hide('slow');
	$("#vote_counter").show('slow');
	interval = setInterval(function(){
		$("#vote_counter").html("Processing data <b>"+dot+"</b> ");
		dot = dot + '.';
		if (dot.length > 10){
			dot = '.';
		} 
	}, 600);
	$.post("http://mu.goldteam.lv/inc/ajax/vote.php", { vote_link: ids }, function(data) 
	{      
		timeout = setTimeout(function() {
			clearInterval(interval);
			$("#vote_counter").hide('slow');
			$("#vote_error").html(data); 
			$("#vote_error").show('slow');
			setTimeout(function(){
				clearTimeout(timeout);
				$("#vote_error").hide('slow');
				$(".links").show(800); 
				addVPoints();
			}, 3000);	
			$('.links').load("http://mu.goldteam.lv/inc/ajax/vote.php");		
		}, 24000);
	});   
}

function addVPoints() {
	$.post("http://mu.goldteam.lv/inc/ajax/vote.php", { check: "points" }, function(data) 
    {                                            
        $('#g_points').fadeOut('slow').html(data).fadeIn("slow");                              
    });
}

