Any motion to suppress as evidence any tangible or intangible thing obtained as a result of an unlawful search or seizure shall be heard prior to the attachment of jeopardy and shall be heard at least five judicial days after receipt of notice by the people unless the people are willing to waive a portion of this time.
If the court grants a motion to suppress prior to the attachment of jeopardy over the objection of the people, the court shall enter a judgment of dismissal as to all counts of the petition except those counts on which the prosecuting attorney elects to proceed pursuant to Section 701.
If, prior to the attachment of jeopardy, opportunity for this motion did not exist or the person alleged to come within the provisions of the juvenile court law was not aware of the grounds for the motion, that person shall have the right to make this motion during the course of the proceeding under Section 701.
Ca. Welf. and Inst. Code § 700.1