/* share42.com | 28.05.2014 | (c) Dimox */ (function($){$(function(){$('div.share42init').each(function(idx){var el=$(this),u=el.attr('data-url'),t=el.attr('data-title'),i=el.attr('data-image'),d=el.attr('data-description'),f=el.attr('data-path'),fn=el.attr('data-icons-file'),z=el.attr("data-zero-counter");if(!u)u=location.href;if(!fn)fn='icons.png';if(!z)z=0;function fb_count(url){var shares;$.getJSON('http://graph.facebook.com/?callback=?&ids='+url,function(data){shares=data[url].shares||0;if(shares>0||z==1)el.find('a[data-count="fb"]').after(''+shares+'')})}fb_count(u);function gplus_count(url){if(!window.services){window.services={};window.services.gplus={}}window.services.gplus.cb=function(number){window.gplusShares=number};$.getScript('http://share.yandex.ru/gpp.xml?url='+url,function(){var shares=window.gplusShares;if(shares>0||z==1)el.find('a[data-count="gplus"]').after(''+shares+'')})}gplus_count(u);function mail_count(url){var shares;$.getJSON('http://connect.mail.ru/share_count?callback=1&func=?&url_list='+url,function(data){shares=data.hasOwnProperty(url)?data[url].shares:0;if(shares>0||z==1)el.find('a[data-count="mail"]').after(''+shares+'')})}mail_count(u);function odkl_count(url){$.getScript('http://www.odnoklassniki.ru/dk?st.cmd=extLike&uid='+idx+'&ref='+url);if(!window.ODKL)window.ODKL={};window.ODKL.updateCount=function(idx,shares){if(shares>0||z==1)$('div.share42init').eq(idx).find('a[data-count="odkl"]').after(''+shares+'')}}odkl_count(u);function pin_count(url){var shares;$.getJSON('http://api.pinterest.com/v1/urls/count.json?callback=?&url='+url,function(data){shares=data.count;if(shares>0||z==1)el.find('a[data-count="pin"]').after(''+shares+'')})}pin_count(u);function twi_count(url){var shares;$.getJSON('http://urls.api.twitter.com/1/urls/count.json?callback=?&url='+url,function(data){shares=data.count;if(shares>0||z==1)el.find('a[data-count="twi"]').after(''+shares+'')})}twi_count(u);function vk_count(url){$.getScript('http://vk.com/share.php?act=count&index='+idx+'&url='+url);if(!window.VK)window.VK={};window.VK.Share={count:function(idx,shares){if(shares>0||z==1)$('div.share42init').eq(idx).find('a[data-count="vk"]').after(''+shares+'')}}}vk_count(u);if(!f){function path(name){var sc=document.getElementsByTagName('script'),sr=new RegExp('^(.*/|)('+name+')([#?]|$)');for(var p=0,scL=sc.length;p';el.html(''+l+''+'');})})})(jQuery);