﻿var evokeSocialNetworks = {
    shareFacebook: function(url) {
        evokeAnalytics.Google.trackSocial("Facebook");
        var shareUrl = location.href;
        if (url != undefined && url != null)
            shareUrl = url;
        window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(shareUrl), 'facebook', 'toolbar=0,status=0,width=626,height=436');
    },
    shareTwitter: function(url, msg) {
        evokeAnalytics.Google.trackSocial("Twitter");
        var shareUrl = location.href;
        if (url != undefined && url != null)
            shareUrl = url;
        if (msg == undefined || msg == null)
            window.open("http://twitter.com/home?status=" + encodeURIComponent(shareUrl), "twitter");
        else
            window.open("http://twitter.com/home?status=" + encodeURIComponent(msg), "twitter");
    },
    shareDelicious: function(url) {
        evokeAnalytics.Google.trackSocial("del.icio.us");
        var shareUrl = location.href;
        if (url != undefined && url != null)
            shareUrl = url;
        window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=' + encodeURIComponent(shareUrl) + '&amp;title=' + encodeURIComponent(document.title), 'delicious', 'toolbar=no,width=550,height=550');
    },
    shareDigg: function(url) {
        evokeAnalytics.Google.trackSocial("Digg");
        var shareUrl = location.href;
        if (url != undefined && url != null)
            shareUrl = url;
        window.open("http://digg.com/submit?url=" + encodeURIComponent(shareUrl) + "&title=" + encodeURIComponent(document.title) + "&topic=health&thumbnails=0", "digg");
    },
    shareEons: function() {
        evokeAnalytics.Google.trackSocial("Eons");
        window.open("http://www.eons.com", "eons");
    },
    shareSermo: function() {
        evokeAnalytics.Google.trackSocial("Sermo");
        window.open("http://www.sermo.com", "sermo");
    }
};