
$(document).ready(function(e) { 
    
      if($("#jobspec_form").length)
   {
       $("#jobspec_form").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'type_job': {
                validators: {
                    notEmpty: {
                        message: 'Type of Job should not be empty'
                    },
                  
                }
            },
            'title': {
                validators: {
                    notEmpty: {
                        message: 'Title should not be empty'
                    },
                  
                }
            },
        }
    });
       
   }
   
     if($("#fundForm").length)
   {
        $("#fundForm").bootstrapValidator({        
        message: 'This value is not valid',
        
        fields: {
          'years_in_business': {
                validators: {
                    notEmpty: {
                        message: 'Years in business should not be empty'
                    },
                  
                }
            },
            'revenue_det': {
                validators: {
                    notEmpty: {
                        message: 'Your Revenue should not be empty'
                    },
                    regexp: {
                                regexp: /^(\d+(,\d+)*)?$/,
                                message: "The value is not an integer"
                            },
                  
                }
            },
           'assets_currency': {
                validators: {
                    notEmpty: {
                        message: 'Assets Currency should not be empty'
                    },
                  
                }
            },
            'assets_currency_units': {
                validators: {
                    notEmpty: {
                        message: 'Assets Currency Units should not be empty'
                    },
                  
                }
            },
            'growth': {
                validators: {
                    notEmpty: {
                        message: 'Growth should not be empty'
                    },
                  
                }
            },
            'emp_strength': {
                validators: {
                     notEmpty: {
                        message: 'Employee Strength should not be empty'
                    },
                    integer: {
                        message: 'Employee Strength should be Integer'
                    },
                  
                }
            },
            'nature_business': {
                validators: {
                    notEmpty: {
                        message: 'Nature Of Business should not be empty'
                    },
                  
                }
            },
            'investment_amt':{
                validators: {
                    notEmpty: {
                        message: 'Investment Amount should not be empty'
                    },
					regexp: {
                                regexp: /^(\d+(,\d+)*)?$/,
                                message: "The value is not an integer"
                            }
                  
                }
            },
            'min_investment_currency':{
                validators: {
                    notEmpty: {
                        message: 'Min Investment Currency should not be empty'
                    },
                  
                }
            },
            'min_investment_currency_units':{
                validators: {
                    notEmpty: {
                        message: 'Min Investment Currency Units should not be empty'
                    },
                  
                }
            },
            
            
          
        }
    });
   }
   
      if($("#fundForm2").length)
  {
     
    $("#fundForm2").bootstrapValidator({        
        message: 'This value is not valid',
        
        fields: {
          'years_in_business': {
                validators: {
                    notEmpty: {
                        message: 'Years in business should not be empty'
                    }
                }
            },
            'revenue_det': {
                validators: {
                    notEmpty: {
                        message: 'Revenue Details should not be empty'
                    }
                }
            },
           'assets_currency': {
                validators: {
                    notEmpty: {
                        message: 'Assets Currency should not be empty'
                    }
                }
            },
          'assets_currency_units': {
                validators: {
                    notEmpty: {
                        message: 'Assets Currency Units should not be empty'
                    }
                }
            },
            'min_investment_amt': {
                validators: {
                    notEmpty: {
                        message: 'Minimum Investment Amount should not be empty'
                    }
                }
            },
            'min_investment_currency': {
                validators: {
                    notEmpty: {
                        message: 'Minimum Investment Currency should not be empty'
                    }
                }
            },
            'min_investment_currency_units': {
                validators: {
                    notEmpty: {
                        message: 'Minimum Investment Currency Units should not be empty'
                    }
                }
            },
            'max_investment_amt': {
                validators: {
                    notEmpty: {
                        message: 'Maximum Investment Amount should not be empty'
                    }
                }
            },
            'max_investment_currency': {
                validators: {
                    notEmpty: {
                        message: 'Maximum Investment Currency should not be empty'
                    }
                }
            },
          'max_investment_currency_units': {
                validators: {
                    notEmpty: {
                        message: 'Maximum Investment Currency Units should not be empty'
                    }
                }
            },
         'industry_focus[]': {
                validators: {
                    notEmpty: {
                        message: 'Industry Focus should not be empty'
                    }
                }
            },
        }
     });
  }
   
     if($("#jobspecification").length)
  {
     
    $("#jobspecification").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'title': {
                validators: {
                    notEmpty: {
                        message: 'The title should not be empty'
                    }
                }
            },
         'company_name': {
                validators: {
                    notEmpty: {
                        message: 'The Company Name should not be empty'
                    }
                  
                }
            },
            
         'link_to_website': {
                validators: {
                    notEmpty: {
                        message: 'The Link to Website should not be empty'
                    }
                  
                }
            },
        'industry[]':{
                validators: {
                    notEmpty: {
                        message: 'The Industry should not be empty'
                    },
                  
                }
            },
        
            
       'country':{
                validators: {
                    notEmpty: {
                        message: 'The Country should not be empty'
                    }
                  
                }
            },
            
        'province':{
                validators: {
                    notEmpty: {
                        message: 'The Province should not be empty'
                    }
                  
                }
            },
            
         'state[]':{
                validators: {
                    notEmpty: {
                        message: 'The State should not be empty'
                    }
                  
                }
            },
            
       'sal_range':{
                validators: {
                    notEmpty: {
                        message: 'The Salary Range should not be empty'
                    }
                  
                }
            },
    
     'skill_level[]': {
                    validators: {
                        choice: {
                        min: 1,
                        message: 'Please choose atleast 1 skill you are good at'
                         }
                    }
                },
      'username':{
                      validators: {
                       notEmpty: {
                        message: 'The Name should not be empty'
                        }
                    }
                },
      'email':{
                    validators: {
                       notEmpty: {
                        message: 'The Email should not be empty'
                        },
                       regexp: {
                                       regexp: /^([\w-\.]+@([\w]+\.)+[\w-]{2,4})?$/,
                                       message: "Invalid email address"
                                    }, 
                    }
                },
     'contact_company':{
                        validators: {
                         notEmpty: {
                          message: 'The Company should not be empty'
                          }

                         }
                      },
                     
                        
               
        
        }
     });
  }
    if($("#profile_search_save").length)
    {
        $(document).on("click","#profile_search_save",function(){
            $("#profile_search_save_modal").modal('show');
        });
    }
    /*if($(".fa-lock").length || $(".fa-unlock").length)
    {
        $(document).on("mouseover",".fa-lock",function(){
            $(this).removeClass('fa fa-lock');
            $(this).addClass('fa fa-unlock');
            $(this).attr('title','unlock');
        });

        $(document).on("mouseout",".fa-unlock",function(){
            $(this).removeClass('fa fa-unlock');
            $(this).addClass('fa fa-lock');
            $(this).attr('title','lock');
        });

        $(document).on("mouseover",".fa-unlock",function(){
            $(this).removeClass('fa fa-unlock');
            $(this).addClass('fa fa-lock');
            $(this).attr('title','lock');
        });

        $(document).on("mouseout",".fa-lock",function(){
            $(this).removeClass('fa fa-lock');
            $(this).addClass('fa fa-unlock');
            $(this).attr('title','unlock');
        });

    }*/
    if($("#auth_profile").length)
    {
        $(document).on("change","#auth_profile",function(){
            $("#authProfileForm").submit();
        });
    }
    if($(".profile_show").length)
    {
        $(document).on("click",".profile_show",function(){
//            $(this).parent().parent().parent().parent().children('.profile_edit_data').slideDown(600);
            $(this).parent().parent().parent().parent().children('.profile_edit_data').show();
            $(this).parent().parent().parent().children('.profile_display_data').hide();
        });
    }    

    if($(".profile_close_open").length)
    {
        $(document).on("click",".profile_close_open",function(){
            $(this).parent().parent().parent().parent('.profile_edit_data').hide();
//            $(this).parent().parent().parent().parent('.profile_edit_data').slideUp(200);
            $(this).parent().parent().parent().parent().parent().children(".row").children('.profile_display_data').show();
        });
    }    

    if($(".remove_cat").length)
    {
        $(document).on("click",".remove_cat",function(){
            $(this).parent().parent().parent().remove();
             if($(".remove_cat").length==0){$('#profile_next').hide()};
        });
    }

    if($(".social_links").length)
    {
        $(document).on("click",".social_links",function(){
            $("#social_modal").modal('show');
        });
    }
    if($(".advanced_search_data").length)
    {
       if($("#req_search_type").val()=='A')       
       {
           $(".advanced_search").hide();
           $(".close_advanced_search").show();
           $(".advanced_search_data").show();
       }
       else
        {
            $(".advanced_search_data").show();
            $(".close_advanced_search").hide();
            $(".advanced_search_data").hide();     
       } 

        $(document).on("click",".advanced_search",function(){
           $(this).hide();
           $("#req_search_type").val('A');
           $(".close_advanced_search").show();
           $(".advanced_search_data").toggle();
         //  $("#search_type").focus();
        });

        $(document).on("click",".close_advanced_search",function(){
           $(this).hide();
           $("#req_search_type").val('N');
           $(".advanced_search").show();
           $(".advanced_search_data input").val('');
           $(".advanced_search_data select").val('');
           $(".advanced_search_data").toggle();
         //  $("#search_type").focus();
        });
    }
    if($("#signupForm").length>0)
    {
            $("#signupForm").bootstrapValidator({        
                message: 'This value is not valid',
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {
                  'name': {
                        validators: {
                            notEmpty: {
                                message: 'The Full Name or Business should not be empty'
                            }
                        }
                    },
                  'username': {
                        validators: {
                            notEmpty: {
                                message: 'The Username should not be empty'
                            },
                            stringLength: {
                                min: 6,
                                max: 40,
                                message: 'The username must be more than 5 characters and less than 40 characters'
                            },
							
                            regexp: {
                                       regexp: /^[^\s][a-zA-Z0-9]*$/,
                                       message: "Invalid username"
                                    },
                            remote: {
                                message : 'Username is not available',
                                url: "/user/check_username",
                                type: "get",
                                data: {
                                username: function() {
                                                return $("#username").val();
                                            }
                                }
                            }

                        }
                    },
                  'city': {
                        validators: {
                            notEmpty: {
                                message: 'The City should not be empty'
                            },
                            stringLength: {
                                max: 255,
                                message: 'The username must be less than 255 characters'
                            },
                        }
                    },
                  'dob': {
                        validators: {
                            notEmpty: {
                               message: 'The Date of Birth should not be empty'
                           },
                            date: {
                                format: 'MM/DD/YYYY',
                                message: 'The Date of Birth format is mm/dd/yyyy'
                            },
                        }
                    },
                    'gender': {
                        validators: {
                            notEmpty: {
                                message: 'The gender should not be empty'
                            },
                            
                        }
                    },
                    'years_in_business':{
                        validators: {
                            notEmpty: {
                                message: 'The Years In Business should not be empty'
                            },
                            
                        } 
                    },
                  'email': {
                        validators: {
                            notEmpty: {
                                message: 'The Email should not be empty'
                            },
                            regexp: {
                                       regexp: /^([\w-\.]+@([\w]+\.)+[\w-]{2,4})?$/,
                                       message: "Invalid email address"
                                    },                             
                            remote: {
                                message : 'Email is already Registered',
                                url: "/user/check_email",
                                type: "get",
                                data: {
                                    email: function() {
                                                return $("#email").val();
                                            }
                                }
                            }

                        }
                    },
                  'password': {
                        validators: {
                            notEmpty: {
                                message: 'The Password should not be empty'
                            },
                            stringLength: {
                                min: 6,
                                max: 10,
                                message: 'The password must be more than 6 characters and less than 10 characters'
                            },
                        }
                    },
                  'password_confirmation': {
                        validators: {
                            notEmpty: {
                                message: 'The Confirm Password should not be empty'
                            },
                            identical: {
                                field: 'password',
                                message: 'The password and its confirm password are not the same'
                            }                   
                        }
                    },
                      'permission': {
                        validators: {
                            notEmpty: {
                                message: 'Please confirm permission'
                            },
                            
                        }
                    },
                }
            });//.find('[name="dob"]').mask('99/99/9999');
//            }).find('[name="dob"]').mask('99/99/9999');
    }

    
    if($("#newsignup").length>0)
    {
            $("#newsignup").bootstrapValidator({        
                message: 'This value is not valid',
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {
                  'fullname': {
                        validators: {
                            notEmpty: {
                                message: 'The Full Name not be empty'
                            }
                        }
                    },                  
                    
                  'newemail': {
                        validators: {
                            notEmpty: {
                                message: 'The Email should not be empty'
                            },
                            
                            regexp: {
                                       regexp: /^([\w-\.]+@([\w]+\.)+[\w-]{2,4})?$/,
                                       message: "Invalid email address"
                                    },                             
                          
                        }
                    },
                  'newpassword': {
                        validators: {
                            notEmpty: {
                                message: 'The Password should not be empty'
                            },
                            stringLength: {
                                min: 6,
                                max: 10,
                                message: 'The password must be more than 6 characters and less than 10 characters'
                            },
                        }
                    },
                }
            });
    }

    
    
    
    if($("#loginForm").length)
    {
            $("#loginForm").bootstrapValidator({        
                message: 'This value is not valid',
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {
                  'username': {
                        validators: {
                            notEmpty: {
                                message: 'The Username should not be empty'
                            },
                        }
                    },
                  'password': {
                        validators: {
                            notEmpty: {
                                message: 'The Password should not be empty'
                            },
                        }
                    },
                }
            });
    }
         if($("#forgot").length)
    {
            $("#forgot").bootstrapValidator({        
                message: 'This value is not valid',
              
                fields: {
                  'email': {
                        validators: {
                            notEmpty: {
                                message: 'The Email should not be empty'
                            },
                       regexp: {
                                       regexp: /^([\w-\.]+@([\w]+\.)+[\w-]{2,4})?$/,
                                       message: "Invalid email address"
                                    }, 
                        }
                    },
                }
            });
    }
       if($("#subscribe").length)
    {
            $("#subscribe").bootstrapValidator({        
                message: 'This value is not valid',
              
                fields: {
                  'email': {
                        validators: {
                            notEmpty: {
                                message: 'The Email should not be empty'
                            },
                         regexp: {
                                       regexp: /^([\w-\.]+@([\w]+\.)+[\w-]{2,4})?$/,
                                       message: "Invalid email address"
                                    }, 
                        }
                    },
                }
            });
    }
         if($("#changepswd").length)
    {
            $("#changepswd").bootstrapValidator({        
                message: 'This value is not valid',
              
                fields: {
                  'cur_pswd': {
                        validators: {
                            notEmpty: {
                                message: 'Current Password should not be empty'
                                      },
                             
                                   }
                             },
                  'password': {
                        validators: {
                            notEmpty: {
                                message: 'The Password should not be empty'
                            },
                            stringLength: {
                                min: 6,
                                max: 10,
                                message: 'The password must be more than 6 characters and less than 10 characters'
                            },
                        }
                    },
                  'password_confirmation': {
                              validators: {
                              notEmpty:   {
                                message: 'The Confirm Password should not be empty'
                                           },
                                identical: {
                                        field: 'password',
                                        message: 'The password and its confirm password are not the same'
                                           }                    
                         }
                                       },
                    }
            });
    }

});

