Layoff/resignation while having a valid H1B

Currently my wife and me both have H1b visa. My wife intends to take some time off and move to a H4 status and after some time start with a new employer. I had following questions:

  1. Since I am on H1B too, does she need to resign after filing for a H4 visa or can she file for it once she has resigned from the current company

  2. When she applies for H1b with the new employer again, will her H1 be under the cap count for that year or will she be exempted. Her current H1b is less than 2 years old.

  3. In case of a layoff in her company, will the same situation hold ? For instance, can she file for H4 and then when she finds another job move back to H1, without going through the H1B cap

The plan to take off for a while is due to the recently expanded family. The plan is to take a max of 6 months off.