// comes with it's own ready function
/*getTwitters('tweet', { 
    id: 'rem', 
    count: 1, 
    enableLinks: true, 
    ignoreReplies: true, 
    clearContents: true,
    template: '"%text%" <a href="http://twitter.com/%user_screen_name%/statuses/%id_str%/">%time%</a>'
});*/

twitterlib.status('rem', { filter: { not: new RegExp(/^@/) } }, function (tweet) {
  tweet = tweet[0];
  document.getElementById('tweet').innerHTML = '"' + twitterlib.ify.clean(twitterlib.expandLinks(tweet)) + '" <a href="http://twitter.com/' + tweet.user.screen_name + '/statuses/' + tweet.id_str + '/">' + twitterlib.time.relative(tweet.created_at) + '</a>'; 
});

$(function () {
    // now done entirely with CSS and CSS transitions 
    /*
    var flickr = $('ul.flickr');
    var flickrImages = $('img', flickr);
    flickr.mouseover(function (ev) {
        if (flickr.data('timer.clear')) clearTimeout(flickr.data('timer.clear'));

        if (ev.target.nodeName == 'IMG') {
            $(ev.target).fadeTo(200, 1);
            flickrImages.filter(function () {
                return !!(ev.target != this);
            }).animate({
                'opacity' : 0.5
            }, 100);

        }
    }).mouseout(function (ev) {
        // using a timer to avoid the fadeTo 1 happening each time we roll off an image
        if (flickr.data('timer.clear')) clearTimeout(flickr.data('timer.clear'));
        flickr.data('timer.clear', setTimeout(function () {
            flickrImages.queue('fx', []).stop().fadeTo(200, 1);            
        }), 1);
    });
    */

    $('a.targetblank').attr('target', '_blank'); // I hate this
    
    // fix overflow in IE - http://remysharp.com/2008/01/21/fixing-ie-overflow-problem/
    if ($.browser.msie) {
        $('pre').each(function () {
            if (this.scrollWidth > this.offsetWidth) {
                $(this).css({ 'overflow-y' : 'hidden', 'padding-bottom' : '20px' });
            }
        });
        
        if ($.browser.version < 7) {
            $('#navigation, #header').pngFix({
                blankgif: '/images/blank.gif;'
            });
        }
    }
        
});

