In the jQuery UI framework for Interactions you can do custom functions and they take two parameters \'event\' and \'ui\'. I know it has to be obvious somewhere but I canno
this is a link for the event object http://api.jquery.com/category/events/event-object/
for UI object it depends on the UI that you are using check this http://docs.jquery.com/UI/