fix the header javascript issue by puttin the include in the footer