View gist:151528
(function() {
var focusInHandler = function(e) { e.findElement().fire("focus:in") };
var focusOutHandler = function(e) { e.findElement().fire("focus:out") };
if (document.addEventListener) {
document.observe("focus", focusInHandler, true);
document.observe("blur", focusOutHandler, true);
} else {
document.observe("focusin", focusInHandler);
document.observe("focusout", focusOutHandler);