



if(typeof(jqcc) === 'undefined') {
	jqcc = jQuery;
}

// Copyright (c) 2006 Klaus Hartl (stilbuero.de)
// http://www.opensource.org/licenses/mit-license.php

jqcc.cookie=function(a,b,c){if(typeof b!='undefined'){c=c||{};if(b===null){b='';c.expires=-1}var d='';if(c.expires&&(typeof c.expires=='number'||c.expires.toUTCString)){var e;if(typeof c.expires=='number'){e=new Date();e.setTime(e.getTime()+(c.expires*24*60*60*1000))}else{e=c.expires}d='; expires='+e.toUTCString()}var f=c.path?'; path='+(c.path):'';var g=c.domain?'; domain='+(c.domain):'';var h=c.secure?'; secure':'';document.cookie=[a,'=',encodeURIComponent(b),d,f,g,h].join('')}else{var j=null;if(document.cookie&&document.cookie!=''){var k=document.cookie.split(';');for(var i=0;i<k.length;i++){var l=jqcc.trim(k[i]);if(l.substring(0,a.length+1)==(a+'=')){j=decodeURIComponent(l.substring(a.length+1));break}}}return j}};

// SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License
// http://www.opensource.org/licenses/mit-license.php

if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectCCUtil=="undefined"){deconcept.SWFObjectCCUtil=new Object();}deconcept.SWFObjectCC=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectCCUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObjectCC.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObjectCC.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectCCUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectCCUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObjectCC.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectCCUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectCCUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectCCUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObjectCC;var SWFObjectCC=deconcept.SWFObjectCC;


/**
 * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com
 * http://flesler.blogspot.com/2007/10/jqccscrollto.html
 */

