$(document).ready(function(){
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=$.LiVE.util.getEmbedProtocol()+"//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
});

$(function() {
	// 連携キット、local時はexit
	if ($.LiVE.bdkit && location.protocol=="file:") return;
	
	var $tweet = $.LiVE.Elements.WIDGETS.tweet.find(".default");
	$tweet.each(function() {
		$tweet.height('100%');
		
		var $this = $(this).parent(),
			id = $this.attr("id"),
			val = $.LiVE.widget[id].data;
		if ( val.url == "#" ) {
			val.url = location.href;
		}
		
		$this.find(".twitter-share-button").attr({
			"data-text": $.LiVE.util.unescapeEntity(val.text),
			"data-url": val.url
		});
	});
});