var spyRunning=1;$.fn.spy=function(A){if(!A.ajax){alert("An AJAX/AJAH URL must be set for the spy to work.");return }var B={limit:(A.limit||10),fadeLast:(A.fadeLast||5),ajax:A.ajax,timeout:(A.timeout||3000),push:(A.push||-1),fadeInSpeed:(A.fadeInSpeed||"slow")};return this.each(function(){var G=this;var C="";var F=new Date(1970,1,1);var D=new Date();var E=Math.floor((D-F)/1000);if(spyRunning){$.post(B.ajax,{timestamp:E},function(H){if(H!=C){$("#"+G.id+" > div:gt("+(B.limit-2)+")").remove();$("#"+G.id+" > div:gt("+(B.limit-B.fadeLast-2)+")").fadeEachDown();if(B.push==-1){$("#"+G.id).prepend(H)}else{B.push.call(G,H)}$("#"+G.id+" > div:first").fadeIn(B.fadeInSpeed);C=H}});D=new Date();E=Math.floor((D-F)/1000)}G.timer=window.setInterval(function(){if(spyRunning){$.post(B.ajax,{timestamp:E},function(H){if(H!=C){$("#"+G.id+" > div:gt("+(B.limit-2)+")").remove();$("#"+G.id+" > div:gt("+(B.limit-B.fadeLast-2)+")").fadeEachDown();if(B.push==-1){$("#"+G.id).prepend(H)}else{B.push.call(G,H)}$("#"+G.id+" > div:first").fadeIn(B.fadeInSpeed);C=H}});D=new Date();E=Math.floor((D-F)/1000)}},B.timeout)})};$.fn.fadeEachDown=function(){var A=this.size();return this.each(function(B){var D=1-(A==1?0.5:0.85/A*(B+1));var C=this.style;if(window.ActiveXObject){C.filter="alpha(opacity="+D*100+")"}})};function pauseSpy(){spyRunning=0;return false}function playSpy(){spyRunning=1;return false};
