Interfacial anisotropy and magnetic transition of cobalt films on Cu(111)