refactor uploader into $.widget for better event support