Js cleanup

cleaned up javascript. toggling still worked for me

however i found no places where `folded_reveal` and `folded_hide` variables are actually used, if they are needed externally outside this plugin then the 'var' directive needs to be removed to make theb "public" again