// Pobera wartosc glosu dla pliku.

function getObjectProperties (object) {
        var result = '';
                for (var property in object) {
                        result += property + ': ' + object[property] + '\r\n';
                }
        return result;
}
   

	//$(document).ready(function(){
	  	   
		//$('.star').click(function() {
      
      function starClicked(count) { 
			$("#current_rate").fadeOut("slow"); 
			docId = $('#rating').attr("name");

			var expires = new Date();
			expires.setTime(expires.getTime()+1000*60*60*24*360);
			document.cookie = "rating_article_" + docId + "=" + escape('rated=true') + ";expires=" + expires.toGMTString();
         
         /**
          * Wykorzystywane przy wywolaniu funkcji przez $(document).ready
          * problemy w IE          
          *                   
			var count = 0;
			$('#rating').children().find(".star-rating-on").each( function () {
				count++;
			});
			*/


         //make sure, old data is deleted (needed for IE)
         document.getElementById("rating").innerHTML = '';

			$.ajax({
				url: "/ajax.php",
				type: "POST", 
				dataType: "html",
				data: "plugin=rating_form&handler=rate&docId=" + docId + "&note=" + count,
				success: function(response) {
               $('#rating').html(response);
				} 
			});			
         	
		};		
		
	//});