var widget_313 = document.getElementById('twitter_div_313');
if (widget_313 == null) widget_313 = document.getElementById('twitter_div');
var TIDYTWEETWIDGET_313 = {    addStylesheet: function(path) {
        var head = document.getElementsByTagName('head')[0];
        var link = document.createElement('link');
        link.setAttribute('href', path);
        link.setAttribute('type', 'text/css');
        link.setAttribute('rel', 'stylesheet');
        head.insertBefore(link,head.childNodes[0]);
    },
    setClass: function(e, cssClass) {
        e.className = cssClass;
    },
    makeLink: function(text, navigateUrl, tooltip, target) {
        var a = document.createElement('a');
        a.setAttribute('href', navigateUrl);
        a.id = 'twitter-link';
        if (tooltip != '') {
            a.setAttribute('title', tooltip);
        }
        a.setAttribute('target', target);
        a.innerHTML = text;
        return a;
    },
    makeListItem: function(text,authorImgPath,screenName,authorURL,createDate,tweetURL) {
        var li = document.createElement('li');
        li.innerHTML = '';
        li.innerHTML = '<a href=\'' + authorURL + '\' target=\'_blank\'><img src=\'' + authorImgPath + '\' alt=\'@' + screenName + '\' title=\'@' + screenName + '\' class=\'aIcon\' /></a>';
        li.innerHTML += '<div class=\'aContent\'>' +  text + '<div class=\'by\'><a href=\'' + authorURL + '\' target=\'_blank\'>@' + screenName + '</a> at <a href=\'' + tweetURL + '\' target=\'_blank\'>' + createDate + '</a>'  + '</div>';
        li.innerHTML += '<div class=\'clearFix\'></div>';
        return li;
    },
    makeEmptyListItem: function() {
        var li = document.createElement('li');
        li.innerHTML = 'No tweets to display';
        return li;
    },
    init: function() {
        TIDYTWEETWIDGET_313.addStylesheet(document.location.protocol + '//thepeevery.tidytweet.com/_resources/Styles/widget.css');
    },
    renderTweets: function(widget) {
        var ulTweets = document.getElementById('twitter_update_list');

      if (ulTweets == null) ulTweets = document.getElementById('twitter_update_list_313');
        ulTweets.innerHTML = '';

        ulTweets.innerHTML = '';
        ulTweets.appendChild(TIDYTWEETWIDGET_313.makeListItem('lil <a href=\"http://search.twitter.com/search?q=%23peeve\"><b>#peeve</b></a> I know it\'s only minor, but I hate not being able to right-click in iTunes. What\'s up with that.','http://a1.twimg.com/profile_images/642163954/final2010a_normal.jpg','CMoz','http://twitter.com/CMoz','2/8/2010 2:27:41 PM','http://twitter.com/CMoz/statuses/8823285669'));
        ulTweets.appendChild(TIDYTWEETWIDGET_313.makeListItem('<a href=\"http://search.twitter.com/search?q=%23peeve\"><b>#peeve</b></a> cold toilet seats','http://a3.twimg.com/profile_images/613307091/34097083_normal.jpg','morgannewton','http://twitter.com/morgannewton','2/7/2010 2:39:15 PM','http://twitter.com/morgannewton/statuses/8777883377'));
        ulTweets.appendChild(TIDYTWEETWIDGET_313.makeListItem('People do not listen! Put bags in overhead wheels/handle first, NOT sideways! <a href=\"http://search.twitter.com/search?q=%23peeve\"><b>#peeve</b></a>','http://a1.twimg.com/profile_images/596107236/IMG_0751_normal.JPG','mcpaige','http://twitter.com/mcpaige','2/7/2010 4:19:51 AM','http://twitter.com/mcpaige/statuses/8760034712'));
        ulTweets.appendChild(TIDYTWEETWIDGET_313.makeListItem('<a href=\"http://search.twitter.com/search?q=%23peeve\"><b>#peeve</b></a> People who have their Formspring syncd with their twitters.. Just sayin','http://a1.twimg.com/profile_images/616915952/m_a3a47282b5bb42c6b5323bb4029ada26_normal.jpg','keatonsays','http://twitter.com/keatonsays','2/6/2010 9:10:41 PM','http://twitter.com/keatonsays/statuses/8748520616'));
        ulTweets.appendChild(TIDYTWEETWIDGET_313.makeListItem('&quot;Keep this receipt as your warranty&quot; kind of sucks when it\'s printed on thermal paper and disappears in 6 months. <a href=\"http://search.twitter.com/search?q=%23peeve\"><b>#peeve</b></a>','http://a3.twimg.com/profile_images/606630257/image_normal.jpg','vaughndavis','http://twitter.com/vaughndavis','2/6/2010 5:03:42 PM','http://twitter.com/vaughndavis/statuses/8740016189'));
    },
    renderWidget: function() {
        TIDYTWEETWIDGET_313.renderTweets(widget_313);    }
};
if (TIDYTWEETWIDGET_313) {    TIDYTWEETWIDGET_313.init();    TIDYTWEETWIDGET_313.renderWidget();}
