What kind of help do you want?
If it is to know how to add the JS script to a js file, and then add this file name into your theme config.php then I have added your JS to the attached file and called it openButton.js. Here are the instructions for adding this into your theme.
directory that you will need to create first.
Then add the following to your theme/yourthemename/config.php where yourthemename is the name of YOUR theme.
Now you can remove the script in the header as the code added to the config will add the JS automatically into the header when the page loads.