if($('#profile_step1').length)
{
    function check_step1()
    {
         if($('[name="indv[]"]:checked').length=='' && $('[name="org[]"]:checked').length=='')   
         {
            $("#profile_step1_errors").html('Please Select atleast one category');
            return false;
         }   
         else if($('[name="indv[]"]:checked').length && $('[name="org[]"]:checked').length)   
         {
            $("#profile_step1_errors").html('Please Deselect Individual Or Organization');
            return false;
         }   
         else
         {
            $("#profile_step1_errors").html('');
         }
    }
    
  $.expr[':'].contains = function (n, i, m) {
        return jQuery(n).text().toUpperCase().indexOf(m[3].toUpperCase()) >= 0;
    };

    $(document).on('keyup','.talent_search',function(){
      search_key = $(this).val();
      if(search_key)
      {
        $('.talent_categories').hide();
        $('.talent_categories:contains("'+search_key+'")').show();
        $('.talent_categories.active').show();
      } 
      else
         $('.talent_categories').show();
    });

    $(document).on('keyup','.organization_search',function(){
      search_key = $(this).val();
      if(search_key)
      {
        $('.organization_categories').hide();
        $('.organization_categories:contains("'+search_key+'")').show();
        $('.organization_categories.active').show();
      } 
      else
         $('.organization_categories').show();
    });

}
if($("#profile_save_type").length)
{
    $(document).on('click','#goto_profile',function(){
        $('#profile_save_type').val('finish');
    });

    $(document).on('click','#profile_next',function(){
        $('#profile_save_type').val('next');
    });
}
/*if($("#dob").length)
{
   $("#dob").mask("99/99/9999");
}
*/
if($("#skillForm").length)
{
    $("#skillForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'skills': {
                validators: {
                    notEmpty: {
                        message: 'The Skills should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The skills must be 255 characters'
                    },
                }
            },
        }
    });
}
if($("#experienceForm").length)
{
    $("#experienceForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'exp_company': {
                validators: {
                    notEmpty: {
                        message: 'The Name of company/project/collective... should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The Name of company/project/collective... must be 255 characters'
                    },
                }
            },
          'exp_from_mm': {
                validators: {
                    notEmpty: {
                        message: 'The From Month should not be empty'
                    },
                }
            },
          'exp_from_yy': {
                validators: {
                    notEmpty: {
                        message: 'The From Year should not be empty'
                    },
                }
            },
          
        }
    });
}
if($("#educationForm").length)
{
    $("#educationForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'edu_company': {
                validators: {
                    notEmpty: {
                        message: 'The Name of company/project/collective... should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The Name of company/project/collective... must be 255 characters'
                    },
                }
            },
          'edu_from_mm': {
                validators: {
                    notEmpty: {
                        message: 'The From Month should not be empty'
                    },
                }
            },
          'edu_from_yy': {
                validators: {
                    notEmpty: {
                        message: 'The From Year should not be empty'
                    },
                }
            },
          
        }
    });
}

