$(function()
{
	$('.hover-star').rating({
		focus: function(value, link)
		{
			var tip = $('span.hover-vote', $(this).parent());
			tip[0].data = tip[0].data || tip.html(); 
			tip.html(link.title || 'value: '+value); 
		}, 
		blur: function(value, link)
		{
			var tip = $('span.hover-vote', $(this).parent());
			tip.html(tip[0].data || '');
		}, 
		callback: function(value, link)
		{
			var s_id = $(this).attr("name").split("_")[2];
			$.get("file_voting.asp", "id=" + s_id + "&value=" + value);
			
			var tip = $('span.hover-vote', $(this).parent());
			var s_thanks = 'Danke!';
			tip[0].data = s_thanks;
			tip.html(s_thanks);
			$('.hover-star', $(this).parent()).rating('readOnly', true);
		}
	});
});

