' }, 'sm-plusone':{ 'enabled':enableGooglePlusOne, 'html':tf.isIE8 ? '' : '', 'fn':function(){ window.___gcfg = {lang:tf.lang.split('-')[0]}; (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = document.location.protocol+'//apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); } }, 'sm-twitter':{ 'enabled':enableTwitter, 'html':'', 'fn':function(){ (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = document.location.protocol+'//platform.twitter.com/widgets.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); } } }; var smColl = document.getElementsByName('social-media'); for (var n = 0, nn = smColl.length; n < nn;){ var smParent = smColl[n].parentNode; if (!smParent.id) { if (typeof(_sfSocialMediaID) == 'undefined') _sfSocialMedia = -1; _sfSocialMedia++; smParent.id = 'social-media-'+_sfSocialMedia; } for (var m in smLinkData){ var smLink = smLinkData[m]; if (smLink && smLink['enabled']){ if (smLink['html']){ var el = document.createElement('span'); el.innerHTML = smLink['html']; smParent.appendChild(el); } var coll = document.getElementById(m); if (coll){ for (var attr in smLink){ if (attr != 'enabled' && attr != 'html' && attr != 'fn'){ coll[attr] = smLink[attr]; } } } if (smLink['fn']){ smLink['fn'](); } } } smParent.removeChild(smColl[n]); nn--; } } if (!tf.isInSF() && document.location.protocol != 'file:') _sfSocialMedia(); /* SFNOTE_BEGIN:prevent script execution when in editing mode */ } /* SFNOTE_END:prevent script execution when in editing mode */