/* vim: set expandtab tabstop=4 shiftwidth=4: */

$(document).ready(function() {
    
    if ($('#news-feature .snippet-title').text()) { 
        /*var buzz = '<div class="buzz-button">'
           + '<a title="Post to Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="normal-count" data-locale="en_GB"></a>'
           + '<script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script>'
           + '</div>';
        var sphinn = '<div class="sphinn-button"><iframe name="pliggit" width="54" height="71" scrolling="no" frameborder="0" src="http://sphinn.com/evb/url.php?url='+escape(document.URL)+'"></iframe></div>';
        var tweetMe = '<div class="tweetMe-button"><iframe src="http://api.tweetmeme.com/button.js?url='+escape(document.URL)+'&amp;style=normal" height="61" width="50" frameborder="0" scrolling="no"></iframe></div>';
        var newsTitle = $('.snippet-title');
        newsTitle.append(buzz);
        newsTitle.append(sphinn);
        newsTitle.append(tweetMe);*/
        // add share this post to news feature
        var newsFeature = $('#news-feature');
        var params = { title: $('#news-feature h1.title').html() }
        $.post('/xhr_get_share_this_post/', params, function(data) {
            newsFeature.append('<p><!-- --></p>' + data);
        });
    }
    if($('.news')) {
        var rssLink = '<a href="/news/rss/" class="rss-button">Subscribe <img src="/images/social_networking/rss_icon.png" alt="RSS Feed"></a>';
        var newsTitle = $('#news-title');
        newsTitle.append(rssLink);
    }
});

