/*  
  post2twitapp v1.0.3 [2009/12/11] : http://prismtone.jp/
  
  post2twitapp is (c) 2009 prismtone and is released under the MIT License:
  http://www.opensource.org/licenses/mit-license.php
 *
 ----------------------------------------------------------------------*/

//image files path
var path ="/i/post2twitapp/img/";

//CSS data
document.write('<style>\
/*---------------------------------------------------------------------*/\
#post2twitapp_button{\
padding: 10px 0;\
}\
/*---------------------------------------------------------------------*/\
#post2twitapp_button img,\
#post2twitapp_button img{\
border:0;\
}\
/*---------------------------------------------------------------------*/\
#post2twitapp_block ul{\
font-family:Arial, Helvetica, sans-serif;\
width: 300px;\
font-size: 15px;\
padding: 0;\
border: 1px solid #888;\
-webkit-border-radius: 6px;\
background: #fff;\
margin-bottom: 10px;\
}\
/*---------------------------------------------------------------------*/\
#post2twitapp_block ul li{\
border-bottom: 1px solid #bbb;\
list-style: none;\
}\
/*---------------------------------------------------------------------*/\
#post2twitapp_block ul li:last-child {\
border-bottom: none !important;\
}\
/*---------------------------------------------------------------------*/\
#post2twitapp_block ul li a{\
padding: 7px 10px 2px;display: block;color: #333333;font-weight:bold;\
}\
/*---------------------------------------------------------------------*/\
#post2twitapp_block ul li img{\
vertical-align: middle;\
margin-bottom: 4px;\
padding-right: 5px;\
background: #fff;\
}\
</style>');


//function
function twit(id) {
var inr = document.getElementById(id);
if(inr.innerHTML==""){inr.innerHTML += htmldata;}else{};
var obj = document.getElementById(id).style;
if(obj.display=="block"){obj.display="none"}else{obj.display="block"}
}

//html data
htmldata=
'<ul>'+
'<li><a href="javascript:window.location=\'echofon:///post\?\'+location.href"><img src="'+path+'echofon_free.png" />Echofon (Free)</a></li>'+
'<li><a href="javascript:window.location=\'echofonpro:///post/username?\'+location.href"><img src="'+path+'echofon_pro.png" />Echofon (Pro)</a></li>'+
'<li><a href="javascript:window.location=\'natsulion:///post?\'+encodeURIComponent(document.title+\'%20\'+location.href);"><img src="'+path+'natsulion.png" />NatsuLion</a></li>'+
'<li><a href="javascript:window.location=\'tweetie:///post?message=\'+encodeURIComponent(document.title+\'%20\'+location.href);"><img src="'+path+'tweetie.png" />Tweetie</a></li>'+
'<li><a href="javascript:window.location=\'twitterrific:///post?message=\'+encodeURIComponent(document.title+\'%20\'+location.href);"><img src="'+path+'twitterrific_free.png" />Twitterrific (Free)</a></li>'+
'<li><a href="javascript:window.location=\'twittelator://\'+location.href"><img src="'+path+'twittelator_free.png" />Twittelator (Free)</a></li>'+
'<li><a href="javascript:window.location=\'twinkle://post?message=\'+encodeURIComponent(document.title+\'%20\'+location.href);"><img src="'+path+'twinkle.png" />twinkle</a></li>'+
'</ul>';

//button
document.write('<div id=\'post2twitapp_button\'><a onclick=\'twit("post2twitapp_block")\'><img src=\''+path+'post.png\' /></div>');

