$(document).ready(function(){
	Ahni.init(); 			
});

Ahni = new function(){
  
  var self = this;
  
  this.init = function(){
    $('#employee-login').click(self.empLoginClick);
    $('#find-a-provider').submit(self.findProviderSubmit);
    $('#sub-navigation li:nth-child(11)').css('border','none');
  };
  
  this.empLoginClick = function(){
    window.open($(this).attr('href'), "loginwindow", "status=0,toolbar=0,width=375,height=250");
    return false;
  };
  
  this.findProviderSubmit = function(){
    var valid = false;
    $(this).find('input[type=text], #specialty').each(function(){
      if($(this).val() != ""){
        valid = true;
      }
    });
    if(!valid){
        window.alert("Please select at least one option to search");
        return false;
    }
  };
  
};
