js: use constant for namespace events
js: save bytes
add license
js: add custom css error class
js: add custom error function
js: fix tests
js: use $.each instead of for loop
js: display server errors (bad request)