This code creates a question prompt that will direct users to either LibChat or LibAnswers depending on whether the LibChat instance is online or not. Currently there is no way to start a chat in LibAnswers with a prepopulated first questions without using the LibChat widget. I'm putting this code up so they can tinker with it and hopefully add that functionality to the API. :)
You can see this live at http://mreidsma.github.io/chat_widget
Feel free to get in touch: [email protected].