if($("#awardsForm").length)
{
    $("#awardsForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'aw_company': {
                validators: {
                    notEmpty: {
                        message: 'The Name of company/project/collective... should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The Name of company/project/collective... must be 255 characters'
                    },
                }
            },
          'aw_from_mm': {
                validators: {
                    notEmpty: {
                        message: 'The Award Month should not be empty'
                    },
                }
            },
          'aw_from_yy': {
                validators: {
                    notEmpty: {
                        message: 'The Award Year should not be empty'
                    },
                }
            },
        }
    });
}

if($("#locationForm").length)
{
    $("#locationForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'loc_name': {
                validators: {
                    notEmpty: {
                        message: 'The Name should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The Name must be 255 characters'
                    },
                }
            },
          'loc_street': {
                validators: {
                    notEmpty: {
                        message: 'The Street should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The Street must be 255 characters'
                    },
                }
            },
          'loc_city': {
                validators: {
                    notEmpty: {
                        message: 'The City should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The City must be 255 characters'
                    },
                }
            },
          'loc_country': {
                validators: {
                    notEmpty: {
                        message: 'The Country should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The Country must be 255 characters'
                    },
                }
            },
        },
    });
}

if($("#influenceForm").length)
{
    $("#influenceForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'influence': {
                validators: {
                    notEmpty: {
                        message: 'The influence should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The influence must be 255 characters'
                    },
                }
            },
        }
    });
}

 
   if($("#inquiry_form").length)
   {
       $("#inquiry_form").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'company': {
                validators: {
                    notEmpty: {
                        message: 'The company should not be empty'
                    },
                  
                }
            },
            'type_inq': {
                validators: {
                    notEmpty: {
                        message: 'Type of Inquery should not be empty'
                    },
                  
                }
            },
        }
    });
       
   }
   
