
// Add :hover functionality for dropdown menu in IE6
sfHover = function() {
  var sfEls = document.getElementById("nav").getElementsByTagName("LI");
  for (var i=0; i<sfEls.length; i++) {
    sfEls[i].onmouseover=function() {
      this.className+=" sfhover";
    }
    sfEls[i].onmouseout=function() {
      this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    }
  }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


function showAnswer(id) {

	// Reset bubble styles
	$("#questions").find(".question1Over").removeClass("question1Over").addClass("question1");
	$("#questions").find(".question2Over").removeClass("question2Over").addClass("question2");
	$("#questions").find(".question3Over").removeClass("question3Over").addClass("question3");

	// Set requested question buble style
	var question = $("#questions").find("#question"+id)
	if (question.hasClass("question1")) question.removeClass("question1").addClass("question1Over");
	if (question.hasClass("question2")) question.removeClass("question2").addClass("question2Over");
	if (question.hasClass("question3")) question.removeClass("question3").addClass("question3Over");

	// Hide all the answers
	$("#answers").find("li").hide();

	// Show requested answer
	$("#answer"+id).show();

}

function showDescription(id) {

	// Reset bubble styles
	$("#people").find(".bubble1-active").removeClass("bubble1-active").addClass("bubble1");
	$("#people").find(".bubble2-active").removeClass("bubble2-active").addClass("bubble2");

	// Set requested question buble style
	var person = $("#people").find("#person"+id)
	if (person.hasClass("bubble1")) person.removeClass("bubble1").addClass("bubble1-active");
	if (person.hasClass("bubble2")) person.removeClass("bubble2").addClass("bubble2-active");

	// Hide all the answers
	$("#descriptions").find("li").hide();

	// Show requested answer
	$("#description"+id).show();

}
