			
/* Skrypt wysyłający dane formularza */
		
 $(function() {  
   $(".button").click(function() {  
     // validate and process form here  

		 var temat = $("select#temat").val();
  		 var firma = $("input#firma").val();
  		 var telefon = $("input#telefon").val();
  		 var imie = $("input#imie").val();  
  		 if (imie == "") {return false;}
		 var nazwisko = $("input#nazwisko").val(); 
		 if (nazwisko == "") {return false;} 
		 var mail = $("input#mail").val();  
		 if (mail == "") {return false;}
		 var trescBox = $("textarea#trescBox").val(); 
		 if (trescBox == "") {return false;} 
		 var daneOsobowe = $("input#daneOsobowe").val();
  		 if (daneOsobowe == "") {return false;}
		 
     
    var dataString = 'temat='+ temat + '&firma='+ firma + '&imie='+ imie + '&nazwisko=' + nazwisko + '&mail=' + mail + '&telefon=' + telefon + '&trescBox=' + trescBox + '&daneOsobowe=' + daneOsobowe;  
    //alert (dataString);return false;  
    $.ajax({  
      type: "POST",  
      url: "bin/process.php",  
      data: dataString,  
      success: function() {  
        $('#formularz').html("<div id='message'></div>");  
        $('#message').html("<h2>Twoje zgłoszenie zostało wysłane!</h2>")  
       .append("<p>Skontaktujemy się z Tobą w ciągu 24 godzin.</p>")  
       .hide()  
       .fadeIn(1500, function() {  
         $('#message').append;  
       });  
     }  
   });  
   return false;  
       
   });  
 });  
 
