$(document).ready(function() { 
  $('#edit_category_response').hide();  
  
    /** POST edit category **/
       
              $('#contact_request').ajaxForm({ 
            url : 'contact', // or whatever
            dataType : 'json',
           // clearForm: '1',
            success : function (response) {
           
            $('#edit_category_response').show();   
           
            if(response.responses == 'n'){
             $('#edit_category_response').removeClass('success error');
            $('#edit_category_response').html(response.errors);
            }else if(response.responses == 'y'){
            $('#contact_request').css({'display':'none'});
            $('form').clearForm();
            
           // $('#edit_category_response').removeClass('error success').addClass('success');
            $('#tellus').html("Your email was successfully sent, we will contact you soon. Thanks!");
            }
              
            var response_height = $("#form_iframe").height();
            var response_height2 = $("#form_iframe").height() + 30;
             $('#simplemodal-container').css({'height':response_height2+'px'});
            
        }
  
            }); 
            
             
  $('#contact_us').click(function() {
  $("#form_iframe").modal({
   overlayClose:true,
   containerCss:{
      height:400,
      width:400
    }
   }); 
  }); 
   });


