#191 initial fix to js files

#191 - initial fix to js files, however, jQuery complains that an obj is undefined, no clue why yet