var currentURL = encodeURIComponent(location.href);
var hostName = encodeURIComponent(location.hostname);
var sTitle = encodeURIComponent(document.title.substring(0,80));
var sDescription = encodeURIComponent(document.title.substring(0,140));

/*  Google Bookmarks  */
function gs_click() {
    var link = 'http://www.google.com/bookmarks/mark?op=edit&bkmk=' + currentURL
            + '&title=' + sTitle;

    window.open(link, 'googlesharer');
    return false;
}


/*  Facebook  */
function fbs_click() {
    var link = 'http://www.facebook.com/sharer.php?u=' + currentURL
            + '&t=' + sTitle;

    window.open(link, 'facebooksharer');
    return false;
}


/*  MySpace  */
function mss_click() {
    var link = 'http://www.myspace.com/index.cfm?fuseaction=postto&' 
        + 't=' + sTitle
        + '&c=' + sDescription 
        + '&u=' + currentURL;

    window.open(link, 'myspacesharer');
    return false;
}


/*  Digg: Submit activity in some category  */
function ds_click() {
    var link = 'http://digg.com/submit?url=' + currentURL
            + '&title=' + sTitle
            + '&bodytext=' + sDescription
            + '&media=news&topic=people&thumbnails=0';

    window.open(link, 'diggsharer');
    return false;
}


/*  LinkedIn: Share article with friends */
function lis_click() {
    var link = 'http://www.linkedin.com/shareArticle?mini=true&url=' + currentURL
            + "&title=" + sTitle
            + '&summary=' + sDescription
            + '&source=' + hostName;
    window.open(link, 'linkedinsharer');
    return false;
}


/*  Twitter :Some text about what user doing */
function ts_click() {
    var link = 'http://twitter.com/home?status=' + currentURL
            + " - " + sDescription;

    window.open(link, 'twittersharer');
    return false;
}

