/*    HTTP Host:  static.ak.fbcdn.net                                          */
/*    Generated:  October 27th 2009 4:23:49 PM PDT                             */
/*      Machine:  10.16.140.108                                                */
/*       Source:  Local Cache                                                  */
/*     Location:  rsrc:4:3tk62l49                                              */
/*       Locale:  nu_ll                                                        */
/*         Path:  js/live_timer.js                                             */

var LiveTimer={restart:function(_L0){this.stop();this.serverTime=_L0;this.offset=0;this.delay=20000;var _L1=ge('globalContainer')||ge('content');this.timeout=setTimeout(function(){LiveTimer.timestamps=DOM.scry(_L1,'abbr.timestamp');LiveTimer.loop();},this.delay);},stop:function(){clearTimeout(this.timeout);},loop:function(){LiveTimer.offset+=LiveTimer.delay/1000;var _L0=-1;LiveTimer.timestamps.each(function(_L1){var _L2=+new Date(_L1.getAttribute('title'))/1000;var _L3=LiveTimer.renderRelativeTime(LiveTimer.serverTime+LiveTimer.offset,_L2);if(_L3.text)DOM.setText(_L1,_L3.text);if(_L3.next!=-1&&(_L3.next<_L0||_L0==-1))_L0=_L3.next;});if(_L0!=-1){LiveTimer.delay=Math.max(20000,_L0*1000);LiveTimer.timeout=setTimeout(function(){LiveTimer.loop();},LiveTimer.delay);}},renderRelativeTime:function(_L0,_L1){var ret={text:"",next:-1};if(_L0-_L1>(12*3600)||(new Date(_L0*1000).getDay()!=new Date(_L1*1000).getDay()))return ret;var _L3=_L0-_L1,_L4=Math.floor(_L3/60),hrs=Math.floor(_L4/60);if(_L4<1){ret.next=60-_L3%60;return ret;}if(hrs<1){if(_L4==1){ret.text=_tx("about a minute ago");}else ret.text=_tx("{number} minutes ago",{number:_L4});ret.next=60-_L3%60;return ret;}if(hrs!=11)ret.next=3600-_L3%3600;if(hrs==1){ret.text=_tx("about an hour ago");return ret;}ret.text=_tx("{number} hours ago",{number:hrs});return ret;}};

if (window.Bootloader) { Bootloader.done(["js\/live_timer.js"]); }