fixing js on Foundation Profile