"The short (not recommend) answer is to rename all of the variable and function names in the second instance of the
script thus preventing them from conflicting.
The longer (recommend) answer would be to rewrite the script in an object-oriented fashion. The reason you'd do it like this
is because this is inherently how object-oriented code is intended to work: with multiple instances. This is true because
when you call the constructor for that object, all variables become internal properties of it therefore completely removing
the chance of anything conflicting between the two scripts. Also note by making it an object you can have as many instances
of it on a page as you'd like — it's not only limited to two."