Refactor megamind into a jQuery plugin