var VK_APP_ID=2323219;var FB_APP_ID=209230705780219;$(document).ready(function(){$facebook_soc_button=$('#facebook_soc_button');if($facebook_soc_button.length)
{$facebook_url_to_like=$('#facebook_url_it_like').val();if(!$facebook_url_to_like)
{$facebook_url_to_like=location.href;}
$facebook_soc_button.append('<iframe src="http://www.facebook.com/plugins/like.php?href='+encodeURIComponent($facebook_url_to_like)+'&amp;locale=ru_RU&amp;layout=button_count&amp;show_faces=true&amp;width=135&amp;action=like&amp;font&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:180px; height:21px;" allowTransparency="true"></iframe>');}
$vkontakte_soc_button=$('#vkontakte_soc_button');if($vkontakte_soc_button.length)
{$vkontakte_url_to_like=$('#vkontakte_url_it_like').val();if(!$vkontakte_url_to_like)
{$vkontakte_url_to_like=location.href;}}
$fb_portal=$("#facebook_soc_box").attr('fb_portal');if($fb_portal!==undefined)
{$("#facebook_soc_box").append('<fb:like-box href="'+encodeURIComponent($fb_portal)+'"" width="188" height="355" show_faces="true" border_color="" stream="false" header="false"></fb:like-box>');}
window.fbAsyncInit=function(){try{FB.init({appId:FB_APP_ID,status:true,cookie:true,xfbml:true});}catch(e){}};window.vkAsyncInit=function(){try{VK.init({apiId:VK_APP_ID,onlyWidgets:true});}catch(e){}
var vk_c_id=$vkontakte_soc_button.attr('id');if(typeof(vk_c_id)=='string'&&vk_c_id.length>0)
{function trimstring(str,maxlen){if(!maxlen)
return str;if(str.length>maxlen)
return str.substr(0,maxlen-3)+'...';return str;}
function ecapeQuotes(str){return str.replace(/"/g,'&qout;').replace(/'/g,'&#039;');}
var params=VK.Util.getPageData();params.title=ecapeQuotes(trimstring(params.title,64));params.description=ecapeQuotes(trimstring(params.description,128));params.type='button';params.pageUrl=$vkontakte_url_to_like;try{VK.Widgets.Like(vk_c_id,params);}catch(e){}}};$('<div id="fb-root"></div><div id="vk_api_transport"></div>').appendTo('body');var e;if($fb_portal!==undefined)
{e=document.createElement('script');e.async=true;e.src='http://connect.facebook.net/ru_RU/all.js';document.getElementById('fb-root').appendChild(e);}
e=document.createElement('script');e.async=true;e.src='http://userapi.com/js/api/openapi.js?45';document.getElementById('vk_api_transport').appendChild(e);});
