Moved code to new global site.js