text: /* repo: social-share-plugin/release-7-28-16@1.2.1-0-g085ad4b - Package Version: 1.2.1 - 2016-07-28 07:33 pm - User: Pfundstein, Andrew */
  
  define("webmd.m.socialshareplugin",[],function(){return webmd.m.socialshareplugin=function(e,t,n,r){"use strict";function o(){return e("meta[property='og:description']").attr("content")||""}function u(){return e("meta[property='og:title']").attr("content")||e("title").html()}function a(){return e("meta[property='og:url']").attr("content")||t.location.href}function f(){return e("meta[property='og:image']").attr("content")||""}function l(){return e("meta[property='og:site_name']").attr("content")||""}function c(){return e("meta[property='og:type']").attr("content")||""}function h(t){var n="https://api-ssl.bitly.com/v3/shorten?access_token=34543b055a4fc76fa6e5969de2abc6f323145392",r=n+"&longUrl="+encodeURIComponent(t)+"&format=txt";s===""&&(s=t,e.ajax({url:r,async:!1,timeout:500,success:function(e,t,n){s=e},error:function(e,n,r){s=t}}))}function p(e){var t="https://twitter.com/intent/tweet?",n="",r="";return h(e.shareLink),n="text="+encodeURIComponent(e.shareTitle)+" "+encodeURIComponent(s)+" from @WebMD",r=t+n,r}function d(e){var t="https://www.facebook.com/dialog/feed?",n="app_id=385978254785998",r="&display=popup",i="&picture="+encodeURIComponent(e.shareImg),s="&redirect_uri="+encodeURIComponent("http://www.webmd.com/facebook-app-close"),o="&name="+encodeURIComponent(e.shareTitle),u="&link="+encodeURIComponent(e.shareLink),a="&caption="+encodeURIComponent(e.shareTitle),f="&description="+encodeURIComponent(e.shareDesc),l=t+n+r+i+s+o+u+a+f;return l}function v(e){var t="https://pinterest.com/pin/create/button/?",n="url="+encodeURIComponent(e.shareLink),r="&media="+encodeURIComponent(e.shareImg),i="&description="+encodeURIComponent(e.shareTitle)+" | WebMD",s=t+n+r+i;return s}function m(e){var t="https://plus.google.com/share?",n="url="+encodeURIComponent(e.shareLink),r=t+n;return r}function y(t,n){this.element=t,this.settings=e.extend({},g,n),this._defaults=g,this._name=i,this.init()}var i="socialshareplugin",s="",g={shareOrder:["facebook","pinterest","twitter"],baseHtmlTmpl:"<div class='plugin plugin-socialshare' data-metrics-module='sharebar'></div>",shareTitle:u(),shareDesc:o(),shareImg:f(),shareLink:a(),shareOptions:{facebook:{windowOpts:"height=400, width=580, scrollbars = 1, toolbar = 0, resizable = 1, status = 0, left = 25, top = 25",htmlTmpl:"<a class='plugin-socialshare-link plugin-socialshare-facebook' data-metrics-link='face' data-metrics-type='ad-hoc' data-sharetype='facebook' href='#' title='Share on Facebook'></a>",clickHandler:function(e){t.open(d(e),"",this.windowOpts)}},pinterest:{windowOpts:"height=400, width=580, scrollbars = 1, toolbar = 0, resizable = 1, status = 0, left = 25, top = 25",htmlTmpl:"<a class='plugin-socialshare-link plugin-socialshare-pinterest' data-metrics-link='pin' data-metrics-type='ad-hoc' data-sharetype='pinterest' href='#' title='Share on Pinterest'></a>",clickHandler:function(e){t.open(v(e),"",this.windowOpts)}},twitter:{windowOpts:"height=400, width=580, scrollbars = 1, toolbar = 0, resizable = 1, status = 0, left = 25, top = 25",htmlTmpl:"<a class='plugin-socialshare-link plugin-socialshare-twitter' data-metrics-link='twit' data-metrics-type='ad-hoc' data-sharetype='twitter' href='#' title='Share on Twitter'></a>",clickHandler:function(e){t.open(p(e),"",this.windowOpts)}},googleplus:{windowOpts:"height=400, width=580, scrollbars = 1, toolbar = 0, resizable = 1, status = 0, left = 25, top = 25",htmlTmpl:"<a class='plugin-socialshare-link plugin-socialshare-googleplus' data-metrics-link='ggl' data-metrics-type='ad-hoc' data-sharetype='googleplus' href='#' title='Share on Google+'></a>",clickHandler:function(e){t.open(m(e),"",this.windowOpts)}},email:{windowOpts:"",htmlTmpl:"<a class='plugin-socialshare-link plugin-socialshare-email triggerEmailOverlay' data-metrics-link='email' data-metrics-type='ad-hoc' data-sharetype='email' href='#' title='Share via Email'></a>",clickHandler:function(){}},print:{windowOpts:"",htmlTmpl:"<a class='plugin-socialshare-link plugin-socialshare-print' data-metrics-link='print' data-metrics-type='ad-hoc' data-sharetype='print' href='#' title='Print this page'></a>",clickHandler:function(){t.printWindow()}},save:{windowOpts:"",htmlTmpl:"<a class='plugin-socialshare-link plugin-socialshare-save' data-metrics-link='save' data-metrics-type='ad-hoc' data-sharetype='save' href='#' title='Save this page'></a>",clickHandler:function(){var e=webmd.p.header.getPromoApp();webmd.cookie.exists("WBMD_AUTH")?webmd.p.header.bookmark_page():t.location.href="http://member"+webmd.url.getEnv()+"."+webmd.url.getSLD()+"?appid="+e+"&returl="+n.location.href}}}};e.extend(y.prototype,{init:function(){this.buildSocialShare(this.settings,this.element)},buildSocialShare:function(n,r){var i=e(n.baseHtmlTmpl),s,o="",u;for(var a=0;a<n.shareOrder.length;a++)s=n.shareOrder[a].toLowerCase(),o=n.shareOptions[s],u=e(o.htmlTmpl),i.append(u);e(r).append(i),this.bindClickHandler(n,r)},bindClickHandler:function(n,r){e(r).on("click",".plugin-socialshare-link",function(t){var r=e(this).data("sharetype");n.shareOptions[r].clickHandler(n),t.preventDefault()})}}),e.fn[i]=function(t){return this.each(function(){e.data(this,"plugin_"+i)||e.data(this,"plugin_"+i,new y(this,t))})}}(jQuery,window,document),webmd.m.socialshareplugin}),define("webmd.m.socialshareplugin.min",function(){});