Thinly slice the onions using a mandoline, and divide the onions between 2 (16 oz.) jars or 3 (10 oz.) jars. Place the garlic and peppercorns in each jar. Heat the vinegar, water, sugar, and salt in a medium saucepan over medium heat. Stir until the sugar and salt dissolve (about 1 minute). Let cool and pour over the onions. Wipe the rim of the jar, and place the flat lid and screw band tightly on the jar. Process in water bath for 10-20 minutes. Allow to cool and seal. Your onion will be ready to eat once they have burned bright pink.