// JavaScript Document

$(document).ready(function() {
	var b = navigator.userAgent.toLowerCase();
	// Figure out what browser is being used
	jQuery.browser = {
					safari: /webkit/.test(b),
					opera: /opera/.test(b),
					msie: /msie/.test(b) && !/opera/.test(b),
					msie6: /msie 6.0/.test(b) && !/opera/.test(b),
					mozilla: /mozilla/.test(b) && !/(compatible|webkit)/.test(b)
	};



	$("#nav-culture").mouseover(function(){
		if ($.browser.msie6) {
			$(this).css({"background": "url(../images/navCulture.jpg) no-repeat"});
		} else {
			$(this).css({"background-position": "0 -57px"});
		}
	});
	
	$("#nav-culture").mouseout(function(){
		if ($.browser.msie6) {
			$(this).css({"background": "url(../images/navCulture.jpg) no-repeat"});
		} else {
			$(this).css({"background-position": "0 0"});
		}
	});
	
	$("#nav-benefits").mouseover(function() {
		if ($.browser.msie6) {
			$(this).css({"background":"url(../images/navBenefits.jpg) no-repeat"});
		} else {
			$(this).css({"background-position":"0 -57px"});	
		}
	});
	
	$("#nav-benefits").mouseout(function(){
		if ($.browser.msie6) {
			$(this).css({"background": "url(../images/navBenefits.jpg) no-repeat"});
		} else {
			$(this).css({"background-position": "0 0"});
		}
	});
	
	$("#nav-opps").mouseover(function() {
		if ($.browser.msie6) {
			$(this).css({"background":"url(../images/navOpportunities.jpg) no-repeat"});
		} else {
			$(this).css({"background-position":"0 -57px"});	
		}
	});
	
	$("#nav-opps").mouseout(function(){
		if ($.browser.msie6) {
			$(this).css({"background": "url(../images/navOpportunities.jpg) no-repeat"});
		} else {
			$(this).css({"background-position": "0 0"});
		}
	});
	
	$("#nav-people").mouseover(function() {
		if ($.browser.msie6) {
			$(this).css({"background":"url(../images/navPeople.jpg) no-repeat"});
		} else {
			$(this).css({"background-position":"0 -57px"});	
		}
	});
	
	$("#nav-people").mouseout(function(){
		if ($.browser.msie6) {
			$(this).css({"background": "url(../images/navPeople.jpg) no-repeat"});
		} else {
			$(this).css({"background-position": "0 0"});
		}
	});
	
	$("#nav-search").mouseover(function() {
		if ($.browser.msie6) {
			$(this).css({"background":"url(../images/navsearchJobs.jpg) no-repeat"});
		} else {
			$(this).css({"background-position":"0 -57px"});	
		}
	});
	
	$("#nav-search").mouseout(function(){
		if ($.browser.msie6) {
			$(this).css({"background": "url(../images/navsearchJobs.jpg) no-repeat"});
		} else {
			$(this).css({"background-position": "0 0"});
		}
	});

});
