// JavaScript Document
/**
* Autor  : Alan Unger
* e-mail : alan.unger@gmail.com
* date   : 22.11.2007
**/

$(document).ready(function() {
   ToolTips();
 });

function ToolTips() {
  var Tags = new Array('input','select','textarea');
	    for (var i=0; i<Tags.length; i++) {
            var objeto = document.getElementsByTagName(Tags[i]);
           	//Percorrendo as tags 
		    for (var j=0; j<objeto.length; j++) {
				if (objeto[j].getAttribute("title") != null && objeto[j].getAttribute("title") !=""){
					//retirando o título
					 objeto[j].removeAttribute("title");					
					//Adicionando o evento Focus				
					 objeto[j].onfocus = function () {
					  this.parentNode.getElementsByTagName("span")[0].style.display = "block";
					}
					//Adicionando o evento Blur
					objeto[j].onblur = function () {
					  this.parentNode.getElementsByTagName("span")[0].style.display = "none";
					}
				}
            }
        }
	}


