It's a combination of magic in juice.js, JuiceWidgetState, JuiceScriptControl and WidgetHashClientStateJavaScriptConverter. We're really not using any of the methods outlined in that link, but we are using add_endRequest to ensure some jquery ui files are loaded.
One of the great things about Juice UI is that it's completely open source. We encourage everyone to freely examine the code. You can get to it from the link I posted earlier, or directly here:
http://github.com/appendto/juiceui.
Cheers