if($("#interestsForm").length)
{
    $("#interestsForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'interests': {
                validators: {
                    notEmpty: {
                        message: 'The interests should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The interests must be 255 characters'
                    },
                }
            },
        }
    });
}

if($("#nameForm").length)
{
    $("#nameForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'name': {
                validators: {
                    notEmpty: {
                        message: 'The name should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The name must be 255 characters'
                    },
                }
            },
        }
    });
}

if($("#cityForm").length)
{
    $("#cityForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'city': {
                validators: {
                    notEmpty: {
                        message: 'The city should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The city must be 255 characters'
                    },
                }
            },
        }
    });
}

if($("#urlForm").length)
{
    $("#urlForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'url': {
                validators: {
                    notEmpty: {
                        message: 'The url should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The url must be 255 characters'
                    },
                }
            },
        }
    });
}

if($("#whyusForm").length)
{
    $("#whyusForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'whyus': {
                validators: {
                    notEmpty: {
                        message: 'The why us should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The why us must be 255 characters'
                    },
                }
            },
        }
    });
}

if($("#aboutusForm").length)
{
    $("#aboutusForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'aboutus': {
                validators: {
                    notEmpty: {
                        message: 'The about us should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The about us must be 255 characters'
                    },
                }
            },
        }
    });
}
       if($("#contactForm").length>0)
    {
            $("#contactForm").bootstrapValidator({        
                message: 'This value is not valid',
                feedbackIcons: {
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {
                  'firstname': {
                        validators: {
                            notEmpty: {
                                message: 'The First Name should not be empty'
                            }
                        }
                    },
                  'lastname': {
                        validators: {
                            notEmpty: {
                                message: 'The Last Name should not be empty'
                            },
                        }
                    },
                  
                  'email': {
                        validators: {
                            notEmpty: {
                                message: 'The Email should not be empty'
                                      },
                                            regexp: {
                                       regexp: /^([\w-\.]+@([\w]+\.)+[\w-]{2,4})?$/,
                                       message: "Invalid email address"
                                    }, 


                                }
                       },
                  'phone': {
                        validators: {
                            notEmpty: {
                                message: 'The Phone Number should not be empty'
                            },
                            stringLength: {
                                min: 8,
                                max: 16,
                                message: 'The Phone must be more than 8 characters and less than 16 characters'
                            },
                                                      regexp: {
                                                                    regexp: /^[1-9()+ -][0-9()+ -]{0,15}$/,
                                                                    message: "Invalid Phone number"
                                                                },
                        }
                    },
                  'company': {
                        validators: {
                            notEmpty: {
                                message: 'The Company should not be empty'
                                       },
                                                
                      }
                           },
                'state': {
                    validators: {
                        notEmpty: {
                            message: 'The  State should not be empty'
                                   },

                              }
                      },
                }
            });//.find('[name="dob"]').mask('99/99/9999');
//            }).find('[name="dob"]').mask('99/99/9999');
    }
   
if($("#contactinfoForm").length)
{
    $("#contactinfoForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'contact_info': {
                validators: {
                    notEmpty: {
                        message: 'The contact info should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The contact info must be 255 characters'
                    },
                }
            },
        }
    });
}

