Cody Summer sells tires for tractor trailers. He earns 4.5 percent commission on the first $6,000, 8 percent on the next $6,000, and 12 percent on sales over $12,000. Last month he sold $18,000 worth of tires. What was his total commission?