﻿// ulan.en.cx
// добавление кнопок "Рассказать друзьям" к играм на главной странице
function vk_like() {	
	$('a#lnkGameTitle').each(function(){		
		$(this).closest('table').after('<div class="vk-like">' + VK.Share.button(
			{ url: 'http://' + location.hostname + $(this).attr('href'), title: $(this).text(), description: 'Encounter - международная сеть активных городских игр', noparse: true }, 
			{ type: 'button', text: 'Рассказать друзьям' }
		) + '</div><div class="clear"></div>');
	});	
}

// кнопки AddThis
function share_button() {	
	$('a#lnkGameTitle').each(function(){		
		$(this).closest('table').after('<div class="share-button">' + 
		'<div class="addthis_toolbox addthis_default_style" addthis:url="http://' + location.hostname + $(this).attr('href') + '" addthis:title="' + $(this).text() + '" addthis:description="Encounter - международная сеть активных городских игр">' +
			'<a class="addthis_button_facebook"></a>' +
			'<a class="addthis_button_twitter"></a>' +
			'<a class="addthis_button_vk" style="border-width: 1px; border-style: solid; border-right: 1px solid rgb(92, 130, 171); border-color: rgb(126, 156, 188) rgb(92, 130, 171) rgb(92, 130, 171); background-color: rgb(109, 143, 179); color: white; text-shadow: 0px 1px rgb(69, 104, 142); height: 15px; padding: 0 px 0px 0px 2x; font-size: 10px; font-family: tahoma; text-decoration: none">&nbsp;Рассказать друзьям</a>' +
		'</div>'  +	
		'</div><div class="clear"></div>');
	});	
}
