Convert from YUI to jQuery