Declared global variable and moved charts js methods to youtubeAPI.js