/*! Note: Microsoft Corporation is not the original author of this script file. Microsoft obtained the original file from http://timeago.yarp.com/ under the license that is referred to below. That license and the other notices below are provided for informational purposes only and are not the license terms under which Microsoft distributes this file. Microsoft grants you the right to use this file for the sole purpose of interacting through your browser with the Microsoft web site hosting this file, subject to that web site’s terms of use. Microsoft reserves all other rights and grants no additional rights, whether by implication, estoppel or otherwise. * timeago: a jQuery plugin, version: 0.9.3 (2011-01-21) * @requires jQuery v1.2.3 or later * * Timeago is a jQuery plugin that makes it easy to support automatically * updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago"). * * For usage and examples, visit: * http://timeago.yarp.com/ * * Licensed under the MIT: * http://www.opensource.org/licenses/mit-license.php * * Copyright (c) 2008-2011, Ryan McGeary (ryanonjavascript -[at]- mcgeary [*dot*] org) */ (function(n){function r(){var t=u(this);return isNaN(t.datetime)||n(this).text(i(t.datetime)),this}function u(i){if(i=n(i),!i.data("timeago")){i.data("timeago",{datetime:t.datetime(i)});var r=n.trim(i.text());r.length>0&&i.attr("title",r)}return i.data("timeago")}function i(n){return t.inWords(f(n))}function f(n){return(new Date).getTime()-n.getTime()}n.timeago=function(t){return t instanceof Date?i(t):typeof t=="string"?i(n.timeago.parse(t)):i(n.timeago.datetime(t))};var t=n.timeago;n.extend(n.timeago,{settings:{refreshMillis:6e4,allowFuture:!1,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",numbers:[]}},inWords:function(t){function r(r,u){var f=n.isFunction(r)?r(u,t):r,e=i.numbers&&i.numbers[u]||u;return f.replace(/%d/i,e)}var i=this.settings.strings,s=i.prefixAgo,h=i.suffixAgo,l;this.settings.allowFuture&&(t<0&&(s=i.prefixFromNow,h=i.suffixFromNow),t=Math.abs(t));var f=t/1e3,e=f/60,o=e/60,u=o/24,c=u/365;return l=f<45&&r(i.seconds,Math.round(f))||f<90&&r(i.minute,1)||e<45&&r(i.minutes,Math.round(e))||e<90&&r(i.hour,1)||o<24&&r(i.hours,Math.round(o))||o<48&&r(i.day,1)||u<30&&r(i.days,Math.floor(u))||u<60&&r(i.month,1)||u<365&&r(i.months,Math.floor(u/30))||c<2&&r(i.year,1)||r(i.years,Math.floor(c)),n.trim([s,l,h].join(" "))},parse:function(t){var i=n.trim(t);return i=i.replace(/\.\d\d\d+/,""),i=i.replace(/-/,"/").replace(/-/,"/"),i=i.replace(/T/," ").replace(/Z/," UTC"),i=i.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(i)},datetime:function(i){var r=n(i).get(0).tagName.toLowerCase()==="time",u=r?n(i).attr("datetime"):n(i).attr("title");return t.parse(u)}});n.fn.timeago=function(){var n=this,i;return n.each(r),i=t.settings,i.refreshMillis>0&&setInterval(function(){n.each(r)},i.refreshMillis),n};document.createElement("abbr");document.createElement("time")})(jQuery)