text: $(document).ready(function() {
  	$("#form_sktm").unbind('submit').bind('submit', function() {
  		var form = $(this);
  
  		$.ajax({
  			url: form.attr('action'),
  			type: form.attr('method'),
  			data: form.serialize(),
  			dataType: 'json',
  			success:function(response) {				
  				if(response.success == true) {
  					$("#messages_sktm").html('<div class="alert alert-success alert-dismissible" role="alert">'+
  					  '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>'+
  					  response.messages+'</div>');
  
  					$("#form_sktm")[0].reset();
  					$(".text-danger").remove();
  					$(".form-group").removeClass('has-error').removeClass('has-success');
  
  				}
  				else {
  					$.each(response.messages, function(index, value) {
  						var element = $("#"+index);
  
  						$(element)
  						.closest('.form-group')
  						.removeClass('has-error')
  						.removeClass('has-success')
  						.addClass(value.length > 0 ? 'has-error' : 'has-success')
  						.find('.text-danger').remove();
  
  						$(element).after(value);
  
  					});
  				}
  			} // /success
  		});	 // /ajax
  
  		return false;
  	});	
  });
  
  $(document).ready(function() {
  	$("#form_kematian").unbind('submit').bind('submit', function() {
  		var form = $(this);
  
  		$.ajax({
  			url: form.attr('action'),
  			type: form.attr('method'),
  			data: form.serialize(),
  			dataType: 'json',
  			success:function(response) {				
  				if(response.success == true) {
  					$("#messages_kematian").html('<div class="alert alert-success alert-dismissible" role="alert">'+
  					  '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>'+
  					  response.messages+'</div>');
  
  					$("#form_kematian")[0].reset();
  					$(".text-danger").remove();
  					$(".form-group").removeClass('has-error').removeClass('has-success');
  
  				}
  				else {
  					$.each(response.messages, function(index, value) {
  						var element = $("#"+index);
  
  						$(element)
  						.closest('.form-group')
  						.removeClass('has-error')
  						.removeClass('has-success')
  						.addClass(value.length > 0 ? 'has-error' : 'has-success')
  						.find('.text-danger').remove();
  
  						$(element).after(value);
  
  					});
  				}
  			} // /success
  		});	 // /ajax
  
  		return false;
  	});	
  });
  
  
  $(document).ready(function() {
  	$("#form_usaha").unbind('submit').bind('submit', function() {
  		var form = $(this);
  
  		$.ajax({
  			url: form.attr('action'),
  			type: form.attr('method'),
  			data: form.serialize(),
  			dataType: 'json',
  			success:function(response) {				
  				if(response.success == true) {
  					$("#messages_usaha").html('<div class="alert alert-success alert-dismissible" role="alert">'+
  					  '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>'+
  					  response.messages+'</div>');
  
  					$("#form_usaha")[0].reset();
  					$(".text-danger").remove();
  					$(".form-group").removeClass('has-error').removeClass('has-success');
  
  				}
  				else {
  					$.each(response.messages, function(index, value) {
  						var element = $("#"+index);
  
  						$(element)
  						.closest('.form-group')
  						.removeClass('has-error')
  						.removeClass('has-success')
  						.addClass(value.length > 0 ? 'has-error' : 'has-success')
  						.find('.text-danger').remove();
  
  						$(element).after(value);
  
  					});
  				}
  			} // /success
  		});	 // /ajax
  
  		return false;
  	});	
  });
  
  
  $(document).ready(function() {
  	$("#form_kelahiran").unbind('submit').bind('submit', function() {
  		var form = $(this);
  
  		$.ajax({
  			url: form.attr('action'),
  			type: form.attr('method'),
  			data: form.serialize(),
  			dataType: 'json',
  			success:function(response) {				
  				if(response.success == true) {
  					$("#messages_kelahiran").html('<div class="alert alert-success alert-dismissible" role="alert">'+
  					  '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>'+
  					  response.messages+'</div>');
  
  					$("#form_kelahiran")[0].reset();
  					$(".text-danger").remove();
  					$(".form-group").removeClass('has-error').removeClass('has-success');
  
  				}
  				else {
  					$.each(response.messages, function(index, value) {
  						var element = $("#"+index);
  
  						$(element)
  						.closest('.form-group')
  						.removeClass('has-error')
  						.removeClass('has-success')
  						.addClass(value.length > 0 ? 'has-error' : 'has-success')
  						.find('.text-danger').remove();
  
  						$(element).after(value);
  
  					});
  				}
  			} // /success
  		});	 // /ajax
  
  		return false;
  	});	
  });