JS reorganization

Had to reorganize due to recursiveness breaking masonry.

Moved js from footer-nojs into functions footer section