﻿/*
	Запрос статуса наград. Не нужно ли поздраить пользователя с новым достижением.
*/
function loadTwitterOAuth( ref )
{
	doQuery( '/ctl/twitter_oauth/', { 'ref': ref }, catchTwitteOAuth );
};

function catchTwitteOAuth( data )
{
	$('.comments .comments-auth-required ul li:eq(1) .cell').append( '<a href="http://api.twitter.com/oauth/authorize?oauth_token='+data.twitter_oauth_token+'"><span class="sbtn sbtn-twitter">Twitter</span></a>' );
	$('#full_auth .col-right .icons-list').append( '<li class="icon icon-twitter"><a href="http://api.twitter.com/oauth/authorize?oauth_token='+data.twitter_oauth_token+'">Твиттер</a></li>' );
};
