return social_box;
}
function init_share(which){
var shortURL = 'http://www2.timesdispatch.com/get_shorturl/im/142480/';
contTitle = escape('Ravens Eagles Football');
try {
$.ajaxSetup({
error: function(xhr, status, e) { console.log(xhr, status, e); }
});
$.getJSON(shortURL, function(data){
if(data.success == true){
shorturl = escape(data.shorturl);
$('.social-bubble a.share_digg').attr('href', 'http://digg.com/submit?url=' + shorturl + '&title=' + contTitle);
$('.social-bubble a.share_delicious').attr('href', 'http://www.delicious.com/save?jump=yes&url=' + shorturl + '&title=' + contTitle);
$('.social-bubble a.share_blogger').attr('href', 'http://www.blogger.com/blog_this.pyra?t='+contTitle+'&u='+shorturl);
$('.social-bubble a.share_fark').attr('href', 'http://www.fark.com/cgi/farkit.pl?u=' + shorturl + '&h='+contTitle);
$('.social-bubble a.share_google_buzz').attr('href', 'http://www.google.com/buzz/post?url=' + shorturl);
$('.social-bubble a.share_livejournal').attr('href', 'http://www.livejournal.com/update.bml?subject=' + contTitle + '%20-%20www.timesdispatch.com&event=%3Ca%20href%3D%22' + shorturl + '%22%3E' + contTitle + '%3C%2Fa%3E');
$('.social-bubble a.share_reddit').attr('href', 'http://www.reddit.com/submit?url=' + shorturl + '&title=' + contTitle);
$('.social-bubble a.share_stumbleupon').attr('href', 'http://www.stumbleupon.com/submit?url=http://timesdispatch.com/im/142480/&title=' + contTitle);
$('.social-bubble a.share_tumblr').attr('href', 'http://www.tumblr.com/share?s=&t=' + contTitle + '&u=' + shorturl + '&v=3');
if(which=='bottom_social') {
$('.detail .bottom_social a.share_google').attr('href', 'https://www.google.com/bookmarks/mark?op=add&bkmk='+shorturl+'&title='+contTitle);
$('.detail .bottom_social a.share_twitter').attr('href', 'http://twitter.com/intent/tweet?status='+contTitle+'+'+shorturl+'+%28via+%40http://www.timesdispatch.com%29&url='+shorturl);
}
else {
$('.social-bubble a.share_google').attr('href', 'https://www.google.com/bookmarks/mark?op=add&bkmk='+shorturl+'&title='+contTitle);
$('.social-bubble a.share_twitter').attr('href', 'http://twitter.com/intent/tweet?status='+contTitle+'+'+shorturl+'+%28via+%40http://www.timesdispatch.com%29&url='+shorturl);
}
$('#email_referrer').val(shorturl);
$('#email_subject').val(contTitle);
$('#email_msg').html(unescape(contTitle));
}
});
} catch(err) { console.log(err); }
}
function createBubble(event,social_box, which){
if (bubbleExists) {
hideBubble();
}
$(social_box).mouseenter(keepBubbleOpen).mouseleave(letBubbleClose).appendTo('body');
positionBubble(event);
init_share(which);
};
function positionBubble(event){
var tPosX = event.pageX -180;
var tPosY = event.pageY +10;
$('div.social-bubble').css({top: tPosY, left: tPosX});
bubbleExists = true;
};
function hideBubble() {
clearTimeout(timeoutID);
if (bubbleExists && !onDiv) {
$('div.social-bubble').remove();
bubbleExists = false;
}
}
function keepBubbleOpen() {
onDiv = true;
}
function letBubbleClose() {
onDiv = false;
hideBubble();
}
function add_to_favorites(){
var title = document.title;
var url = location.href;
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if(document.all)// ie
window.external.AddFavorite(url, title);
}
Advertisement
?
View More: No tags are associated with this articleNot what you're looking for? Try our quick search:
?
?
Advertisement
*Facebook Account Required to Comment. If you are not already logged into Facebook, please click the comment button to do so.
Source: http://www2.timesdispatch.com/sports/2011/dec/25/ravens-eagles-football-im-142480/
coriolis effect giants patriots yolo steelers vs ravens jack dempsey lake malawi hines ward
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.