function inherits(n,t){function i(){}i.prototype=t.prototype,n.superClass_=t.prototype,n.prototype=new i,n.prototype.constructor=n}function MarkerLabel_(n,t){this.marker_=n,this.handCursorURL_=n.handCursorURL,this.labelDiv_=document.createElement("div"),this.labelDiv_.style.cssText="position: absolute; overflow: hidden;",this.eventDiv_=document.createElement("div"),this.eventDiv_.style.cssText=this.labelDiv_.style.cssText,this.eventDiv_.setAttribute("onselectstart","return false;"),this.eventDiv_.setAttribute("ondragstart","return false;"),this.crossDiv_=MarkerLabel_.getSharedCross(t)}function MarkerWithLabel(n){n=n||{},n.labelContent=n.labelContent||"",n.labelAnchor=n.labelAnchor||new google.maps.Point(0,0),n.labelClass=n.labelClass||"markerLabels",n.labelStyle=n.labelStyle||{},n.labelInBackground=n.labelInBackground||!1,typeof n.labelVisible=="undefined"&&(n.labelVisible=!0),typeof n.raiseOnDrag=="undefined"&&(n.raiseOnDrag=!0),typeof n.clickable=="undefined"&&(n.clickable=!0),typeof n.draggable=="undefined"&&(n.draggable=!1),typeof n.optimized=="undefined"&&(n.optimized=!1),n.crossImage=n.crossImage||"http"+(document.location.protocol==="https:"?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png",n.handCursor=n.handCursor||"http"+(document.location.protocol==="https:"?"s":"")+"://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur",n.optimized=!1,this.label=new MarkerLabel_(this,n.crossImage,n.handCursor),google.maps.Marker.apply(this,arguments)}var FRTaxonomyBanner=function(){function n(){var n={domainId:FRArticle.DomainId,fieldId:FRArticle.FieldId,specialtyId:FRArticle.SpecialityId};$.getJSON("/Banner/GetTaxonomyBannerDetails",n).done(function(n){t(n)})}function t(n){var i=['<a href="{{ JournalHomeUrl }}">','<img src="{{ JournalBannerUrl }}" alt="" /></a>'].join(""),t=['<a href="{{ SectionHomeUrl }}" class="default-banner-block">','<h1 class="{{ TaxonomyBannerCssClass }}">{{ TaxonomyName }} </h1>',"</a>"].join("");i=i.replace("{{ JournalBannerUrl }}",n.JournalBannerUrl),i=i.replace("{{ JournalHomeUrl }}",n.JournalHomeUrl),t=t.replace("{{ TaxonomyName }}",n.TaxonomyName),t=t.replace("{{ SectionHomeUrl }}",n.SectionHomeUrl),t=t.replace("{{ TaxonomyBannerCssClass }}",n.TaxonomyBannerCssClass),n.IsTaxonomyHeaderTextVisible?$(".banner-wrapper").html(i+t):$(".banner-wrapper").html(i)}(function(){n()})()}(),FRJournalArticle=function(){function p(){$(document).on("click",".ui-accordion",function(n){$(n.target).toggleClass("closed").next(".ui-accordion-content").slideToggle()});n.on("click",".link-pdf-download",function(){var n=$(this);FRWebTrends.Track("pdf_download","pdf_file","article","51","51")});$(document).on("click",function(t){if($(t.target).parents().andSelf().is(".popover, .popover-trigger")){var i=n.find(".popover");i.length>1&&i.each(function(){$(this).parent().has(t.target).length||$(this).prev(".popover-trigger").popover("hide")})}else $(n.find("a.popover-trigger")).popover("hide")});b()}function y(){var t=n.find("div.widget-listing a.format-by-specialchar");t.length&&t.each(function(){var n=$(this).data("title"),t;n!=undefined&&(t=formatTextContent(n),$(this).text(t))})}function v(){$.getJSON(FRConfiguration.FrontiersJournalUIUrl+"/Impact/GetArticleImpactTotalViews?articleId="+FRArticle.ArticleId,function(t){n.find(".total-views span.count").text(t)})}function a(){var n=i.find(".topic-link-trim").data("topic"),t;n&&n.length>55&&(i.find(".topic-link-trim").attr("title",n),t=jQuery.trim(i.find(".topic-link-trim").attr("title")).substring(0,55).split(" ").slice(0,-1).join(" ")+" ...",i.find(".topic-link-trim").html(t),i.find(".topic-link-trim").tooltip({placement:"bottom"}))}function l(){var t=$(n).find(".total-views");t.tooltip({placement:"bottom",delay:{show:400}})}function c(){n.find("a.popover-trigger").each(function(){var n=$(this),i="",t=n.parent().find("input:hidden");n.hasClass("popover-enhanced")?(i+='<div class="download-pdf link-pdf-download" ><a  href="'+t.eq(0).data("url")+'" target="_blank" ><span><i class="fr-icon-medium dropdown-pdf"></i></span>'+t.eq(0).data("name")+'</a></div><div class="divider"></div>',i+='<div class="view-enhanced-pdf"><a href="'+t.eq(1).data("url")+'" target="_blank" data-webtrendtracking=\'{"WT_action":"enhanced_pdf_download","WT_destination":"pdf_file","WT_source":"article","WT_dl":"51","WT_ndl":"51"}\'><span><i class="fr-icon-medium enhanced-pdf"></i></span>'+t.eq(1).data("name")+"</a></div></div>"):t.each(function(){i+='<li><a href="'+$(this).data("url")+'"target="_blank" data-webtrendtracking ='+$(this).data("webtrendtracking")+">"+$(this).data("name")+"</a></li>"}),n.popover({content:'<div class="'+n.data("type")+'-popover-content"><ul class="nav-listing">'+i+"</ul></div>",template:'<div class="popover '+n.data("type")+'-popover-wrapper"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"></div></div></div>',placement:"bottom",html:!0})}),n.find("div.downloads-content > ul > li").length==2&&n.find("div.downloads-content").addClass("block-two")}function h(){$.getJSON("/Article/GetRelatedArticleByArticleId?articleId="+FRArticle.ArticleId).done(function(n){s(n)})}function s(t){var i=n.find(".widget-listing.original-article"),r=n.find(".widget-listing.commentary-article"),f,e;t!=null&&(t.IsCommentaryVisible&&(f="<h3>"+t.CommentaryArticleTitle+"</h3>"+u(t.CommentaryArticle),r.append(f),r.show()),t.IsOriginalArticleVisible&&(e="<h3>"+t.OriginalArticleTitle+"</h3>"+u(t.OriginalArticle),i.append(e),i.show()))}function u(n){var t="",i=n;return $.each(i,function(n){t=t+'<div class="widget-content-repeater"><p><a href="'+FRConfiguration.FrontiersJournalUIUrl+i[n].ArticleUrl+'"class="format-by-specialchar">'+i[n].ArticleTitle+"</a></p>",t=t+'<p class="posted-by-text">'+r(i[n].AuthorDetails)+"</p></div>"}),t}function r(n){var t="",i,r;return n!=null&&n.length&&(i=n.length,r=0,$.each(n,function(u){r++,t=n[u].WhosWhoUrl==""?t+n[u].FullName:t+'<a href="'+n[u].WhosWhoUrl+'">'+n[u].FullName+"</a>",i>1&&(r==i-1?t=t+" and ":r!=i&&(t=t+", "))})),t}function o(){$.getJSON("/journalproxy/Article/GetRecommendedArticleDetails?articleId="+FRArticle.ArticleId).done(function(n){e(n)})}function e(t){var i=n.find(".widget-listing.people-also-looked-at"),r;t!=null&&(r="<h3>"+t.Title+"</h3>"+f(t.RecommendedArticleDetails),i.append(r),i.show())}function f(n){var t="";return $.each(n,function(i){t=t+'<div class="widget-content-repeater"><p><a data-webtrendtracking=\'{"WT_action":"go_to_article","WT_destination":"article_page","WT_source":"article","WT_dl":"1","WT_ndl":"1"}\' href="'+FRConfiguration.FrontiersJournalUIUrl+n[i].ArticleUrl+'"class="format-by-specialchar">'+n[i].ArticleTitle+"</a></p>",t=t+'<p class="posted-by-text">'+r(n[i].AuthorDetails)+"</p></div>"}),t}function b(){var t=n.find("div.altmetric-icon");t.on("click",".altmetric-embed>a",function(){FRWebTrends.Track("altmetric_click","altmetric_page","article","1","1")});w.on("click","div.authors > a",function(n){var t=n.target||n.srcElement;t&&t.tagName&&t.tagName.toUpperCase()=="IMG"?FRWebTrends.Track("author_click","author_photo","author name","1","1"):FRWebTrends.Track("author_click","author_page","author name","1","1")})}function k(){var n,i;t.find(".JournalFullText").find('a[id^="h"]').addClass("position-top-50"),t.find(".JournalFullText").find('a[id^="B"],a[id^="K"]').addClass("position-top-75"),n=window.location.hash,n.indexOf("#F")==0&&(i=t.find(".JournalFullText").find(n),$("html, body").animate({scrollTop:i.offset().top-120},100),window.location.hash=n.toLowerCase())}var t=$(".article-container"),n=t.find(".right-container"),w=t.find(".abstract-container"),i=$(".research-topic-block");$(function(){v(),l(),y(),c(),a(),h(),o(),p(),k()})}(),FRJournal=function(){function n(){$.getScript("http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML")}function t(){$.getScript("https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js")}$(function(){n(),t()})}(),FRMetric=function(){function n(){$.post("/Metric/InsertArticleRecommendations?articleId="+FRArticle.ArticleId)}$(function(){n()})}(),FRAddThis=function(){function b(){addthis.addEventListener("addthis.menu.share",y)}function y(n){return n.type=="addthis.menu.share"&&a(n.data.service),!0}function w(){var n=t.find(".addthis_button_facebook");i.on("click",function(){if(n.length)n.click();else return});u.on("click",function(){var n=t.find(".addthis_button_google");if(n.length)n.click();else return});r.on("click",function(){var n=t.find(".addthis_button_twitter");if(n.length)n.click();else return});f.on("click",function(){var n=t.find(".addthis_button_linkedin");if(n.length)n.click();else return});e.on("click",function(){var n=t.find(".addthis_button_more");if(n.length)n.click();else return})}function p(){FRSocial.pageType==1?k():FRSocial.pageType==2&&v()}function k(){$.getJSON("/Article/GetSocialCountByArticleId?articleId="+FRArticle.ArticleId).done(function(n){s(n)})}function v(){$.getJSON("/ResearchTopic/"+FRResearchTopic.Id+"/SocialCounts").done(function(n){s(n)})}function s(n){typeof n!="undefined"&&(typeof n.Facebook=="undefined"?(i.html(0),i.data("count",0)):(i.html(n.Facebook),i.data("count",n.Facebook)),typeof n.Twitter=="undefined"?(r.html(0),r.data("count",0)):(r.html(n.Twitter),r.data("count",n.Twitter)),typeof n.GooglePlus=="undefined"?(u.html(0),u.data("count",0)):(u.html(n.GooglePlus),u.data("count",n.GooglePlus)),typeof n.LinkedIn=="undefined"?(f.html(0),f.data("count",0)):(f.html(n.LinkedIn),f.data("count",n.LinkedIn)),typeof n.Total=="undefined"||n.Total==0?(e.html("New"),e.data("count",0)):(e.html(n.Total),e.data("count",n.Total)))}function a(t){var i;t!="more"&&(t=="facebook"?(i=n.find(".facebook_count"),o(i)):t=="twitter"?(i=n.find(".twitter_count"),o(i)):t=="google"||t=="google_plusone_share"?(t="google",i=n.find(".googleplus_count"),o(i)):t=="linkedin"?(i=n.find(".linkedin_count"),o(i)):d(),FRSocial.pageType==1?l(t):FRSocial.pageType==2&&c(t))}function l(n){$.post("/Article/TrackCurrentSocialCounts?id="+FRArticle.ArticleId+"&provider="+n).done(function(){})}function c(n){$.post("/ResearchTopic/TrackCurrentSocialCounts?id="+FRResearchTopic.Id+"&provider="+n).done(function(){})}function o(t){var u=$(t).data("count"),i=parseInt(u)+parseInt(1),f=n.find(".total_count").data("count"),r=parseInt(f)+parseInt(1);$(t).html(i),n.find(".total_count").html(r),$(t).data("count",i),n.find(".total_count").data("count",r)}function d(){var i=n.find(".total_count").data("count"),t=parseInt(i)+parseInt(1);n.find(".total_count").html(t),n.find(".total_count").data("count",t)}var h=$(".article-container"),g=h.find(".right-container"),n=$(".share-media"),t=n.find(".social_block"),i=t.find(".facebook_count"),r=t.find(".twitter_count"),u=t.find(".googleplus_count"),f=t.find(".linkedin_count"),e=t.find(".total_count");$(function(){b(),p(),w()})}(),FRArticleImpact;inherits(MarkerLabel_,google.maps.OverlayView),MarkerLabel_.getSharedCross=function(n){var t;return typeof MarkerLabel_.getSharedCross.crossDiv=="undefined"&&(t=document.createElement("img"),t.style.cssText="position: absolute; z-index: 1000002; display: none;",t.style.marginLeft="-8px",t.style.marginTop="-9px",t.src=n,MarkerLabel_.getSharedCross.crossDiv=t),MarkerLabel_.getSharedCross.crossDiv},MarkerLabel_.prototype.onAdd=function(){var n=this,r=!1,t=!1,o,s,h,f,i,c,l,u=20,a="url("+this.handCursorURL_+")",e=function(n){n.preventDefault&&n.preventDefault(),n.cancelBubble=!0,n.stopPropagation&&n.stopPropagation()},v=function(){n.marker_.setAnimation(null)};this.getPanes().overlayImage.appendChild(this.labelDiv_),this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_),typeof MarkerLabel_.getSharedCross.processed=="undefined"&&(this.getPanes().overlayImage.appendChild(this.crossDiv_),MarkerLabel_.getSharedCross.processed=!0),this.listeners_=[google.maps.event.addDomListener(this.eventDiv_,"mouseover",function(t){(n.marker_.getDraggable()||n.marker_.getClickable())&&(this.style.cursor="pointer",google.maps.event.trigger(n.marker_,"mouseover",t))}),google.maps.event.addDomListener(this.eventDiv_,"mouseout",function(i){(n.marker_.getDraggable()||n.marker_.getClickable())&&!t&&(this.style.cursor=n.marker_.getCursor(),google.maps.event.trigger(n.marker_,"mouseout",i))}),google.maps.event.addDomListener(this.eventDiv_,"mousedown",function(i){t=!1,n.marker_.getDraggable()&&(r=!0,this.style.cursor=a),(n.marker_.getDraggable()||n.marker_.getClickable())&&(google.maps.event.trigger(n.marker_,"mousedown",i),e(i))}),google.maps.event.addDomListener(document,"mouseup",function(e){var s;if(r&&(r=!1,n.eventDiv_.style.cursor="pointer",google.maps.event.trigger(n.marker_,"mouseup",e)),t){if(i){s=n.getProjection().fromLatLngToDivPixel(n.marker_.getPosition()),s.y+=u,n.marker_.setPosition(n.getProjection().fromDivPixelToLatLng(s));try{n.marker_.setAnimation(google.maps.Animation.BOUNCE),setTimeout(v,1406)}catch(h){}}n.crossDiv_.style.display="none",n.marker_.setZIndex(o),f=!0,t=!1,e.latLng=n.marker_.getPosition(),google.maps.event.trigger(n.marker_,"dragend",e)}}),google.maps.event.addListener(n.marker_.getMap(),"mousemove",function(f){var e;r&&(t?(f.latLng=new google.maps.LatLng(f.latLng.lat()-s,f.latLng.lng()-h),e=n.getProjection().fromLatLngToDivPixel(f.latLng),i&&(n.crossDiv_.style.left=e.x+"px",n.crossDiv_.style.top=e.y+"px",n.crossDiv_.style.display="",e.y-=u),n.marker_.setPosition(n.getProjection().fromDivPixelToLatLng(e)),i&&(n.eventDiv_.style.top=e.y+u+"px"),google.maps.event.trigger(n.marker_,"drag",f)):(s=f.latLng.lat()-n.marker_.getPosition().lat(),h=f.latLng.lng()-n.marker_.getPosition().lng(),o=n.marker_.getZIndex(),c=n.marker_.getPosition(),l=n.marker_.getMap().getCenter(),i=n.marker_.get("raiseOnDrag"),t=!0,n.marker_.setZIndex(1e6),f.latLng=n.marker_.getPosition(),google.maps.event.trigger(n.marker_,"dragstart",f)))}),google.maps.event.addDomListener(document,"keydown",function(r){t&&r.keyCode===27&&(i=!1,n.marker_.setPosition(c),n.marker_.getMap().setCenter(l),google.maps.event.trigger(document,"mouseup",r))}),google.maps.event.addDomListener(this.eventDiv_,"click",function(t){(n.marker_.getDraggable()||n.marker_.getClickable())&&(f?f=!1:(google.maps.event.trigger(n.marker_,"click",t),e(t)))}),google.maps.event.addDomListener(this.eventDiv_,"dblclick",function(t){(n.marker_.getDraggable()||n.marker_.getClickable())&&(google.maps.event.trigger(n.marker_,"dblclick",t),e(t))}),google.maps.event.addListener(this.marker_,"dragstart",function(){t||(i=this.get("raiseOnDrag"))}),google.maps.event.addListener(this.marker_,"drag",function(){t||i&&(n.setPosition(u),n.labelDiv_.style.zIndex=1e6+(this.get("labelInBackground")?-1:1))}),google.maps.event.addListener(this.marker_,"dragend",function(){t||i&&n.setPosition(0)}),google.maps.event.addListener(this.marker_,"position_changed",function(){n.setPosition()}),google.maps.event.addListener(this.marker_,"zindex_changed",function(){n.setZIndex()}),google.maps.event.addListener(this.marker_,"visible_changed",function(){n.setVisible()}),google.maps.event.addListener(this.marker_,"labelvisible_changed",function(){n.setVisible()}),google.maps.event.addListener(this.marker_,"title_changed",function(){n.setTitle()}),google.maps.event.addListener(this.marker_,"labelcontent_changed",function(){n.setContent()}),google.maps.event.addListener(this.marker_,"labelanchor_changed",function(){n.setAnchor()}),google.maps.event.addListener(this.marker_,"labelclass_changed",function(){n.setStyles()}),google.maps.event.addListener(this.marker_,"labelstyle_changed",function(){n.setStyles()})]},MarkerLabel_.prototype.onRemove=function(){var n;for(this.labelDiv_.parentNode.removeChild(this.labelDiv_),this.eventDiv_.parentNode.removeChild(this.eventDiv_),n=0;n<this.listeners_.length;n++)google.maps.event.removeListener(this.listeners_[n])},MarkerLabel_.prototype.draw=function(){this.setContent(),this.setTitle(),this.setStyles()},MarkerLabel_.prototype.setContent=function(){var n=this.marker_.get("labelContent");typeof n.nodeType=="undefined"?(this.labelDiv_.innerHTML=n,this.eventDiv_.innerHTML=this.labelDiv_.innerHTML):(this.labelDiv_.innerHTML="",this.labelDiv_.appendChild(n),n=n.cloneNode(!0),this.eventDiv_.innerHTML="",this.eventDiv_.appendChild(n))},MarkerLabel_.prototype.setTitle=function(){this.eventDiv_.title=this.marker_.getTitle()||""},MarkerLabel_.prototype.setStyles=function(){var n,t;this.labelDiv_.className=this.marker_.get("labelClass"),this.eventDiv_.className=this.labelDiv_.className,this.labelDiv_.style.cssText="",this.eventDiv_.style.cssText="",t=this.marker_.get("labelStyle");for(n in t)t.hasOwnProperty(n)&&(this.labelDiv_.style[n]=t[n],this.eventDiv_.style[n]=t[n]);this.setMandatoryStyles()},MarkerLabel_.prototype.setMandatoryStyles=function(){this.labelDiv_.style.position="absolute",this.labelDiv_.style.overflow="hidden",typeof this.labelDiv_.style.opacity!="undefined"&&this.labelDiv_.style.opacity!==""&&(this.labelDiv_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(opacity='+this.labelDiv_.style.opacity*100+')"',this.labelDiv_.style.filter="alpha(opacity="+this.labelDiv_.style.opacity*100+")"),this.eventDiv_.style.position=this.labelDiv_.style.position,this.eventDiv_.style.overflow=this.labelDiv_.style.overflow,this.eventDiv_.style.opacity=.01,this.eventDiv_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(opacity=1)"',this.eventDiv_.style.filter="alpha(opacity=1)",this.setAnchor(),this.setPosition(),this.setVisible()},MarkerLabel_.prototype.setAnchor=function(){var n=this.marker_.get("labelAnchor");this.labelDiv_.style.marginLeft=-n.x+"px",this.labelDiv_.style.marginTop=-n.y+"px",this.eventDiv_.style.marginLeft=-n.x+"px",this.eventDiv_.style.marginTop=-n.y+"px"},MarkerLabel_.prototype.setPosition=function(n){var t=this.getProjection().fromLatLngToDivPixel(this.marker_.getPosition());typeof n=="undefined"&&(n=0),this.labelDiv_.style.left=Math.round(t.x)+"px",this.labelDiv_.style.top=Math.round(t.y-n)+"px",this.eventDiv_.style.left=this.labelDiv_.style.left,this.eventDiv_.style.top=this.labelDiv_.style.top,this.setZIndex()},MarkerLabel_.prototype.setZIndex=function(){var n=this.marker_.get("labelInBackground")?-1:1;typeof this.marker_.getZIndex()=="undefined"?(this.labelDiv_.style.zIndex=parseInt(this.labelDiv_.style.top,10)+n,this.eventDiv_.style.zIndex=this.labelDiv_.style.zIndex):(this.labelDiv_.style.zIndex=this.marker_.getZIndex()+n,this.eventDiv_.style.zIndex=this.labelDiv_.style.zIndex)},MarkerLabel_.prototype.setVisible=function(){this.labelDiv_.style.display=this.marker_.get("labelVisible")?this.marker_.getVisible()?"block":"none":"none",this.eventDiv_.style.display=this.labelDiv_.style.display},inherits(MarkerWithLabel,google.maps.Marker),MarkerWithLabel.prototype.setMap=function(n){google.maps.Marker.prototype.setMap.apply(this,arguments),this.label.setMap(n)},FRArticleImpact=function(){function ni(){t.find(".btn-close").on("click",function(){u(),window.location.hash=""});t.find(".article-title").on("click",function(){window.location.hash="",u()});$(document).on("shown",".article-impact-tabs .nav-tabs > li > a",function(n){if(!$(".article-impact-tabs .nav-tabs > li > a").checkDuplicateEvent())switch($(n.target).data("tabType")){case"views":p();break;case"demographics":$("#map-container").find("img.map-loading").show(),ti()}});t.find("#views-timeline-button").click(function(){r="timeline",kt()}),t.find("#views-bar-button").click(function(){r="bar",ei()});t.on("click",".dropdown-menu li",function(n){lt(n)});$(window).on("hashchange",function(){s()});$(document).on("click",'a[href^="#impact"]',function(){window.location.hash.length&&$(window).trigger("hashchange")})}function bt(){$(".modal-backdrop").show(),o.addClass("body-locked"),t.addClass("dp-block")}function u(){$(".modal-backdrop").hide(),$(".article-impact-tabs .nav-tabs > li > a").checkDuplicateEvent("clear"),oi(),o.removeClass("body-locked"),t.removeClass("dp-block")}function wt(){$.getJSON("/ImpactNew/GetImpactViews?articleId="+FRArticle.ArticleId).done(function(i){if(i!=null&&i.IsVisible==!0)n.views=i,yt(),$(".article-impact-tabs .nav-tabs > li > a:first").hasClass("active")||$(".article-impact-tabs .nav-tabs > li > a:first").tab("show"),p(),gt(),t.find(".loader").hide();else{t.find(".loader").hide(),$(".article-impact-tabs .nav-tabs > li > a:first").hasClass("active")||$(".article-impact-tabs .nav-tabs > li > a:first").tab("show");var r="<p class='lead'>No records found</p>";t.find("#views-tab").html(r)}})}function pt(){$.getJSON("/ImpactNew/GetImpactDemographics?articleId="+FRArticle.ArticleId).done(function(i){if(i!=null&&i.IsVisible)n.demographics=i;else{var r="<p class='lead'>No records found</p>";t.find("#demographics-tab").html(r)}})}function yt(){n.views.TotalViewsAndDownloads!=null?k.find(".nav-tabs .total-views").text(n.views.TotalViewsAndDownloads):k.find(".nav-tabs .total-views").text(0)}function f(){$(".thisyear, .thismonth").hide(),n.views.TotalViewsYearlySummary!=null&&($(".sincebeginning").show(),$(".sincebeginning").find(".begin-views-downloads").text(n.views.TotalViewsYearlySummary.TotalViewsAndDownloadsCount),$(".sincebeginning").find(".begin-views").text(n.views.TotalViewsYearlySummary.TotalViewsCount),$(".sincebeginning").find(".begin-downloads").text(n.views.TotalViewsYearlySummary.PDFDownloadCount))}function b(){$(".sincebeginning, .thismonth").hide(),n.views.TotalViewsMonthlySummary!=null&&($(".thisyear").show(),$(".thisyear").find(".year-views-downloads").text(n.views.TotalViewsMonthlySummary.TotalViewsAndDownloadsCount),$(".thisyear").find(".year-views").text(n.views.TotalViewsMonthlySummary.TotalViewsCount),$(".thisyear").find(".year-downloads").text(n.views.TotalViewsMonthlySummary.PDFDownloadCount))}function w(){$(".sincebeginning, .thisyear").hide(),n.views.TotalViewsWeeklySummary!=null&&($(".thismonth").show(),$(".thismonth").find(".month-views-downloads").text(n.views.TotalViewsWeeklySummary.TotalViewsAndDownloadsCount),$(".thismonth").find(".month-views").text(n.views.TotalViewsWeeklySummary.TotalViewsCount),$(".thismonth").find(".month-downloads").text(n.views.TotalViewsWeeklySummary.PDFDownloadCount))}function lt(n){var t=$(n.currentTarget);r=="timeline"&&(t.text()=="Since beginning"&&e(),t.text()=="This year"&&y(),t.text()=="This month"&&v()),r=="bar"&&(t.text()=="Since beginning"&&a(),t.text()=="This year"&&l(),t.text()=="This month"&&c()),t.closest(".btn-group").find('[data-bind="label"]').text(t.text()).end().children(".dropdown-toggle").dropdown("toggle")}function e(){n.views.TotalViewsYearlySummary==null?($(".chart-container").hide(),$(".views-empty-message").show(),$("h5.sincebeginning").show(),$("h5.thisyear").hide(),$("h5.thismonth").hide()):($(".chart-container").show(),$(".views-empty-message").hide(),it(),f())}function y(){n.views.TotalViewsMonthlySummary==null?($(".chart-container").hide(),$(".views-empty-message").show(),$("h5.sincebeginning").hide(),$("h5.thisyear").show(),$("h5.thismonth").hide()):($(".chart-container").show(),$(".views-empty-message").hide(),nt(),b())}function v(){n.views.TotalViewsWeeklySummary==null?($(".chart-container").hide(),$(".views-empty-message").show(),$("h5.sincebeginning").hide(),$("h5.thisyear").hide(),$("h5.thismonth").show()):($(".chart-container").show(),$(".views-empty-message").hide(),ut(),w())}function a(){n.views.TotalViewsYearlySummary==null?($(".chart-container").hide(),$(".views-empty-message").show(),$("h5.sincebeginning").show(),$("h5.thisyear").hide(),$("h5.thismonth").hide()):($(".chart-container").show(),$(".views-empty-message").hide(),rt(),f())}function l(){n.views.TotalViewsMonthlySummary==null?($(".chart-container").hide(),$(".views-empty-message").show(),$("h5.sincebeginning").hide(),$("h5.thisyear").show(),$("h5.thismonth").hide()):($(".chart-container").show(),$(".views-empty-message").hide(),tt(),b())}function c(){n.views.TotalViewsWeeklySummary==null?($(".chart-container").hide(),$(".views-empty-message").show(),$("h5.sincebeginning").hide(),$("h5.thisyear").hide(),$("h5.thismonth").show()):($(".chart-container").show(),$(".views-empty-message").hide(),ft(),w())}function kt(){$("#views-bar-chart").hide(),$("#views-timeline-chart").show(),$("#views-bar-button").removeClass("active"),$("#views-timeline-button").addClass("active");var n=$("#Period").text();n=="Since beginning"&&e(),n=="This year"&&y(),n=="This month"&&v()}function gt(){$("#views-bar-chart").hide(),$("#views-timeline-chart").show(),$("#views-bar-button").removeClass("active"),$("#views-timeline-button").addClass("active")}function ei(){$("#views-timeline-chart").hide(),$("#views-bar-chart").show(),$("#views-timeline-button").removeClass("active"),$("#views-bar-button").addClass("active");var n=$("#Period").text();n=="Since beginning"&&a(),n=="This year"&&l(),n=="This month"&&c()}function p(){if(n.views.IsVisible==!0)$("#views-bar-chart").hide(),$("#views-timeline-chart").show(),f(),e(),h(),$(".percentile-panel-social").hide(),$(".percentile-panel-citations").hide(),$(".percentile-panel").show(700);else{var i="<p class='lead'>No records found</p>";t.find("#views-tab").html(i)}}function ti(){ii(),ri(),dt(),ui(),fi(),vt(),at(),ct(),d(),g()}function ii(){et()}function ri(){var t,i,r;n.demographics.TopViewingCountries!=null&&n.demographics.TopViewingCountries.IsVisible?(t=[],i=[],$.each(n.demographics.TopViewingCountries.DemographicsDetails,function(n,r){t.push(r.XValue),i.push({y:r.YValue})}),$("#demographics-top-countries").highcharts({chart:{type:"bar",width:370,height:300,marginLeft:0,style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},xAxis:{categories:t,tickWidth:0,title:{text:null},labels:{align:"left",x:0,y:-18,style:{whiteSpace:"nowrap",color:"black"}}},yAxis:{min:0,title:{enabled:!1},labels:{overflow:"justify"},gridLineColor:"#e0e0e0"},plotOptions:{bar:{dataLabels:{enabled:!0,style:{color:"#000000",fontWeight:"700",fontSize:"16px",lineHeight:"30px"},y:1},pointWidth:25}},legend:{enabled:!1},credits:{enabled:!1},series:[{name:"Views",color:"#7d7900",data:i}]})):(r="<p class='empty-message'>No records found</p>",$("#demographics-top-countries").html(r))}function ui(){var t,f,r,u,e;n.demographics.DomainDemographics!=null&&n.demographics.DomainDemographics.IsVisible?(t="",n.demographics.DomainDemographics.IsOtherVisible&&(t=["<table>","<tr>",'<th style="padding-bottom: 5px;">{{otherName}}</th>','<th style="text-align: right; padding-bottom: 10px;"><b>{{otherCount}}</b></th>',"</tr>","{{fieldContents}}","</table>"].join(""),f=["<tr>","<td>{{fieldName}}</td>",'<td style="text-align: right;"><b>{{viewCount}}</b></td>',"</tr>"].join(""),r="",$.each(n.demographics.DomainDemographics.OtherDetails,function(n,t){r+=f.replace("{{fieldName}}",t.XValue).replace("{{viewCount}}",t.YValue)}),t=t.replace("{{otherName}}",n.demographics.DomainDemographics.Other.XValue).replace("{{otherCount}}",n.demographics.DomainDemographics.Other.YValue),t=t.replace("{{fieldContents}}",r)),u=[],$.each(n.demographics.DomainDemographics.DemographicsDetails,function(t,i){u.push({name:i.XValue,y:i.YValue,color:n.demographics.DomainDemographics.ColorCodes[t]})}),$("#demographics-domain").highcharts({credits:{enabled:!1},chart:{type:"pie",width:250,height:310,style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},legend:{layout:"vertical",itemMarginTop:2,itemMarginBottom:2,useHTML:!0,labelFormatter:function(){return'<span style="font-weight: 600;" title="'+this.name+'">'+i(this.name)+'</span> <b style="font-weight: 800; font-size: 14;">'+this.y+"</b>"}},tooltip:{useHTML:!0,borderWidth:0,shadow:!1,backgroundColor:"transparent",formatter:function(){return this.point.name=="Other"&&n.demographics.DomainDemographics.IsOtherVisible?'<div class="t-container" style="border: 1px solid'+this.point.color+';position:absolute;">'+t+"</div>":'<div class="t-container" style="border: 1px solid'+this.point.color+'"><div class="t-simple">'+this.point.name+"<strong> "+this.point.y+"</strong></div></div>"},style:{zIndex:1e3}},plotOptions:{pie:{center:[96,60],size:160,point:{events:{legendItemClick:function(){return this.mouseOver(),chart.tooltip.refresh(this),!1}}},allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},showInLegend:!0}},series:[{data:u}]})):(e="<p class='empty-message'>No records found</p>",$("#demographics-domain").html(e))}function fi(){var t,f,r,u,e;n.demographics.FieldDemographics!=null&&n.demographics.FieldDemographics.IsVisible?(t="",n.demographics.FieldDemographics.IsOtherVisible&&(t=["<table>","<tr>",'<th style="padding-bottom: 5px;">{{otherName}}</th>','<th style="text-align: right; padding-bottom: 10px;"><b>{{otherCount}}</b></th>',"</tr>","{{fieldContents}}","</table>"].join(""),f=["<tr>","<td>{{fieldName}}</td>",'<td style="text-align: right;"><b>{{viewCount}}</b></td>',"</tr>"].join(""),r="",$.each(n.demographics.FieldDemographics.OtherDetails,function(n,t){r+=f.replace("{{fieldName}}",t.XValue).replace("{{viewCount}}",t.YValue)}),t=t.replace("{{otherName}}",n.demographics.FieldDemographics.Other.XValue).replace("{{otherCount}}",n.demographics.FieldDemographics.Other.YValue),t=t.replace("{{fieldContents}}",r)),u=[],$.each(n.demographics.FieldDemographics.DemographicsDetails,function(t,i){u.push({name:i.XValue,y:i.YValue,color:n.demographics.FieldDemographics.ColorCodes[t]})}),$("#demographics-field").highcharts({credits:{enabled:!1},chart:{type:"pie",width:250,height:310,style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},legend:{layout:"vertical",itemMarginTop:2,itemMarginBottom:2,useHTML:!0,labelFormatter:function(){return'<span style="font-weight: 600;" title="'+this.name+'">'+i(this.name)+'</span> <b style="font-weight: 800; font-size: 14;">'+this.y+"</b>"}},tooltip:{useHTML:!0,borderWidth:0,shadow:!1,backgroundColor:"transparent",formatter:function(){return this.point.name=="Other"&&n.demographics.FieldDemographics.IsOtherVisible?'<div class="t-container" style="border: 1px solid'+this.point.color+';position:absolute;">'+t+"</div>":'<div class="t-container" style="border: 1px solid'+this.point.color+'"><div class="t-simple">'+this.point.name+"<strong> "+this.point.y+"</strong></div></div>"},style:{zIndex:1e3}},plotOptions:{pie:{center:[96,60],size:160,point:{events:{legendItemClick:function(){return this.mouseOver(),chart.tooltip.refresh(this),!1}}},allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},showInLegend:!0}},series:[{data:u}]})):(e="<p class='empty-message'>No records found</p>",$("#demographics-field").html(e))}function vt(){var t,f,r,u,e;n.demographics.SpecialtyDemographics!=null&&n.demographics.SpecialtyDemographics.IsVisible?(t="",n.demographics.SpecialtyDemographics.IsOtherVisible&&(t=["<table>","<tr>",'<th style="padding-bottom: 5px;">{{otherName}}</th>','<th style="text-align: right; padding-bottom: 10px;"><b>{{otherCount}}</b></th>',"</tr>","{{fieldContents}}","</table>"].join(""),f=["<tr>","<td>{{fieldName}}</td>",'<td style="text-align: right;"><b>{{viewCount}}</b></td>',"</tr>"].join(""),r="",$.each(n.demographics.SpecialtyDemographics.OtherDetails,function(n,t){r+=f.replace("{{fieldName}}",t.XValue).replace("{{viewCount}}",t.YValue)}),t=t.replace("{{otherName}}",n.demographics.SpecialtyDemographics.Other.XValue).replace("{{otherCount}}",n.demographics.SpecialtyDemographics.Other.YValue),t=t.replace("{{fieldContents}}",r)),u=[],$.each(n.demographics.SpecialtyDemographics.DemographicsDetails,function(t,i){u.push({name:i.XValue,y:i.YValue,color:n.demographics.SpecialtyDemographics.ColorCodes[t]})}),$("#demographics-specialty").highcharts({credits:{enabled:!1},chart:{type:"pie",width:250,height:310,style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},legend:{layout:"vertical",itemMarginTop:2,itemMarginBottom:2,useHTML:!0,labelFormatter:function(){return'<span style="font-weight: 600;" title="'+this.name+'">'+i(this.name)+'</span> <b style="font-weight: 800; font-size: 14;">'+this.y+"</b>"}},tooltip:{useHTML:!0,borderWidth:0,shadow:!1,backgroundColor:"transparent",formatter:function(){return this.point.name=="Other"&&n.demographics.SpecialtyDemographics.IsOtherVisible?'<div class="t-container" style="border: 1px solid'+this.point.color+';position:absolute;">'+t+"</div>":'<div class="t-container" style="border: 1px solid'+this.point.color+'"><div class="t-simple">'+this.point.name+"<strong> "+this.point.y+"</strong></div></div>"},style:{zIndex:1e3}},plotOptions:{pie:{center:[96,60],size:160,point:{events:{legendItemClick:function(){return this.mouseOver(),chart.tooltip.refresh(this),!1}}},allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},showInLegend:!0}},series:[{data:u}]})):(e="<p class='empty-message'>No records found</p>",$("#demographics-specialty").html(e))}function dt(){var t,i,r;n.demographics.TopReferringSites!=null&&n.demographics.TopReferringSites.IsVisible?(t=[],i=[],$.each(n.demographics.TopReferringSites.DemographicsDetails,function(n,r){t.push(r.XValue),i.push({y:r.YValue})}),$("#demographics-top-sites").highcharts({chart:{type:"bar",width:370,height:300,marginLeft:0,style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},xAxis:{categories:t,tickWidth:0,title:{text:null},labels:{align:"left",x:0,y:-18,style:{whiteSpace:"nowrap",color:"black"}}},yAxis:{min:0,title:{enabled:!1},labels:{overflow:"justify"},gridLineColor:"#e0e0e0"},tooltip:{},plotOptions:{bar:{dataLabels:{enabled:!0,style:{color:"#000000",fontWeight:"700",fontSize:"16px",lineHeight:"30px"},y:1},pointWidth:25}},legend:{enabled:!1},credits:{enabled:!1},series:[{name:"Views",color:"#f29400",data:i}]})):(r="<p class='empty-message'>No records found</p>",$("#demographics-top-sites").html(r))}function at(){var t,u,e;if(n.demographics.IndustryDemographics!=null&&n.demographics.IndustryDemographics.IsVisible){if(t="",n.demographics.IndustryDemographics.IsOtherVisible){var r=["<table>","<tr>",'<th style="padding-bottom: 5px;">{{otherName}}</th>','<th style="text-align: right; padding-bottom: 10px;"><b>{{otherCount}}</b></th>',"</tr>","{{fieldContents}}","</table>"].join(""),o=["<tr>","<td>{{fieldName}}</td>",'<td style="text-align: right;"><b>{{viewCount}}</b></td>',"</tr>"].join(""),f="";$.each(n.demographics.IndustryDemographics.OtherDetails,function(n,t){f+=o.replace("{{fieldName}}",t.XValue).replace("{{viewCount}}",t.YValue)}),r=r.replace("{{otherName}}",n.demographics.IndustryDemographics.Other.XValue).replace("{{otherCount}}",n.demographics.IndustryDemographics.Other.YValue),t=r.replace("{{fieldContents}}",f)}u=[],$.each(n.demographics.IndustryDemographics.DemographicsDetails,function(t,i){u.push({name:i.XValue,y:i.YValue,color:n.demographics.IndustryDemographics.ColorCodes[t]})}),$("#demographics-industry").highcharts({credits:{enabled:!1},chart:{type:"pie",width:250,height:308,style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},legend:{layout:"vertical",itemMarginTop:1,itemMarginBottom:1,useHTML:!0,labelFormatter:function(){return'<span style="font-weight: 600;" title="'+this.name+'">'+i(this.name)+'</span> <b style="font-weight: 800; font-size: 14;">'+this.y+"</b>"}},tooltip:{useHTML:!0,borderWidth:0,shadow:!1,backgroundColor:"transparent",formatter:function(){return this.point.name=="Other"&&n.demographics.IndustryDemographics.IsOtherVisible?'<div class="t-container" style="border: 1px solid'+this.point.color+';position:absolute;">'+t+"</div>":'<div class="t-container" style="border: 1px solid'+this.point.color+'"><div class="t-simple">'+this.point.name+"<strong> "+this.point.y+"</strong></div></div>"},style:{zIndex:1e3}},plotOptions:{pie:{center:[96,60],size:160,point:{events:{legendItemClick:function(){return this.mouseOver(),chart.tooltip.refresh(this),!1}}},allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},showInLegend:!0}},series:[{data:u}]})}else e="<p class='empty-message'>No records found</p>",$("#demographics-industry").html(e)}function ct(){var t,u,e;if(n.demographics.EducationDemographics!=null&&n.demographics.EducationDemographics.IsVisible){if(t="",n.demographics.EducationDemographics.IsOtherVisible){var r=["<table>","<tr>",'<th style="padding-bottom: 5px;">{{otherName}}</th>','<th style="text-align: right; padding-bottom: 10px;"><b>{{otherCount}}</b></th>',"</tr>","{{fieldContents}}","</table>"].join(""),o=["<tr>","<td>{{fieldName}}</td>",'<td style="text-align: right;"><b>{{viewCount}}</b></td>',"</tr>"].join(""),f="";$.each(n.demographics.EducationDemographics.OtherDetails,function(n,t){f+=o.replace("{{fieldName}}",t.XValue).replace("{{viewCount}}",t.YValue)}),r=r.replace("{{otherName}}",n.demographics.EducationDemographics.Other.XValue).replace("{{otherCount}}",n.demographics.EducationDemographics.Other.YValue),t=r.replace("{{fieldContents}}",f)}u=[],$.each(n.demographics.EducationDemographics.DemographicsDetails,function(t,i){u.push({name:i.XValue,y:i.YValue,color:n.demographics.EducationDemographics.ColorCodes[t]})}),$("#demographics-education").highcharts({credits:{enabled:!1},chart:{type:"pie",width:250,height:308,style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},legend:{layout:"vertical",itemMarginTop:1,itemMarginBottom:1,useHTML:!0,labelFormatter:function(){return'<span style="font-weight: 600;" title="'+this.name+'">'+i(this.name)+'</span> <b style="font-weight: 800; font-size: 14;">'+this.y+"</b>"}},tooltip:{useHTML:!0,borderWidth:0,shadow:!1,backgroundColor:"transparent",formatter:function(){return this.point.name=="Other"&&n.demographics.EducationDemographics.IsOtherVisible?'<div class="t-container" style="border: 1px solid'+this.point.color+';position:absolute;">'+t+"</div>":'<div class="t-container" style="border: 1px solid'+this.point.color+'"><div class="t-simple">'+this.point.name+"<strong> "+this.point.y+"</strong></div></div>"},style:{zIndex:1e3}},plotOptions:{pie:{center:[96,60],size:160,point:{events:{legendItemClick:function(){return this.mouseOver(),chart.tooltip.refresh(this),!1}}},allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},showInLegend:!0}},series:[{data:u}]})}else e="<p class='empty-message'>No records found</p>",$("#demographics-education").html(e)}function d(){var t,u,e;if(n.demographics.PositionDemographics!=null&&n.demographics.PositionDemographics.IsVisible){if(t="",n.demographics.PositionDemographics.IsOtherVisible){var r=["<table>","<tr>",'<th style="padding-bottom: 5px;">{{otherName}}</th>','<th style="text-align: right; padding-bottom: 10px;"><b>{{otherCount}}</b></th>',"</tr>","{{fieldContents}}","</table>"].join(""),o=["<tr>","<td>{{fieldName}}</td>",'<td style="text-align: right;"><b>{{viewCount}}</b></td>',"</tr>"].join(""),f="";$.each(n.demographics.PositionDemographics.OtherDetails,function(n,t){f+=o.replace("{{fieldName}}",t.XValue).replace("{{viewCount}}",t.YValue)}),r=r.replace("{{otherName}}",n.demographics.PositionDemographics.Other.XValue).replace("{{otherCount}}",n.demographics.PositionDemographics.Other.YValue),t=r.replace("{{fieldContents}}",f)}u=[],$.each(n.demographics.PositionDemographics.DemographicsDetails,function(t,i){u.push({name:i.XValue,y:i.YValue,color:n.demographics.PositionDemographics.ColorCodes[t]})}),$("#demographics-position").highcharts({credits:{enabled:!1},chart:{type:"pie",width:250,height:308,style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},legend:{layout:"vertical",itemMarginTop:1,itemMarginBottom:1,useHTML:!0,labelFormatter:function(){return'<span style="font-weight: 600;" title="'+this.name+'">'+i(this.name)+'</span> <b style="font-weight: 800; font-size: 14;">'+this.y+"</b>"}},tooltip:{useHTML:!0,borderWidth:0,shadow:!1,backgroundColor:"transparent",formatter:function(){return this.point.name=="Other"&&n.demographics.PositionDemographics.IsOtherVisible?'<div class="t-container" style="border: 1px solid'+this.point.color+';position:absolute;">'+t+"</div>":'<div class="t-container" style="border: 1px solid'+this.point.color+'"><div class="t-simple">'+this.point.name+"<strong> "+this.point.y+"</strong></div></div>"},style:{zIndex:1e3}},plotOptions:{pie:{center:[96,60],size:160,point:{events:{legendItemClick:function(){return this.mouseOver(),chart.tooltip.refresh(this),!1}}},allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!1},showInLegend:!0}},series:[{data:u}]})}else e="<p class='empty-message'>No records found</p>",$("#demographics-position").html(e)}function g(){var i,f,e;if(n.demographics.GenderDemographics!=null&&n.demographics.GenderDemographics.IsVisible){var t=[],r=[],u=[];$.each(n.demographics.GenderDemographics.DemographicsDetails,function(n,i){t.push(i.AgeRange),u.push(0-i.MValue),r.push(i.FValue)}),i=n.demographics.GenderDemographics.MaxRange,f=0-i,$(document).ready(function(){$("#demographics-age").highcharts({chart:{type:"bar",style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},xAxis:[{categories:t,reversed:!1,labels:{step:1},lineColor:"#e0e0e0",tickColor:"#e0e0e0"},{opposite:!0,reversed:!1,categories:t,linkedTo:0,labels:{step:1},lineColor:"#e0e0e0",tickColor:"#e0e0e0"}],yAxis:{title:{text:null},gridLineColor:"#e0e0e0",labels:{formatter:function(){return Math.abs(this.value)}},min:f,max:i},plotOptions:{series:{stacking:"normal"}},tooltip:{formatter:function(){return'<b style="font-weight: 600; color:'+this.series.color+'">'+this.series.name+", age "+this.point.category+"</b><br/>Views: <b>"+Highcharts.numberFormat(Math.abs(this.point.y),0)+"</b>"}},series:[{name:"Male",data:u,color:"#7d7900",dataLabels:{enabled:!0,style:{color:"#7d7900",fontWeight:"700",fontSize:16},inside:!1,x:-2,formatter:function(){if(this.point.y!=0)return Highcharts.numberFormat(Math.abs(this.point.y),0)}}},{name:"Female",data:r,color:"#f29400",dataLabels:{enabled:!0,style:{color:"#f29400",fontWeight:"700",fontSize:16},inside:!1,x:2,formatter:function(){if(this.point.y!=0)return Highcharts.numberFormat(Math.abs(this.point.y),0)}}}]})})}else e="<p class='empty-message'>No records found</p>",$("#demographics-age").html(e)}function nt(){$("#views-timeline-chart").highcharts({credits:{enabled:!1},chart:{type:"spline",style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},legend:{x:40},xAxis:{gridLineColor:"#e0e0e0",gridLineWidth:1,lineColor:"#e0e0e0",tickColor:"#e0e0e0",categories:n.views.TotalViewsMonthlySummary.Categories},yAxis:{gridLineColor:"#e0e0e0",gridLineWidth:1,lineColor:"#e0e0e0",title:{text:"Views"},min:0},plotOptions:{series:{allowPointSelect:!0}},series:[{name:"Views and Downloads",lineWidth:6,color:"#f29400",marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:n.views.TotalViewsMonthlySummary.ViewsAndDownloadsData},{name:"Views",visible:!1,lineWidth:6,color:"#7d7900",marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:n.views.TotalViewsMonthlySummary.ViewsData},{name:"Downloads",visible:!1,lineWidth:6,color:"#eccc00",marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:n.views.TotalViewsMonthlySummary.DownloadsData}]}),$('text:contains("Highcharts.com")').hide()}function tt(){n.views.TotalViewsMonthlySummary!=null&&$("#views-bar-chart").highcharts({credits:{enabled:!1},chart:{type:"column",style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},legend:{x:140},xAxis:{categories:n.views.TotalViewsMonthlySummary.Categories},yAxis:{min:0,title:{text:"Views"}},tooltip:{headerFormat:'<span style="font-size:10px">{point.key}</span><table>',pointFormat:'<tr><td style="color:{series.color};padding:0">{series.name}:&nbsp;</td><td style="padding:0"><b>{point.y}</b></td></tr>',footerFormat:"</table>",shared:!0,useHTML:!0},plotOptions:{series:{stacking:"normal"}},series:[{name:"Views",color:"#dccd00",data:n.views.TotalViewsMonthlySummary.ViewsData},{name:"Downloads",color:"#7d7900",data:n.views.TotalViewsMonthlySummary.DownloadsData}]})}function it(){$("#views-timeline-chart").highcharts({credits:{enabled:!1},chart:{type:"spline",style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},legend:{x:40},xAxis:{gridLineColor:"#e0e0e0",gridLineWidth:1,lineColor:"#e0e0e0",tickColor:"#e0e0e0",categories:n.views.TotalViewsYearlySummary.Categories},yAxis:{gridLineColor:"#e0e0e0",gridLineWidth:1,lineColor:"#e0e0e0",title:{text:"Views"},min:0},plotOptions:{series:{allowPointSelect:!0}},series:[{name:"Views and Downloads",lineWidth:6,color:"#f29400",marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:n.views.TotalViewsYearlySummary.ViewsAndDownloadsData},{name:"Views",visible:!1,lineWidth:6,color:"#7d7900",marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:n.views.TotalViewsYearlySummary.ViewsData},{name:"Downloads",visible:!1,lineWidth:6,color:"#eccc00",marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:n.views.TotalViewsYearlySummary.DownloadsData}]}),$('text:contains("Highcharts.com")').hide()}function rt(){n.views.TotalViewsYearlySummary!=null&&$("#views-bar-chart").highcharts({credits:{enabled:!1},chart:{type:"column",style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},legend:{x:140},xAxis:{categories:n.views.TotalViewsYearlySummary.Categories},yAxis:{min:0,title:{text:"Views"}},tooltip:{headerFormat:'<span style="font-size:10px">{point.key}</span><table>',pointFormat:'<tr><td style="color:{series.color};padding:0">{series.name}:&nbsp;</td><td style="padding:0"><b>{point.y}</b></td></tr>',footerFormat:"</table>",shared:!0,useHTML:!0},plotOptions:{series:{stacking:"normal"}},series:[{name:"Views",color:"#dccd00",data:n.views.TotalViewsYearlySummary.ViewsData},{name:"Downloads",color:"#7d7900",data:n.views.TotalViewsYearlySummary.DownloadsData}]})}function ut(){$("#views-timeline-chart").highcharts({credits:{enabled:!1},chart:{type:"spline",style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},legend:{x:40},xAxis:{gridLineColor:"#e0e0e0",gridLineWidth:1,lineColor:"#e0e0e0",tickColor:"#e0e0e0",categories:n.views.TotalViewsWeeklySummary.Categories},yAxis:{gridLineColor:"#e0e0e0",gridLineWidth:1,lineColor:"#e0e0e0",title:{text:"Views"},min:0},plotOptions:{series:{allowPointSelect:!0}},series:[{name:"Views and Downloads",lineWidth:6,color:"#f29400",marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:n.views.TotalViewsWeeklySummary.ViewsAndDownloadsData},{name:"Views",visible:!1,lineWidth:6,color:"#7d7900",marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:n.views.TotalViewsWeeklySummary.ViewsData},{name:"Downloads",visible:!1,lineWidth:6,color:"#eccc00",marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:n.views.TotalViewsWeeklySummary.DownloadsData}]}),$('text:contains("Highcharts.com")').hide()}function ft(){n.views.TotalViewsWeeklySummary!=null&&$("#views-bar-chart").highcharts({credits:{enabled:!1},chart:{type:"column",style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14}},title:{text:null},legend:{x:140},xAxis:{categories:n.views.TotalViewsWeeklySummary.Categories},yAxis:{min:0,title:{text:"Views"}},tooltip:{headerFormat:'<span style="font-size:10px">{point.key}</span><table>',pointFormat:'<tr><td style="color:{series.color};padding:0">{series.name}:&nbsp;</td><td style="padding:0"><b>{point.y}</b></td></tr>',footerFormat:"</table>",shared:!0,useHTML:!0},plotOptions:{series:{stacking:"normal"}},series:[{name:"Views",color:"#dccd00",data:n.views.TotalViewsWeeklySummary.ViewsData},{name:"Downloads",color:"#7d7900",data:n.views.TotalViewsWeeklySummary.DownloadsData}]})}function et(){var u=new google.maps.LatLng(20,5),t=new google.maps.Map(document.getElementById("map"),{zoom:2,center:u,mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:!1}),f=[{featureType:"water",stylers:[{color:"#f5f8fc"}]},{featureType:"landscape.natural",stylers:[{color:"#deddbf"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#cac998"}]},{}],i,r;t.setOptions({styles:f}),i=[],n.demographics.OriginLocations!=null&&n.demographics.OriginLocations.IsVisible&&$.each(n.demographics.OriginLocations.DemographicsDetails,function(n,r){var f=new google.maps.LatLng(r.Latitude,r.Longitude),u=new MarkerWithLabel({position:f,draggable:!1,icon:"/Areas/Journal/Images/Impact/marker2.png",labelContent:r.VisitCount,labelAnchor:new google.maps.Point(16,33),labelClass:"labels",labelInBackground:!1,title:this.City+" ("+this.VisitCount+" visits)"});google.maps.event.addListener(u,"click",function(){t.panTo(u.getPosition())}),i.push(u)}),mcOptions={styles:[{height:53,url:"/Areas/Journal/Images/Impact/m1.png",width:53},{height:56,url:"/Areas/Journal/Images/Impact/m2.png",width:56},{height:66,url:"/Areas/Journal/Images/Impact/m3.png",width:66},{height:78,url:"/Areas/Journal/Images/Impact/m4.png",width:78},{height:90,url:"/Areas/Journal/Images/Impact/m5.png",width:90}]},r=new MarkerClusterer(t,i,mcOptions),r.setCalculator(function(n){for(var i=0,t,r,u=0;u<n.length;u++)i+=n[u].labelContent;return t=i,r=1,i>500&&i<=1e3?(t=i,r=2):i>1e3&&i<1e6?(t=Math.floor(i/1e3),t>=1&&t<5?r=3:t>=5&&t<10?r=4:t>=10&&(r=5),t=t+"K+"):i>=1e6&&i<1e9?(t=Math.floor(i/1e6)+"M+",r=5):i>=1e9&&(t="1T+",r=5),{text:t,index:r}}),google.maps.event.addListenerOnce(t,"idle",function(){$("#map-container").find("img.map-loading").hide()})}function ot(){$("#views-chart-controls > div.btn-group.pull-left").tooltip(),$("li.pull-right.disable").tooltip()}function h(){var n=$(".beginning");n.closest(".btn-group").find('[data-bind="label"]').text(n.text()).end()}function st(){var n;if($(".article-container").find(".JournalAbstract.subData").length>0){var i=$(".article-title-container").find(".article-title").contents(),t=$(".article-title-container").contents().not(".article-title"),n=i.add(t);$(".impact-modal").find(".article-title").html(n.clone())}else n=$(".article-container").find(".JournalAbstract h1").contents(),$(".impact-modal").find(".article-title").html(n.clone())}function s(){var n=window.location.hash.replace("#","").toLowerCase();n.length&&n=="impact"?(bt(),wt(),pt(),ht()):u()}function ht(){var n={ArticleId:FRArticle.ArticleId,LoggedInUserId:FRArticle.LoginUserId,DomainId:FRArticle.DomainId,FieldId:FRArticle.FieldId,SpecialtyId:FRArticle.SpecialityId};$.ajax({url:"/ImpactNew/LogImpactViews",type:"POST",data:n,success:function(){},error:function(){throw new FRError({className:"FRArticleImpact",methodName:"logImpactViews",message:"Failed to log impact"});}})}function i(n){return n.length>30?jQuery.trim(n).substring(0,27)+"...":n}function oi(){$(".views-bar-charts").empty(),$(".views-timeline-charts").empty(),$("#map").empty()}var o=$("body"),t=$(".modal-container"),si=$(".right-container"),k=$(".impact-modal"),n={views:{},demographics:{}},r="timeline";$(function(){ni(),s(),ot(),h(),st()})}()