added js to see if moment and jquery are defined