$(document).ready(function () { 
	$('.auto-submit-star').rating({ 
		callback: function(value, link)
		{ 
			//alert("
			alert($(this).attr("id") + " : " + $(this).val());
			var tab = ($(this).attr('id')).split("_");
			var id = tab[tab.length-1];
			var universeId = $("#universeId").val();
			$.ajax({   
	 		type: "POST",   
	 		data: "objectId="+id+"&rate="+$(this).val()+"&universeId="+universeId,
	 		url: $("#urlSetRank").val(),   
	 		success: function(msg){
	 		
	 		}
	 		});
	 		$(this).rating('readOnly',true);
	 	}
	 });
});
			//$(this).select(3); 
			/*$(".auto-submit-star.attr('id'):eq($(this).attr('id'))").each(function(){
  				alert("prout");
			});*/
			/*$average = 2;
			$class="."+$(this).attr('id');
			$($class).each(function(){
  				//alert($(this).val());
  				if($(this).val() != "" && $(this).val() != $average)
  				{
  					alert($(this).attr('checked'));
  					$(this).attr('checked',false);
  				}
  				else if($(this).val() == $average)
  				{
  					alert($(this).attr('checked'));
  					$(this).attr('checked',true);
  				}*/
  				//$("#rat").hide();
					//$("#loader").show();
				//$(this).select(Math.round(4.2));
  				//$(this).rating('blur');
  				
  				 
  				//$(this).attr('checked','checked');
			//});
		//} 
	//});
	/*$('.auto-submit-star').click(function()
		{ 
			alert($(this).attr("id") + " : " + $(this).val());
			$(this).rating("select",3); 
		});*/ 
//});