jQuery(document).ready(function($) {
  
  $("#nav ul li:has(ul)").hover(
     function(){
    $(this).addClass('ulActive');
  },
  function () {
     $(this).removeClass('ulActive');
   }
  );
  
  
   //  For calendar/lunch menu in sidebar
    $("#menuDiv li.first, #menuDiv li.second").click(function() {
        $("#menuDivBox div").removeClass('active');
		$('#menuDiv li').removeClass('active');
        $(this).addClass("active");
        $("#menuDivBox div:first").hide();
        var selected_tab = $(this).find("a").attr("href");
        $(selected_tab).fadeIn();
        return false;
    });
	$("#menuDiv li.first").click(function() {
		$("#menuDiv #lunch").hide();
	});
  
  //popup
  $(function(){
	$.superbox.settings = {
	closeTxt: "X",
	loadTxt: "Loading...",
	overlayOpacity: ".3"
	};
	$.superbox();
  });

  // login validation
  $('form.required-form').simpleValidate();
  
  //color widgets in blog
  $('.page-template-news-events-template-php .widget:first').css('background','#fcf2b4'); 
  $('.page-template-news-events-template-php .widget:nth-child(2)').css('background','#dbe6f3'); 
  $('.page-template-news-events-template-php .widget:nth-child(3)').css('background','#ecefcf');
  $('.page-template-news-events-template-php .widget:nth-child(4)').css('background','#fcf2b4'); 
  $('.page-template-news-events-template-php .widget:nth-child(5)').css('background','#dbe6f3'); 
  $('.page-template-news-events-template-php .widget:nth-child(6)').css('background','#ecefcf');
  
  //vertically align employees without images 
  if ($('#bio .bio img:not')) {
	$('#bio .bio').wrapInner('<div class="wrap1"><div class="wrap2"></div></div>');
  } 

});

