A couple of possible solutions:
A) You mustn't rename files ;) Once you rename the jpg or the js file it won't work anymore. The only thing you can rename is the html file, the other have to stay untouched.
B) Some browsers like Internet Explorer and chrome don't seem to allow running the js script on a local machine (=> panorama is black). Once it's uploaded to a web server it's all fine and all browsers show the content (Firefox works both ways, local and on web). Don't ask me why, I'm not a web developer :D
C) Make sure your image is valid and doesn't have a corrupt header (or some other format renamed to .jpg). I also don't know if other formats than jpg work with the js script.