2 function openClose(theID) {
3 if(document.getElementById(theID).style.display == "block") {
4 document.getElementById(theID).style.display = "none"
7 document.getElementById(theID).style.display = "block"
11 function openMenu(theID) {
12 document.getElementById(theID).style.display = "block"
15 function closeMenu(theID) {
16 document.getElementById(theID).style.display = "none"
19 function commentOpen(obj,id) {
20 if(obj.value == 'Comment') {
22 obj.className = "comment-edit-text-full";
23 openMenu("comment-edit-submit-wrapper-" + id);
26 function commentClose(obj,id) {
28 obj.value = 'Comment';
29 obj.className="comment-edit-text-empty";
30 closeMenu("comment-edit-submit-wrapper-" + id);
39 $(document).ready(function() {
40 $.ajaxSetup({cache: false});
41 msie = $.browser.msie ;
48 function NavUpdate() {
50 if($('#live-network').length) { src = 'network'; liveUpdate(); }
51 if($('#live-profile').length) { src = 'profile'; liveUpdate(); }
53 $.get("ping",function(data) {
54 $(data).find('result').each(function() {
55 var net = $(this).find('net').text();
56 if(net == 0) { net = ''; }
57 $('#net-update').html(net);
58 var home = $(this).find('home').text();
59 if(home == 0) { home = ''; }
60 $('#home-update').html(home);
61 var mail = $(this).find('mail').text();
62 if(mail == 0) { mail = ''; }
63 $('#mail-update').html(mail);
64 var intro = $(this).find('intro').text();
65 if(intro == 0) { intro = ''; }
66 $('#notify-update').html(intro);
69 setTimeout(NavUpdate,30000);
73 function liveUpdate() {
74 if(src == null) { return; }
75 if($('.comment-edit-text-full').length) {
76 livetime = setTimeout(liveUpdate, 10000);
81 $.get('update_' + src + '?msie=' + ((msie) ? 1 : 0),function(data) {
82 $('.wall-item-outside-wrapper',data).each(function() {
83 var ident = $(this).attr('id');
84 if($('#' + ident).length == 0) {
85 $('img',this).each(function() {
86 $(this).attr('src',$(this).attr('dst'));
88 $('#' + prev).after($(this));
92 $('#' + ident + ' ' + '.wall-item-ago').replaceWith($(this).find('.wall-item-ago'));
93 $('#' + ident + ' ' + '.wall-item-comment-wrapper').replaceWith($(this).find('.wall-item-comment-wrapper'));
94 $('#' + ident + ' ' + '.my-comment-photo').each(function() {
95 $(this).attr('src',$(this).attr('dst'));
106 function confirmDelete() {
107 return confirm("Delete this item?");
110 function imgbright(node) {
111 $(node).attr("src",$(node).attr("src").replace('hide','show'));
112 $(node).css('width',24);
113 $(node).css('height',24);
116 function imgdull(node) {
117 $(node).attr("src",$(node).attr("src").replace('show','hide'));
118 $(node).css('width',16);
119 $(node).css('height',16);