/*
* @title bookmarklet
* @description my bookmarklet
* @include http://*
* @license MIT License
* @require
*/
var d=document,
w=window,
e=w.getSelection,
k=d.getSelection,
x=d.selection,
s=(e?e():(k)?k():(x?x.createRange().text:0)),
f='http://www.tumblr.com/share',
l=d.location,
e=encodeURIComponent,
p='?v=3&u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s),
u=f+p,
A=document.createElement('a'),
D=document.createElement('div'),
F=document.createElement('iframe'),
R=function(){D.parentNode.removeChild(D);};
try{
if( !/^(.*\.)?tumblr[^.]*$/.test(l.host) ) throw(0);
tstbklt();
}catch(z){
a=function(){
document.body.appendChild(D);
D.style.cssText='background:#666;opacity:0.8;position:fixed;bottom:10px;right:10px;z-index:65536;-moz-border-radius:5px;padding:2px;';
F.style.cssText='width:500px;height:500px;';
A.innerHTML = 'X';
A.addEventListener('click',R,false);
A.style.cssText='display:block;padding:2px;line-height:11px;font-size:8px;width:1em;height:1em;margin-left:auto;background:#C33;color:#FFF;text-decoration:none;';
D.appendChild(A);
D.appendChild(F);
F.src=u;
};
if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();
}
void(0)