add footer scripts function