A garden is in the shape of a square with a perimeter of 68 feet. The garden is surrounded by two fences. One fence is around the perimeter of the garden, whereas the second fence is 2 feet from the first fence on the outside. If the material used to build the two fences is $1.37 per foot, what was the total cost of the fences?