Index: /XoopsModules/xim/trunk/modules/xim/js/chat.js
===================================================================
--- /XoopsModules/xim/trunk/modules/xim/js/chat.js (revision 5918)
+++ /XoopsModules/xim/trunk/modules/xim/js/chat.js (revision 6018)
@@ -523,5 +523,5 @@
 	//If opened window
 	if (state==1) {
-	$(function() {
+	xoops_im(function() {
 	  // shake window 
 	  xoops_im("#MBchatbox_"+chatboxID).fadeIn(100).animate({top:"-=20px"},100).animate({top:"+=20px"},100).animate({top:"-=20px"},100)
@@ -532,5 +532,5 @@
 	// if iconized
 	if (state==0) {
-		$(function() {
+		xoops_im(function() {
 			xoops_im("img:[conttitle]").each(function() {
 				if(xoops_im(this).attr("conttitle") == un) { 
