Duplicate Code Button Function

Hello, I’m taking a code provided by Subbly which allows a button to open up a Subbly shop window within the website I have; my question is, I have two other buttons and I want the same function, however when I copy the code and apply the button function to the copied code, it does not work. What am I doing wrong?

Please add your code here into a CODE-BLOCK.