wrapping and putting javascript file to above head tag