make an instanceable version of mj-single.js