﻿$(document).ready(function ()
{
    $('#quickMenu').addFloating({ targetLeft: 0, targetTop: 0 });
});

var goTwitter = function (title)
{
    window.open("http://twitter.com/home?status=" + encodeURIComponent(title) + " " + encodeURIComponent(location.href), '', '');
    return false;
}

var goFacebook = function (title)
{
    window.open("http://www.facebook.com/sharer.php?t=" + encodeURIComponent(title)+ "&u=" + encodeURIComponent(location.href), '', '');
    return false;
}

var goMe2day = function (title)
{

    var target_url = "http://me2day.net/plugins/post/new";

    window.open(target_url + "?new_post[body]=" + encodeURIComponent(title)+ " " + encodeURIComponent(location.href) + "&new_post[tags]=sbs8news", 'me2day', '');
    return false;
}

var goYozm = function (title)
{
    var target_url = "http://yozm.daum.net/api/popup/post";
    window.open(target_url + "?prefix=" + encodeURIComponent(title)+ "&link=" + encodeURIComponent(location.href), 'yozm', '');
    return false;
}

var goclog = function (title, img_file)
{
    var target_url = "http://csp.cyworld.com/bi/bi_recommend_pop.php";

    var param = "?url=" + encodeURIComponent(location.href);
    param += "&title_nobase64=" + encodeURIComponent(title)+ "&title=";
    if (img_file)
    {
        param += "&thumbnail=" + img_file;
    }
    param += "&summary_nobase64=&summary=&writer=&corpid=65925089";
    window.open(target_url + param, 'clog', 'width=400,height=364,scrollbars=no,resizable=no');
    return false;
}
