// JavaScript Document
$(document).ready(function() {

// define class keys for alternating colours
var classNames = {
0: 'first',
1: 'second',
};

// add alternating class attributes to each li
$("#twitter_update_list").find("li").each(function(i) {
$(this).addClass(classNames[i % 2]);
});

// surround each twitter post content tetx with a block-level element, so backgrounds are well-styled
$("#twitter_update_list").find("li").find("span").each(function(i) {
$(this).wrap("<div>");
});

// align ‘posted xx ago’ links under each post to right, by surrounding with a block-level element and adding a css style
$("#twitter_update_list").find("li").find("a").each(function(i) {
$(this).wrap("<div class=’rightAlign’>");
});

});