almost working except modals
all references to $ replaced by jqchat