Update js/centerboxes.js

clean up code