Using YUI to attach JavaScript event listeners