return social_box;
}
function init_share(which){
var shortURL = 'http://www2.tbo.com/get_shorturl/im/182676/';
contTitle = escape('CUBA SWIMMING TO FLORIDA 21570519.JPG');
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.tbo.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://tbo.com/im/182676/&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+%40tbocom%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+%40tbocom%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);
}
Source: http://www2.tbo.com/news/2012/jun/29/cuba-swimming-to-florida-21570519jpg-im-182676/
free shipping esophageal cancer marfan syndrome marfan syndrome britney spears engaged craig smith craig smith
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.