spin.js partial implementation