Move to jQuery plugin.