seperate js file for media