  $(document).ready(function(){

	$("button").click(function () {
      $("p#comment").hide();
	  $("#production").hide();
	  
      $("h2").hide();
	  $("h2").html("Шаг 3 из 3 <br /> Отправка заявки");
	  $("h2").show();
	  $("div#mess").show();
	  return false;
    });
	
	$("#sub_mess1").click(function () {	
	$("#sub_mess1").hide();
	 $.post('index2.php?option=com_mpk&task=kontakt&no_html=1', 
			{
				'name': $("#post_name").attr('value'),
			    'email': $("#post_email").attr('value'),
				'mess': $("#post_mess").attr('value'),
				'company': $("#post_company").attr('value'),
				'phone': $("#post_phone").attr('value')
			},	
	 function(data) {	 
     alert(data);
	 $("#sub_mess1").show();
     });
	 
	 });
	
	$("#sub_mess").click(function () {	
	 $.post('index2.php?option=com_mpk&task=zakaz&no_html=1', 
			{
				'name': $("#post_name").attr('value'),
			    'email': $("#post_email").attr('value'),
				'mess': $("#post_mess").attr('value'),
				'company': $("#post_company").attr('value'),
				'phone': $("#post_phone").attr('value')
			},
	 function(data) {	 
     alert(data);
     });
	 
	 });
	
	$("#bmail1").click(function () {	
	 $.post('../index2.php?option=com_mpk&task=mail1&no_html=1', 
			{
			    'email': $("#email1").attr('value')
			},
	 function(data) {
	 $("#mess").show();
     $("#mess").html(data);
     });
	 
	 });
	
	$("#bmail2").click(function () {
	 $.post('../index2.php?option=com_mpk&task=mail2&no_html=1', 
			{
			    'email': $("#email2").attr('value')
			},
	 function(data) {
	 $("#mess").show();
     $("#mess").html(data);
     });
	 
	 });
  
  });

  

     
	
  
   
