$(document).ready(function() {

	//allVacancies Code ///////////////////////////////////////////////////////////////////////////////////
	
	$('.vacancyCategories').hover(function(){  
         $(".byBox", this).stop().animate({bottom:'0px'},{queue:false,duration:160});
	   }, function() {  
         $(".byBox", this).stop().animate({bottom:'-90px'},{queue:false,duration:160}); 	
	});
	//end of all Vacancies code ///////////////////////////////////////////////////////////////////////////

   //Search by Category Code ///////////////////////////////////////////////////////////////////////////////
   // Info popover on Categories page - looks after mouseover for showing additional Job Category Info
   $("#CatList a").hover(
	   function() {
		  $("#bgFade").show().fadeTo("slow", 0.9);	
		  $("#categoryInfopopOver").fadeIn("slow");
		  $("#categoryInfopopOver").html(this.name);
	   },
	   function() {
		 $("#categoryInfopopOver").hide();
		  $("#bgFade").hide();
	   }
   );
 
   //Job Display GoogleMap Reveal
	$(".showMap").click(function() {
	 var mapName = this.hash;
		
	  $(mapName).slideDown('slow');
          
		  //specific code for Search by location map
		  if(mapName == "#mapByLocation"){			  
 	      $(".showLocationsList").toggle();
		  $("#locationList").slideUp();
		  $("#mapToggle").css('border-top', '1px solid #7ED1E1');
		  }
		  
		  $(".showMap").hide();
		  $(".hideMap").show();
           return (false);
        });

        $(".hideMap").click(function() {
          var mapName = this.hash; 
		   $(mapName).slideUp();
			$(".hideMap").hide();
            $(".showMap").show();
			
		//specific code for Search by location map
		 if(mapName == "#mapByLocation"){			  
  	      $(".showLocationsList").hide();
		  $("#locationList").slideDown();
		  $("#mapToggle").css('border-top', 'none');
		 }
		  return (false);
          });
		
		
		$(".showLocationsList").click(function() {	
          $("#locationList").slideDown();
		  $(".showLocationsList").hide();
			$(".hideMap").hide();
			$(".showMap").show();
			 $("#mapByLocation").slideUp();
			 $("#mapToggle").css('border-top', 'none');
            return (false);
        });

// End of Search by Category Code////////////////////////////////////////////////////////////////////////

//Search by Company Code ///////////////////////////////////////////////////////////////////////////////
//$(".atGlance").css("color", "#fff"); 
$(".stats").css("color", "#fff"); 

/*$(".atGlance").FontEffect({ 
		outline:true,
		outlineWeight :2,
		outlineColor1 :"#005581"
		})
*/
$(".stats").FontEffect({ 
		outline:true,
		outlineWeight :1,
		outlineColor1 :"#00B6DD"
		})


// End of Search by Company 



}); // end of document ready

$(document).unload( function () {
	
	// unload GoogleMap							  
	GUnload();
	  
} );

//General functions for careers area

function resizeCareersMap() {

	if (is.ns) {
	  w = window.innerWidth;
	  h = window.innerHeight;
	}
	if (is.ie) {
		if (document.compatMode && document.compatMode != "BackCompat") {
			w=document.documentElement.clientWidth;
			h=document.documentElement.clientHeight;
		} else {
			w=document.body.clientWidth;
			h=document.body.clientHeight;
		}
	}
	
	document.getElementById('map').style.height='420px';

}

