My question involves a marriage in the state of: CA

I'm going to be getting a divorce and have been doing some reading. We have 2 children, 6yrs and 2 1/2 years, and want to try and minimize the ugliness. I've been reading that mediation is cheaper and best if you can come to an agreement. I know attorney fees can be large...but at the same time want to protect my rights. I've also read about hiring a lawyer during mediation, just to review agreements, etc to make sure things I agree to are reasonable. Any feedback would be appreciated!