Crossover Dreams: Cholera in Haiti: "a disease of poverty" - 2 views
-
October 31, 2010 03:26 AM BIO Become a Fan Get Email Alerts Bloggers' Index function hide_user_promo_bubble_second_stage() { var bubble = $("user_promo_bubble"); bubble.style.display = "none"; } function hide_user_promo_bubble() { var bubble = $("user_promo_bubble"); var myAnim = new YAHOO.util.Anim(bubble, { opacity: { to: 0 } }, 1, YAHOO.util.Easing.easeOut); myAnim.animate(); setTimeout("hide_user_promo_bubble_second_stage()", 1100); } function handle_promo_username(params) { var bubble = $("user_promo_bubble"); var img = $("user_promo_bubble_image"); var anchor = $("user_promo_bubble_link"); if (params.has_photo == "true") { img.src = "http://images.huffingtonpost.com/profiles/" + params.user_id + "-tiny.png"; } else { img.style.display = "none"; Dom.addClass(anchor, "wide"); } anchor.innerHTML = "Shared by " + params.user_name; anchor.href = "http://www.huffingtonpost.com/social/" + params.user_name; bubble.style.display = "block"; var myAnim = new YAHOO.util.Anim(bubble, { opacity: { to: 1 } }, 2, YAHOO.util.Easing.easeOut); myAnim.animate(); } if (HuffPoUtil.getUrlVar("user_promo")) { YAHOO.util.Event.onDOMReady(function() { var parts = document.location.hash.split(","), shared_by = "", badge = "", i; if (parts.length < 2) return; for (i = 0; i < parts.length; i++) { if (parts[i].indexOf("sb=") !== -1) { shared_by = parts[i]; } if (parts[i].indexOf("b=") !== -1) { badge = parts[i]; } } if (shared_by == "" || badge == "") return; var bubble = $("user_promo_bubble"); if (!bubble) return; var entry_id = HuffPoUtil.GetEntryID(); if (!entry_id) return; var user_id = parseInt(shared_by.substr(shared_by.indexOf("sb=") + 3)); if (!user_id) return; var badge_type = badge.substr(badge.indexOf("b=") + 2); if (!badge_type) return; script = document.createElement("script"); script.setAttribute("type", "text/javascript"); bubble.appendChild(script); script.setAttribute("src", "/include/share_track.php?a=view&eid=" + entry_id + "&uid=" + user_id + "&b=" + badge_type + "&cb=handle_promo_username"); }); } Cholera in Haiti: "a disease of poverty"