/*
 * Hover elements for th search form;
 */

window.onload = function() {
  applyDefaultValue(document.getElementById('s'), 'Search');
}

function applyDefaultValue(elem, val) {
  elem.style.color = '#666666';
  elem.value = val;
  elem.onfocus = function() {
    if(this.value == val) {
      this.style.color = '';
      this.value = ''; //On focus, make blank;
    }
  }
  elem.onblur = function() {
    if(this.value == '') {
      this.value = val; //If it's not in focus, use declared value;
    }
  }
}

