Communicating with Drupal from Javascript/Jquery (Drupal 7)
You can send variables to your JS with drupal_add_js() in the $settings array.

An other way (the dirty one) to do it would be to print your data in a hidden div and read it with your JS. (don't hesitate to ask if you need code to do it)

Have fun !