toes.js: add elements sort logic.