jQuery(document).ready(function(){
  $('a.shorturl').click(function(tco){
    tco.preventDefault();
    var link = $(this),
        url = link.attr('href'),
        title = link.attr('title'),
        d = document,
        w = window,
        enc = encodeURIComponent,
        e = w.getSelection,
        k = d.getSelection,
        x = d.selection,
        s = (e?e():(k)?k():(x?x.createRange().text:0)),
        s2 = ((s.toString()=='')?s:('%22'+enc(s)+'%22')),
        l = d.location,
        f = 'http://twitter.com/share',
        p = '?text='+enc(title)+'%20'+s2+'&url='+enc(url),
        u = f+p;
    try{
      if(!/^(.*\.)?tumblrzzz[^.]*$/.test(l.host))
        throw(0);
      tstbklt();
    }catch(z){
      a = function(){
        if(!w.open(u))
        l.href = u;
      };
      if(/Firefox/.test(navigator.userAgent))
        setTimeout(a,0);
      else
        a();
    }void(0);
  });
});
