moving chartcycle trigger functions from host pages to footer, wrapped in php to prevent undefined js variable errors from happening on all other pages. this was needed because original functions were being laoded below footer, and therefore below closing body and html tags