window.onload = function() {
//object detection to disable older browsers
if (!document.getElementById) {return;}

//create references to single elements that will change
var right = document.getElementById('rightside');
var logo = document.getElementsByTagName('h1')[0];
var headline = document.getElementsByTagName('h2')[0];
var faqnav = document.getElementById('current');

//assign event handlers
right.onmouseover = changeRightBg
right.onmouseout = rightBgWhite
headline.onmouseover = newHdNavBg
headline.onmouseout = oldHdNavBg
logo.onclick = logoBg

//function runs when div rightside is moused over
function changeRightBg() {
  //add green background to div rightside
  right.className += ' green';
}

//function runs when div rightside is moused off
function rightBgWhite() {
  //take off green background to div rightside
  right.className = '';
}
 
//function runs when h2 headline is moused over
function newHdNavBg() {
  //add green background to h2
  headline.className += ' green';
  //add green background to FAQ nav item
  faqnav.className += ' green';
}

//function runs when h2 headline is moused off
function oldHdNavBg() {
  //take off green background to h2
  headline.className = '';
  //take off green background to FAQ nav item
  faqnav.className = '';
}

//function runs when the logo div is clicked
function logoBg() {
  //change logo background to pink
  logo.className += ' pink';
}

}