function enablePlaceholders() {

var detect = navigator.userAgent.toLowerCase();

// BAIL OUT IF BROWSER IS HTML5 COMPLIANT
if (detect.indexOf("safari") > 0) return false;
if (detect.indexOf("chrome") > 0) return false;
if (detect.indexOf("opera") > 0) return false;

// FIND ALL INPUTS AND ACTIVATE THE PLACHOLDER IF PRESENT IN NON-HTML5 BROWSERS
var inputs = document.getElementsByTagName("input");
for (var i=0;i<inputs.length;i++) {
  if ((inputs[i].getAttribute("type") == "text" || inputs[i].getAttribute("type") == "password") && (inputs[i].value.length < 1 && inputs[i].value != inputs[i].getAttribute("placeholder"))) {
   if (inputs[i].getAttribute("placeholder") && inputs[i].getAttribute("placeholder").length > 0) {
    inputs[i].value = inputs[i].getAttribute("placeholder");
    inputs[i].style.color = "#999";
    
    inputs[i].onfocus = function() {
     if (this.value == this.getAttribute("placeholder")) {
      this.value = "";
      this.style.color = ""; // THIS SHOULD RESPECT THE COLOR SPECIFIED IN THE CSS
     }
     return false;
    }
    inputs[i].onblur = function() {
     if (this.value.length < 1) {
      this.value = this.getAttribute("placeholder");
      this.style.color = "#999";
      
     }
    }
   }
  }
}
}

// LOAD THIS SHIZ UP
window.onload=function() {
  enablePlaceholders();
}
