$(document).ready(function(){
     $(document).pngFix();
      getComment();

});

function getComment(){

				$.post("http://audio.com.pl/index.php?page=testy", {postActionAjax: "getComments",id:$("#idArt").val(),model:$("#model").val()},
          function(data){
         
          
           $("#comments").html(data);

         
					}
				); 


}
function sendComment(){
         
				$.post("http://audio.com.pl/index.php?page=testy", {postActionAjax: "addComment",nick: $("#nick").val(),comment:$("#t1").val(),id:$("#idArt").val(),password:$("#passw").val(),model:$("#model").val(),katId:$("#katIdCom").val()},
          function(data){
       
         
          // $("#errorMessage").html(data);
          //alert(data);
          if(data == 1){
           
           $("#errorMessage").html("Uzupełnij wszystkie pola poza polem czarnym!");
           
           }
           
           if(data == 2){
          
            $("#errorMessage").html("");
            $("#nick").val("");
            $("#t1").val("");
  
            getComment();
      
           }
            
         
					}
				);     
} 

