function voting (point,model ,model_id, kind){		
	$('#voting_' + kind + '_' +model+'_'+model_id).hide();
	$('#voting_loader_' + kind + '_' +model+'_'+model_id).show();
	 $.getJSON("/votes/voting/"+model+"/"+model_id+"/"+point,{			
		}, function(result){	
			if (result.error != "") {
				alert(result.error);
				$('#voting_' + kind + '_' +model+'_'+model_id).show();
				$('#voting_loader_' + kind + '_'  +model+'_'+model_id).hide();
			} else {
					
					$('#'+model+'_votes_plus_'+model_id).html(" "+parseInt(result.votes_plus));
					$('#'+model+'_votes_minus_'+model_id).html(" "+parseInt(result.votes_minus));
					$('#'+model+'_sum_'+model_id).html(" "+parseInt(result.sum));
					
					if (kind == 'double') {		
						if (point >0) {
							$('#'+model+'_arrows_' + kind + '_' +model_id).children("div.dw_vote").addClass('dis');
							$('#'+model+'_arrows_' + kind + '_' +model_id).children("div.up_vote").addClass('voted');
						} else {
							$('#'+model+'_arrows_' + kind + '_' +model_id).children("div.dw_vote").addClass('voted');
							$('#'+model+'_arrows_' + kind + '_' +model_id).children("div.up_vote").addClass('dis');
						}
						$('#'+model + '_arrows_' + kind + '_' + model_id).children("div.dw_vote").attr('onclick', 'return false;');
						$('#'+model+'_arrows_' + kind + '_' +model_id).children("div.up_vote").attr('onclick', 'return false;');
					} else {
						if (point >0) {
							$('#'+model+'_arrows_minus_' +model_id).children("div.dw_vote").addClass('dis');
							$('#'+model+'_arrows_plus_' +model_id).children("div.up_vote").addClass('voted');
						} else {
							$('#'+model+'_arrows_minus_' +model_id).children("div.dw_vote").addClass('voted');
							$('#'+model+'_arrows_plus_' +model_id).children("div.up_vote").addClass('dis');
						}
						$('#'+model + '_arrows_minus_' + model_id).children("div.dw_vote").attr('onclick', 'return false;');
						$('#'+model+'_arrows_plus_' +model_id).children("div.up_vote").attr('onclick', 'return false;');						
					}

					
					$('#voting_' + kind + '_' +model+'_'+model_id).show();
					$('#voting_loader_' + kind + '_' +model+'_'+model_id).hide();
					
			}		   
	})
}
