drupal_to_js() and anonymous functions
This guide can be used as a work around http://echodittolabs.org/blog/2011/04/setting-js-callbacks-drupal-json-and-some-jquery-sauce-jcarousel-controls

We are looking for a generalized solution to this here http://drupal.org/node/1148204