function socbuttons_img(id) {
	return '<img src="/images/socbuttons/blank.gif" alt="" class="b b' + id +'">';
}
function socbuttons_insert(u, id, t) {

	document.write('<div id="socbs' + id + '"></div>');
	var s = $('#socbs' + id);

	u = encodeURIComponent(u);
	
	s.append(
		'<span class="socbuttons"><a href="http://vkontakte.ru/share.php?url=' + u + '" title="Поделиться ВКонтакте">' + socbuttons_img(0) + '</a>' +
		'<a href="http://www.odnoklassniki.ru/dk?st.cmd=addShare&amp;st.s=0&amp;st._surl=' + u + '" title="Опубликовать в Одноклассники.ру">' + socbuttons_img(7) + '</a>' +
		'<a href="http://twitter.com/home?status=RT @sim-portal.ru ' + t + ' - ' + u + '" title="Добавить в Twitter">' + socbuttons_img(2) + '</a>' +
		'<a href="http://connect.mail.ru/share?share_url=' + u + '" title="Поделиться в Моем Мире">' + socbuttons_img(8) + '</a>' +
		'<a href="http://www.facebook.com/sharer.php?u=' + u + '" title="Поделиться в Facebook">' + socbuttons_img(1) + '</a>' +
		'<a href="http://www.livejournal.com/update.bml?event=' + u + '&subject=' + t + '" title="Опубликовать в своем блоге livejournal.com">' + socbuttons_img(6) + '</a>' +
		'<a href="http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=' + u + '&title=' + t + '" title="Сохранить закладку в Google">' + socbuttons_img(3) + '</a>' +
		'<a href="http://memori.ru/link/?sm=1&u_data[url]=' + u + '&u_data[name]=' + t + '" title="Сохранить закладку в Memori.ru">' + socbuttons_img(5) + '</a>' +
	'</span>');

	s.find('a').attr({target: '_blank'}).css({opacity: 0.5}).hover(
		function() { $(this).css({opacity: 1}); },
		function() { $(this).css({opacity: 0.7}); }
	);
	s.hover(
		function() { $(this).find('a').css({opacity: 0.7}); },
		function() { $(this).find('a').css({opacity: 0.5}); }
	);
}	

