Magnetic fluid: an extended thermodynamic approach