                var colors = ['red','gray','red','gray','red'];
                var reCls = /^.([^:#\[\.,]*)$/
                var reId = /^#([\w-]+)/;
                function get(selector, context) {
                        if(typeof selector == 'string') {
                                var match = reCls.exec(selector);
                                if(match) {
                                        var parent = context || document, list = parent.getElementsByTagName('*');
                                        var elems = [];
                                        for(var n = list[0], i = 0; n; n = list[i++]) {
                                                if((' '+n.className + ' ').indexOf(' ' + match[1] + ' ') >= 0) {
                                                        elems.push(n);
                                                }
                                        }
                                        return elems;
                                } else {
                                        match = reId.exec(selector);
                                        if(match && match[1]) {
                                                return [document.getElementById(match[1])];
                                        }
                                }
                        } else {
                                return [selector];
                        }
                };
                
                function attr(e, n, v) {
                        var value = v || null;
                        
                        if(value === null) {
                                v = e.getAttribute(n, 2);
                                
                                if(!v) {
                                        switch(n) {
                                                case 'class':
                                                        return e.className;
                                                default:
                                                        v = e.attributes[n];
                                                        v = v && v.nodeValue ? v.nodeValue : v;
                                        }
                                }
                                
                                return (v && v != '') ? '' + v : "";
                        } else {
                                switch(n) {
                                        case 'class':
                                                e.className = v;
                                                break;
                                        case 'style':
                                                e.style.cssText = v;
                                                break;
                                        default:
                                                e.setAttribute(n, ''+v, 2);
                                                break;
                                }
                        }
                };
                
                function randomize( colors ) {
                        var random = Math.ceil(10 * Math.random());
                        var idx = random % colors.length;
                        return colors[idx];
                }
                
                function blink( index ) {
                        var elems = get('.blink-text'), span, rand = 0, color;
                        
                        if(colors.length - 1 <= index) index = 0;
                        color = colors[index];
                        for(var i = 0; i < elems.length; i++) {
                                span = elems[i], rand = parseInt(attr(span, 'rand'));
                                if(rand) {
                                        attr(span, 'style', 'color: ' + randomize(colors));
                                } else {
                                        attr(span, 'style', 'color: ' + color);
                                }
                        }
                        setTimeout(function() {
                                blink(index + 1);
                        }, 1000);
                };
                
                window.onload = function() {
                        blink(0);
                };