if($("#pservicesForm").length)
{
    $("#pservicesForm").bootstrapValidator({        
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
          'products_services': {
                validators: {
                    notEmpty: {
                        message: 'The description should not be empty'
                    },
                    stringLength: {
                        max: 255,
                        message: 'The description must be 255 characters'
                    },
                }
            },
        }
    });
}

if($("#talent_vid_from").length)
{
    
     $("#talent_vid_from").bootstrapValidator({
        fields: {
          'name': {
                validators: {
                    notEmpty: {
                        message: 'The title should not be empty'
                    },
                    stringLength: {
                        max: 100,
                        message: 'The title must be 100 characters'
                    },
                }
            },
            
          'image': {
                validators: {
                     notEmpty: {
                        message: 'The Video should not be empty'
                    },
                   file: {
                        extension: 'avi,mp4,mkv,flv,mov',
                        //type: 'application/avi',
                        message: 'Please choose a valid file.'
                    }
                }
            },
        }
     });
    
}

 if($("#pictureForm").length)
    {
            $("#pictureForm").bootstrapValidator({        
                message: 'This value is not valid',
               
                fields: {
                  'name': {
                        validators: {
                            notEmpty: {
                                message: 'The Title should not be empty'
                            },
                        }
                    },
                  'image': {
                        validators: {
                            file: {
                                extension: 'jpeg,jpg,png,gif,bmp',
                                type: 'image/gif,image/jpeg,image/png,image/bmp',
                                message: 'The image must be a file of type: jpeg, png, bmp, gif. '
                                 },
                            notEmpty: {
                                message: 'The Image should not be empty'
                            },
                        }
                    },
                }
            });
    }
    
 
       if($("#resumesForm").length)
    {
            $("#resumesForm").bootstrapValidator({        
                message: 'This value is not valid',
               
                fields: {
                  'name': {
                        validators: {
                            notEmpty: {
                                message: 'The Title should not be empty'
                            },
                        }
                    },
                  'attachment': {
                        validators: {
                            file: {
                                extension: 'doc,docx,pdf,rtf,xlsx,xls,txt',
                                type: 'application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/rtf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,text/plain',
                                 maxSize: 5*1024*1024,
                                message: 'The Resume must be a file of type: doc,docx,pdf,rtf,xlsx,xls,txt. '
                                 },
                            notEmpty: {
                                message: 'The Resume should not be empty'
                            },
                        }
                    },
                }
            });
    }
    if($("#account_settings").length)
    {
            $("#account_settings").bootstrapValidator({        
                message: 'This value is not valid',
               
                fields: {
                  'name': {
                        validators: {
                            notEmpty: {
                                message: 'The Name should not be empty'
                            },
                        }
                    },
                  'city': {
                        validators: {
                            notEmpty: {
                                message: 'The City should not be empty'
                            },
                        }
                    },
                  'dob': {
                        validators: {
                            notEmpty: {
                                message: 'Date of Birth should not be empty'
                            },
                        }
                    }, 
                 'gender': {
                        validators: {
                            notEmpty: {
                                message: 'The Gender should not be empty'
                            },
                        }
                    },
               'years_in_business':{
                        validators: {
                            notEmpty: {
                                message: 'The Years In Business should not be empty'
                            },
                            
                        } 
                    },
                'fb_id': {
                        validators: {
                            notEmpty: {
                                message: 'The Facebook ID should not be empty'
                            },
                        }
                    },
                'linked_id': {
                        validators: {
                            notEmpty: {
                                message: 'The LinkedIn ID should not be empty'
                            },
                        }
                    },
                
                }
            });
    }