The id attribute specifies a unique id for an HTML element, you can't use same id for multiple elements. You need to use unique ids like #location1, #location2 etc. for each element and apply animations separately
There is a small arrow on the left side of the error description which you can use to show more details and find the original pen.js line that causing the error.
So in your case it is this line (TweenMax is not a timeline and you don't need to instantiate it). Besides you don't even use tm1 in your code.
var tm1 = new TweenMax()
The next error was a weird mix of jquery and native js selectors
var main = document.getElementById($("#main"));
should be just this:
var main = $("#main");