Moving togglePause function to index.html in order to resolve link issue.