loader image and moving custom js to separate file