(function(){ var arrSnsUrls = {}; var arrSnsTypes = ["mypeople", "twitter", "facebook", "me2day"]; var currentSnsIndex = 0; daum.Event.addEvent(window, 'load', function loadSnsShortUrls(){ var snsName = arrSnsTypes[currentSnsIndex]; arrSnsUrls[snsName] = 'http://cafe.daum.net/egilro1/Cxws/1745'+"?sns="+snsName; currentSnsIndex++; if(currentSnsIndex < arrSnsTypes.length) { loadSnsShortUrls(); } else { initSocialShare(); } }); function initSocialShare() { window.socialEl = new socialshare(daum.$('readSnsShare'), { shareType: 'icon', link: 'http://cafe.daum.net/egilro1/Cxws/1745', prefix: '\uBD04\uAF43\uACFC \uBC14\uB2E4', useSmallIcon: true }); daum.$$('#readSnsShare .link_sns').each(function (el) { daum.Event.addEvent(el, 'mousedown', function () { if (daum.Element.hasClassName(el, "link_sns")) { var key = el.getAttribute("data-handler"); if (key) { window.socialEl.context.link = arrSnsUrls[key]; } } }); }); addLineSubForSkinCss(); daum.$$('#readSnsShare .link_url').each(function (el) { daum.Event.addEvent(el, 'mousedown', function () { if (daum.Element.hasClassName(el, "link_url")) { window.socialEl.context.link = arrSnsUrls['addressCopy']; } }); }); } function addLineSubForSkinCss() { daum.$$('#readSnsShare .link_sns').each(function (el) { el.className += " line_sub"; }); daum.$$('#readSnsShare .layer_sharesns')[0].style.borderColor = daum.Element.getStyle(daum.$$('.line_sub')[0], 'border-color'); } })();