/* * Social Links - Twitter and Facebook buttons * */ /* Pager : Replace Next/Previous text and smooth scrolling to the top of the list */ Drupal.behaviors.mettfunction = { attach: function() { if (!jQuery('#fb-root').length) { jQuery('body').append('
'); } jQuery('.fb-like').each( function() { jQuery(this).after('').remove(); }); jQuery('a.twitter-share-button').each( function() { var startersiteDefaultURL = 'blinkemphaticrock.drupalgardens.com'; var href = jQuery(this).attr('data-url'); var result = href.replace(startersiteDefaultURL, WMG.basePath); result = result.replace('wmgd2c_ss1', WMG.Twitter.handle); jQuery(this).attr('data-url',result); //add the via attribute if present in configuration if ( WMG.Twitter.via ){ jQuery(this).attr('data-via', WMG.Twitter.via); } }); try{ FB.XFBML.parse(); } catch(ex){ _includeJS("//connect.facebook.net/en_US/all.js#xfbml=1"); } _includeJS("//platform.twitter.com/widgets.js"); } };