var stream = [{"id":"qbbby","type":"jpg","message":"Carl Jung action figure would totally kick his ass !!!!!","timestamp":"1258773981"},{"id":"q2jib","type":"jpg","message":"I am so not missing tomorrow's episode of Vampire Diaries :-P","timestamp":"1258605643"},{"id":"pw2y1","type":"jpg","message":"Tomkat calebrating their anniversary... She's having the time of her life !!!!!","timestamp":"1258483447"},{"id":"puagj","type":"jpg","message":"Dmitry is the hottest DWTS dancer ever :-P","timestamp":"1258435892"},{"id":"p6c9a","type":"jpg","message":"One of our shoot just made it to NBC news!","timestamp":"1257988371"}];
function twitpicBuildBadge() {
document.write("
");
var statusHTML = "";
for (var i=0; i'+stream[i].message+' '+relative_time(stream[i].timestamp)+'')
}
document.getElementById('twitpic_badge_container_v1').innerHTML = 'Alek And Steph TwitPics
' + statusHTML + 'View my photos';
}
function relative_time(time_value) {
var parsed_date = time_value;
//var relative_to = new Date();
//var delta = parseInt((relative_to.getTime() / 1000) - parsed_date);
var delta = parseInt((1258804643) - parsed_date);
//delta = delta + (relative_to.getTimezoneOffset() * 60);
if (delta < 60) {
return 'less than a minute ago';
} else if(delta < 120) {
return 'about a minute ago';
} else if(delta < (60*60)) {
return (parseInt(delta / 60)).toString() + ' minutes ago';
} else if(delta < (120*60)) {
return 'about an hour ago';
} else if(delta < (24*60*60)) {
return 'about ' + (parseInt(delta / 3600)).toString() + ' hours ago';
} else if(delta < (48*60*60)) {
return '1 day ago';
} else {
return (parseInt(delta / 86400)).toString() + ' days ago';
}
}
twitpicBuildBadge();