fixed configuration and popup variables

Added a few config options and checked to make sure they are being
passed through to the java script.  Changed so that the items below the
image in the popup are not hardcoded. Added a bit of documentation.