$(document).ready(function() {
socText = $('title').text();
socComment = $('meta[name = description]').attr('content');
});


socPoster = function(socPost)
{
var socUrl = document.location.href;
var socPicture = 'http://speed-tester.info/images/template/main_table_pic.jpg';
var netUrl = '';

if(socPost == 'facebook')
	{
	netUrl  = 'http://www.facebook.com/sharer.php?s=100';
	netUrl += '&p[title]=' + encodeURIComponent(socText);
	netUrl += '&p[summary]=' + encodeURIComponent(socComment);
	netUrl += '&p[url]=' + encodeURIComponent(socUrl);
	netUrl += '&p[images][0]=' + encodeURIComponent(socPicture);
	}	
else if(socPost == 'odnokl')
	{
	netUrl  = 'http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1';
	netUrl += '&st.socComments=' + encodeURIComponent(socText);
	netUrl += '&st._surl=' + encodeURIComponent(socUrl);
	}
else if(socPost == 'twitter')
	{
	netUrl  = 'http://twitter.com/share?';
	netUrl += 'text=' + encodeURIComponent(socText);
	netUrl += '&url=' + encodeURIComponent(socUrl);
	netUrl += '&counturl=' + encodeURIComponent(socUrl);
	}
else if(socPost == 'vkontakte')
	{
	netUrl  = 'http://vkontakte.ru/share.php?';
	netUrl += 'url=' + encodeURIComponent(socUrl);
	netUrl += '&title=' + encodeURIComponent(socText);
	netUrl += '&description=' + encodeURIComponent(socComment);
	netUrl += '&image=' + encodeURIComponent(socPicture);
	netUrl += '&noparse=true';
	}
else if(socPost == 'mailru')
{
	netUrl  = 'http://connect.mail.ru/share?';
	netUrl += 'url=' + encodeURIComponent(socUrl);
	netUrl += '&title=' + encodeURIComponent(socText);
	netUrl += '&description=' + encodeURIComponent(socComment);
	netUrl += '&imageurl=' + encodeURIComponent(socPicture);
}

window.open(netUrl,'','toolbar=0,status=0,width=630,height=440');
}
