A triple potential model for the structural transition in Cu2Mo6S8