First off just wanted to say how much I'm enjoying playing with Juice UI - really impressive and easy to use for a back-end developer like me who's never been that comfortable with client-side stuff.
 
I'm trying to figure out how I can assign a function to my dialog OK button at runtime. I have a reusable "Are you sure..." dialog, where I want to pass different messages and different confirmation functions. Is the best way to use jQuery .each on the button classes, find the match based on button caption, and then assign a click function?