	$(document).ready(function() {	
		var gp=document.getElementById("gplusone");
		if (gp) {
			gp.setAttribute("data-size","medium");
			gp.setAttribute("data-count","true");
			
			window.___gcfg = {lang: 'hr'};

			var hd = document.getElementsByTagName('head')[0];
			var scr = document.createElement('script');
			scr.type ='text/javascript';
			scr.async = true;
			if (!$.browser.msie) {
				scr.innerHTML = '{"lang": "hr"}';
			}
			else
			{
				scr.text = '{"lang": "hr"}';
			}
			scr.src = "https://apis.google.com/js/plusone.js";
			hd.appendChild(scr);
		}
		
		var c = document.getElementById('fbrecommendations');
		
		if (c != null) {
			var e = document.createElement('fb:recommendations');
			e.setAttribute('site', 'http://www.boletus.hr');
			e.setAttribute('width', '246');
			e.setAttribute('height', '280');
			e.setAttribute('header', 'true');
			e.setAttribute('colorscheme', 'light');
			c.appendChild(e);
		}
		
		c = document.getElementById('fblikesmall');
		
		if (c != null) {
			e = document.createElement('fb:like');
			e.setAttribute('action', 'like');
			e.setAttribute('width', '150');
			e.setAttribute('send', 'true');
			e.setAttribute('layout', 'button_count');				
			e.setAttribute('show_faces', 'false');
			e.setAttribute('font', 'segoe ui');
			c.appendChild(e);
		}
		
		c = document.getElementById('fblike');
		
		if (c != null) {
			e = document.createElement('fb:like');
			e.setAttribute('action', 'like');
			e.setAttribute('width', '450');
			c.appendChild(e);
		}
		
		c = document.getElementById('fbsharebutton');
		
		if (c != null) {
			e = document.createElement('fb:share-button');
			e.setAttribute('action', 'share');
			e.setAttribute('type', 'button_count');
			e.setAttribute('width', '473');
			c.appendChild(e);
		}
			
		c = document.getElementById('fblogin');
		
		if (c != null) {
			e = document.createElement('fb:login-button');
			e.setAttribute('autologoutlink', 'true');
			c.appendChild(e);
		}
		
		c = document.getElementById('fbcomments');
		
		if (c != null) {
			e = document.createElement('fb:comments');
			e.setAttribute('numposts', '100');
			e.setAttribute('width', '880');
			c.appendChild(e);
		}
		
		// End of additional features //
		
		// FaceBook initialise
		if (document.getElementById('fb-root')) {
			window.fbAsyncInit = function () { FB.init({ appId: '309433861477', status: true, cookie: true, xfbml: true }); };
			(function () { var e = document.createElement('script'); e.src = document.location.protocol + '//connect.facebook.net/en_GB/all.js'; e.async = 1; document.getElementById('fb-root').appendChild(e); })();
		}
	});
