jQuery(window).load(function(){});var notify={notify_o:null,info:{},cache:{chat_new_msg:{},chat_invites:{}},content:{chat_new_msg:function(a){if(notify.cache.chat_new_msg.last_msg==notify.info.last_msg){notify.die()}notify.cache.chat_new_msg={last_msg:notify.info.last_msg};a.html('<a href="'+CL_MY_DOMAIN+"/"+LOGGED_IN_USER_LOGIN+'/settings?t=notify" class="settings_link">Настрить уведомления</a><h1>Новых сообщений +'+notify.info.msg_count+'</h1><p>Пока Вас небыло, Вам написали сообщение в чате.<br /><span class="btn"><a href="'+CL_CHAT_DOMAIN+'/bind" target="_blank">открыть чат</a></span><span class="btn gray"><a href="#" onclick="notify.close();">скрыть уведомление</a></span></p>')},chat_invites:function(b){var a=notify.info.req[0];b.html('<div class="clearfix"><img src="'+CL_STATIC_DOMAIN+"/images/avatars/"+a.a+'" alt="" width="64" height="64" style="float:left;margin-right:11px;margin-bottom:11px;"/><p><a href="'+CL_MY_DOMAIN+"/"+a.l+'">'+a.u+'</a> запрашивает автори зацию и приглашает Вас в чат, разрешить?</p><p><span class="btn"><a href="" onclick="allow_deny_chat_request('+a.uid+", "+a.id+',\'allow\'); return false;">Разрешить</a></span> &nbsp; <span class="btn gray"><a href="" onclick="deny_chat_request('+a.uid+", "+a.id+",'deny'); return false;\">Отказать</a></span></p></div>")}},die:function(){this.stop=true},prepare:function(a){var b=jQuery("<div />");if(this.notify_o!=undefined){this.notify_o.remove()}this.notify_o=jQuery("<div />");this.notify_o.attr("id","global_notify").appendTo("body");b.attr("class","content").appendTo("#global_notify");if(a!=undefined&&typeof a=="function"){a(b)}if(!this.stop){this.notify_o.animate({height:"show"})}return false},show:function(b,a){this.stop=false;if(a!=undefined&&a>0){a*=1000;window.setTimeout("notify.prepare("+notify.content[b]+")",a)}else{notify.prepare(notify.content[b])}return false},close:function(){this.notify_o.slideUp(200,function(){jQuery(this).remove()});return false}};
