A thermodynamic approach for cooperative phenomena in magnetic materials