bash, refactoring and jPlayer