	// リンクURL
	var linkUrl = "";
	// リンクタイトル
	var linkTitle = "";

	// ma_canonicalタグが存在する場合
	if (document.getElementById('ma_canonical')) {
		linkUrl = document.getElementById('ma_canonical').href;
		linkTitle = document.title;
	} else {
		linkUrl = document.getElementById("urlLinkForParts").value;
		linkTitle = document.getElementsByName("urlTitleForParts")[0].value;
	}

	// facebookのsrcにセット
	var spJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	var facebookLikeForArticleEl = document.getElementById('facebookLink');
	// 2011/06/28 SSLいいねボタンを表示すると、ダイアログ表示されるため
	if(!("https:" == document.location.protocol)){
		facebookLikeForArticleEl.src = spJsHost + 'facebook.com/plugins/like.php?href=' + encodeURIComponent(linkUrl) + '&layout=button_count&show_faces=true&width=100&action=like&colorscheme=light&height=21';
	}else{
		if(null != document.getElementById("sb_facebook")){
			document.getElementById("sb_facebook").style.display = "none";
		}
	}
	// mixiのURLにセット
	var mixiShareForArticleEl = document.getElementById('mixiLink');
	mixiShareForArticleEl.setAttribute('data-url',  linkUrl);

	function tweetLink() {
		window.open('http://twitter.com/share?url=' + encodeURIComponent(linkUrl) + '&count=none&text=' + encodeURIComponent(' #demaetw 「' + linkTitle + '」'), '', 'scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,left=Math.round((screen.width/2)-(550/2))');
	}

	function greeLink() {
		window.open('http://gree.jp?mode=share&act=write&url=' + encodeURIComponent(linkUrl) + '&button_type=4&button_size=16', '', 'width=600,height=500');
	}

