[#909] moved bac JS libraries from footer to head

@KasperBrandt please check