fixed pwp js variables.

consolidate js variables inside a single object, cleaned js root path
variable when qtranslate is in use. fix #6 fix #7