$(document).ready(function(){$(".hovercard").click(function(a){a.preventDefault();
return false
});
twttr.anywhere(function(a){a(".hovercard").hovercards({linkify:false,username:function(b){return b.parentNode.getAttribute("rel")
}})
});
$(".network.twitter").click(function(b){b.preventDefault();
var a=$(".tweetBox");
var c=a.find(".external");
if(c.is(":empty")){twttr.anywhere(function(e){var g=a.find("h4").attr("rel");
var h=parseInt(a.attr("rel"));
var d=40;
if($.browser.msie){d=50
}if(e.isConnected()){h=h-50;
var f=e.currentUser;
var i='<img class="avatar" src="'+f.data("profile_image_url")+'" height="50px" />';
c.before(i)
}e(".tweetBox .external").tweetBox({defaultContent:g,label:"&nbsp;",width:h,height:d,onTweet:function(j,k){a.slideUp("slow",function(){a.prev(".message.success").fadeIn("slow")
})
},complete:function(j){var m=a.find("iframe");
var k=m.contents().find("#tweet-box").attr("style");
var l="";
if($.browser.msie){l="height: 40px;"
}m.contents().find("#tweet-box").attr("style",k+" border-radius: 0;"+l).focus();
m.contents().find("#tweeting-button").attr("style","cursor: pointer;");
a.find("h4").fadeIn("slow")
}})
})
}else{if(a.is(":hidden")){a.prev(".message.success").fadeOut("slow",function(){a.find("iframe").contents().find("#tweet-box").focus();
a.fadeIn("slow")
})
}else{a.slideUp("slow")
}}return false
})
});
