
$(document).ready(function() {
	var urlPage = " "+window.location.href;
	var defaultAction = true;
	$('ul.quicklinks a').hover(function() {
		$(this).parents("li").css("background", "#fff");
	}, function() {
		$(this).parents("li").css("background", "");
	});
	if(!urlPage.match(/\/leadership\//)) {
		var email = document.getElementById('email');
		$(document.body).click(function() {
			if(defaultAction) {
				if (email.value == "") {
					email.value = email.defaultValue;
				}
			}
			defaultAction = true;
		});
		email.value = email.defaultValue;
		email.onclick=function() {
			if (email.value == email.defaultValue) {
				email.value='';
				defaultAction = false;
			}
		}
	}
	var quicks = $('#x a');
	for(var i = 0; i < quicks.length; i++) {
		if(quicks[i].href == window.location) {
			$('#x li').eq(i).addClass("quickon");
		}
	}
	if ($("#section").length > 0) { //first check if #section is present
		var section = $('#section a');
		for(var i = 0; i < section.length; i++) {
			if(section[i].href == window.location) {
				$('#section a').eq(i).addClass("active");
			}
		}
	}
});
