Closure Compiler can not compile javascript embedded in HTML (https://developers.google.com/closure/compiler/faq#tags)
As burnttoast11 mentioned, use exporting to preserve javascript object names you need to use in the HTML javascript (https://developers.google.com/closure/compiler/docs/api-tutorial3#export).
Lastly, the more code you can move out of HTML and into separate Javascript files, the more work closure compiler can do for you.