fix browser load errors from image src
split js file