/*!
 * webmd.core.js
 */
var webmd,image_server_url=window.image_server_url||location.protocol+"//img.webmd.com/dtmcms/live",s_business_reference=window.s_business_reference||"",s_furl=window.s_furl||"",s_package_type=window.s_package_type||"",s_package_name=window.s_package_name||"",s_sponsor_program=window.s_sponsor_program||"";if(!webmd){webmd={}}if(!webmd.p){webmd.p={}}if(!webmd.m){webmd.m={}}$.extend(webmd,{load:function(b,a){return $.xLazyLoader(b,a)},substitute:function(a,b){return a.replace(/\{([^{}]*)\}/g,function(d,c){var e=b[c];return typeof e==="string"||typeof e==="number"?e:d})},htmlEncode:function(a){return a.replace(/\&/g,"&amp;").replace(/\</g,"&lt;").replace(/\>/g,"&gt;").replace(/\"/g,"&quot;")},openWindow:function(d,c){var h,g,b,e,a;if(!c){c={}}h={name:"",focus:true};if(c.standard){h=$.extend(h,{location:1,menubar:1,resizable:1,scrollbars:1,status:1,toolbar:1})}c=$.extend(h,c);e={name:1,focus:1,standard:1};b=[];for(g in c){if(c.hasOwnProperty(g)){if(e[g]){continue}b.push(g+"="+c[g])}}a=window.open(d,c.name,b.join(","));if(c.focus&&a){a.focus()}return a},object:(function(){function a(){}return function(d,c){a.prototype=d;var b=new a();if(c){$.extend(b,c)}return b}})(),plugin:function(b,a){$.fn[b]=function(d){var f,c=Array.prototype.slice.call(arguments,1),g=typeof d=="string"?{}:d,e=false;this.each(function(){var h=$.data(this,b);if(!h){h=webmd.object(a);$.data(this,b,h);h.init(g,this)}if($.isFunction(h[d])){f=h[d].apply(h,c);if(f!==undefined&&f!==h){e=true;return false}}else{if(d==="option"){if(c.length>1){h[c[0]]=c[1]}else{e=true;f=h[c[0]];return false}}}});return e?f:this}}});$(function(){window.document.write=function(a){throw ("INVALID document.write: "+a)}});webmd.useragent={ua:{type:"desktop",device:"pc",browser:"",major_version:"",minor_version:""},init:function(){var a=this,b;if(b=/MSIE\s(\d+)\.(\d+);/.exec(navigator.userAgent)){this.ua.browser="browserIE";this.ua.major_version=b[1];this.ua.minor_version=b[2]}else{if(b=/Firefox[\/\s](\d+)\.(\d+)/.exec(navigator.userAgent)){this.ua.browser="browserFF";this.ua.major_version=b[1];this.ua.minor_version=b[2]}else{if(b=/AppleWebKit\/(\d+)\.(\d+)/.exec(navigator.userAgent)){this.ua.browser="browserWK";this.ua.major_version=b[1];this.ua.minor_version=b[2]}}}if((navigator.userAgent.indexOf("AppleWebKit")!=-1)&&((navigator.userAgent.indexOf("Mobile")!=-1)||(navigator.userAgent.indexOf("webOS")!=-1))){this.ua.type="mobile"}if((navigator.userAgent.indexOf("iPad")!=-1)){this.ua.type="tablet";this.ua.device="ipad"}if((navigator.userAgent.indexOf("iPhone")!=-1)){this.ua.type="mobile";this.ua.device="iphone"}if((navigator.userAgent.indexOf("Android")!=-1)){this.ua.type="mobile";this.ua.device="android"}if((navigator.userAgent.indexOf("webmdapp")!=-1)){this.ua.appview="webmdapp"}document.documentElement.className+=" ua_type_"+this.ua.type+" ua_device_"+this.ua.device;if(this.ua.appview){document.documentElement.className+=" ua_app_"+this.ua.appview}if(this.ua.browser){document.documentElement.className+=webmd.substitute(" {b} {b}_{maj} {b}_{maj}_{min}",{b:this.ua.browser,maj:this.ua.major_version,min:this.ua.minor_version})}document.documentElement.className=document.documentElement.className.replace(/no-js/i,"js")},getDevice:function(){var a=this;return this.ua.device},getType:function(){var a=this;return this.ua.type},getTouch:function(){var d=$("div:first").get(0);d.setAttribute("ontouchstart","return;");var b=false;var c=new RegExp(/Android\s[.\d]*/);var a=c.exec(navigator.userAgent);if((webmd.useragent.getDevice()=="android")&&(a<"Android 2.0")){b=true}if(navigator.userAgent.indexOf("T-Mobile_Espresso")!=-1){b=true}if((typeof d.ontouchstart=="function")&&!b){return true}else{return false}}};webmd.useragent.init();
/*!
 * webmd.json.js
 */
var JSON;if(!JSON){JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());webmd.json={parse:JSON.parse,stringify:JSON.stringify};
/*!
 * webmd.cookie
 */
(function(){function d(f){return e(f)}function b(f){return e(f)}function e(f){return(f||"").replace(/[a-z]/ig,function(g){var h=g.charCodeAt(0);return String.fromCharCode(h>109||h<97&&h>77?h-13:h+13)})}var c=/^(\s|\u00A0)+|(\s|\u00A0)+$/g;function a(f){return(f||"").replace(c,"")}webmd.cookie=function(g,o,r){
/*! BEGIN LICENSE Cookie plugin
		 * This code was based on:
		 * Cookie plugin
		 * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
		 * Dual licensed under the MIT and GPL licenses:
		 * http://www.opensource.org/licenses/mit-license.php
		 * http://www.gnu.org/licenses/gpl.html
		 */
r=r||{};if(typeof o!="undefined"){if(o===null){o="";r.expires=-1}if(r.scramble){o=d(o)}var k="";if(r.expires&&(typeof r.expires=="number"||r.expires.toUTCString)){var l;if(typeof r.expires=="number"){l=new Date();l.setTime(l.getTime()+(r.expires*24*60*60*1000))}else{l=r.expires}k="; expires="+l.toUTCString()}var q="; path="+(r.path?(r.path):"/");var m=r.domain?"; domain="+(r.domain):"";var f=r.secure?"; secure":"";document.cookie=[g,"=",encodeURIComponent(o),k,q,m,f].join("");return o}else{var j=null;if(document.cookie&&document.cookie!==""){var p=document.cookie.split(";");for(var n=0;n<p.length;n++){var h=a(p[n]);if(h.substring(0,g.length+1)==(g+"=")){j=decodeURIComponent(h.substring(g.length+1));if(r.scramble){j=b(j)}break}}}return j}};
/*! END LICENSE Cookie plugin */
webmd.cookie=$.extend(webmd.cookie,{get:function(h,g){var f=this(h,undefined,g);return f===null?"":f},set:function(g,h,f){return this(g,h,f)},getJson:function(g,f){var h=this(g,undefined,f);if(h===null){return{}}try{h=webmd.json.parse(h);return h}catch(i){return{}}},setJson:function(h,g,f){return this(h,webmd.json.stringify(g),f)},exists:function(f){return(this(f)!==null)},deleteCookie:function(g,f){return this(g,"",$.extend({},f,{expires:-1}))}})})();
/*!
 * webmd.p.adscookie
 */
webmd.adsCookie={config:{perm:{name:"ads_perm",expire:365},sess:{name:"ads_sess",expire:null}},baseDomain:location.hostname.replace(/.*(\.[^.]+\.[^.]+)$/,"$1"),get:function(b){var a=webmd.cookie(this.config[b].name);return a===null?{}:JSON.parse(a)},deleteCookie:function(a){return webmd.cookie(this.config[a].name,"",{domain:this.baseDomain,expires:-1})},set:function(b){var a=webmd.adsCookie.get(b.type);if(!a[b.prefix]){a[b.prefix]={}}a[b.prefix][b.value]=b.prefix+b.value+"x";if(b.count){a[b.prefix][b.value]=a[b.prefix][b.value].split("x")[0]+"_"+b.count+"x"}if(b.type=="sess"){return webmd.cookie(this.config[b.type].name,JSON.stringify(a),{domain:this.baseDomain})}else{return webmd.cookie(this.config[b.type].name,JSON.stringify(a),{domain:this.baseDomain,expires:this.config[b.type].expire})}},remove:function(c){var b,a=webmd.adsCookie.get(c.type);if(!c.prefix){return}if(!a[c.prefix]){return}if(!c.value){delete a[c.prefix]}else{if(!a[c.prefix][c.value]){return}else{delete a[c.prefix][c.value]}}return webmd.cookie(this.config[c.type].name,JSON.stringify(a),{domain:this.baseDomain,expires:this.config[c.type].expire})}};webmd.p.pim={maxSession:4,cookieCount:{type:"sess",prefix:"pim",value:"c",count:0},cookieMax:{type:"sess",prefix:"pim",value:"m"},cookieExpire:{type:"sess",prefix:"pim",value:"t"},expireMS:86400000,_occurredOnPage:false,_baseDomain:location.hostname.replace(/.*(\.[^.]+\.[^.]+)$/,"$1"),runIfAllowed:function(b,a){if(this.isAllowed()){this.increment();if(b){b()}}else{if(a){a()}}return this},isAllowed:function(){this.checkExpiration();if(this._occurredOnPage){return false}return Boolean(this.getCount()<this.maxSession)},increment:function(){var a=this,b=0;a._occurredOnPage=true;b=a.getCount()+1;a.cookieCount.count=b;webmd.adsCookie.set(a.cookieCount);if(b>=a.maxSession){webmd.adsCookie.set(a.cookieMax)}a.cookieExpire.count=new Date().getTime();webmd.adsCookie.set(a.cookieExpire);return a},getCount:function(){var b,a;b=webmd.adsCookie.get(this.cookieCount.type);if(b[this.cookieCount.prefix]&&b[this.cookieCount.prefix][this.cookieCount.value]){a=b[this.cookieCount.prefix][this.cookieCount.value].replace(/.*_(\d+)x$/,"$1");return parseInt(a,10)||0}return 0},checkExpiration:function(){var c,b,a=new Date().getTime();c=webmd.adsCookie.get(this.cookieExpire.type);if(c[this.cookieExpire.prefix]&&c[this.cookieExpire.prefix][this.cookieExpire.value]){b=c[this.cookieExpire.prefix][this.cookieExpire.value].replace(/.*_(\d+)x$/,"$1");b=parseInt(b,10)||0}if(!b){return}if(b+this.expireMS<a){webmd.adsCookie.remove({type:this.cookieExpire.type,prefix:this.cookieExpire.prefix})}}};webmd.p.pim.checkExpiration();
/*!
 * webmd.url.js
 */
webmd.url={getParam:function(c,a){if(a===undefined){a=document.location.href}var b=this._getParts(a).params;return b[c]},addParam:function(g,b,a){if(a===undefined){a=document.location.href}var e,f,d,c;c="";d=this._getParts(a);if(b===undefined){b=""}d.params[g]=b;a=d.url+"?";f=d.params;for(e in f){if(f.hasOwnProperty(e)){a+=c+encodeURIComponent(e)+"="+encodeURIComponent(f[e]);c="&"}}if(d.hash){a+="#"+encodeURIComponent(d.hash)}return a},deleteParam:function(c,a){if(a===undefined){a=document.location.href}var b=new RegExp("[?&]"+encodeURIComponent(c)+"=[^&#]*","g");a=a.replace(b,"");return a},getHash:function(a){if(a===undefined){a=document.location.href}var b=this._getParts(a).hash;return b},setHash:function(b,a){if(a===undefined){a=document.location.href}a=a.replace(/#.*/,"");b=b.replace(/^#/,"");if(b){a=a+"#"+encodeURIComponent(b)}return a},clear:function(a){if(a===undefined){a=document.location.href}return this._getParts(a).url},_getParts:function(c){var b={url:"",query:"",hash:"",params:{}};var d=new RegExp("([^#?]*)\\??([^#]*)?#?(.*)?");var a=d.exec(c);if(a!==null){b.url=a[1]===undefined?"":a[1];b.query=a[2]===undefined?"":a[2];b.hash=a[3]===undefined?"":decodeURIComponent(a[3]);b.params=this._splitParams(b.query)}return b},_splitParams:function(g){var e,f,b,d,a,c;e={};if(g){f=g.split("&");for(b=0;b<f.length;b++){d=f[b].split("=");a=decodeURIComponent(d[0]);c=decodeURIComponent(d[1]);e[a]=c}}return e}};
/*!
 * webmd.flash
 */
webmd.flash={getState:function(c){var b,a;if(!c){c="urlParams"}webmd.debug("webmd.flash.getState called. appID: ",c);webmd.debug("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");a={};b=this.getState[c];if(b){a=b()}else{webmd.debug("Error: no getState handler for ",c)}$(document).trigger("getState",[a]);return a},handleUserAction:function(b){webmd.debug("userAction object:",b);var a=this.handleUserAction[b.action];if(a){a(b)}else{webmd.debug("Error: no handleUserAction function for ",b.action)}b.type="userAction";$(document).trigger(b)}};$.extend(webmd.flash.handleUserAction,{moduleClick:function(a){wmdPageLink(a.id)},linkClick:function(a){ctrs(a.id);if(a.url){location=a.url}},pageClick:function(a){wmdTrack(a.id);if(a.url){location=a.url}},pageView:function(c){var b=location.pathname.split("default.htm");var a=location.host+b[0]+c.id;wmdPageview(a);webmd.debug("omniturePageURL: ",a)},videoView:function(c){if(!c.video.id){c.video.id="sponsorvideo"}if(c.video&&c.video.status&&c.video.name&&c.video.id){var b,a;b=s_gi(s_account);b.linkTrackVars="prop9,prop17,prop18,prop20,prop34,prop50";b.prop17=c.video.id;b.prop18=c.video.id+"_"+c.video.status;b.prop20=c.video.name+"_"+c.video.id+"_"+c.video.status;b.prop34=c.video.name+"_"+c.video.id;b.prop9="";if(c.video.status=="start"){b.prop9="allvideo_start"}if(c.video.status=="100pct"){b.prop9="allvideo_100pct"}b.tl(true,"o",b.prop20)}}});$.extend(webmd.flash.getState,{urlParams:function(){var b={};var a,g,d,f,c,e;if(location.search){a=location.search.split("?");a=a[1]===undefined?"":a[1];g=a.split("&");for(d=0;d<g.length;d++){f=g[d].split("=");c=decodeURIComponent(f[0]);e=decodeURIComponent(f[1]);b[c]=e}}return b}});
/*!
 * webmd.ads
 */
webmd.ads={params:{},init:function(){var b=new RegExp("(.*/)(.*)");var c={};$("*[id*='Ad_Iframe']").each(function(){a(this,c)});$.each(webmd.ads.refresh.defaults.src,function(){a(this,c)});function a(k,n){var g,f,j,l,d,o;var e=$(k).attr("src");var h=b.exec(e);if(h!==null){g=h[2]===undefined?"":h[2]}if(g){g=g.replace(/amp;/g,"");f=g.split("&");for(j=0;j<f.length;j++){l=f[j].split("=");d=decodeURIComponent(l[0]);o=decodeURIComponent(l[1]);o=o.replace(/\//g,"%2f");if(d!="pos"||!(n[d])){n[d]=o}else{n[d]=n[d]+","+o}}}return true}webmd.ads.params=c},refresh:function(b){var c=$.extend({},webmd.ads.refresh.defaults,b);var d=Math.round(99999999*Math.random());$(c.selector).each(function(){var h,j;var g=$(this).children("*[id*='Ad_Iframe']");$(this).find("*").not("*[id*='Ad_Iframe'],.ad_placeholder").remove();g.empty();h=$(this).find("[id]");if(!h[0]){var f=c.src[$(this).attr("id")];j=$(f).attr("src");if(j){j=j.replace(/amp;/g,"");j=a(j,"transactionID",d);j=a(j,"tile",d);$.each(c.params,function(e,k){j=a(j,e,k);if(j.indexOf(e+"=")<0){j=j+"&"+e+"="+k}});if($.isFunction(c.filter)){j=c.filter(j)}$(f).attr("src",j);f='<iframe id="'+$(f).attr("id")+'" width="'+$(f).attr("width")+'" height="'+$(f).attr("height")+'" src="'+$(f).attr("src")+'" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style=""></iframe>';$(this).children("div.ad_placeholder").append(f);return}else{$(this).parent().remove();return}}else{j=h.attr("src");if(!j){return}j=a(j,"transactionID",d);j=a(j,"tile",d);$.each(c.params,function(e,k){j=a(j,e,k);if(j.indexOf(e+"=")<0){j=j+"&"+e+"="+k}});if($.isFunction(c.filter)){j=c.filter(j)}$(h).attr("style","");if(h[0].contentWindow){try{h[0].contentWindow.location.replace(j)}catch(i){webmd.debug(i)}}else{h.attr({src:j})}}});function a(g,e,f){var h=new RegExp("\\b"+e+"=[^&#\"']*");g=g.replace(h,e+"="+f);return g}}};$(function(){webmd.ads.init()});webmd.ads.refresh.defaults={selector:"#bannerAd_fmt, #leftAd_fmt, #rightAd_fmt, #slideshow_ad_300x250, #cw_btm_ad_300x250",src:{},params:{}};
/*!
 * webmd.debug
 */
webmd.debug=function(){var a=Array.prototype.slice.call(arguments);if(webmd.debug.active){if(window.console){if(console.log.apply){console.log.apply(console,a)}else{console.log(a)}}else{webmd.debug.cache.push(a)}}};$.extend(webmd.debug,{active:false,cookie:"webmddebug",param:"webmddebug",cache:[],autoDetect:function(){var a=webmd.url.getParam(this.param);if(a==="0"){this.deactivate()}else{if(a==="1"||webmd.cookie.exists(this.cookie)){this.activate()}}},activate:function(){this.active=true;webmd.cookie.set(this.cookie,"1");if(!window.console){this._createConsole()}},deactivate:function(){this.active=false;webmd.cookie.deleteCookie(this.cookie)},_createConsole:function(){var a=this;$.getScript("http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js",function(){a._createConsole2()})},_createConsole2:function(){var a=this,b=arguments.callee;if(window.firebug){$(function(){firebug.init();a._emptyCache()})}else{setTimeout(function(){b.call(a)},100)}},_emptyCache:function(){var a=this,b=arguments.callee;if(!console.log){setTimeout(function(){b.call(a)},100);return}$.each(a.cache,function(){a.apply(a,this)})}});webmd.debug.autoDetect();(function(t,F){var u={transition:"elastic",speed:300,width:false,initialWidth:"600",innerWidth:false,maxWidth:false,height:false,initialHeight:"450",innerHeight:false,maxHeight:false,scrolling:true,inline:false,html:false,iframe:false,photo:false,href:false,title:false,rel:false,opacity:0.7,preloading:true,close:"close",open:false,returnFocus:true,loop:true,onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false,overlayClose:true,escKey:true,arrowKey:true,hideCloseButton:false},o="colorbox",C="webmdHover",E=C+"_open",d=C+"_load",D=C+"_complete",l=C+"_cleanup",J=C+"_closed",g=C+"_purge",A=C+"_loaded",m=t.browser.msie&&!t.support.opacity,M=m&&t.browser.version<7,I=C+"_IE6",B,N,O,c,b,H,w,i,f,p,P,j,h,a,n,s,K,q,G,x=false,v,k=C+"Element";function z(R,Q){R=R?' id="'+C+R+'"':"";Q=Q?' style="'+Q+'"':"";return t("<div"+R+Q+"/>")}function y(Q,R){R=R==="x"?H.width():H.height();return(typeof Q==="string")?Math.round((/%/.test(Q)?(R/100)*parseInt(Q,10):parseInt(Q,10))):Q}function L(R){for(var Q in R){if(t.isFunction(R[Q])&&Q.substring(0,2)!=="on"){R[Q]=R[Q].call(n)}}R.rel=R.rel||n.rel||"nofollow";R.href=R.href||t(n).attr("href");R.title=R.title||n.title;return R}function r(Q,R){if(R){R.call(n)}t.event.trigger(Q)}function e(Q){if(!x){n=Q;K=L(t.extend({},t.data(n,o)));b=t(n);s=0;if(K.rel!=="nofollow"){b=t("."+k).filter(function(){var S=t.data(this,o).rel||this.rel;return(S===K.rel)});s=b.index(n);if(s===-1){b=b.add(n);s=b.length-1}}if(!q){q=G=true;N.show();if(K.returnFocus){try{n.blur();t(n).one(J,function(){try{this.focus()}catch(S){}})}catch(R){}}B.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show();if(webmd.useragent.getType()=="mobile"){B.css({height:document.height+"px"})}K.w=y(K.initialWidth,"x");K.h=y(K.initialHeight,"y");v.position(0);if(M){H.bind("resize."+I+" scroll."+I,function(){B.css({width:H.width(),height:H.height(),top:H.scrollTop(),left:H.scrollLeft()})}).trigger("scroll."+I)}r(E,K.onOpen);p.html(K.close).show()}v.load(true)}}v=t.fn[o]=t[o]=function(Q,T){var R=this,S;if(!R[0]&&R.selector){return R}Q=Q||{};if(T){Q.onComplete=T}if(!R[0]||R.selector===undefined){R=t("<a/>");Q.open=true}R.each(function(){t.data(this,o,t.extend({},t.data(this,o)||u,Q));t(this).addClass(k)});S=Q.open;if(t.isFunction(S)){S=S.call(R)}if(S){e(R[0])}return R};v.init=function(){H=t(F);N=z().attr({id:o,"class":m?C+"IE":""});B=z("Overlay",M?"position:absolute":"").hide();O=z("Wrapper");c=z("Content").append(w=z("LoadedContent","width:0; height:0; overflow:hidden"),f=z("LoadingOverlay"),p=z("Close"));O.append(c);i=z(false,"position:absolute; width:9999px; visibility:hidden; display:none");t("body").prepend(B,N.append(O,i));c.children().hover(function(){t(this).addClass("hover")},function(){t(this).removeClass("hover")}).addClass("hover");P=c.outerHeight(true)-c.height();j=c.outerWidth(true)-c.width();h=w.outerHeight(true);a=w.outerWidth(true);N.css({"padding-bottom":P,"padding-right":j}).hide();p.click(v.close);c.children().removeClass("hover");t("."+k).live("click",function(Q){if(!((Q.button!==0&&typeof Q.button!=="undefined")||Q.ctrlKey||Q.shiftKey||Q.altKey)){Q.preventDefault();e(this)}});B.click(function(){if(K.overlayClose){v.close()}});t(document).bind("keydown",function(Q){if(q&&K.escKey&&Q.keyCode===27){Q.preventDefault();v.close()}})};v.remove=function(){N.add(B).remove();t("."+k).die("click").removeData(o).removeClass(k)};v.position=function(U,R){var T,S=Math.max(document.documentElement.clientHeight-K.h-h-P,0)/2+H.scrollTop(),Q=Math.max(H.width()-K.w-a-j,0)/2+H.scrollLeft();T=(N.width()===K.w+a&&N.height()===K.h+h)?0:U;O[0].style.width=O[0].style.height="9999px";function V(W){c[0].style.width=W.style.width;f[0].style.height=c[0].style.height=W.style.height}if(T==0){N[0].style.width=K.w+"px";N[0].style.height=K.h+"px";N[0].style.top=S+"px";N[0].style.left=Q+"px";N[0].style.display="block";G=false;O[0].style.width=(K.w+a+j)+"px";O[0].style.height=(K.h+h+P)+"px";if(R){R()}}else{N.dequeue().animate({width:K.w+a,height:K.h+h,top:S,left:Q},{duration:T,complete:function(){V(this);G=false;O[0].style.width=(K.w+a+j)+"px";O[0].style.height=(K.h+h+P)+"px";if(R){R()}},step:function(){V(this)}})}};v.resize=function(Q){if(q){Q=Q||{};if(Q.width){K.w=y(Q.width,"x")-a-j}if(Q.innerWidth){K.w=y(Q.innerWidth,"x")}w.css({width:K.w});if(Q.height){K.h=y(Q.height,"y")-h-P}if(Q.innerHeight){K.h=y(Q.innerHeight,"y")}if(!Q.innerHeight&&!Q.height){var R=w.wrapInner("<div style='overflow:auto'></div>").children();K.h=R.height();R.replaceWith(R.children())}w.css({height:K.h});v.position(K.transition==="none"?0:K.speed)}};v.prep=function(T){if(!q){return}var S,U=K.transition==="none"?0:K.speed;H.unbind("resize."+C);w.remove();w=z("LoadedContent").html(T);function Q(){K.w=K.w||w.width();K.w=K.mw&&K.mw<K.w?K.mw:K.w;return K.w}function V(){K.h=K.h||w.height();K.h=K.mh&&K.mh<K.h?K.mh:K.h;return K.h}w.hide().appendTo(i.show()).css({width:Q(),overflow:K.scrolling?"auto":"hidden"}).css({height:V()}).prependTo(c);i.hide();t("#"+C+"Photo").css({cssFloat:"none",marginLeft:"auto",marginRight:"auto"});if(M){t("select").not(N.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(l,function(){this.style.visibility="inherit"})}function R(Z){var ab,ac,Y,X,aa=b.length,W=K.loop;v.position(Z,function(){function ad(){if(m){N[0].style.removeAttribute("filter")}}if(!q){return}if(m){if(S){w.fadeIn(100)}}w.show();r(A);f.hide();if(K.transition==="fade"){N.fadeTo(U,1,function(){ad()})}else{ad()}H.bind("resize."+C,function(){v.position(0)});r(D,K.onComplete)})}if(K.transition==="fade"){N.fadeTo(U,0,function(){R(0)})}else{R(U)}};v.load=function(T){var S,R,U,Q=v.prep;G=true;n=b[s];if(!T){K=L(t.extend({},t.data(n,o)))}r(g);r(d,K.onLoad);K.h=K.height?y(K.height,"y")-h-P:K.innerHeight&&y(K.innerHeight,"y");K.w=K.width?y(K.width,"x")-a-j:K.innerWidth&&y(K.innerWidth,"x");K.mw=K.w;K.mh=K.h;if(K.maxWidth){K.mw=y(K.maxWidth,"x")-a-j;K.mw=K.w&&K.w<K.mw?K.w:K.mw}if(K.maxHeight){K.mh=y(K.maxHeight,"y")-h-P;K.mh=K.h&&K.h<K.mh?K.h:K.mh}S=K.href;f.show();if(K.inline){z().hide().insertBefore(t(S)[0]).one(g,function(){t(this).replaceWith(w.children())});Q(t(S))}else{if(K.iframe){N.one(A,function(){var V=t("<iframe frameborder='0' style='width:100%; height:100%; border:0; display:block'/>")[0];V.name=+new Date();V.src=K.href;if(!K.scrolling){V.scrolling="no"}if(m){V.allowtransparency="true"}t(V).appendTo(w).one(g,function(){V.src="//about:blank"})});Q(" ")}else{if(K.html){Q(K.html)}else{if(S){i.load(S,function(W,V,X){Q(V==="error"?"Request unsuccessful: "+X.statusText:t(this).children())})}}}}};v.close=function(){if(q&&!x){x=true;q=false;r(l,K.onCleanup);H.unbind("."+C+" ."+I);B.hide();N.stop().hide();r(g);w.remove();N.add(B).css({opacity:1,cursor:"auto"}).hide();x=false;r(J,K.onClosed)}};v.element=function(){return t(n)};v.settings=u}(jQuery,this));webmd.overlay=function(a,b,c){if($("#colorbox").length==0){$.fn.colorbox.init()}$(a).colorbox(b,c)};webmd.overlay=$.extend(webmd.overlay,{open:function(a){this.init();$("#webmdHoverClose").css("visibility",(a.hideCloseButton?"hidden":"visible"));$.fn.colorbox(a,a.callback)},close:function(){$.fn.colorbox.close()},resize:function(a){$.fn.colorbox.resize(a)},init:function(){if($("#colorbox").length==0){$.fn.colorbox.init()}},remove:function(){$.fn.colorbox.remove()},replace:function(a){this.open(a,false)},alert:function(b){var a={};if(typeof(b)=="string"){a.text=b}else{a=$.extend(true,a,b)}a.cancel="";this.confirm(a)},confirm:function(c){var e=this;var b=false;var a={text:"",ok:"OK",okSizeClass:"webmd-btn-xs",cancel:"Cancel",cancelSizeClass:"webmd-btn-xs",width:"",callback:function(){}};a=$.extend(true,a,c);if(typeof(c)=="string"){a.text=c}a.buttons=webmd.substitute('<button id="webmd_confirm_true_button" class="webmd-btn webmd-btn-sc {okSizeClass}">{ok}</button>',a);if(a.cancel){a.buttons+=webmd.substitute('<button id="webmd_confirm_false_button" class="webmd-btn webmd-btn-sc {cancelSizeClass}">{cancel}</button>',a)}var d=webmd.substitute('<div id="webmd_confirm"><div class="webmd_confirm_content">{text}</div><div class="webmd_confirm_buttons">{buttons}</div></div>',a);this.open({html:d,innerWidth:a.width,onComplete:function(){$("#webmd_confirm_true_button").click(function(){b=true;e.close();return false});$("#webmd_confirm_false_button").click(function(){b=false;e.close();return false})},onClosed:function(){a.callback(b)}})}});if(!window.webmd){webmd={}}if(!webmd.content){webmd.content={}}webmd.content["overlay-styles.html"]=decodeURIComponent("%3cstyle%20type%3d%22text%2fcss%22%3e%0a%0a%2f*%20START%20Overlay%20styles%20to%20go%20into%20layout.css%20*%2f%0a%23webmdHoverOverlay%20%7b%0abackground%3a%23fefefe%3b%0aheight%3a100%25%3b%0aposition%3afixed%3b%0awidth%3a100%25%3b%0az-index%3a999%3b%0a%7d%0a%23colorbox%20%7b%0abackground%3a%23fff%3b%0a-moz-box-shadow%3a%200px%200px%2015px%202px%20%20%237f7f7f%3b%0a-webkit-box-shadow%3a%200px%200px%2015px%202px%20%20%237f7f7f%3b%0abox-shadow%3a%200px%200px%2015px%202px%20%20%237f7f7f%3b%0a-moz-border-radius%3a%2010px%3b%0aborder-radius%3a%2010px%3b%0aposition%3aabsolute%3b%0awidth%3a550px%3b%0az-index%3a999%3b%0aoverflow%3avisible%20!important%3b%0apadding%3a%200px%20!important%3b%0a%7d%0a.browserIE%20%23colorbox%20%7b%0aborder%3a1px%20solid%20%237f7f7f%3b%0a%7d%0a%23webmdHoverContent%20%7b%0abackground%3a%23fff%3b%0a-moz-border-radius%3a%2012px%3b%0aborder-radius%3a%2012px%3b%0a%7d%0a.browserIE%20%23webmdHoverContent%20%7b%0aborder%3a1px%20solid%20%23999%3b%0a%7d%0a%0a%2f*%20Outer%20*%2f%0a.browserIE_7%20%23colorbox%2c%0a.browserIE_8%20%23colorbox%20%7b%0a%09border-color%3a%20%23DADADA%3b%0a%09padding-bottom%3a%202px%20!important%3b%0a%09padding-right%3a%202px%20!important%3b%0a%7d%0a%0a%2f*%20Inner%20*%2f%0a.browserIE_7%20%23webmdHoverContent%2c%0a.browserIE_8%20%23webmdHoverContent%20%7b%0a%09border-color%3a%20%23B9B9B9%3b%0a%7d%0a%0a%23webmdHoverClose%20%7b%0abackground%3aurl('http%3a%2f%2fimg.webmd.com%2fdtmcms%2flive%2fwebmd%2fconsumer_assets%2fsite_images%2fmodules%2fwebmd_overlay_close_x.png')%20no-repeat%3b%0acursor%3apointer%3b%0adisplay%3ablock%3b%0aheight%3a34px%3b%0atext-indent%3a-5000px%3b%0aposition%3aabsolute%3b%0awidth%3a34px%3b%0atop%3a-15px%3b%0aright%3a-15px%3b%0az-index%3a999%3b%0a%7d%0a%23webmdHoverTitle%20%7b%0adisplay%3anone%3b%0a%7d%0a%2f*%20START%20styles%20for%20WebMD%20Confirm%20and%20Alert%20defaults%20*%2f%0a%23webmd_confirm%20%7b%0atext-align%3acenter%3b%0apadding%3a28px%3b%0a%7d%0a%23webmd_confirm%20.webmd_confirm_content%20%7b%0atext-align%3aleft%3b%0a%7d%0a%23webmd_confirm%20.webmd_confirm_buttons%20%7b%0amargin-top%3a10px%3b%0a%7d%0a%23webmd_confirm_false_button%20%7b%0amargin-left%3a12px%3b%0a%7d%0a%2f*%20END%20styles%20for%20WebMD%20Confirm%20and%20Alert%20defaults%20*%2f%0a%2f*%20END%20Overlay%20styles%20to%20go%20into%20layout.css%20*%2f%0a%0a%3c%2fstyle%3e%0a");if(webmd.content&&webmd.content["overlay-styles.html"]){$("head").append(webmd.content["overlay-styles.html"])};
