function popMailWin() {
var pageURL = document.URL;if (pageURL.substring(pageURL.length-1)=="#") {
pageURL = pageURL.substring(0, pageURL.length-1);}
var pageTitle = escape(self.document.title);var formURL = emailFriendUrl+"?path=/health/emailfriend/&group=health6&title="+pageTitle+"&url="+pageURL;showCenteredPopup('emailpop', formURL, 'scrollbars=1', 600, 600);return false;}

function showCenteredPopup(name, url, features, width, height) {
var top = (window.screen.height / 2) - height / 2;var left = (window.screen.width / 2) - width / 2;if (features == null || features == '') {
features = "scrollbars=yes,toolbar=no,menubar=no,status=no,location=no";}
window.open (url, name.replace (' ', '_'), features + ",top=" + top + ",left=" + left + ",width=" + width + ",height=" + height);}



$ (document).ready (function ()
{
var facebookDiv = document.getElementById('facebookLike');
/* Always read from og:url;if the page a new uses gallery, it will always point to the primary gallery 
* If the page is any other gallery, it will point to the first slide. 
*/
var canonicalUrl = $('meta[name=path]').attr('content');;
/* Required Facebook HTML to render the Like button */
$(facebookDiv).append('<div id="fb-root" class="fb_reset"></div>');$(facebookDiv).append('<fb:like href="' + canonicalUrl + '" layout="button_count" show_faces="false" width="150" action="recommend" font="verdana"></fb:like>');$ ('#fb-root').append ('<script type="text/javascript" async="true" src="http://connect.facebook.net/en_US/all.js"></script>');
/* Retrieve app ID from meta tag in template */
var metaAppId = '111292702278073';
/* Standard Facebook Like button initialization - from Facebook developer documentation */
window.fbAsyncInit = function ()
{
FB.init ({appId: metaAppId, status: true, cookie: true, xfbml: true});FB.Event.subscribe ('edge.create', function(response) {
/* This fires when the user clicks recommend or after they log into FB if they weren't already.
* Place the Omniture code here.
*/
omniToolTrack(useractionDesc);var s_code=s_time.t();if(s_code)document.write(s_code)

});};});

