text: var FormValidation = function() {
  
      // basic validation
      var handleValidation1 = function() {
          // for more info visit the official plugin documentation: 
          // http://docs.jquery.com/Plugins/Validation
  
          var form1 = $('#form_sample_1');
          var error1 = $('.alert-danger', form1);
          var success1 = $('.alert-success', form1);
  
          form1.validate({
              errorElement: 'span', //default input error message container
              errorClass: 'help-block help-block-error', // default input error message class
              focusInvalid: false, // do not focus the last invalid input
              ignore: "", // validate all fields including form hidden input
              messages: {
                  select_multi: {
                      maxlength: jQuery.validator.format("Max {0} items allowed for selection"),
                      minlength: jQuery.validator.format("At least {0} items must be selected")
                  }
              },
              rules: {
                  name: {
                      minlength: 3,
                      required: true
                  },
                  email: {
                      required: true,
                      email: true
                  },
                  url: {
                      required: true,
                      url: true
                  },
                  number: {
                      required: true,
                      number: true
                  },
                  digits: {
                      required: true,
                      digits: true
                  },
                  creditcard: {
                      required: true,
                      creditcard: true
                  },
                  occupation: {
                      minlength: 3,
                  },
                  select: {
                      required: true
                  },
                  select_multi: {
                      required: true,
                      minlength: 1,
                      maxlength: 3
                  }
              },
              invalidHandler: function(event, validator) { //display error alert on form submit              
                  success1.hide();
                  error1.show();
                  App.scrollTo(error1, -200);
              },
              highlight: function(element) { // hightlight error inputs
                  $(element)
                      .closest('.form-group').addClass('has-error'); // set error class to the control group
              },
              unhighlight: function(element) { // revert the change done by hightlight
                  $(element)
                      .closest('.form-group').removeClass('has-error'); // set error class to the control group
              },
              success: function(label) {
                  label
                      .closest('.form-group').removeClass('has-error'); // set success class to the control group
              },
              submitHandler: function(form) {
                  success1.show();
                  error1.hide();
              }
          });
  
  
      }
    var handleElectricianValidation1 = function() {
          // for more info visit the official plugin documentation: 
          // http://docs.jquery.com/Plugins/Validation
  
          var form1 = $('#electrician_form');
          var error1 = $('.alert-danger', form1);
          var success1 = $('.alert-success', form1);
  
          form1.validate({
              errorElement: 'span', //default input error message container
              errorClass: 'help-block help-block-error', // default input error message class
              focusInvalid: false, // do not focus the last invalid input
              ignore: "", // validate all fields including form hidden input
              messages: {
                  select_multi: {
                      maxlength: jQuery.validator.format("Max {0} items allowed for selection"),
                      minlength: jQuery.validator.format("At least {0} items must be selected")
                  }
              },
              rules: {
                  e_name: {
                      minlength: 3,
                      required: true
                  },
                  e_phone_1: {
                      required: true,
                      number: true
                  },
                  e_location: {
                      required: true,
                  },
                  e_description: {
                      required: true,
                  },
                  
              },
              invalidHandler: function(event, validator) { //display error alert on form submit              
                  success1.hide();
                  error1.show();
                  App.scrollTo(error1, -200);
              },
              highlight: function(element) { // hightlight error inputs
                  $(element)
                      .closest('.form-group').addClass('has-error'); // set error class to the control group
              },
              unhighlight: function(element) { // revert the change done by hightlight
                  $(element)
                      .closest('.form-group').removeClass('has-error'); // set error class to the control group
              },
              success: function(label) {
                  label
                      .closest('.form-group').removeClass('has-error'); // set success class to the control group
              },
              submitHandler: function(form) {
                  success1.show();
                  error1.hide();
              }
          });
  
  
      }
    var handlePlumberValidation1 = function() {
          // for more info visit the official plugin documentation: 
          // http://docs.jquery.com/Plugins/Validation
  
          var form1 = $('#plumber_form');
          var error1 = $('.alert-danger', form1);
          var success1 = $('.alert-success', form1);
  
          form1.validate({
              errorElement: 'span', //default input error message container
              errorClass: 'help-block help-block-error', // default input error message class
              focusInvalid: false, // do not focus the last invalid input
              ignore: "", // validate all fields including form hidden input
              messages: {
                  select_multi: {
                      maxlength: jQuery.validator.format("Max {0} items allowed for selection"),
                      minlength: jQuery.validator.format("At least {0} items must be selected")
                  }
              },
              rules: {
                  p_name: {
                      minlength: 3,
                      required: true
                  },
                  p_phone_1: {
                      required: true,
                      number: true
                  },
                  p_location: {
                      required: true,
                  },
                  p_description: {
                      required: true,
                  },
                  
              },
              invalidHandler: function(event, validator) { //display error alert on form submit              
                  success1.hide();
                  error1.show();
                  App.scrollTo(error1, -200);
              },
              highlight: function(element) { // hightlight error inputs
                  $(element)
                      .closest('.form-group').addClass('has-error'); // set error class to the control group
              },
              unhighlight: function(element) { // revert the change done by hightlight
                  $(element)
                      .closest('.form-group').removeClass('has-error'); // set error class to the control group
              },
              success: function(label) {
                  label
                      .closest('.form-group').removeClass('has-error'); // set success class to the control group
              },
              submitHandler: function(form) {
                  success1.show();
                  error1.hide();
              }
          });
  
  
      }
      return {
          //main function to initiate the module
          init: function() {
             // handlePlumberValidation1();
             //     handleElectricianValidation1();
          }
      };
  
  }();
  
  jQuery(document).ready(function() {
      FormValidation.init();
  });