re organize index.js

document onready
Merge branch 'master' of https://github.com/saharrehani/Pinster

Conflicts:
	www/js/index.js