(function($){var h=$.scrollToCC=function(a,b,c){$(window).scrollToCC(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jqcc)>=1.3?0:1};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return $.browser.safari||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollToCC=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.speed||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jqcc); 
(function($){$.cometchat=$.cometchat||function(){var _1="/chat/";var _2=[];var _3=[];_2[0] = 'Chat Options';
_2[1] = 'Type your status and hit the enter key!';
_2[2] = 'My Status';
_2[3] = 'Available';
_2[4] = 'Busy';
_2[5] = 'Invisible';
_2[6] = '';
_2[7] = '';
_2[8] = 'Please login to use chat';
_2[9] = 'Who\'s Online';
_2[10] = 'Me';
_2[11] = 'Offline';
_2[12] = 'Who\'s Online';
_2[13] = 'Disable sound notifications';
_2[14] = 'No users online at the moment. Please try again later.';
_2[15] = 'New Messages...';
_2[16] = '';
_2[17] = 'Offline';
_2[18] = 'Find a user';
_2[19] = '<br/><span style=\'color:#999\'>is online</span>';
_2[20] = '<br/><span style=\'color:#999\'>is offline</span>';
_2[21] = '<br/><span style=\'color:#999\'>is online (busy)</span>';
_2[22] = 'Set my status';
_2[23] = 'I am...';
_2[24] = 'Disable popup notifications';
_2[25] = '';
_2[26] = 'Start chatting!';
_2[27] = 'Close this bar';
_2[28] = 'No users online at the moment. Please try again later.';
_2[29] = 'No friends online at the moment. Please try again later.';
_2[30] = 'I\'m available';
_2[31] = 'I\'m busy';
_2[32] = 'I\'m offline';
_2[33] = 'I\'m offline';
_2[34] = 'I\'m away';
_2[35] = ' | ';
_2[36] = 'And ';
_2[37] = ' more notifications';
_3['announcements'] = ['announcements','Announcements','/chat/modules/announcements/index.php','_popup','280','300','','1',''];
_3['games'] = ['games','Single Player Games','/chat/modules/games/index.php','_popup','500','300','','1',''];
_3['translate2'] = ['translate2','Translate This Page','/chat/modules/translate2/index.php','_popup','280','300','','1',''];
_3['share'] = ['share','Share This Page','/chat/modules/share/index.php','_popup','340','50','','1',''];
_3['gamenotifications'] = ['gamenotifications','Game Notifications','http://www.mafiafamilies.net/live/index.php?module=notifications','_popup','600','500','','',''];
_3['chatrooms'] = ['chatrooms','Chatrooms','/chat/modules/chatrooms/index.php','_popup','500','300','','1','1'];
_3['scrolltotop'] = ['scrolltotop','Scroll To Top','javascript:jqcc.cometchat.scrollToTop();','','','','','',''];
var _4 = ['games','handwrite','chathistory','clearconversation','chattime','smilies','filetransfer','report','block'];
var _5 = 0;var _6 = 1;var _7 = 'dark';var _8 = 3000;var _9 = 12000;var _a = 'cc_';var _b = 'fluid';var _c = 960;var _d = 'center';var _e = 20;var _f = 1;var _10 = 0;var _11 = 1;var _12 = 22;var _13 = 14;var _14 = 10;var _15 = 40;var _16 = 30000;var _17 = 300;var _18 = 1;var _19 = 1;var _1a = 1;var _1b = 5000;var _1c = 15000;var _1d = 0;var _1e = 1;var _1f = 0;var _20 = 0;var _21 = 0;var _22 = 0;var _23 = 0;var _24 = [''];
var _25=0;var _26={};var _27={};var _28={};var _29="";var _2a=0;var _2b=0;var _2c=true;var _2d=0;var ie6=false;var _2e;var _2f;var _30=_8;var _31=1;var _32=0;var _33=0;var _34=0;var _35="";var _36=document.title;var _37=0;var _38={};var _39={};var _3a={};var _3b={};var _3c={};var _3d={};var _3e=0;var _3f=0;var _40={};var _41={};var _42={};var _43={};var _44=new Date();var _45=_44.getDate();var _46=Math.floor(_44.getTime()/1000);var _47=/([^\x00-\x80]+)|([&][#])+/;var _48=0;var _49;var _4a=_46;var _4b=0;var _4c;var _4d=0;var _4e;var _4f;var _50="";var _51=$.cookie(_a+"data");var _52=navigator.userAgent.match(/ipad|ipod|iphone|android|windows ce|blackberry|palm|symbian/i)!=null;var _53=0;var _54=0;var _55="0";var _56="get";var _57="10000";$.ajaxSetup({scriptCharset:"utf-8",cache:"false"});if(_6==1){$("<div id=\"cometchat_flashcontent\"></div>").appendTo($("body"));so=new SWFObjectCC(_1+"swf/sound.swf?3","cometchatbeep","1","1","8","#000");so.addParam("allowscriptaccess","always");so.addParam("flashvars","base="+_1);so.write("cometchat_flashcontent");}function _58(_59){var _5a=navigator.appName.indexOf("Microsoft")!=-1;return (_5a)?window[_59]:document[_59];};function _5b(){try{_58("cometchatbeep").beep();}catch(error){_6=0;}};function _5c(id,_5d,_5e){if(_50==""){$("#cometchat_tooltip").css("display","none");$("#cometchat_tooltip").removeClass("cometchat_tooltip_left").css("left","-100000px");$("#cometchat_tooltip .cometchat_tooltip_content").html(_5d);var pos=$("#"+id).offset();var _5f=$("#"+id).width();var _60=$("#cometchat_tooltip").width();if(_5e==1){$("#cometchat_tooltip").css("left",(pos.left+_5f)-16).addClass("cometchat_tooltip_left");}else{var _61=(pos.left+_5f)-_60;_61+=16;$("#cometchat_tooltip").removeClass("cometchat_tooltip_left").css("left",_61);}$("#cometchat_tooltip").css("display","block");if(ie6){_62();}}};function _63(_64){var _65=$("#cometchat_optionsbutton_popup .cometchat_statustextarea").val();if(_65!=""){$.ajax({url:_1+"cometchat_send.php",data:{statusmessage:_65,basedata:_51},dataType:"jsonp",type:_56,timeout:_57,success:function(_66){$(_64).blur();}});}};function _67(_68,_69){if(_68.keyCode==13&&_68.shiftKey==0){_63();return false;}};function _6a(id){if(_48==id){_48=0;}};function _6b(_6c,_6d,id,_6e){if((_6c.keyCode==13&&_6c.shiftKey==0)||_6e==1){var _6f=$(_6d).val();_6f=_6f.replace(/^\s+|\s+$/g,"");$(_6d).val("");$(_6d).css("height","18px");$("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").css("height","200px");$(_6d).css("overflow-y","hidden");$(_6d).focus();if(_6f!=""){if(_3d[id]!=1){$.ajax({url:_1+"cometchat_send.php",data:{to:id,message:_6f,basedata:_51},dataType:"jsonp",type:_56,timeout:_57,success:function(_70){if(_70){_eb(id,_6f,"1","1",_70,1,Math.floor(new Date().getTime()/1000));$("#cometchat_tabcontenttext_"+id).scrollTop(50000);setTimeout(function(){$("#cometchat_tabcontenttext_"+id).scrollTop(50000);},100);}_6a(id);_31=1;if(_30>_8){_30=_8;clearTimeout(_2e);_2e=setTimeout(function(){_71();},_8);}}});}else{jqcc.ccjabber.sendMessage(id,_6f);}}return false;}};function _72(_73,_74,id){if(_73.keyCode==13&&_73.shiftKey==0){$(_74).val("");}var _75=_74.clientHeight;var _76=94;clearTimeout(_49);_48=id;_49=setTimeout(function(){_6a(id);},_16);if(_76>_75){_75=Math.max(_74.scrollHeight,_75);if(_76){_75=Math.min(_76,_75);}if(_75>_74.clientHeight){$(_74).css("height",_75+4+"px");$("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").css("height",218-(_75+4)+"px");}}else{$(_74).css("overflow-y","auto");}$("#cometchat_tabcontenttext_"+id).scrollTop(50000);setTimeout(function(){$("#cometchat_tabcontenttext_"+id).scrollTop(50000);},100);};function _77(){$("#cometchat_optionsbutton_popup .busy").css("text-decoration","none");$("#cometchat_optionsbutton_popup .invisible").css("text-decoration","none");$("#cometchat_optionsbutton_popup .available").css("text-decoration","none");_78();};function _78(){$("#cometchat_userstab_icon").removeClass("cometchat_user_available2");$("#cometchat_userstab_icon").removeClass("cometchat_user_busy2");$("#cometchat_userstab_icon").removeClass("cometchat_user_invisible2");$("#cometchat_userstab_icon").removeClass("cometchat_user_away2");};function _79(_7a){$.ajax({url:_1+"cometchat_send.php",data:{status:_7a,basedata:_51},dataType:"jsonp",type:_56,timeout:_57,success:function(_7b){if(_7a!="away"){_4e=_7a;}}});};function _7c(_7d){_2b=1;_77();$("#cometchat_userstab_icon").addClass("cometchat_user_invisible2");if(_7d!=1){_79("offline");}$("#cometchat_userstab_popup").removeClass("cometchat_tabopen");$("#cometchat_userstab").removeClass("cometchat_userstabclick").removeClass("cometchat_tabclick");$("#cometchat_optionsbutton_popup").removeClass("cometchat_tabopen");$("#cometchat_optionsbutton").removeClass("cometchat_tabclick");_7e("buddylist","0");$("#cometchat_userstab_text").html(_2[17]);if(_29!=""){$("#cometchat_user_"+_29+" .cometchat_closebox_bottom").click();_29="";_7e("openChatboxId",_29);}for(chatbox in _40){if(_40.hasOwnProperty(chatbox)){if(_40[chatbox]!=null){$("#cometchat_user_"+chatbox+" .cometchat_closebox_bottom").click();}}}};function _7f(){$("#cometchat_optionsbutton_popup .cometchat_gooffline").click(function(){_7c();});$("#cometchat_soundnotifications").click(function(_80){$.cookie(_a+"sound",$("#cometchat_soundnotifications").attr("checked"),{path:"/",expires:365});});$("#cometchat_popupnotifications").click(function(_81){$.cookie(_a+"popup",$("#cometchat_popupnotifications").attr("checked"),{path:"/",expires:365});});$("#cometchat_optionsbutton_popup .available").click(function(_82){_77();$("#cometchat_userstab_icon").addClass("cometchat_user_available2");$(this).css("text-decoration","underline");_79("available");});$("#cometchat_optionsbutton_popup .cometchat_statusbutton").click(function(_83){_63();});$("#cometchat_optionsbutton_popup .busy").click(function(_84){_77();$("#cometchat_userstab_icon").addClass("cometchat_user_busy2");$(this).css("text-decoration","underline");_79("busy");});$("#cometchat_optionsbutton_popup .invisible").click(function(_85){_77();$("#cometchat_userstab_icon").addClass("cometchat_user_invisible2");$(this).css("text-decoration","underline");_79("invisible");});$("#cometchat_optionsbutton_popup .cometchat_statustextarea").keydown(function(_86){return _67(_86,this);});$("#cometchat_optionsbutton").mouseover(function(){if(!$("#cometchat_optionsbutton_popup").hasClass("cometchat_tabopen")){if(_2a==0){if(_4d==0){_5c("cometchat_optionsbutton",_2[0]);}}else{if(_4d==0){_5c("cometchat_optionsbutton",_2[8]);}}}$(this).addClass("cometchat_tabmouseover");});$("#cometchat_optionsbutton").mouseout(function(){$(this).removeClass("cometchat_tabmouseover");if(_4d==0){$("#cometchat_tooltip").css("display","none");}});$("#cometchat_optionsbutton").click(function(){if(_35!=""){$("#cometchat_trayicon_"+_35+"_popup").removeClass("cometchat_tabopen");$("#cometchat_trayicon_"+_35).removeClass("cometchat_trayclick");_35="";_7e("trayOpen",_35);}if(_2a==0){if(_2b==1){_2b=0;$("#cometchat_userstab_text").html(_2[9]+" ("+_34+")");_71(1);$("#cometchat_optionsbutton_popup .available").click();}$("#cometchat_tooltip").css("display","none");var _87=$("#cometchat_base").position().left;var _88=$("#cometchat_base").width();$("#cometchat_optionsbutton_popup").css("left",_87+_88-223-32);$(this).toggleClass("cometchat_tabclick");$("#cometchat_optionsbutton_popup").toggleClass("cometchat_tabopen");$("#cometchat_optionsbutton").toggleClass("cometchat_optionsimages_click");$("#cometchat_userstab_popup").removeClass("cometchat_tabopen");$("#cometchat_userstab").removeClass("cometchat_userstabclick").removeClass("cometchat_tabclick");_7e("buddylist","0");if($.cookie(_a+"sound")){if($.cookie(_a+"sound")=="true"){$("#cometchat_soundnotifications").attr("checked",true);}else{$("#cometchat_soundnotifications").attr("checked",false);}}if($.cookie(_a+"popup")){if($.cookie(_a+"popup")=="true"){$("#cometchat_popupnotifications").attr("checked",true);}else{$("#cometchat_popupnotifications").attr("checked",false);}}}else{if(_2[16]!=""){location.href=_2[16];}}});$("#cometchat_optionsbutton_popup .cometchat_userstabtitle").click(function(){$("#cometchat_optionsbutton").click();});$("#cometchat_optionsbutton_popup .cometchat_userstabtitle").mouseenter(function(){$("#cometchat_optionsbutton_popup .cometchat_userstabtitle .cometchat_minimizebox").addClass("cometchat_chatboxtraytitlemouseover");});$("#cometchat_optionsbutton_popup .cometchat_userstabtitle").mouseleave(function(){$("#cometchat_optionsbutton_popup .cometchat_userstabtitle .cometchat_minimizebox").removeClass("cometchat_chatboxtraytitlemouseover");});};function _89(){var _8a="";var _8b=0;for(chatbox in _40){if(_40.hasOwnProperty(chatbox)){if(_40[chatbox]!=null){if(!Number(_40[chatbox])){_40[chatbox]=0;}_8a+=chatbox+"|"+_40[chatbox]+",";if(_40[chatbox]>0){_8b=1;}}}}_37=_8b;_8a=_8a.slice(0,-1);_7e("activeChatboxes",_8a);};function _8c(id,_8d,_8e,_8f,_90,_91,_92,_93){if(id==null||id==""){return;}if(_38[id]==null||_38[id]==""){if(_42[id]===undefined){_42[id]=1;if(!isNaN(id)){$.ajax({url:_1+"cometchat_getid.php",data:{userid:id,basedata:_51},dataType:"jsonp",type:_56,timeout:_57,cache:false,success:function(_94){if(_94){_8d=_38[id]=_94.n;_8e=_3a[id]=_94.s;_8f=_39[id]=_94.m;_90=_3b[id]=_94.a;_91=_3c[id]=_94.l;if(_41[id]!=null){$("#cometchat_user_"+id+" .cometchat_closebox_bottom_status").removeClass("cometchat_available").removeClass("cometchat_busy").removeClass("cometchat_offline").removeClass("cometchat_away").addClass("cometchat_"+_8e);if($("#cometchat_user_"+id+"_popup").length>0){$("#cometchat_user_"+id+"_popup .cometchat_tabsubtitle .cometchat_message").html(_8f);}}_42[id]=5;if(id!=null&&id!=""&&_8d!=null&&_8d!=""){_96(id,_8d,_8e,_8f,_90,_91,_92,_93);}}},error:function(_95){_42[id]=5;}});}else{setTimeout(function(){_8c(id,_38[id],_3a[id],_39[id],_3b[id],_3c[id],_92,_93);},5000);}}else{if(_42[id]<5){_42[id]++;setTimeout(function(){_8c(id,_38[id],_3a[id],_39[id],_3b[id],_3c[id],_92,_93);},5000);}}}else{_96(id,_38[id],_3a[id],_39[id],_3b[id],_3c[id],_92,_93);}};function _96(id,_97,_98,_99,_9a,_9b,_9c,_9d){if(_41[id]!=null){if(!$("#cometchat_user_"+id).hasClass("cometchat_tabclick")&&_9c!=1){if(_29!=""){$("#cometchat_user_"+_29+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+_29).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");_29="";_7e("openChatboxId",_29);}if(($("#cometchat_user_"+id).offset().left<($("#cometchat_chatboxes").offset().left+$("#cometchat_chatboxes").width()))&&($("#cometchat_user_"+id).offset().left-$("#cometchat_chatboxes").offset().left)>=0){$("#cometchat_user_"+id).click();}else{$("#cometchat_chatboxes_wide .cometchat_tabalert").css("display","none");var ms=_1e;if(_9e("initialize")==1){ms=0;}$("#cometchat_chatboxes").scrollToCC("#cometchat_user_"+id,ms,function(){$("#cometchat_user_"+id).click();_cd();_bc();});}}_cd();return;}$("#cometchat_chatboxes_wide").width($("#cometchat_chatboxes_wide").width()+152);_c3(1);if(_97.length>_13&&!_47.test(_97)){shortname=_97.substr(0,_13)+"...";}else{shortname=_97;}if(_97.length>_12&&!_47.test(_97)){longname=_97.substr(0,_12)+"...";}else{longname=_97;}$("<span/>").attr("id","cometchat_user_"+id).addClass("cometchat_tab").html("<div class=\"cometchat_user_shortname\">"+shortname+"</div>").appendTo($("#cometchat_chatboxes_wide"));$("#cometchat_user_"+id).append("<div class=\"cometchat_closebox_bottom_status cometchat_"+_98+"\"></div>");$("#cometchat_user_"+id).append("<div class=\"cometchat_closebox_bottom\"></div>");$("#cometchat_user_"+id+" .cometchat_closebox_bottom").mouseenter(function(){$(this).addClass("cometchat_closebox_bottomhover");});$("#cometchat_user_"+id+" .cometchat_closebox_bottom").mouseleave(function(){$(this).removeClass("cometchat_closebox_bottomhover");});$("#cometchat_user_"+id+" .cometchat_closebox_bottom").click(function(){$("#cometchat_user_"+id+"_popup").remove();$("#cometchat_user_"+id).remove();if(_29==id){_29="";_7e("openChatboxId",_29);}$("#cometchat_chatboxes_wide").width($("#cometchat_chatboxes_wide").width()-152);$("#cometchat_chatboxes").scrollToCC("-=152px");_c3();_40[id]=null;_41[id]=null;_43[id]=0;_89();});var _9f="";

if(_3d[id]!=1 && id != "99999" && id != "999992"){

var _a0=_4.length;if(_a0>0){if(_a0>8){_9f+="<div style=\"clear:both;padding-bottom:2px\"></div>";}
_9f+="<div class=\"cometchat_plugins\">";
 
 for(var i=0;i<_a0;i++){
 var _97="cc"+_4[i];
 if(typeof ($[_97])=="object"){
 _9f+="<img src=\""+_1+"plugins/"+_4[i]+"/icon.png\" class=\"cometchat_pluginsicon\" title=\""+$[_97].getTitle()+"\" onclick=\"javascript:jqcc."+_97+".init("+id+");\">";
 }}
 _9f+="</div>";}

}else{

var _a0=_4.length;if(_a0>0){if(_a0>8){_9f+="<div style=\"clear:both;padding-bottom:2px\"></div>";}
_9f+="<div class=\"cometchat_plugins\">";
 
 for(var i=0;i<_a0;i++){
 var _97="cc"+_4[i];
 if(typeof ($[_97])=="object"){
 _9f+="<img src=\""+_1+"plugins/"+_4[i]+"/icon.png\" class=\"cometchat_pluginsicon\" title=\""+$[_97].getTitle()+" [Disabled because it's a bot]\" onclick=\"javascript:void(0);\">";
 }}
 _9f+="</div>";}
 
}

var _a1="";var _a2="";if(_9b!=""){_a1="<a href=\""+_9b+"\" target=\"_blank\">";_a2="</a>";}var _a3="";if(_9a!=""){_a3="<div class=\"cometchat_avatarbox\">"+_a1+"<img src=\""+_9a+"\" border=\"0\" class=\"cometchat_avatar\" />"+_a2+"</div>";}$("<div/>").attr("id","cometchat_user_"+id+"_popup").addClass("cometchat_tabpopup").css("display","none").html("<div class=\"cometchat_tabtitle\"><div class=\"cometchat_name\">"+_a1+longname+_a2+"</div> <span id=\"cometchat_typing_"+id+"\" class=\"cometchat_typing\"></span></div><div class=\"cometchat_tabsubtitle\">"+_a3+"<div class=\"cometchat_message\">"+_99+"</div>"+_9f+"<div style=\"clear:both\"></div>"+"</div><div class=\"cometchat_tabcontent\"><div class=\"cometchat_tabcontenttext\" id=\"cometchat_tabcontenttext_"+id+"\"></div><div class=\"cometchat_tabcontentinput\"><textarea class=\"cometchat_textarea\"></textarea><div class=\"cometchat_tabcontentsubmit\"></div></div><div style=\"clear:both\"></div></div>").appendTo($("#cometchat"));$("#cometchat_user_"+id+"_popup .cometchat_textarea").keydown(function(_a4){return _6b(_a4,this,id);});$("#cometchat_user_"+id+"_popup .cometchat_tabcontentsubmit").click(function(_a5){return _6b(_a5,$("#cometchat_user_"+id+"_popup .cometchat_textarea"),id,1);});$("#cometchat_user_"+id+"_popup .cometchat_textarea").keyup(function(_a6){return _72(_a6,this,id);});$("#cometchat_user_"+id+"_popup .cometchat_tabtitle").append("<div class=\"cometchat_closebox\"></div><div class=\"cometchat_minimizebox\"></div><br clear=\"all\"/>");$("#cometchat_user_"+id+"_popup .cometchat_tabtitle .cometchat_closebox").mouseenter(function(){$(this).addClass("cometchat_chatboxmouseoverclose");$("#cometchat_user_"+id+"_popup .cometchat_tabtitle .cometchat_minimizebox").removeClass("cometchat_chatboxtraytitlemouseover");});$("#cometchat_user_"+id+"_popup .cometchat_tabtitle .cometchat_closebox").mouseleave(function(){$(this).removeClass("cometchat_chatboxmouseoverclose");$("#cometchat_user_"+id+"_popup .cometchat_tabtitle .cometchat_minimizebox").addClass("cometchat_chatboxtraytitlemouseover");});$("#cometchat_user_"+id+"_popup .cometchat_tabtitle .cometchat_closebox").click(function(){$("#cometchat_user_"+id+"_popup").remove();$("#cometchat_user_"+id).remove();if(_29==id){_29="";_7e("openChatboxId",_29);}$("#cometchat_chatboxes_wide").width($("#cometchat_chatboxes_wide").width()-152);$("#cometchat_chatboxes").scrollToCC("-=152px");_c3();_41[id]=null;_40[id]=null;_43[id]=0;_89();});$("#cometchat_user_"+id+"_popup .cometchat_tabtitle").click(function(){$("#cometchat_user_"+id).click();});$("#cometchat_user_"+id+"_popup .cometchat_tabtitle").mouseenter(function(){$("#cometchat_user_"+id+"_popup .cometchat_tabtitle .cometchat_minimizebox").addClass("cometchat_chatboxtraytitlemouseover");});$("#cometchat_user_"+id+"_popup .cometchat_tabtitle").mouseleave(function(){$("#cometchat_user_"+id+"_popup .cometchat_tabtitle .cometchat_minimizebox").removeClass("cometchat_chatboxtraytitlemouseover");});$("#cometchat_user_"+id).mouseenter(function(){$(this).addClass("cometchat_tabmouseover");$("#cometchat_user_"+id+" .cometchat_user_shortname").addClass("cometchat_tabmouseovertext");});$("#cometchat_user_"+id).mouseleave(function(){$(this).removeClass("cometchat_tabmouseover");$("#cometchat_user_"+id+" .cometchat_user_shortname").removeClass("cometchat_tabmouseovertext");});$("#cometchat_user_"+id).click(function(){if(_35!=""){$("#cometchat_trayicon_"+_35+"_popup").removeClass("cometchat_tabopen");$("#cometchat_trayicon_"+_35).removeClass("cometchat_trayclick");_35="";_7e("trayOpen",_35);}if($("#cometchat_user_"+id+" .cometchat_tabalert").length>0){$("#cometchat_user_"+id+" .cometchat_tabalert").remove();_41[id]=0;_40[id]=0;_89();}if($(this).hasClass("cometchat_tabclick")){$(this).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");$("#cometchat_user_"+id+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+id+" .cometchat_closebox_bottom").removeClass("cometchat_closebox_bottom_click");_29="";_7e("openChatboxId",_29);}else{var _a7=$("#cometchat_base").position().left;if(($("#cometchat_user_"+id).offset().left<($("#cometchat_chatboxes").offset().left+$("#cometchat_chatboxes").width()))&&($("#cometchat_user_"+id).offset().left-$("#cometchat_chatboxes").offset().left)>=0){if(_29!=""&&_29!=id){$("#cometchat_user_"+_29+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+_29).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");$("#cometchat_user_"+_29+" .cometchat_closebox_bottom").removeClass("cometchat_closebox_bottom_click");_29="";_7e("openChatboxId",_29);}$("#cometchat_user_"+id+"_popup").css("left",_a7+$("#cometchat_user_"+id).position().left-77);$(this).addClass("cometchat_tabclick").addClass("cometchat_usertabclick");$("#cometchat_user_"+id+"_popup").addClass("cometchat_tabopen");$("#cometchat_user_"+id+" .cometchat_closebox_bottom").addClass("cometchat_closebox_bottom_click");_29=id;_7e("openChatboxId",_29);if(_43[id]!=1&&(_9e("initialize")!=1||isNaN(id))){_b1(id);_43[id]=1;}if(ie6){_62();}}else{$("#cometchat_user_"+id+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+id).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");var _a8=(($("#cometchat_user_"+id).offset().left-$("#cometchat_chatboxes_wide").offset().left))-((Math.floor(($("#cometchat_chatboxes").width()/152))-1)*152);$("#cometchat_chatboxes").scrollToCC(_a8,0,function(){_bc();_cd();$("#cometchat_user_"+id).click();});}$("#cometchat_tabcontenttext_"+id).scrollTop(50000);setTimeout(function(){$("#cometchat_tabcontenttext_"+id).scrollTop(50000);},100);}if(_a9("updatingsession")!=1){$("#cometchat_user_"+id+"_popup .cometchat_textarea").focus();}});if(_9c!=1){$("#cometchat_user_"+id).click();}_40[id]=0;_41[id]=0;_89();};function _aa(ts){var ap="";var _ab=ts.getHours();var _ac=ts.getMinutes();var _ad=ts.getDate();var _ae=ts.getMonth();if(_1d!=1){if(_ab>11){ap="pm";}else{ap="am";}if(_ab>12){_ab=_ab-12;}if(_ab==0){_ab=12;}}else{if(_ab<10){_ab="0"+_ab;}}if(_ac<10){_ac="0"+_ac;}var _af=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var _b0="th";if(_ad==1||_ad==21||_ad==31){_b0="st";}else{if(_ad==2||_ad==22){_b0="nd";}else{if(_ad==3||_ad==23){_b0="rd";}}}if(_ad!=_45){return "<span class=\"cometchat_ts\">("+_ab+":"+_ac+ap+" "+_ad+_b0+" "+_af[_ae]+")</span>";}else{return "<span class=\"cometchat_ts\">("+_ab+":"+_ac+ap+")</span>";}};function _b1(id){if(_3d[id]!=1){$.ajax({cache:false,url:_1+"cometchat_receive.php",data:{chatbox:id,basedata:_51},type:_56,timeout:_57,dataType:"jsonp",success:function(_b2){if(_b2){var _b3="";var _b4=_38[id];$.each(_b2,function(_b5,_b6){if(_b5=="messages"){$.each(_b6,function(i,_b7){var _b8="";if(_b7.self==1){fromname=_2[10];_b8=" cometchat_self";}else{fromname=_b4;}var ts=new Date(_b7.sent*1000);if(!_10){fromname=fromname.split(" ")[0];}_b3+=(_12c("<div class=\"cometchat_chatboxmessage\" id=\"cometchat_message_"+_b7.id+"\"><span class=\"cometchat_chatboxmessagefrom"+_b8+"\"><strong>"+fromname+"</strong>:&nbsp;&nbsp;</span><span class=\"cometchat_chatboxmessagecontent"+_b8+"\">"+_b7.message+"</span>"+_aa(ts)+"</div>",_b8));});}});document.getElementById("cometchat_tabcontenttext_"+id).innerHTML="<div>"+_b3+"</div>";$("#cometchat_tabcontenttext_"+id).scrollTop(50000);setTimeout(function(){$("#cometchat_tabcontenttext_"+id).scrollTop(50000);},100);}}});}else{jqcc.ccjabber.getRecentData(id);}};function _b9(id,_ba,add){if(_38[id]==null||_38[id]==""){if(_42[id]===undefined){_8c(id,null,null,null,null,null,1,null);}if(_42[id]<5){setTimeout(function(){_b9(id,_ba,add);},5000);}}else{_bb(id);if(add==1){if($("#cometchat_user_"+id+" .cometchat_tabalert").length>0){_ba=parseInt($("#cometchat_user_"+id+" .cometchat_tabalert").html())+parseInt(_ba);}}if(_ba==0){$("#cometchat_user_"+id+" .cometchat_tabalert").remove();}else{if($("#cometchat_user_"+id+" .cometchat_tabalert").length>0){$("#cometchat_user_"+id+" .cometchat_tabalert").html(_ba);}else{$("<div/>").css("top","-5px").addClass("cometchat_tabalert").html(_ba).appendTo($("#cometchat_user_"+id+" .cometchat_closebox_bottom_status"));}}_40[id]=_ba;_89();_bc();}};function _bd(){$("#cometchat_search").click(function(){var _be=$(this).val();if(_be==_2[18]){$("#cometchat_search").val("");$("#cometchat_search").addClass("cometchat_search_light");}});$("#cometchat_search").blur(function(){var _bf=$(this).val();if(_bf==""){$("#cometchat_search").addClass("cometchat_search_light");$("#cometchat_search").val(_2[18]);}});$("#cometchat_search").keyup(function(){var _c0=$(this).val();if(_c0.length>0&&_c0!=_2[18]){$("#cometchat_userscontent .cometchat_userlist").hide();$("#cometchat_userscontent .cometchat_userlist:icontains("+_c0+")").show();$("#cometchat_search").removeClass("cometchat_search_light");}else{$("#cometchat_userscontent .cometchat_userlist").show();}});$("#cometchat_userstab_popup .cometchat_userstabtitle").click(function(){$("#cometchat_userstab").click();});$("#cometchat_userstab_popup .cometchat_userstabtitle").mouseenter(function(){$("#cometchat_userstab_popup .cometchat_userstabtitle .cometchat_minimizebox").addClass("cometchat_chatboxtraytitlemouseover");});$("#cometchat_userstab_popup .cometchat_userstabtitle").mouseleave(function(){$("#cometchat_userstab_popup .cometchat_userstabtitle .cometchat_minimizebox").removeClass("cometchat_chatboxtraytitlemouseover");});$("#cometchat_userstab").mouseover(function(){$(this).addClass("cometchat_tabmouseover");});$("#cometchat_userstab").mouseout(function(){$(this).removeClass("cometchat_tabmouseover");});$("#cometchat_userstab").click(function(){if(_35!=""){$("#cometchat_trayicon_"+_35+"_popup").removeClass("cometchat_tabopen");$("#cometchat_trayicon_"+_35).removeClass("cometchat_trayclick");_35="";_7e("trayOpen",_35);}if(_2b==1){_2b=0;$("#cometchat_userstab_text").html(_2[9]+" ("+_34+")");_71(1);$("#cometchat_optionsbutton_popup .available").click();}$("#cometchat_optionsbutton_popup").removeClass("cometchat_tabopen");$("#cometchat_optionsbutton").removeClass("cometchat_tabclick");if($(this).hasClass("cometchat_tabclick")){_7e("buddylist","0");}else{_7e("buddylist","1");$("#cometchat_tooltip").css("display","none");$(".cometchat_userscontentavatar img").each(function(){if($(this).attr("original")){$(this).attr("src",$(this).attr("original"));$(this).removeAttr("original");}});}var _c1=$("#cometchat_base").position().left;var _c2=jqcc("#cometchat_base").width();$("#cometchat_userstab_popup").css("left",_c1+_c2-223-32);$(this).toggleClass("cometchat_tabclick").toggleClass("cometchat_userstabclick");$("#cometchat_userstab_popup").toggleClass("cometchat_tabopen");});};function _c3(_c4){var _c5=$(window).width();var _c6=_25+32;if(_c6<80){_c6=80;}if(_b=="fixed"){$("#cometchat_base").css("width",_c);if(_d=="center"){var _c7=(_c5-_c)/2;$("#cometchat_base").css("left",_c7);}if(_d=="right"){var _c7=(_c5-_c);$("#cometchat_base").css("left",_c7-_e);}if(_d=="left"){$("#cometchat_base").css("left",_e);}}else{if(_c5<400+_c6+_e+20){_c5=400+_c6+_e+20;}$("#cometchat_base").css("left",_e);$("#cometchat_base").css("width",_c5-(_e*2));}var _c8=$("#cometchat_base").position().left;var _c9=$("#cometchat_base").width();$("#cometchat_userstab_popup").css("left",_c8+_c9-223-32);$("#cometchat_optionsbutton_popup").css("left",_c8+_c9-223-32);if(_35!=""){$("#cometchat_trayicon_"+_35+"_popup").css("left",$("#cometchat_trayicon_"+_35).offset().left).css("width",_3[_35][4]);}if($("#cometchat_chatboxes_wide").width()<=($("#cometchat_base").width()-26-178-44-_c6)){$("#cometchat_chatboxes").css("width",$("#cometchat_chatboxes_wide").width());$("#cometchat_chatboxes").scrollToCC("0px",0);}else{var _ca=$("#cometchat_chatboxes").width();$("#cometchat_chatboxes").css("width",Math.floor(($("#cometchat_base").width()-26-178-44-_c6)/152)*152);var _cb=$("#cometchat_chatboxes").width();if(_ca!=_cb){$("#cometchat_chatboxes").scrollToCC("-=152px",0);}}if(_29!=""&&_c4!=1){if(($("#cometchat_user_"+_29).offset().left<($("#cometchat_chatboxes").offset().left+$("#cometchat_chatboxes").width()))&&($("#cometchat_user_"+_29).offset().left-$("#cometchat_chatboxes").offset().left)>=0){$("#cometchat_user_"+_29+"_popup").css("left",_c8+$("#cometchat_user_"+_29).position().left-77);}else{$("#cometchat_user_"+_29+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+_29).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");var _cc=(($("#cometchat_user_"+_29).offset().left-$("#cometchat_chatboxes_wide").offset().left))-((Math.floor(($("#cometchat_chatboxes").width()/152))-1)*152);$("#cometchat_chatboxes").scrollToCC(_cc,0,function(){$("#cometchat_user_"+_29).click();});}}_bc(_c4);_cd(_c4);if(ie6){_62();}};function _bc(_ce){$("#cometchat_chatbox_left .cometchat_tabalertlr").html("0");$("#cometchat_chatbox_right .cometchat_tabalertlr").html("0");$("#cometchat_chatbox_left .cometchat_tabalertlr").css("display","none");$("#cometchat_chatbox_right .cometchat_tabalertlr").css("display","none");$("#cometchat_chatboxes_wide  .cometchat_tabalert").each(function(){if(($(this).parent().offset().left<($("#cometchat_chatboxes").offset().left+$("#cometchat_chatboxes").width()))&&($(this).parent().offset().left-$("#cometchat_chatboxes").offset().left)>=0){$(this).css("display","block");}else{$(this).css("display","none");if(($(this).parent().offset().left-$("#cometchat_chatboxes").offset().left)>=0){$("#cometchat_chatbox_right .cometchat_tabalertlr").html(parseInt($("#cometchat_chatbox_right .cometchat_tabalertlr").html())+parseInt($(this).html()));$("#cometchat_chatbox_right .cometchat_tabalertlr").css("display","block");}else{$("#cometchat_chatbox_left .cometchat_tabalertlr").html(parseInt($("#cometchat_chatbox_left .cometchat_tabalertlr").html())+parseInt($(this).html()));$("#cometchat_chatbox_left .cometchat_tabalertlr").css("display","block");}}});};function _cd(_cf){var _d0=0;var _d1=0;var _d2=0;if($("#cometchat_chatbox_right").hasClass("cometchat_chatbox_right_last")){_d1=1;}if($("#cometchat_chatbox_right").hasClass("cometchat_chatbox_lr")){_d2=1;}if($("#cometchat_chatboxes").scrollLeft()==0){$("#cometchat_chatbox_left").unbind("click",_d3);$("#cometchat_chatbox_left .cometchat_tabtext").html("0");$("#cometchat_chatbox_left").addClass("cometchat_chatbox_left_last");_d0++;}else{var _d4=Math.floor($("#cometchat_chatboxes").scrollLeft()/152);$("#cometchat_chatbox_left").unbind("click",_d3);$("#cometchat_chatbox_left").bind("click",_d3);$("#cometchat_chatbox_left .cometchat_tabtext").html(_d4);$("#cometchat_chatbox_left").removeClass("cometchat_chatbox_left_last");}if(($("#cometchat_chatboxes").scrollLeft()+$("#cometchat_chatboxes").width())==$("#cometchat_chatboxes_wide").width()){$("#cometchat_chatbox_right").unbind("click",_d5);$("#cometchat_chatbox_right .cometchat_tabtext").html("0");$("#cometchat_chatbox_right").addClass("cometchat_chatbox_right_last");_d0++;}else{var _d4=Math.floor(($("#cometchat_chatboxes_wide").width()-($("#cometchat_chatboxes").scrollLeft()+$("#cometchat_chatboxes").width()))/152);$("#cometchat_chatbox_right").unbind("click",_d5);$("#cometchat_chatbox_right").bind("click",_d5);$("#cometchat_chatbox_right .cometchat_tabtext").html(_d4);$("#cometchat_chatbox_right").removeClass("cometchat_chatbox_right_last");}if(_d0==2){$("#cometchat_chatbox_right").addClass("cometchat_chatbox_lr");$("#cometchat_chatbox_left").addClass("cometchat_chatbox_lr");}else{$("#cometchat_chatbox_right").removeClass("cometchat_chatbox_lr");$("#cometchat_chatbox_left").removeClass("cometchat_chatbox_lr");}if((!$("#cometchat_chatbox_right").hasClass("cometchat_chatbox_right_last")&&_d1==1)||($("#cometchat_chatbox_right").hasClass("cometchat_chatbox_right_last")&&_d1==0)||(!$("#cometchat_chatbox_right").hasClass("cometchat_chatbox_lr")&&_d2==1)||($("#cometchat_chatbox_right").hasClass("cometchat_chatbox_lr")&&_d2==0)){_c3(_cf);}};function _d6(_d7){if(_29!=""){$("#cometchat_user_"+_29+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+_29).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");}$("#cometchat_chatboxes_wide .cometchat_tabalert").css("display","none");var _d8=$("#cometchat_base").position().left;var ms=_1e;if(_9e("initialize")==1){ms=0;}$("#cometchat_chatboxes").scrollToCC(_d7,ms,function(){if(_29!=""){if(($("#cometchat_user_"+_29).offset().left<($("#cometchat_chatboxes").offset().left+$("#cometchat_chatboxes").width()))&&($("#cometchat_user_"+_29).offset().left-$("#cometchat_chatboxes").offset().left)>=0){$("#cometchat_user_"+_29).click();}else{_29="";}_7e("openChatboxId",_29);}_bc();_cd();});};function _d3(){_d6("-=152px");};function _d5(){_d6("+=152px");};function _d9(_da,_db){_26[_da]=_db;};function _9e(_dc){if(_26[_dc]){return _26[_dc];}else{return "";}};function _dd(_de,_df){_28[_de]=_df;};function _a9(_e0){if(_28[_e0]){return _28[_e0];}else{return "";}};function _7e(_e1,_e2){_27[_e1]=_e2;if(_a9("updatingsession")!=1){var _e3="";if(_27["buddylist"]){_e3+=_27["buddylist"];}else{_e3+=" ";}_e3+=":";if(_27["activeChatboxes"]){_e3+=_27["activeChatboxes"];}else{_e3+=" ";}_e3+=":";if(_27["openChatboxId"]){_e3+=_27["openChatboxId"];}else{_e3+=" ";}_e3+=":"+_34;_e3+=":"+_2b;_e3+=":"+_35;$.cookie(_a+"state",_e3,{path:"/"});}};function _e4(_e5,_e6){if(_27[_e5]){return _27[_e5];}else{return "";}};function _e7(_e8){var id=$(_e8).attr("id");if(typeof id==="undefined"||$(_e8).attr("id")==""){id=$(_e8).parent().attr("id").substr(19);}else{id=id.substr(19);}_8c(id,_38[id],_3a[id],_39[id],_3b[id],_3c[id]);};function _e9(id){_8c(id,_38[id],_3a[id],_39[id],_3b[id],_3c[id]);};function _bb(_ea){var id=_ea;_8c(id,_38[id],_3a[id],_39[id],_3b[id],_3c[id],1);};function _eb(id,_ec,_ed,old,_ee,_ef,_f0){if(_42[id]===undefined){_8c(id,_38[id],_3a[id],_39[id],_3b[id],_3c[id],1,1);}if(_38[id]==null||_38[id]==""){if(_42[id]<5){setTimeout(function(){_eb(id,_ec,_ed,old,_ee,_ef,_f0);},2000);}}else{var _f1="";if(parseInt(_ed)==1){fromname=_2[10];_f1=" cometchat_self";}else{fromname=_38[id];}if(parseInt(_ef)==1){_ec=_ec.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br>").replace(/\"/g,"&quot;");}if(_ed!=1&&_6==1){if($.cookie(_a+"sound")&&$.cookie(_a+"sound")=="true"){}else{if(old!=1){_5b();}}}separator=":&nbsp;&nbsp;";if($("#cometchat_message_"+_ee).length>0){$("#cometchat_message_"+_ee+" .cometchat_chatboxmessagecontent").html(_ec);}else{sentdata="";if(_f0!=null){var ts=new Date(_f0*1000);sentdata=_aa(ts);}if(!_10){fromname=fromname.split(" ")[0];}var msg=_12c("<div class=\"cometchat_chatboxmessage\" id=\"cometchat_message_"+_ee+"\"><span class=\"cometchat_chatboxmessagefrom"+_f1+"\"><strong>"+fromname+"</strong>"+separator+"</span><span class=\"cometchat_chatboxmessagecontent"+_f1+"\">"+_ec+"</span>"+sentdata+"</div>",_f1);$("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").append(msg);$("#cometchat_typing_"+id).css("display","none");$("#cometchat_tabcontenttext_"+id).scrollTop(50000);setTimeout(function(){$("#cometchat_tabcontenttext_"+id).scrollTop(50000);},100);var _f2=new Date();var _f3=Math.floor(_f2.getTime()/1000)-_4a;if(_f3>5){if(_50==""){document.title=_2[15];}}}if(_29!=id&&old!=1){_b9(id,1,1);}}};function _f4(id){if(_38[id]==null||_38[id]==""){if(_42[id]<5){setTimeout(function(){_f4(id);},500);}}else{if(_29!=id){$("#cometchat_user_"+id).click();}}};function _f5(id){if(_38[id]==null||_38[id]==""){if(_42[id]<5){setTimeout(function(){_f5(id);},500);}}else{$("#cometchat_user_"+id).click();}};function _f6(id,_f7,_f8){if(_38[id]==null||_38[id]==""){if(_42[id]<5){setTimeout(function(){_f6(id,_f7,_f8);},1000);}}else{$("#cometchat_tabcontenttext_"+id).append("<div>"+_f7+"</div>");$("#cometchat_tabcontenttext_"+id).scrollTop(50000);$("#cometchat_typing_"+id).css("display","none");setTimeout(function(){$("#cometchat_tabcontenttext_"+id).scrollTop(50000);},100);_41[id]=1;if(_f8==1){var _f9=new Date();var _fa=Math.floor(_f9.getTime()/1000)-_4a;if(_fa>5){if(_50==""){document.title=_2[15];}}}if($.cookie(_a+"sound")&&$.cookie(_a+"sound")=="true"){}else{if(_f==1&&_f8==1){_5b();}}}};function _71(_fb){_26["timestamp"]=_33;_26["typingto"]=_48;_26["blh"]=_4f;_26["status"]="";if(_fb==1){_26["f"]=1;}else{delete _26["f"];}var _fc="";var _fd={};var _fe={};_fd["available"]="";_fd["busy"]="";_fd["offline"]="";_fd["away"]="";_fe["available"]="";_fe["busy"]="";_fe["offline"]="";_fe["away"]="";var _ff=0;var _100=new Date();var _101=Math.floor(_100.getTime()/1000)-_4a;if(_101>_17&&_4b==0){if(_4e=="available"||_4e=="busy"){_4b=1;_26["status"]="away";_78();$("#cometchat_userstab_icon").addClass("cometchat_user_away2");}}if(_101<_17&&_4b==1){if(_4e=="available"||_4e=="busy"){_4b=0;_26["status"]=_4e;_78();$("#cometchat_userstab_icon").addClass("cometchat_user_"+_4e+"2");}}if(_55==1){_26["cookie_"+_a+"state"]=$.cookie(_a+"state");_26["cookie_"+_a+"hidebar"]=$.cookie(_a+"hidebar");_26["cookie_"+_a+"an"]=$.cookie(_a+"an");_26["cookie_"+_a+"loggedin"]=$.cookie(_a+"loggedin");}_26["basedata"]=_51;$.ajax({url:_1+"cometchat_receive.php",data:_26,dataType:"jsonp",type:_56,timeout:_57,error:function(){clearTimeout(_2e);_30=_8;_2e=setTimeout(function(){_71();},_30);},success:function(data){if(data){var _102=0;var _103="";$.each(data,function(type,item){if(type=="blh"){_4f=item;}if(type=="an"){if($.cookie(_a+"popup")&&$.cookie(_a+"popup")=="true"){}else{_4d=100;message="<div class=\"cometchat_announcement\">"+item.m+"</div>";if(item.o){var _104=(item.o-1);if(_104>0){message+="<div class=\"cometchat_notification\" onclick=\"javascript:jqcc.cometchat.launchModule('announcements')\"><div class=\"cometchat_notification_message cometchat_notification_message_and\">"+_2[36]+_104+_2[37]+"</div><div style=\"clear:both\" /></div>";}}else{$.cookie(_a+"an",item.id,{path:"/",expires:365});}_5c("cometchat_userstab",message,0);clearTimeout(_4c);_4c=setTimeout(function(){$("#cometchat_tooltip").css("display","none");_4d=0;},_1c);}}if(type=="buddylist"){var _105=0;var _106=0;$.each(item,function(i,_107){if(_107.n.length>_12&&!_47.test(_107.n)){longname=_107.n.substr(0,_12)+"...";}else{longname=_107.n;}if(_41[_107.id]!=null){$("#cometchat_user_"+_107.id+" .cometchat_closebox_bottom_status").removeClass("cometchat_available").removeClass("cometchat_busy").removeClass("cometchat_offline").removeClass("cometchat_away").addClass("cometchat_"+_107.s);if($("#cometchat_user_"+_107.id+"_popup").length>0){$("#cometchat_user_"+_107.id+"_popup .cometchat_tabsubtitle .cometchat_message").html(_107.m);}}if(_107.s!="offline"){_105++;}_106++;_fd[_107.s]+="<div id=\"cometchat_userlist_"+_107.id+"\" class=\"cometchat_userlist\" onmouseover=\"jqcc(this).addClass('cometchat_userlist_hover');\" onmouseout=\"jqcc(this).removeClass('cometchat_userlist_hover');\"><span class=\"cometchat_userscontentname\">"+longname+"</span><span class=\"cometchat_userscontentdot cometchat_"+_107.s+"\"></span></div>";_fe[_107.s]+="<div id=\"cometchat_userlist_"+_107.id+"\" class=\"cometchat_userlist\" onmouseover=\"jqcc(this).addClass('cometchat_userlist_hover');\" onmouseout=\"jqcc(this).removeClass('cometchat_userlist_hover');\"><span class=\"cometchat_userscontentavatar\"><img class=\"cometchat_userscontentavatarimage\" original=\""+_107.a+"\"></span><span class=\"cometchat_userscontentname\">"+longname+"</span><span class=\"cometchat_userscontentdot cometchat_"+_107.s+"\"></span></div>";var _108="";if(_19==1&&_9e("initialize")!=1&&_3a[_107.id]!="available"&&_3a[_107.id]!="busy"&&_3a[_107.id]!="away"&&_107.s=="available"){_108=_2[19];}if(_1a==1&&_9e("initialize")!=1&&_3a[_107.id]!="available"&&_3a[_107.id]!="busy"&&_3a[_107.id]!="away"&&_107.s=="busy"){_108=_2[21];}if(_18==1&&_9e("initialize")!=1&&_3a[_107.id]!="offline"&&_107.s=="offline"){_108=_2[20];}if(_108!=""){_103+="<div class=\"cometchat_notification\" onclick=\"javascript:jqcc.cometchat.chatWith('"+_107.id+"')\"><div class=\"cometchat_notification_avatar\"><img class=\"cometchat_notification_avatar_image\" src=\""+_107.a+"\"></div><div class=\"cometchat_notification_message\">"+_107.n+_108+"<br/><span class=\"cometchat_notification_status\">"+_107.m+"</span></div><div style=\"clear:both\" /></div>";}_3a[_107.id]=_107.s;_39[_107.id]=_107.m;_38[_107.id]=_107.n;_3b[_107.id]=_107.a;_3c[_107.id]=_107.l;});var _109=_fe;if(_106>_15){_109=_fd;}for(buddystatus in _109){if(_109.hasOwnProperty(buddystatus)){if(_109[buddystatus]==""){document.getElementById("cometchat_userslist_"+buddystatus).style.display="none";}else{document.getElementById("cometchat_userslist_"+buddystatus).style.display="block";_13f("cometchat_userslist_"+buddystatus,"<div>"+_109[buddystatus]+"</div>");}}}if(_e4("buddylist")==1){$(".cometchat_userscontentavatar img").each(function(){if($(this).attr("original")){$(this).attr("src",$(this).attr("original"));$(this).removeAttr("original");}});}$("#cometchat_search").keyup();$(".cometchat_userlist").unbind("click");$(".cometchat_userlist").bind("click",function(e){_e7(e.target);});$("#cometchat_userstab_text").html(_2[9]+" ("+(_105+_3e)+")");_3f=_105;_34=_105+_3e;if(_106==0){document.getElementById("cometchat_userslist_available").style.display="block";$("#cometchat_userslist_available").html("<div class=\"cometchat_nofriends\">"+_2[14]+"</div>");}if(_106>_14){$("#cometchat_searchbar").css("display","block");}else{$("#cometchat_searchbar").css("display","none");}if(_103!=""&&!$("#cometchat_userstab_popup").hasClass("cometchat_tabopen")&&!$("#cometchat_optionsbutton_popup").hasClass("cometchat_tabopen")){if(_4d<10){if($.cookie(_a+"popup")&&$.cookie(_a+"popup")=="true"){}else{_4d=10;_5c("cometchat_userstab",_103,0);clearTimeout(_4c);_4c=setTimeout(function(){$("#cometchat_tooltip").css("display","none");_4d=0;},_1b);}}}if(_50!=""){jqcc[_50].updateBuddyList(item);}}if(type=="loggedout"){$.cookie(_a+"loggedin",null,{path:"/"});$.cookie(_a+"state",null,{path:"/"});$.cookie(_a+"jabber",null,{path:"/"});$.cookie(_a+"jabber_type",null,{path:"/"});$.cookie(_a+"hidebar",null,{path:"/"});$("#cometchat_optionsbutton").addClass("cometchat_optionsimages_exclamation");$("#cometchat_userstab").hide();$("#cometchat_chatboxes").hide();$("#cometchat_chatbox_left").hide();$("#cometchat_chatbox_right").hide();$("#cometchat_optionsbutton_popup").removeClass("cometchat_tabopen");$("#cometchat_userstab_popup").removeClass("cometchat_tabopen");$("#cometchat_optionsbutton").removeClass("cometchat_tabclick");$("#cometchat_userstab").removeClass("cometchat_tabclick");if(_29!=""){$("#cometchat_user_"+_29+"_popup").removeClass("cometchat_tabopen");_29="";_7e("openChatboxId",_29);}_2a=1;if(_50!=""){jqcc[_50].loggedOut();}}if(type=="userstatus"){$.each(item,function(name,_10a){if(name=="message"){$("#cometchat_optionsbutton_popup .cometchat_statustextarea").val(_10a);}if(name=="status"){_4e=_10a;if(_10a=="offline"){_7c(1);}else{_77();$("#cometchat_userstab_icon").addClass("cometchat_user_"+_10a+"2");$("#cometchat_optionsbutton_popup ."+_10a).css("text-decoration","underline");}}});}if(type=="cometid"){cometcall_function(item.id,item.td,_50);}if(type=="initialize"){_33=item;_11c();}if(type=="tt"){$(".cometchat_typing").css("display","none");var _10b=item.split(",");var t=_10b.length;while(t>-1){$("#cometchat_typing_"+_10b[t]).css("display","block");t--;}}if(type=="messages"){if(_50!=""){jqcc[_50].newMessages(item);}$.each(item,function(i,_10c){_33=_10c.id;if((_29)==(_10c.from)&&_38[_10c.from]!=""&&_38[_10c.from]!=null){++_102;var name=_38[_10c.from];var _10d="";if(_10c.self==1){fromname=_2[10];_10d=" cometchat_self";}else{fromname=name;}if($("#cometchat_message_"+_10c.id).length>0){$("#cometchat_message_"+_10c.id+" .cometchat_chatboxmessagecontent").html(_10c.message);}else{var ts=new Date(_10c.sent*1000); 

if(!_10){ fromname=fromname.split(" ")[0]; } 
_fc+=(_12c("<div class=\"cometchat_chatboxmessage\" id=\"cometchat_message_"+_10c.id+"\"><span class=\"cometchat_chatboxmessagefrom"+_10d+"\"><strong>"+fromname+"</strong>:&nbsp;&nbsp;</span><span class=\"cometchat_chatboxmessagecontent"+_10d+"\">"+_10c.message+"</span>"+_aa(ts)+"</div>",_10d));

if(_10c.old==0&&_10c.self==0){_ff=1;}}}else{var _10e=0;
if($("#cometchat_user_"+_10c.from).length>0){}else{_10e=1;}_eb(_10c.from,_10c.message,_10c.self,_10c.old,_10c.id,0,_10c.sent);if(_29==""&&_5==1&&_10e==1){_f4(_10c.from);}}});_31=1;_30=_8;}});if(_29!=""&&_102>0){_f6(_29,_fc,_ff);}}_d9("initialize","0");_d9("currenttime","0");if(_2a!=1&&_2b!=1){_31++;if(_31>4){_30*=2;_31=1;}if(_30>_9){_30=_9;}clearTimeout(_2e);_2e=setTimeout(function(){_71();},_30);}}});};function _10f(){_2[1]="Type your status and hit the enter key!";};function _110(){$("body").append("<div id=\"cometchat\"></div><div id=\"cometchat_hidden\"><div id=\"cometchat_hidden_content\"></div></div><div id=\"cometchat_tooltip\"><div class=\"cometchat_tooltip_content\"></div></div>");var _111="";var _112="";for(x in _3){if(_3.hasOwnProperty(x)){var icon=_3[x];_111+=("<div id=\"cometchat_trayicon_"+x+"\" class=\"cometchat_trayicon\"><div class=\"cometchat_trayiconimage\"><img src=\""+_1+"modules/"+icon[0]+"/icon.png\"></div>");if(_3[x][8]){_111+="<div class=\"cometchat_trayicontext\">"+_3[x][1]+"</div>";}_111+="</div>";if(icon[3]=="_popup"){_112+="<div id=\"cometchat_trayicon_"+x+"_popup\" class=\"cometchat_traypopup\" style=\"display:none\"><div class=\"cometchat_traytitle\"><div class=\"cometchat_name\">"+icon[1]+"</div><div class=\"cometchat_minimizebox\"></div><br clear=\"all\"/></div><div class=\"cometchat_traycontent\"><div class=\"cometchat_traycontenttext\"><iframe  allowtransparency=\"true\" frameborder=0 width=\""+icon[4]+"\" height=\""+icon[5]+"\" id=\"cometchat_trayicon_"+x+"_iframe\"></iframe></div></div></div>";}if(!isNaN(icon[6])&&Number(icon[6])>0){_25+=Number(icon[6]);}else{_25+=16;}_25+=18;}}var _113=$.cookie(_a+"state");var _114=0;if(_113!=null){var _115=_113.split(/:/);_114=_115[3];}var _116="<div id=\"cometchat_trayicons\">"+_112+"</div><div id=\"cometchat_base\"><div id=\"cometchat_hide\" onclick=\"jqcc.cometchat.hideBar();\"></div><span id=\"cometchat_optionsbutton\" class=\"cometchat_tab cometchat_optionsimages\"></span><div id=\"cometchat_trayicons\">"+_111+"</div><span id=\"cometchat_userstab\" class=\"cometchat_tab\"><span id=\"cometchat_userstab_icon\"></span><span id=\"cometchat_userstab_text\">"+_2[9]+" ("+_114+")</span></span><div id=\"cometchat_chatbox_right\"><span class=\"cometchat_tabtext\"></span><span style=\"top:-5px;display:none\" class=\"cometchat_tabalertlr\"></span></div><div id=\"cometchat_chatboxes\"><div id=\"cometchat_chatboxes_wide\"></div></div><div id=\"cometchat_chatbox_left\"><span class=\"cometchat_tabtext\"></span><span class=\"cometchat_tabalertlr\" style=\"top:-5px;display:none;\"></span></div></div><div id=\"cometchat_optionsbutton_popup\" class=\"cometchat_tabpopup\" style=\"display:none\"><div class=\"cometchat_userstabtitle\"><div class=\"cometchat_userstabtitletext\">"+_2[0]+"</div><div class=\"cometchat_minimizebox\"></div><br clear=\"all\"/></div><div class=\"cometchat_tabsubtitle\">"+_2[1]+"</div><div class=\"cometchat_tabcontent cometchat_optionstyle\"><strong>"+_2[2]+"</strong><br/><textarea class=\"cometchat_statustextarea\"></textarea><br/><input type=\"button\" class=\"cometchat_statusbutton\" value=\""+_2[22]+"\"><br/><div class=\"cometchat_statusinputs\"><strong>"+_2[23]+"</strong><br/><span class=\"cometchat_user_available\"></span><span class=\"cometchat_optionsstatus available\">"+_2[3]+"</span><span class=\"cometchat_optionsstatus2 cometchat_user_invisible\" ></span><span class=\"cometchat_optionsstatus invisible\">"+_2[5]+"</span><div style=\"clear:both\"></div><span class=\"cometchat_optionsstatus2 cometchat_user_busy\"></span><span class=\"cometchat_optionsstatus busy\">"+_2[4]+"</span><span class=\"cometchat_optionsstatus2 cometchat_user_invisible\"></span><span class=\"cometchat_optionsstatus cometchat_gooffline\">"+_2[11]+"</span><br clear=\"all\"/></div><div style=\"border-top:1px solid #eeeeee;margin-top:10px;padding-top:4px;\"><div><input type=\"checkbox\" id=\"cometchat_soundnotifications\" style=\"vertical-align: -2px;\">"+_2[13]+"</div><div><input type=\"checkbox\" id=\"cometchat_popupnotifications\" style=\"vertical-align: -2px;\">"+_2[24]+"</div></div><div class=\"cometchat_hidebartext\"><div><a href=\"javascript:void(0);\" id=\"cometchat_hidebar\">"+_2[25]+"</a></div></div></div></div><div id=\"cometchat_userstab_popup\" class=\"cometchat_tabpopup\" style=\"display:none\"><div class=\"cometchat_userstabtitle\"><div class=\"cometchat_userstabtitletext\">"+_2[9]+"</div><div class=\"cometchat_minimizebox\"></div><br clear=\"all\"/></div><div class=\"cometchat_tabsubtitle\" id=\"cometchat_searchbar\"><input type=\"text\" name=\"cometchat_search\" class=\"cometchat_search cometchat_search_light\" id=\"cometchat_search\" value=\""+_2[18]+"\"></div><div class=\"cometchat_tabcontent cometchat_tabstyle\"><div id=\"cometchat_userscontent\"><div id=\"cometchat_userslist_available\"></div><div id=\"cometchat_userslist_busy\"></div><div id=\"cometchat_userslist_away\"></div><div id=\"cometchat_userslist_offline\"></div></div></div></div>";document.getElementById("cometchat").innerHTML=_116;$(".cometchat_trayicontext").each(function(){_25+=this.clientWidth+1;id=$(this).parent().attr("id");$("#"+id+"_popup .cometchat_traycontent").css("background-position",(this.clientWidth)+"px bottom");});_7f();_bd();$("#cometchat_chatboxes").attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false;});$("#cometchat_userscontent").attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false;});$(".cometchat_trayicon").attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false;});$(".cometchat_tab").attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false;});$("#cometchat_hidebar").click(function(){_7c();$("#cometchat").css("display","none");$("#cometchat_hidden").css("display","block");$.cookie(_a+"hidebar","1",{path:"/",expires:365});});$("#cometchat_hidden").click(function(){$("#cometchat").css("display","block");$("#cometchat_hidden").css("display","none");$.cookie(_a+"hidebar","0",{path:"/",expires:365});if(_2a==0){clearTimeout(_2e);_71();}});$("#cometchat_hidden").mouseover(function(){if(_4d==0){_5c("cometchat_hidden_content",_2[26],0);}$(this).addClass("cometchat_tabmouseover");});$("#cometchat_hidden").mouseout(function(){$(this).removeClass("cometchat_tabmouseover");if(_4d==0){$("#cometchat_tooltip").css("display","none");}});$("#cometchat_hide").mouseover(function(){if(_4d==0){_5c("cometchat_hide",_2[27],0);}$(this).addClass("cometchat_tabmouseover");});$("#cometchat_hide").mouseout(function(){$(this).removeClass("cometchat_tabmouseover");if(_4d==0){$("#cometchat_tooltip").css("display","none");}});$("#cometchat .cometchat_trayicon").mouseover(function(){var id=$(this).attr("id").substr(19);if(!_3[id][8]){if(_4d==0){_5c("cometchat_trayicon_"+id,_3[id][1],1);}}$(this).addClass("cometchat_tabmouseover");});$("#cometchat .cometchat_trayicon").mouseout(function(){$(this).removeClass("cometchat_tabmouseover");if(_4d==0){$("#cometchat_tooltip").css("display","none");}});$("#cometchat .cometchat_traytitle").mouseenter(function(){var id=$(this).parent().attr("id");id=id.substring(19,id.length-6);$("#cometchat_trayicon_"+id+"_popup .cometchat_traytitle .cometchat_minimizebox").addClass("cometchat_chatboxtraytitlemouseover");});$("#cometchat .cometchat_traytitle").mouseleave(function(){var id=$(this).parent().attr("id");id=id.substring(19,id.length-6);$("#cometchat_trayicon_"+id+"_popup .cometchat_traytitle .cometchat_minimizebox").removeClass("cometchat_chatboxtraytitlemouseover");});$("#cometchat .cometchat_traytitle").click(function(){var id=$(this).parent().attr("id");id=id.substring(19,id.length-6);$("#cometchat_trayicon_"+id).click();});$("#cometchat .cometchat_trayicon").click(function(){var id=$(this).attr("id").substr(19);_12a(id,0);if(_29!=""){$("#cometchat_user_"+_29+"_popup").removeClass("cometchat_tabopen");$("#cometchat_user_"+_29).removeClass("cometchat_tabclick").removeClass("cometchat_usertabclick");$("#cometchat_user_"+_29+" .cometchat_closebox_bottom").removeClass("cometchat_closebox_bottom_click");_29="";_7e("openChatboxId",_29);}$("#cometchat_userstab_popup").removeClass("cometchat_tabopen");$("#cometchat_userstab").removeClass("cometchat_userstabclick").removeClass("cometchat_tabclick");$("#cometchat_optionsbutton_popup").removeClass("cometchat_tabopen");$("#cometchat_optionsbutton").removeClass("cometchat_tabclick");_7e("buddylist","0");var _117="_self";if(_3[id][3]){_117=_3[id][3];}if(_117=="_popup"){if(_35!=id){$("#cometchat_trayicon_"+_35+"_popup").removeClass("cometchat_tabopen");$("#cometchat_trayicon_"+_35).removeClass("cometchat_trayclick");_35="";_7e("trayOpen",_35);}if(_35==""){$("#cometchat_trayicon_"+id+"_popup").css("left",$("#cometchat_trayicon_"+id).offset().left-1).css("width",_3[id][4]);if(ie6){$("#cometchat_trayicon_"+id+"_popup .cometchat_traytitle").css("width",parseInt(_3[id][4])-5);}if($("#cometchat_trayicon_"+id+"_iframe").attr("src")===undefined||$("#cometchat_trayicon_"+id+"_iframe").attr("src")=="blank.html"||$("#cometchat_trayicon_"+id+"_iframe").attr("src")==""){$("#cometchat_trayicon_"+id+"_iframe").attr("src",_3[id][2]+"?basedata="+_51);}$("#cometchat_trayicon_"+id).addClass("cometchat_trayclick");$("#cometchat_trayicon_"+id+"_popup").addClass("cometchat_tabopen");_35=id;_7e("trayOpen",_35);}else{$("#cometchat_trayicon_"+_35+"_popup").removeClass("cometchat_tabopen");$("#cometchat_trayicon_"+_35).removeClass("cometchat_trayclick");_35="";_7e("trayOpen",_35);}if(ie6){_62();}}else{window.open(_3[id][2],_117);}});$("#cometchat_chatbox_right").bind("click",_d5);$("#cometchat_chatbox_left").bind("click",_d3);_c3();_cd();$("#cometchat_chatbox_right").mouseover(function(){$(this).addClass("cometchat_chatbox_lr_mouseover");});$("#cometchat_chatbox_right").mouseout(function(){$(this).removeClass("cometchat_chatbox_lr_mouseover");});$("#cometchat_chatbox_left").mouseover(function(){$(this).addClass("cometchat_chatbox_lr_mouseover");});$("#cometchat_chatbox_left").mouseout(function(){$(this).removeClass("cometchat_chatbox_lr_mouseover");});$(window).bind("resize",_c3);_d9("buddylist","1");_d9("initialize","1");_d9("currenttime",_46);var _118=1;if(typeof document.body.style.maxHeight==="undefined"){if(_1f){$("#cometchat").css("display","none");_118=0;}else{ie6=true;_62();$(window).bind("scroll",function(){_62();});}}else{if(_52){if(_20&&_50==""){$("#cometchat").css("display","none");_118=0;}else{ie6=true;_62();$(window).bind("scroll",function(){_62();});}}}document.onmousemove=function(e){var _119=new Date();_4a=Math.floor(_119.getTime()/1000);};if(_23==1){_11a();}if($.cookie(_a+"hidebar")=="1"){$("#cometchat").css("display","none");$("#cometchat_hidden").css("display","block");_118=0;}if(_50==""){var _11b=_24.length;if(_11b>0){for(var i=0;i<_11b;i++){var name="cc"+_24[i];if(typeof ($[name])=="object"){$[name].init();}}}}if($.inArray("block",_4)>0&&_50==""){$.ccblock.addCode();}if(_118==1){_71();}};function _11c(){if(_2a==0){var _11d=$.cookie(_a+"state");_dd("updatingsession","1");if(_11d!=null){var _11e=_11d.split(/:/);if(_2b==0){var _11f=0;if(_11e[0]!=" "&&_11e[0]!=""){_11f=_11e[0];}if((_11f==0&&$("#cometchat_userstab").hasClass("cometchat_tabclick"))||(_11f==1&&!($("#cometchat_userstab").hasClass("cometchat_tabclick")))){$("#cometchat_userstab").click();}_11f="";if(_11e[1]!=" "&&_11e[1]!=""){_11f=_11e[1];}if(_11f!=_e4("activeChatboxes")){var _120={};var _121={};if(_11f!=""){var _122=_11f.split(/,/);for(i=0;i<_122.length;i++){var _123=_122[i].split(/\|/);_120[_123[0]]=_123[1];}}if(_e4("activeChatboxes")!=""){var _122=_e4("activeChatboxes").split(/,/);for(i=0;i<_122.length;i++){var _123=_122[i].split(/\|/);_121[_123[0]]=_123[1];}}for(r in _120){if(_120.hasOwnProperty(r)){_b9(r,parseInt(_120[r]),0);if(parseInt(_120[r])>0){_37=1;}}}for(y in _121){if(_121.hasOwnProperty(y)){if(_120[y]==null){$("#cometchat_user_"+y+"_popup .cometchat_tabtitle .cometchat_closebox").click();}}}}if(_37>0){if(_50==""){if(document.title==_2[15]){document.title=_36;}else{document.title=_2[15];}}}else{var _124=new Date();var _125=Math.floor(_124.getTime()/1000)-_4a;if(_125<5){if(_50==""){document.title=_36;}}}_11f=0;if(_11e[2]!=" "&&_11e[2]!=""){_11f=_11e[2];}if(_11f!=_29){if(_29!=""){_f5(_29);}if(_11f!=""){_f5(_11f);}}if(_11e[4]==1){_7c(1);}}if(_11e[4]==0&&_2b==1){_2b=0;$("#cometchat_userstab_text").html(_2[9]+" ("+_34+")");_71(1);_77();$("#cometchat_userstab_icon").addClass("cometchat_user_available2");$("#cometchat_optionsbutton_popup .available").css("text-decoration","underline");}if(_11e[5]!=" "&&_11e[5]!=""&&_11e[5]!=_35&&_11==1){$("#cometchat_trayicon_"+_11e[5]).click();}}_dd("updatingsession","0");clearTimeout(_2f);_2f=setTimeout(function(){_11c();},5000);}};var _126={};function _62(){var _127=["cometchat_base","cometchat_userstab_popup","cometchat_optionsbutton_popup","cometchat_tooltip","cometchat_hidden"];if(_29!=""){_127.push("cometchat_user_"+_29+"_popup");}if(_35!=""&&_35!=0){_127.push("cometchat_trayicon_"+_35+"_popup");}for(x in _127){$("#"+_127[x]).css("position","absolute");var _128=parseInt($("#"+_127[x]).css("bottom"));if(x==0){_128=0;}var _129=parseInt($("#"+_127[x]).height());if(_126[_127[x]]&&x!=3){_129=_126[_127[x]];}else{_126[_127[x]]=_129;}if(x==3){}$("#"+_127[x]).css("top",(parseInt($(window).height())-_128-_129+parseInt($(window).scrollTop()))+"px");}};function _12a(id,_12b){if(!$("#cometchat_trayicon_"+id+"_popup").hasClass("cometchat_tabopen")){$("#cometchat_trayicon_"+id+" .cometchat_tabalert").remove();if(_12b!=0){$("<div/>").css("top","-10px").addClass("cometchat_tabalert").html(_12b).appendTo($("#cometchat_trayicon_"+id));}}};function _12c(_12d,self){if(_21){if(self==null||self==""){return "<table class=\"cometchat_iphone\" cellpadding=0 cellspacing=0 style=\"float:right\"><tr><td class=\"cometchat_tl\"></td><td class=\"cometchat_tc\"></td><td class=\"cometchat_tr\"></td></tr><tr><td class=\"cometchat_cl\"></td><td class=\"cometchat_cc\">"+_12d+"</td><td class=\"cometchat_cr\"></td></tr><tr><td class=\"cometchat_bl\"></td><td class=\"cometchat_bc\"></td><td class=\"cometchat_br\"></td></tr></table><div style=\"clear:both\"></div>";}else{return "<table class=\"cometchat_iphone\" cellpadding=0 cellspacing=0><tr><td class=\"cometchat_xtl\"></td><td class=\"cometchat_xtc\"></td><td class=\"cometchat_xtr\"></td></tr><tr><td class=\"cometchat_xcl\"></td><td class=\"cometchat_xcc\">"+_12d+"</td><td class=\"cometchat_xcr\"></td></tr><tr><td class=\"cometchat_xbl\"></td><td class=\"cometchat_xbc\"></td><td class=\"cometchat_xbr\"></td></tr></table><div style=\"clear:both\"></div>";}}return _12d;};function _12e(){if(_50==""&&_22==1&&$.cookie(_a+"loggedin")!=1){$.ajax({url:_1+"cometchat_check.php",data:{"init":"1",basedata:_51},dataType:"jsonp",type:_56,timeout:_57,success:function(data){if(data!="0"){$.cookie(_a+"loggedin","1",{path:"/"});_110();}}});}else{_110();}};function _11a(){$("embed").each(function(i){if($(this).attr("id")!="cometchatbeep"){var _12f=this.cloneNode(true);_12f.setAttribute("WMode","Transparent");$(this).before(_12f);$(this).remove();}});$("object").each(function(i,v){if($(this).attr("id")!="cometchatbeep"){var _130=$(this).children("embed");if(typeof (_130.get(0))!="undefined"){if(typeof (_130.get(0).outerHTML)!="undefined"){_130.attr("wmode","transparent");$(this.outerHTML).insertAfter(this);$(this).remove();}return true;}var algo=this.attributes;var _131="<OBJECT ";for(var i=0;i<algo.length;i++){_131+=algo[i].name+"=\""+algo[i].value+"\" ";}_131+=">";var flag=false;$(this).children().each(function(elem){if(this.nodeName=="PARAM"){if(this.name=="wmode"){flag=true;_131+="<PARAM NAME=\""+this.name+"\" VALUE=\"transparent\">";}else{_131+="<PARAM NAME=\""+this.name+"\" VALUE=\""+this.value+"\">";}}});if(!flag){_131+="<PARAM NAME=\"wmode\" VALUE=\"transparent\">";}_131+="</OBJECT>";$(_131).insertAfter(this);$(this).remove();}});};arguments.callee.c5=function(){_10f();_12e();return;};arguments.callee.c6=function(){_12e();return;};arguments.callee.getBaseData=function(){return _51;};arguments.callee.getActiveId=function(){return _29;};arguments.callee.getUser=function(id,_132){$.ajax({url:_1+"cometchat_getid.php",data:{userid:id,basedata:_51},cache:false,dataType:"jsonp",type:_56,timeout:_57,success:function(data){if(data){window[_132](data);}else{window[_132](0);}}});};arguments.callee.ping=function(){return 1;};arguments.callee.getLanguage=function(id){return _2[id];};arguments.callee.chatWith=function(id){if(_2a==0){if(_2b==1){_2b=0;$("#cometchat_userstab_text").html(_2[9]+" ("+_34+")");_71(1);$("#cometchat_optionsbutton_popup .available").click();}_8c(id,_38[id],_3a[id],_39[id],_3b[id],_3c[id]);}};arguments.callee.getRecentData=function(id){$.ajax({cache:false,url:_1+"cometchat_receive.php",data:{chatbox:id,basedata:_51},dataType:"jsonp",type:_56,timeout:_57,success:function(data){if(_50!=""){jqcc[_50].loadData(id,data);}}});};arguments.callee.getUserDetails=function(id){$.ajax({url:_1+"cometchat_getid.php",data:{userid:id,basedata:_51},type:_56,timeout:_57,cache:false,async:false,dataType:"jsonp",success:function(data){if(_50!=""){jqcc[_50].loadUserData(id,data);}}});};arguments.callee.launchModule=function(id){if(!$("#cometchat_trayicon_"+id+"_popup").hasClass("cometchat_tabopen")){$("#cometchat_trayicon_"+id).click();}};arguments.callee.toggleModule=function(id){$("#cometchat_trayicon_"+id).click();};arguments.callee.closeModule=function(id){if($("#cometchat_trayicon_"+id+"_popup").hasClass("cometchat_tabopen")){$("#cometchat_trayicon_"+id).click();}};arguments.callee.joinChatroom=function(_133,_134,_135){$("#cometchat_trayicon_chatrooms_iframe").attr("src",_1+"modules/chatrooms/index.php?roomid="+_133+"&inviteid="+_134+"&roomname="+_135);$("#cometchat_trayicon_chatrooms").click();};arguments.callee.sendMessage=function(id,_136){if(_136!=""){$.ajax({url:_1+"cometchat_send.php",data:{to:id,message:_136,basedata:_51},dataType:"jsonp",type:_56,timeout:_57,success:function(data){if(data){_eb(id,_136,1,1,data,1,1);$("#cometchat_tabcontenttext_"+id).scrollTop(50000);setTimeout(function(){$("#cometchat_tabcontenttext_"+id).scrollTop(50000);},100);}_31=1;if(_30>_8){_30=_8;clearTimeout(_2e);_2e=setTimeout(function(){_71();},_8);}}});}};arguments.callee.hideBar=function(){$("#cometchat_hidebar").click();};arguments.callee.getBaseUrl=function(){return _1;};arguments.callee.setAlert=function(id,_137){_12a(id,_137);};arguments.callee.closeTooltip=function(){$("#cometchat_tooltip").css("display","none");};arguments.callee.scrollToTop=function(){$("html,body").animate({scrollTop:0},{"duration":"slow"});};arguments.callee.reinitialize=function(){if(_2a==1){$("#cometchat_optionsbutton").removeClass("cometchat_optionsimages_exclamation");$("#cometchat_userstab").show();$("#cometchat_chatboxes").show();$("#cometchat_chatbox_left").show();$("#cometchat_chatbox_right").show();_2a=0;_d9("initialize","1");_71();}};arguments.callee.addMessage=function(id,_138,self,old,_139,_13a,sent,_13b){_eb(id,_138,self,old,_139,_13a,sent,_13b);};arguments.callee.updateHtml=function(id,temp){if($("#cometchat_user_"+id+"_popup").length>0){document.getElementById("cometchat_tabcontenttext_"+id).innerHTML="<div>"+temp+"</div>";$("#cometchat_tabcontenttext_"+id).scrollTop(50000);setTimeout(function(){$("#cometchat_tabcontenttext_"+id).scrollTop(50000);},100);}else{if(_42[id]===undefined||_42[id]<5){setTimeout(function(){$.cometchat.updateHtml(id,temp);},1000);}}};arguments.callee.processMessage=function(id,_13c){return _12c(id,_13c);};arguments.callee.replaceHtml=function(id,_13d){_13f(id,_13d);};arguments.callee.userClick=function(e){_e7(e);};arguments.callee.userAdd=function(id,s,m,n,a,l){_3d[id]=1;_3a[id]=s;_39[id]=m;_38[id]=n;_3b[id]=a;_3c[id]=l;};arguments.callee.updateJabberOnlineNumber=function(_13e){_3e=_13e;_34=_3e+_3f;if(_2b==0){$("#cometchat_userstab_text").html(_2[9]+" ("+_34+")");}};arguments.callee.getSessionVariable=function(name){return _e4(name);};arguments.callee.getName=function(id){return _38[id];};};$.expr[":"].icontains=function(a,i,m){return (a.textContent||a.innerText||"").toLowerCase().indexOf(m[3].toLowerCase())>=0;};function _13f(el,html){var _140=typeof el==="string"?document.getElementById(el):el;var _141=_140.cloneNode(false);_141.innerHTML=html;_140.parentNode.replaceChild(_141,_140);return _141;};})(jqcc);

