function initActive() { _nav = document.getElementsByTagName("ul"); for (i = 0; i < _nav.length; i++) if (_nav[i].className.indexOf("navigation") != -1) { _anchors = _nav[i].getElementsByTagName("a"); for (j = 0; j < _anchors.length; j++) { _anchors[j].onmousedown = function () { this.className += " active" }; _anchors[j].onmouseup = function () { this.className = this.className.replace("active", "") } } } } jQuery(initActive);
