ajax for graph and switch in static page for home