setTimeout(function() {
  var g = document.createElement('script'),
      s = document.getElementsByTagName('script')[0];
  g.async = true;
  g.src = '//www.google-analytics.com/ga.js';
  s.parentNode.insertBefore(g, s);
 }, 0);

/*
(function() {
    var ga = document.createElement('script');     ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:'   == document.location.protocol ? 'https://ssl'   : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
*/
jQuery(document).ready(function() {
		jQuery('div.russian-america')
  		.html('<a href="http://www.RussianAmerica.com/top/?id=992" target="_blank" rel="nofollow"><img border="0" width="88" height="31" src="http://www.russianamerica.com/top/logo/index.php?id=992" alt="Russian America Top. Рейтинг ресурсов Русской Америки."></a>');
		jQuery('div.baraban')
  		.html('<a rel="nofollow" href="http://www.baraban.org/top/topsites.php3?Category=Russians+in+USA&ID=412" target="_blank"><img src="/images/banners/banner.gif" border="0" height="31" width="88"/></a>');
		jQuery('div.mail-ru')
  		.html('<a rel="nofollow" target="_top" href="http://top.mail.ru/jump?from=468126"><img src="http://d4.c2.b7.a0.top.mail.ru/counter?id=468126;t=103" border="0" height="18" width="88" alt="Рейтинг@Mail.ru"></a>');
		jQuery('div.photo-pulse')
  		.html('<a  rel="nofollow" href="http://top.photopulse.ru/in/851" target="_top"><img src="http://counter.photopulse.ru/counter?site_id=851&logo_id=01" width="88" height="31" border="0" alt="top.PhotoPulse.ru - рейтинг фоторесурсов"></a>');
		jQuery('div.rambler')
  		.html('<img src="http://counter.rambler.ru/top100.cnt?2181646" alt="" width="1" height="1" border="0" /><a href="http://top100.rambler.ru/home?id=2181646"><img src="http://top100-images.rambler.ru/top100/banner-88x31-rambler-gray2.gif" alt="Ramblers Top100" width="88" height="31" border="0" /></a></a>');
		jQuery('div.liveinternet')
  		.html("<a href='http://www.liveinternet.ru/click' "+"target=_blank><img src='//counter.yadro.ru/hit?t26.6;r"+escape(document.referrer)+((typeof(screen)=="undefined")?"":";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+";"+Math.random()+"' alt='' title='LiveInternet: показано число посетителей за"+" сегодня' "+"border='0' width='88' height='15'><\/a>");

  	//To switch directions up/down and left/right just place a "-" in front of the top/left attribute
		//Horizontal Sliding
			jQuery('.boxgrid.slidedown').hover(function(){
					jQuery(".cover", this).stop().animate({top:'-78px'},{queue:false,duration:300});
			}, function() {
				jQuery(".cover", this).stop().animate({top:'0px'},{queue:false,duration:300});
			});

	//add feedburner email subscription
	if (jQuery('div.feedburner-subscribe')) {
		jQuery('div.feedburner-subscribe')
  		.html('<form onsubmit="window.open(\'http://feedburner.google.com/fb/a/mailverify?uri=photo-travel-blog\', \'popupwindow\', \'scrollbars=yes,width=550,height=520\');return true" target="popupwindow" method="post" action="http://feedburner.google.com/fb/a/mailverify" style="spacing:0px;text-align:center;background:transparent;">Получать обновления: <input type="text" onblur="if (this.value==\'\') {this.value=\'Введите Ваш e-mail\';}" onfocus="if (this.value==\'Введите Ваш e-mail\') {this.value=\'\';}" name="email" value="Введите Ваш e-mail" style="width:140px"><input type="hidden" name="uri" value="photo-travel-blog"><input type="hidden" value="ru_RU" name="loc"><input type="submit" value="Подписаться"></form>');
	}
	
	//add facebook like box
	if (jQuery('div.facebook-box')) {
		jQuery('div.facebook-box')
  		.html('<iframe src="http://www.facebook.com/plugins/likebox.php?id=207846495917273&width=610&connections=11&stream=false&header=false&height=180&locale=ru_RU" scrolling="no" frameborder="0" style="overflow:hidden; width:610px; height:180px;"></iframe>');
	}
	
	if (jQuery('div.pikabu-box')) {
		jQuery('div.pikabu-box')
		.html('<iframe src="http://pikabu.ru/buttons.php?rand='+Math.random()+'" width="108" height="20" scrolling="no" frameborder="0" allowtransparency="true" /></iframe>');
	}
});



