In general, if you want to embed your scripts, use the
$LAB.queue() syntax. It's mandatory if your scripts depend on drupal.js or jQuery. Don't use the native
Don't use the
document.ready() event, use Drupal behaviors instead. If you prefer to bind to an event, then bind to 'scripts-ready' (a LABjs custom event, fires when all scripts are executed) instead of 'domready'.
The following comment should be added to exclude your inline script from the LAB processing:
// LABjs exclusion