(function($) {

    jQuery.fn.extend({
        slimScroll: function(o) {

            var ops = o;
            //do it for every element that matches selector
            this.each(function(){

            var isOverPanel, isOverBar, isDragg, queueHide, barHeight,
                divS = '<div></div>',
                minBarHeight = 30,
                wheelStep = 30,
                o = ops || {},
                cwidth = o.width || 'auto',
                cheight = o.height || '80%',
                size = o.size || '7px',
                color = o.color || '#000',
                position = o.position || 'right',
                opacity = o.opacity || .4,
                alwaysVisible = o.alwaysVisible === true;
            
                //used in event handlers and for better minification
                var me = $(this);

                //wrap content
                var wrapper = $(divS).css({
                    position: 'relative',
                    overflow: 'hidden',
                    width: cwidth,
                    height: cheight
                }).attr({ 'class': 'slimScrollDiv' });

                //update style for the div
                me.css({
                    overflow: 'hidden',
                    width: cwidth,
                    height: cheight
                });

                //create scrollbar rail
                var rail  = $(divS).css({
                    width: '15px',
                    height: '100%',
                    position: 'absolute',
                    top: 0
                });

                //create scrollbar
                var bar = $(divS).attr({
                    'class': 'slimScrollBar ',
                    style: 'border-radius: ' + size
                    }).css({
                        background: color,
                        width: size,
                        position: 'absolute',
                        top: 0,
                        opacity: opacity,
                        display: alwaysVisible ? 'block' : 'none',
                        BorderRadius: size,
                        MozBorderRadius: size,
                        WebkitBorderRadius: size,
                        zIndex: 99
                });

                //set position
                var posCss = (position == 'right') ? { right: '1px' } : { left: '1px' };
                rail.css(posCss);
                bar.css(posCss);

                //wrap it
                me.wrap(wrapper);

                //append to parent div
                me.parent().append(bar);
                me.parent().append(rail);

                //make it draggable
                bar.draggable({
                    axis: 'y',
                    containment: 'parent',
                    start: function() { isDragg = true; },
                    stop: function() { isDragg = false; hideBar(); },
                    drag: function(e)
                    {
                        //scroll content
                        scrollContent(0, $(this).position().top, false);
                    }
                });

                //on rail over
                rail.hover(function(){
                    showBar();
                }, function(){
                    hideBar();
                });

                //on bar over
                bar.hover(function(){
                    isOverBar = true;
                }, function(){
                    isOverBar = false;
                });

                //show on parent mouseover
                me.hover(function(){
                    isOverPanel = true;
                    showBar();
                    hideBar();
                }, function(){
                    isOverPanel = false;
                    hideBar();
                });

                var _onWheel = function(e)
                {
                    //use mouse wheel only when mouse is over
                    if (!isOverPanel) { return; }

                    var e = e || window.event;

                    var delta = 0;
                    if (e.wheelDelta) { delta = -e.wheelDelta/120; }
                    if (e.detail) { delta = e.detail / 3; }

                    //scroll content
                    scrollContent(0, delta, true);

                    //stop window scroll
                    if (e.preventDefault) { e.preventDefault(); }
                    e.returnValue = false;
                }

                var scrollContent = function(x, y, isWheel)
                {
                    var delta = y;

                    if (isWheel)
                    {
                        //move bar with mouse wheel
                        delta = bar.position().top + y * wheelStep;

                        //move bar, make sure it doesn't go out
                        delta = Math.max(delta, 0);
                        var maxTop = me.outerHeight() - bar.outerHeight();
                        delta = Math.min(delta, maxTop);

                        //scroll the scrollbar
                        bar.css({ top: delta + 'px' });
                    }

                    //calculate actual scroll amount
                    percentScroll = parseInt(bar.position().top) / (me.outerHeight() - bar.outerHeight());
                    delta = percentScroll * (me[0].scrollHeight - me.outerHeight());

                    //scroll content
                    me.scrollTop(delta);

                    //ensure bar is visible
                    showBar();
                }

                var attachWheel = function()
                {
                    if (window.addEventListener)
                    {
                        this.addEventListener('DOMMouseScroll', _onWheel, false );
                        this.addEventListener('mousewheel', _onWheel, false );
                    }
                    else
                    {
                        document.attachEvent("onmousewheel", _onWheel)
                    }
                }

                //attach scroll events
                attachWheel();

                var getBarHeight = function()
                {
                    //calculate scrollbar height and make sure it is not too small
                    barHeight = Math.max((me.outerHeight() / me[0].scrollHeight) * me.outerHeight(), minBarHeight);
                    bar.css({ height: barHeight + 'px' });
                }

                //set up initial height
                getBarHeight();

                var showBar = function()
                {
                    //recalculate bar height
                    getBarHeight();
                    clearTimeout(queueHide);
                    
                    //show only when required
                    if(barHeight >= me.outerHeight()) {
                        return;
                    }
                    bar.fadeIn('fast');
                }

                var hideBar = function()
                {
                    //only hide when options allow it
                    if (!alwaysVisible)
                    {
                        queueHide = setTimeout(function(){
                            if (!isOverBar && !isDragg) { bar.fadeOut('slow'); }
                        }, 1000);
                    }
                }

            });
            
            //maintain chainability
            return this;
        }
    });

    jQuery.fn.extend({
        slimscroll: jQuery.fn.slimScroll
    });

})(jQuery);

