In a medium sauce pan add all of the ingredients, except the onions and garlic. Bring to a boil and remove from heat. While heating the brine, slice the onions (onions should be sliced thinly). Place a clove of garlic in each jar. Pack the onions into a jar or jars, depending on the size of your jars. It is fine to pack the onions quite tightly into the jars. Pour the hot brine over the onions. Let the jars of onions set on the counter for 10 hours with the tops open.