(a) Except as provided in subsection (b), when a candidate in lieu of nomination petitions files a declaration of intention to become a candidate for any national, state, county or township office, the accompanying fee shall be in an amount as follows: For the office of United States senator, United States representative from any district or at large, all state offices, and all county offices, where the salary is over $1,000 per year, a sum equal to 1% of one year's salary as determined by the secretary of state for state and national offices, and as determined by the county election officer for county offices. For all county offices where the salary is $1,000 or less, a fee of $5; for a state senator, $75; for representatives, $50; for all township offices, $1. Nothing in this act shall be construed as requiring any fee of a candidate filing a declaration of intention to become a candidate for precinct committeeman or precinct committeewoman. The officer receiving the funds shall turn them over to the state treasurer, if deposited with the secretary of state, or to the county treasurer, if deposited with the county election officer, and the funds shall become a part of the general fund of the respective government. Such declaration shall be prescribed by the secretary of state and shall be attested before a county election officer or deputy county election officer in the case of county and township offices, and before a county election officer, the secretary of state or a deputy of one of such officers in the case of state and national offices, and a notary public in the case of precinct committeemen and committeewomen.