A Los Angeles County Superior Court judge has extended the custody agreement that gives Britney Spears and ex-husband Kevin Federline joint custody of their two children, Sean Preston and Jayden James.

According to TMZ, the order, which was originally put in place to cover Spears' Circus tour, will likely last through the end of the year. Under the terms of the deal, Spears — who at one point had lost custody of the children due to her chaotic personal life — was allowed to travel with the boys while on tour, provided she make arrangements for Federline's lodging if he chose to accompany them.

Unnamed sources told TMZ that the sealed order is very detailed, but that it reportedly provides Spears with a minimum of 50/50 custody, or more at times. In return, Federline gets $20,000 a month in child support, as well as $20,000-$25,000 additional a month when the boys travel outside of California. The judge will reevaluate the custody arrangements at the end of the year, but the joint custody appears to be the plan going forward.

While Spears has been traversing the globe in support of her Circus album — which will travel to Australia in November — a noticeably heftier Federline has signed up to appear on VH1's "Celebrity Fit Club." Reportedly joining him on the show will be singer Bobby Brown, Federline's ex-girlfriend Shar Jackson and former "Baywatch" star Nicole Eggert.