Event.observe(window, "load", function() { ShareLinks.init(); });

var ShareLinks = {

    init: function() {
        $$("a.fb_share_link").each(function(e) { Actions.attach(e, "onclick", "ShareLinks.facebook"); });
        $$("a.delicious_share_link").each(function(e) { Actions.attach(e, "onclick", "ShareLinks.delicious", "'" + e + "'"); });
        $$("a.supon_share_link").each(function(e) { Actions.attach(e, "onclick", "ShareLinks.stubleupon", "'" + e + "'"); });
    },

    facebook: function() {
        u = location.href;
        t = document.title;
        window.open("http://www.facebook.com/sharer.php?u=" + encodeURIComponent(u) + "&t=" + encodeURIComponent(t), "sharer", "toolbar=0,status=0,scrollbars=1,width=626,height=436");
        return false;
    },

    delicious: function(src) {
        window.open(src, "sharer", "toolbar=0,status=0,scrollbars=1,width=726,height=436");
        return false;
    },

    stubleupon: function(src) {
        window.open(src, "StubleUpon", "toolbar=0,status=0,scrollbars=1,width=726,height=436");
        return false;
    }

};
