A war of attrition with endogenous effort levels