(b) Upon any application to enforce, annul or modify an order or judgment for alimony, maintenance, distributive award, distribution of marital property or for custody, visitation, or maintenance of a child, made as in section two hundred thirty-six or section two hundred forty of this article provided, or upon any application by writ of habeas corpus or by petition and order to show cause concerning custody, visitation or maintenance of a child, the court may direct a spouse or parent to pay counsel fees and fees and expenses of experts directly to the attorney of the other spouse or parent to enable the other party to carry on or defend the application or proceeding by the other spouse or parent as, in the court's discretion, justice requires, having regard to the circumstances of the case and of the respective parties. There shall be a rebuttable presumption that counsel fees shall be awarded to the less monied spouse. In exercising the court's discretion, the court shall seek to assure that each party shall be adequately represented and that where fees and expenses are to be awarded, they shall be awarded on a timely basis, pendente lite, so as to enable adequate representation from the commencement of the proceeding. Applications for the award of fees and expenses may be made at any time or times prior to final judgment. Both parties to the action or proceeding and their respective attorneys, shall file an affidavit with the court detailing the financial agreement, between the party and the attorney. Such affidavit shall include the amount of any retainer, the amounts paid and still owing thereunder, the hourly amount charged by the attorney, the amounts paid, or to be paid, any experts, and any additional costs, disbursements or expenses. Any applications for fees and expenses may be maintained by the attorney for either spouse in counsel's own name in the same proceeding. Payment of any retainer fees to the attorney for the petitioning party shall not preclude any awards of fees and expenses to an applicant which would otherwise be allowed under this section.
(c) In any action or proceeding for failure to obey any lawful order compelling payment of support or maintenance, or distributive award the court shall, upon a finding that such failure was willful, order respondent to pay counsel fees to the attorney representing the petitioner.
(d) The term "expenses" as used in subdivisions (a) and (b) of this section shall include, but shall not be limited to, accountant fees, appraisal fees, actuarial fees, investigative fees and other fees and expenses that the court may determine to be necessary to enable a spouse to carry on or defend an action or proceeding under this section. In determining the appropriateness and necessity of fees, the court shall consider: 1. The nature of the marital property involved; 2. The difficulties involved, if any, in identifying and evaluating the marital property; 3. The services rendered and an estimate of the time involved; and 4. The applicant's financial status.