/**
 * Mogmag clip button
 * @update 2012.1.5
 * @description Copyright RHYTHMTYPE Inc. - http://rhythmtype.com
 */
window.onload = function() {
	var mog = document.getElementsByTagName("mogmag");
	if (mog) {
		var btnType = mog[0].getAttribute("type");
		var parent = mog[0].parentNode;
		var w, h;
		if (btnType == "short") {
			w = 84;
			h = 20;
		} else if (btnType == "large") {
			w = 160;
			h = 29;
		} else {
			btnType = "normal";
			w = 150;
			h = 20;
		}
		parent.innerHTML = '<iframe scrolling="no" frameborder="0" allowtransparency="true" style="border:none; overflow:hidden; width:'+w+'px; height:'+h+'px;" src="http://mogmag.jp/apps/shared/shared.php?title='+encodeURI(window.document.title)+'&location='+encodeURI(location.href)+'&type='+btnType+'"></iframe>';
		//parent.innerHTML = '<iframe scrolling="no" frameborder="0" allowtransparency="true" style="border:none; overflow:hidden; width:150px; height:21px;" src="http://mogmag.jp/apps/shared/shared.php?title='+encodeURI(window.document.title)+'&location='+encodeURI(location.href)+'&type='+btnType+'"></iframe>';
	}
}

