reorder pindex.js functions
add auto-load on page scrolldown