$('#cometchat_tabcontenttext').slimscroll({
color: '#000',
size: '10px',
width: '200px',
height: '217px'                  
});

jqcc(document).ready(function () {   

	if (typeof CometChathasBeenRun === 'undefined') {
		CometChathasBeenRun = true;
	} else {
		return;
	}

	jqcc.cometchat();
	jqcc.cometchat.c5();
});
(function($){   
  
	$.ccgames = (function () {

		var title = 'Play a game';
		var lastcall = 0;

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				baseUrl = $.cometchat.getBaseUrl();
				baseData = $.cometchat.getBaseData();
				window.open (baseUrl+'plugins/games/index.php?id='+id+'&basedata='+baseData, 'games_init',"status=0,toolbar=0,menubar=0,directories=0,resizable=0,location=0,status=0,scrollbars=0, width=440,height=260"); 
			},

			accept: function (id,fid,tid,rid,gameId,gameWidth) {
				baseUrl = $.cometchat.getBaseUrl();
				baseData = $.cometchat.getBaseData();
                $.getJSON(baseUrl+'plugins/games/index.php?action=accept&callback=?', {to: id,fid: fid,tid: tid, rid: rid, gameId: gameId, gameWidth: gameWidth, basedata: baseData});
				var w = window.open (baseUrl+'plugins/games/index.php?action=play&fid='+fid+'&tid='+tid+'&rid='+rid+'&gameId='+gameId+'&basedata='+baseData, 'games'+fid+''+tid,"status=0,toolbar=0,menubar=0,directories=0,resizable=0,location=0,status=0,scrollbars=0, width="+(gameWidth-30)+",height=600"); 
				w.focus(); // add popup blocker check
			},

			accept_fid: function (id,fid,tid,rid,gameId,gameWidth) {
				baseUrl = $.cometchat.getBaseUrl();
				baseData = $.cometchat.getBaseData();
				var w =window.open (baseUrl+'plugins/games/index.php?action=play&fid='+fid+'&tid='+tid+'&rid='+rid+'&gameId='+gameId+'&basedata='+baseData, 'games'+fid+''+tid,"status=0,toolbar=0,menubar=0,directories=0,resizable=0,location=0,status=0,scrollbars=0, width="+(gameWidth-30)+",height=600");
				w.focus(); // add popup blocker check
			}

        };
    })();
 
})(jqcc);(function($){   
  
	$.cchandwrite = (function () {

		var title = 'Handwrite a message';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				baseUrl = $.cometchat.getBaseUrl();
				baseData = $.cometchat.getBaseData();
				window.open (baseUrl+'plugins/handwrite/index.php?id='+id+'&basedata='+baseData, 'handwrite',"status=0,toolbar=0,menubar=0,directories=0,resizable=1,location=0,status=0,scrollbars=0, width=330,height=250"); 
			}

        };
    })();
 
})(jqcc);(function($){   
  
	$.ccchathistory = (function () {

		var title = 'View chat history';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				baseUrl = $.cometchat.getBaseUrl();
				baseData = $.cometchat.getBaseData();
				window.open (baseUrl+'plugins/chathistory/index.php?history='+id+'&basedata='+baseData, 'chathistory',"status=0,toolbar=0,menubar=0,directories=0,resizable=0,location=0,status=0,scrollbars=1, width=600,height=500"); 
			}

        };
    })();
 
})(jqcc);(function($){   
  
	$.ccclearconversation = (function () {

		var title = 'Clear conversation';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				if ($("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").html() != '') {
					baseUrl = $.cometchat.getBaseUrl();
					baseData = $.cometchat.getBaseData();

					$.getJSON(baseUrl+'plugins/clearconversation/index.php?action=clear&callback=?', {clearid: id, basedata: baseData});
					$("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").html('');
				}
			}

        };
    })();
 
})(jqcc);(function($){   
  
	$.ccchattime = (function () {

		var title = 'Show/hide time';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {

				if ($("#cometchat_user_"+id+"_popup .cometchat_ts").css('display') == 'none') {
					$("#cometchat_user_"+id+"_popup .cometchat_ts").css('display','inline');
					$("#cometchat_tabcontenttext_"+id).scrollTop(50000);
				} else {
					$("#cometchat_user_"+id+"_popup .cometchat_ts_date").css('display','none');
					$("#cometchat_user_"+id+"_popup .cometchat_ts").css('display','none');					
				}
			}

        };
    })();
 
})(jqcc);(function($){   
  
	$.ccsmilies = (function () {

		var title = 'Add a smiley';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				baseUrl = $.cometchat.getBaseUrl();
				baseData = $.cometchat.getBaseData();
				window.open (baseUrl+'plugins/smilies/index.php?id='+id+'&basedata='+baseData, 'smilies',"status=0,toolbar=0,menubar=0,directories=0,resizable=0,location=0,status=0,scrollbars=0, width=220,height=130"); 
			},

			addtext: function (id,text) {

				var string = $('#cometchat_user_'+id+'_popup .cometchat_textarea').val();
				
				if (string.charAt(string.length-1) == ' ') {
					$('#cometchat_user_'+id+'_popup .cometchat_textarea').val($('#cometchat_user_'+id+'_popup .cometchat_textarea').val()+text);
				} else {
					$('#cometchat_user_'+id+'_popup .cometchat_textarea').val($('#cometchat_user_'+id+'_popup .cometchat_textarea').val()+' '+text);
				}
				
				$('#cometchat_user_'+id+'_popup .cometchat_textarea').focus();
				
			}

        };
    })();
 
})(jqcc);(function($){   
  
	$.ccfiletransfer = (function () {

		var title = 'Send a file';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				baseUrl = $.cometchat.getBaseUrl();
				baseData = $.cometchat.getBaseData();

				window.open (baseUrl+'plugins/filetransfer/index.php?id='+id+'&basedata='+baseData, 'filetransfer',"status=0,toolbar=0,menubar=0,directories=0,resizable=0,location=0,status=0,scrollbars=0, width=400,height=170"); 
			}

        };
    })();
 
})(jqcc);(function($){   
  
	$.ccreport = (function () {

		var title = 'Report Conversation';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				if ($("#cometchat_user_"+id+"_popup .cometchat_tabcontenttext").html() != '') {
					baseUrl = $.cometchat.getBaseUrl();
					window.open (baseUrl+'plugins/report/index.php?id='+id, 'report',"status=0,toolbar=0,menubar=0,directories=0,resizable=0,location=0,status=0,scrollbars=0, width=430,height=220"); 
				} else {
					alert('Please enter your reason as to why you are reporting this user?');
				}
				
			}

        };
    })();
 
})(jqcc);(function($){   
  
	$.ccblock = (function () {

		var title = 'Block User';

        return {

			getTitle: function() {
				return title;	
			},

			init: function (id) {
				baseUrl = $.cometchat.getBaseUrl();
				baseData = $.cometchat.getBaseData();

				var result = confirm('Are you sure you want to block this user?');

				if (result) {
					$.getJSON(baseUrl+'plugins/block/index.php?action=block&callback=?', {to: id, basedata: baseData},
						function(data) {
							alert('User has been blocked successfully.');
							setTimeout(function() {
								if ($('#cometchat_user_'+id).length > 0) {
									$('#cometchat_user_'+id+' .cometchat_closebox_bottom').click();
								}
							}, 1000);
						}
					);
				}
			},

			addCode: function() {
				$('#cometchat_optionsbutton_popup .cometchat_tabcontent').append('<a href="javascript:void(0);" onclick="javascript:jqcc.ccblock.blockList();" style="margin-left:5px;margin-top:5px;">Manage blocked users</a>');
			},

			blockList: function (id) {
				baseUrl = $.cometchat.getBaseUrl();
				baseData = $.cometchat.getBaseData();
				window.open (baseUrl+'plugins/block/index.php?basedata='+baseData, 'blocks',"status=0,toolbar=0,menubar=0,directories=0,resizable=0,location=0,status=0,scrollbars=1, width=540,height=300"); 
			}
        };
    })();
 
})(jqcc);
var languageAdded = 0;

function fireEvent(element,event){
    if (document.createEventObject){
    var evt = document.createEventObject();
    return element.fireEvent('on'+event,evt)
    } else {
    var evt = document.createEvent("HTMLEvents");
    evt.initEvent(event, true, true ); 
    return !element.dispatchEvent(evt);
    }
}

function changeLanguage() {
	jqcc('.goog-te-combo').attr('id','cclanguagebutton');
	fireEvent(document.getElementById('cclanguagebutton'),'change');
}

function addLanguageCode() {
	if (!languageAdded) {
		jqcc.getScript('//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit',function(data) {
			jqcc("body").append('<div id="google_translate_element"></div><style>#google_translate_element {display:none!important;}</style>');
			languageAdded++;
		});
	}
}

jqcc(document).ready(function() {
	if (jqcc.cookie('googtrans')) {
		addLanguageCode();
	}
});

function googleTranslateElementInit() {
  new google.translate.TranslateElement({
	  pageLanguage: 'en',
	  autoDisplay: false
  }, 'google_translate_element');
}
/* Execution time: 0.003835916519165 seconds */
