html/rainbow/rainbow.js
function _attr(el, attr, attrs, i) {
        var result = (el.getAttribute && el.getAttribute(attr)) || 0;

        if (!result) {
            attrs = el.attributes;

            for (i = 0; i < attrs.length; ++i) {
                if (attrs[i].nodeName === attr) {
                    return attrs[i].nodeValue;
                }
            }
        }

        return result;
    }
function _attr(el, attr, attrs, i) {
        var result = (el.getAttribute && el.getAttribute(attr)) || 0;

        if (!result) {
            attrs = el.attributes;

            for (i = 0; i < attrs.length; ++i) {
                if (attrs[i].nodeName === attr) {
                    return attrs[i].nodeValue;
                }
            }
        }

        return result;
    }
function _attr ( el , attr , attrs , i ) { var result = ( el . getAttribute && el . getAttribute ( attr ) ) || 0 ; if ( ! result ) { attrs = el . attributes ; for ( i = 0 ; i < attrs . length ; ++ i ) { if ( attrs [ i ] . nodeName === attr ) { return attrs [ i ] . nodeValue ; } } } return result ; }
cross browser get attribute for an element

@see http://stackoverflow.com/questions/3755227/cross-browser-javascript-getattribute-method

@param {Node} el
@param {string} attr     attribute you are trying to get
@returns {string|number}
cross browser get attribute for an element