var FRJournalResearchTopic=function(){var n=$(".page-container"),o=n.find("#research-topics-header"),u=n.find(".tab-content"),r=o.find(".primary-tabs"),f=u.find("#research-topic-overview"),h=u.find("#research-topic-articles"),t=u.find("#research-topic-authors"),c=n.find(".article-share-count"),s=function(){function e(){$.getJSON("/api/research-topics/"+window.FRResearchTopic.Id+"/getResearchTopicHeaderImage").done(function(n){n&&n.length>0?document.getElementById("research-topic-image").setAttribute("src",n):$("#research-topic-image").remove()})}function o(){n.on("click","button[data-href]",function(){if($(this).hasClass("purchase")&&window.FRSocial.loginUserId==0)u();else{$(this).hasClass("btn-manage-topic");var n=$(this).data("href");if(!n||!n.length)return;window.location.href=n}});r.find("a[data-toggle=tab]").on("click",function(){window.location.hash=this.hash.replace("research-topic-","")});$(window).on("hashchange",function(){i()});$(window).on("load",function(){i()});n.find(".rt-more-link").click(function(){var n=f.find(".about-preview");$(this).hasClass("show-less")?n.collapse("show"):n.collapse("hide")});f.find(".about-preview").on("hide.bs.collapse",function(){var t=n.find(".rt-more-link");t.text("Show less").addClass("show-less")});f.find(".about-preview").on("show.bs.collapse",function(){var t=n.find(".rt-more-link");t.text("Show more").removeClass("show-less")});$(document).on("ui.load.images",function(){n.find("img[data-src]").each(function(){var n=$(this);n.attr("src",n.attr("data-src"))});n.find("img[data-src]").imagesLoaded().progress(function(n,t){var i=$(t.img).removeAttr("data-src"),r;t.isLoaded?(i.hasClass("resize")?l(i):i.hasClass("img-clip")&&a(i),i.show()):(r=i.data("default"),r&&r.length?i.attr("src",r).removeAttr("data-default").imagesLoaded().done(function(n){$(n.elements).first().show()}):(i.closest(".teaser").addClass("no-pic"),i.parent("a").remove(),i.remove()))})})}function s(){n.find(".rt-submission .bottom-links li a.authorguidelines").click(function(){switch(t()){}});n.find(".rt-submission .bottom-links li a.articletypes").click(function(){switch(t()){}});n.find(".journal-list .bottom-links ul a.submit-abstract").click(function(){switch(t()){}});n.find(".journal-list .bottom-links ul a.submit-manuscript").click(function(){switch(t()){}});n.find(".journal-list .teaser a.journal").click(function(){switch(t()){}});n.find(".journal-list .teaser a.field-journal").click(function(){switch(t()){}});n.find(".journal-list .teaser a.section").click(function(){switch(t()){}});n.on("click",".article-list .articles-wrapper h2.teaser-heading a",function(){switch(t()){}});n.on("click",".article-list .articles-wrapper .teaser-authors a",function(){switch(t()){}});n.on("click",".profiles.editor-list h2.teaser-heading a",function(){switch(t()){}});n.on("click",".comment-container h4.teaser-heading a",function(){});n.find("#research-topics-header .teaser-buttons li .btn-abstract").click(function(){});n.find("#research-topics-header .teaser-buttons li .btn-manuscript").click(function(){});h.on("click",".article-list .articles-wrapper .teaser-links li .altmetric-embed",function(){});n.on("click",".container-editors .teaser-follow .btn-follow-orange",function(){switch(t()){}});n.on("click",".container-authors .teaser-follow .btn-follow-orange",function(){});n.on("click",".container-editors .teaser-follow .btn-follow-orange-message",function(){})}function i(){var n=window.location.hash.replace("#","").toLowerCase();n.length&&r.find('a[href="#research-topic-'+n+'"]').tab("show")}function c(){n.find(".container-bordered").each(function(){var n=$(this);n.find(".teaser").eq(0).addClass("first");n.find(".teaser-links").last().addClass("last")})}function l(n){var t=parseInt(n.css("height")),i=parseInt(n.css("width"));i>110&&t>110&&i>=t&&n.css("height",110);i>110&&t>110&&t>=i&&n.css("width",110)}function a(n){parseInt(n.css("height"))>250&&n.wrap('<div class="img-clip-container"><\/div>')}function u(){if(!$(".popup-login").length){var n=window.FRConfiguration.SharepointWebsiteUrl+"/Login.aspx?returnurl="+document.location.href;$.FRModal({modalClass:"popup-login",contentHeader:$("<h3>Login Required<\/h3>"),contentBody:$("<p>This action requires you to be registered with Frontiers and logged in. To register or login click <a href="+n+">here.<\/a> <\/p>")})}}function t(){return n.find(".primary-tabs li.active a").attr("class")}function v(n){var e,o,s,r,h;if(!n||!n.HasPagination)return"";var f=5,t=1,u,i=$("<ul>");for(n.PageIndex>3&&(t=n.PageIndex-2),e=n.TotalPageCount-n.PageIndex,e<f&&e<=2&&(t=n.TotalPageCount-f+1),t<=0&&(t=1),u=t+f-1,n.TotalPageCount<=u&&(u=n.TotalPageCount),o="no-set",s="no-set",t>1&&(o=""),u<n.TotalPageCount&&(s=""),i.append('<li class="'+n.PreviousPageCssClass+'"><a data-index="-">Prev<\/a><\/li>'),i.append('<li class="disabled '+o+'"><a>...<\/a><\/li>'),r=t;r<=u;r++)h=r==n.PageIndex?"active":"",i.append('<li class="'+h+'"><a data-index="'+r+'">'+r+"<\/a><\/li>");return i.append('<li class="disabled '+s+'" ><a>...<\/a><\/li>'),i.append('<li class="'+n.NextPageCssClass+'"><a data-index="+">Next<\/a><\/li>'),i}function y(n){$("html, body").animate({scrollTop:n.offset().top-75},500)}return $(function(){o();e();i();$(document).trigger("ui.load.images");c();s()}),{getPagerHtml:v,showLoginPopUp:u,getCurrentTab:t,scrollToElement:y}}(),l=function(){function t(){$.getJSON("/research-topics/"+window.FRResearchTopic.Id+"/summary").done(function(t){n=t;u(t)})}function i(){var n=$(o).find(".views-count").find("strong");n.tooltip({placement:"bottom",delay:{show:400}})}function u(n){n.IsArticlesCountVisible&&r.find(".articles .badge").text(n.ArticlesCount);n.IsAuthorsCountVisible&&r.find(".authors .badge").text(n.AuthorsCount);n.IsImpactViewsCountVisible&&(o.find(".views-count").show().find("strong").text(n.ImpactViewsCount),i())}$(function(){t()});var n={};return{summary:function(){return n}}}(),a=function(){function i(){$.getJSON(e.UrlTopicEditors).done(function(n){r(n)}).fail(function(){throw new FRError({className:"FRJournalResearchTopicEditors",methodName:"populateEditors",message:"Failed to get the Editors"});}).always(function(){t.find(".loading-wrapper").remove()})}function r(n){var i,r;if(!n||!n.Editors||!n.Editors.length){t.remove();return}(i=FRTemplate.bind("template-topic-editors",{editors:n.Editors}),i.length)&&(r=t.find(".container-editors"),r.each(function(){var n=$(this);n.html(i);n.find(".teaser-links").last().addClass("last")}),$(document).trigger("ui.load.images"),FRNetworkUserFollow.fill())}var t=n.find(".editor-list");$(function(){i()})}(),v=function(){function i(){$.getJSON(e.UrlTopicCoordinators).done(function(n){r(n)}).fail(function(){throw new FRError({className:"FRJournalResearchTopicCoordinators",methodName:"populateCoordinators",message:"Failed to get the Coordinators"});}).always(function(){t.find(".loading-wrapper").remove()})}function r(n){var i,r;if(!n||!n.Coordinators||!n.Coordinators.length){t.remove();return}(i=FRTemplate.bind("template-topic-coordinators",{coordinators:n.Coordinators}),i.length)&&(r=t.find(".container-coordinators"),r.each(function(){var n=$(this);n.html(i);n.find(".teaser-links").last().addClass("last")}),$(document).trigger("ui.load.images"),FRNetworkUserFollow.fill())}var t=n.find(".coordinator-list");$(function(){i()})}(),y=function(){function i(){$.getJSON(e.UrlTopicJournals).done(function(n){r(n)}).fail(function(){throw new FRError({className:"FRJournalResearchTopicParticipatingJournals",methodName:"populateJournals",message:"Failed to get the Journals"});}).always(function(){t.find(".loading-wrapper").remove()})}function r(n){var i,r;if(!n||!n.ShowJournalsWidget){t.remove();return}(i=FRTemplate.bind("template-topic-participating-journals",{journals:n}),i.length)&&(r=t.find(".container-journals-list"),r.html(i))}var t=n.find(".journal-list");$(function(){i()})}(),p=function(){function o(){r.find('a[data-toggle="tab"].articles').on("show",function(){i(1,e,"Default",!1,!1)});t.on("click",".articles-all",function(){r.find(".articles").tab("show");window.scrollTo(0,0)});n.on("click",".pagination li a",function(){l($(this))});n.on("click",".nav-sort li a",function(){a($(this))})}function i(n,t,i,r,u){var f={index:n,sortBy:i,pageSize:t,isRecent:r};$.getJSON("/research-topics/"+window.FRResearchTopic.Id+"/articles",f).done(function(n){c(n,u)}).fail(function(){throw new FRError({className:"FRJournalResearchTopic",methodName:"populateArticlesByIndex",message:"Failed to get the articles"});})}function c(i,r){var f,e;if(!i||!i.Articles||!i.Articles.length){n.find(".container-message").text(i.HeaderInfoText);n.find(".loading-wrapper").remove();return}(f=FRTemplate.bind("template-topic-articles",{articleList:i}),f.length)&&(i.IsRecent?(t.find(".loading-wrapper").remove(),t.find(".articles-wrapper").html(f),t.find(".bottom-links").show(),t.find(".articles-wrapper .teaser").first().addClass("first")):(n.find(".loading-wrapper").remove(),n.find(".articles-wrapper").html(f),n.find(".nav-sort [data-sort]").parent().removeClass("active"),n.find('.nav-sort [data-sort="'+i.Pager.SortBy+'"]').parent().addClass("active").show(),n.find(".nav-sort").show(),n.find(".articles-wrapper .teaser").first().addClass("first"),e=s.getPagerHtml(i.Pager),n.find(".pagination").html(e).show()),$(document).trigger("ui.load.images"),v(),r&&s.scrollToElement(u.find("#research-topic-articles")))}function l(t){var r,u,f;t.parent("li").hasClass("active")||t.parent("li").hasClass("disabled")||(r=t.data("index"),u=n.find(".nav-sort li.active a").data("sort"),u==undefined&&(u="Default"),f=n.find(".pagination li.active a").data("index"),!isNaN(r),r=="+"&&(r=f+1),r=="-"&&(r=f-1),r&&u.length)&&i(r,e,u,!1,!0)}function a(n){var t=n.data("sort");t.length&&(t=="views"&&i(1,e,t,!1,!1),t=="type"&&i(1,e,t,!1,!1),t=="date"&&i(1,e,t,!1,!1))}function v(){typeof _altmetric_embed_init!="undefined"&&window._altmetric_embed_init()}function y(){t.length&&i(1,3,"Default",!0,!1)}var e=12,n=h.find(".article-list"),t=f.find(".article-list");o();$(function(){y()})}(),w=function(){function e(){r.find('a[data-toggle="tab"].authors').on("show",function(){i=0;u=!1;f(0,!1)});t.on("click",".toggle",function(n){var i,r;n.preventDefault();i=$("#"+$(this).attr("href"));t.find(".article-list-small").not(i).slideUp();i.slideToggle();r=$(this).closest(".teaser-container");t.find(".teaser-container").not(r).removeClass("author-selected");r.toggleClass("author-selected")});$(window).scroll(function(){n==!1&&u==!1&&s.getCurrentTab()=="authors"&&$(window).scrollTop()>=$(document).height()-$(window).height()-200&&f(i,!0)})}function f(i,r){n=!0;t.find(".loading-wrapper").show();$.getJSON("/research-topics/"+window.FRResearchTopic.Id+"/authors",{index:i,isScroll:r}).done(function(n){o(n)}).fail(function(){throw new FRError({className:"FRJournalResearchTopicAuthors",methodName:"populateAuthors",message:"Failed to get the authors"});}).always(function(){n=!1;t.find(".loading-wrapper").hide()})}function o(n){if(n){if(n.AuthorRows&&n.AuthorRows.length)n.IsScroll||t.find(".container-authors").empty(),i+=parseInt(n.AuthorsCount);else{n.IsScroll?u=!0:t.find(".container-message").show().find("p").text(n.InfoText);return}var r=FRTemplate.bind("template-topic-authors",{jsnAuthors:n});r.length&&(t.find(".container-authors").append(r),$(document).trigger("ui.load.images"),FRNetworkUserFollow.fill(),h())}}function h(){t.find(".container-authors .author-container").each(function(n,t){var i=0,r=$(t).find(".teaser-container .container-bordered .teaser");r.each(function(n,t){var r=$(t).height();r>i&&(i=r)});r.height(i)})}var n=!1,i=0,u=!1;e()}(),b=function(){function u(){n.on("click",".btn-close",function(){o()});i.on("click",".btn-manuscript-crosslisted",function(){r("manuscript")});i.on("click",".btn-abstract-crosslisted",function(){r("abstract")})}function r(n){$.getJSON("/research-topics/"+window.FRResearchTopic.Id+"/journals/"+n).done(function(n){f(n)}).fail(function(){throw new FRError({className:"FRJournalResearchTopicJournals",methodName:"populateResearchTopicJournals",message:"Failed to get the journals"});})}function f(i){var u,f,r;if(i&&(u=e(i),!(u<=0)))if(u>1)f=FRTemplate.bind("template-topic-journals",{journals:i}),$(".journal-container").html(f),n.fadeIn("500",function(){t.addClass("body-locked");$(".modal-backdrop").show();n.addClass("dp-block")});else{if(r="",i.SpecialtyJournals&&i.SpecialtyJournals.length?r=i.SpecialtyJournals[0].SubmissionUrl:i.FieldJournals&&i.FieldJournals.length&&(r=i.FieldJournals[0].Sections[0].SubmissionUrl),!r.length)return;window.location.href=r}}function e(n){var t=0;return n.FieldJournals&&n.FieldJournals.length&&$(n.FieldJournals).each(function(n,i){i&&i.Sections&&i.Sections.length&&(t=t+i.Sections.length)}),n.SpecialtyJournals&&n.SpecialtyJournals.length&&(t=t+n.SpecialtyJournals.length),t}function o(){$(".modal-backdrop").hide();t.removeClass("body-locked");n.removeClass("dp-block")}var t=$("body"),n=$(".modal-container"),i=$("#research-topics-header");$(function(){u()})}(),k=function(){function r(){$.getJSON(e.UrlTopicSponsorships).done(function(n){u(n)}).fail(function(){throw new FRError({className:"FRJournalResearchTopicSponsorshipDetails",methodName:"populateSponsorshipDetails",message:"Failed to get the Sponsorship details"});}).always(function(){})}function u(n){var u,r,f,o,e;if(!n||!n.length){t.remove();return}if(n&&window.FRConfiguration.IsOneTrustCookieEnabled.toLowerCase()==="true")for(i=0;i<n.length;i++)u=$(n[i].SponsorshipDetail),r=$(u).find("iframe"),r&&r.length>0&&(f=$(r).attr("src"),o=new URL(f),o.host=="www.youtube.com"?($(r).attr("data-src",$(r).attr("src")),$(r).removeAttr("src"),$(r).addClass("optanon-category-C0004")):$(r).attr("src",f+"&dnt=1"),n[i].SponsorshipDetail=$(u).html());(e=FRTemplate.bind("template-topic-sponsorship_details",{sponsorships:n}),e.length)&&t.html(e)}var t=n.find(".sponsorship-list");$(function(){r()})}(),e=function(){var n="/api/research-topics/";return{UrlTopicEditors:n+window.FRResearchTopic.Id+"/topiceditors",UrlTopicCoordinators:n+window.FRResearchTopic.Id+"/topiccoordinators",UrlTopicJournals:n+window.FRResearchTopic.Id+"/journals",UrlTopicSponsorships:n+window.FRResearchTopic.Id+"/sponsorshipdetails"}}()}(),ResearchTopicImpact=function(){function c(){t.on("click","#views-timeline-button",function(){r="timeline";k()});t.on("click","#views-bar-button",function(){r="bar";d()});$("#research-topics-section").on("click",".tab-impact .topic-impact-tabs.nav-tabs > li > a",function(n){switch($(n.target).data("tabType")){case"demographics":w()}});t.on("click",".dropdown-menu li",function(n){b(n)});$(window).on("hashchange",function(){s()});$(window).on("load",function(){s()})}function l(){$.getJSON("/research-topics/impact/getimpactviews?topicId="+FRResearchTopic.Id).done(function(i){if(i!=null&&i.IsVisible==!0)n.views=i,v(),t.find(".impact-topic-tabs").show(),t.find(".loading-wrapper").hide(),y(),g(),$.each(i.TimePeriodOptions,function(n,t){$("#PeriodDropTGK").append('<li id="'+t+'" class="'+t+'"><a>'+t+"<\/a><\/li>")});else{t.find(".loading-wrapper").hide();t.find(".impact-topic-tabs").show();t.find("#views-tab").html("<p class='no-records'>No records found<\/p>")}})}function a(){$.getJSON("/research-topics/impact/getimpactdemographics?topicId="+FRResearchTopic.Id).done(function(i){if(i!=null&&i.IsVisible)n.demographics=i;else t.find("#demographics-tab").html("<p class='no-records'>No records found<\/p>")})}function u(n,t){if(t!=null){var i=$.grep(t,function(t){return t.TimePeriod===n});i!=null&&(i=i[0],$(".impact-title").text(n),$(".timeperiod").find(".total-views").text(i.TotalViewsCount),$(".timeperiod").find(".article-views").text(i.ArticleViewsCount),$(".timeperiod").find(".downloads").text(i.ArticleDownloadsCount),$(".timeperiod").find(".topic-views").text(i.TopicViewsCount))}}function v(){n.views!=null&&n.views.TotalViews?t.find(".nav-tabs .total-views").text(n.views.TotalViews):t.find(".nav-tabs .total-views").addClass("hide")}function y(){if(n.views.IsVisible==!0)$("#views-bar-chart").hide(),$("#views-timeline-chart").show(),n.views.IsPMCDataAvailable&&t.find(".impact-tab-footer-pmc").show(),p(),it();else t.find("#views-tab").html("<p class='no-records'>No records found<\/p>")}function p(){u(n.views.DefaultViewScaleOption,n.views.ImpactSummary)}function w(){ut();ft();ht();et();ot();st();ct();lt();at();vt()}function b(t){var i=$(t.currentTarget),u=i.attr("id");r=="timeline"&&f(u,n.views.ImpactSummary);r=="bar"&&o(u,n.views.ImpactSummary);i.closest(".btn-group").find('[data-bind="label"]').text(i.text()).end().children(".dropdown-toggle").dropdown("toggle")}function f(t,i){i==null?($(".chart-container").hide(),$(".views-empty-message").show()):($(".chart-container").show(),$(".views-empty-message").hide(),tt(t,n.views.ImpactSummary),u(t,n.views.ImpactSummary))}function k(){var t=$("#Period").text();$("#views-bar-chart").hide();$("#views-timeline-chart").show();$("#views-bar-button").removeClass("active");$("#views-timeline-button").addClass("active");f(t,n.views.ImpactSummary)}function o(t,i){i==null?($(".chart-container").hide(),$(".views-empty-message").show()):($(".chart-container").show(),$(".views-empty-message").hide(),nt(t,n.views.ImpactSummary),u(t,n.views.ImpactSummary))}function d(){var t=$("#Period").text();$("#views-timeline-chart").hide();$("#views-bar-chart").show();$("#views-timeline-button").removeClass("active");$("#views-bar-button").addClass("active");o(t,n.views.ImpactSummary)}function g(){$("#views-bar-chart").hide();$("#views-timeline-chart").show();$("#views-bar-button").removeClass("active");$("#views-timeline-button").addClass("active")}function nt(n,t){if(t!=null){var i=$.grep(t,function(t){return t.TimePeriod===n});i=i[0];$("#views-bar-chart").highcharts({credits:{enabled:!1},chart:{type:"column",style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14},marginBottom:80,marginLeft:47},title:{text:null},xAxis:{gridLineColor:"#e0e0e0",gridLineWidth:1,lineColor:"#e0e0e0",tickColor:"#e0e0e0",categories:i.Categories},yAxis:{gridLineColor:"#e0e0e0",gridLineWidth:1,lineColor:"#e0e0e0",min:0,title:{text:"Views",margin:2},labels:{x:-5}},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:"Article Views",color:"#dccd00",data:i.ArticleViewsData},{name:"Downloads",color:"#7d7900",data:i.DownloadsData},{name:"Topic Views",color:"#000000",data:i.TopicViewsData}]})}}function tt(n,t){var i=$.grep(t,function(t){return t.TimePeriod===n}),r,u;i=i[0];r="";u=!1;$("#views-timeline-chart").highcharts({credits:{enabled:!1},chart:{type:"spline",style:{fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial',fontSize:14},marginLeft:47},title:{text:null},xAxis:{gridLineColor:"#e0e0e0",gridLineWidth:1,lineColor:"#e0e0e0",tickColor:"#e0e0e0",categories:i.Categories,labels:{formatter:function(){if(this.isFirst&&(u=this.value.indexOf("-")>0),u){var n=this.value.slice(-4);return r!=n?r=n:""}return this.isLast&&(r=""),this.value}}},yAxis:{gridLineColor:"#e0e0e0",gridLineWidth:1,lineColor:"#e0e0e0",title:{text:"Views",margin:2},min:0,labels:{x:-5}},plotOptions:{series:{allowPointSelect:!0}},series:[{name:"Total Views",lineWidth:6,color:h,marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:i.SummedViewsData},{name:"Article Views",visible:!1,lineWidth:6,color:"#7d7900",marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:i.ArticleViewsData},{name:"Article Downloads",visible:!1,lineWidth:6,color:"#eccc00",marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:i.DownloadsData},{name:"Topic Views",visible:!1,lineWidth:6,color:"#000000",marker:{symbol:"circle",fillColor:"#FFFFFF",radius:7,lineWidth:5,lineColor:null},data:i.TopicViewsData}]});$('text:contains("Highcharts.com")').hide()}function it(){f(n.views.DefaultViewScaleOption,n);rt()}function rt(){var t=$(".dropdown-menu");$dropDownTarget=t.find("."+n.views.DefaultViewScaleOption);$(".btn-group").find('[data-bind="label"]').text(n.views.DefaultViewScaleOption).end()}function ut(){var i,r;$(".tab-content.topic-impact-tabs #demographics-tab").addClass("active");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});t.setOptions({styles:[{featureType:"water",stylers:[{color:"#f5f8fc"}]},{featureType:"landscape.natural",stylers:[{color:"#deddbf"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#cac998"}]},{}]});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/research-topics/Content/Images/frontiers/common/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/research-topics/Content/Images/frontiers/common/impact/m1.png",width:53},{height:56,url:"/areas/research-topics/Content/Images/frontiers/common/impact/m2.png",width:56},{height:66,url:"/areas/research-topics/Content/Images/frontiers/common/impact/m3.png",width:66},{height:78,url:"/areas/research-topics/Content/Images/frontiers/common/impact/m4.png",width:78},{height:90,url:"/areas/research-topics/Content/Images/frontiers/common/impact/m5.png",width:90}]};r=new MarkerClusterer(t,i,mcOptions);r.setCalculator(function(n){for(var t,r,i=0,u=0;u<n.length;u++)i+=parseInt(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 ft(){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 et(){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>',f='<tr><td>{{fieldName}}<\/td><td style="text-align: right;"><b>{{viewCount}}<\/b><\/td><\/tr>',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,innerSize:102,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 ot(){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>',f='<tr><td>{{fieldName}}<\/td><td style="text-align: right;"><b>{{viewCount}}<\/b><\/td><\/tr>',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,innerSize:102,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 st(){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>',f='<tr><td>{{fieldName}}<\/td><td style="text-align: right;"><b>{{viewCount}}<\/b><\/td><\/tr>',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,innerSize:102,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 ht(){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 ct(){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>',o='<tr><td>{{fieldName}}<\/td><td style="text-align: right;"><b>{{viewCount}}<\/b><\/td><\/tr>',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,innerSize:102,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 lt(){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>',o='<tr><td>{{fieldName}}<\/td><td style="text-align: right;"><b>{{viewCount}}<\/b><\/td><\/tr>',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,innerSize:102,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 at(){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>',o='<tr><td>{{fieldName}}<\/td><td style="text-align: right;"><b>{{viewCount}}<\/b><\/td><\/tr>',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,innerSize:102,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 vt(){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 yt(){$("#views-chart-controls > div.btn-group.pull-left").tooltip();$("li.pull-right.disable").tooltip()}function i(n){return n.length>30?jQuery.trim(n).substring(0,27)+"...":n}function s(){if(!e){var n=window.location.hash.replace("#","").toLowerCase();n.length&&n=="impact"&&(a(),l(),e=!0)}}function pt(){$("#research-topic-nav").on("click",".primary-tabs .impact",function(){});t.on("click",'.topic-impact-tabs a[data-tab-type="views"]',function(){});t.on("click",'.topic-impact-tabs a[data-tab-type="demographics"]',function(){});t.on("click","#views-chart-controls #views-timeline-button",function(){});t.on("click","#views-chart-controls #views-bar-button",function(){});t.on("click","#views-chart-controls #PeriodDrop li.beginning",function(){});t.on("click","#views-chart-controls #PeriodDrop li.year",function(){});t.on("click","#views-chart-controls #PeriodDrop li.month",function(){})}var t=$(".tab-impact"),r="timeline",e=!1,n={views:{},demographics:{}},h=window.FRConfiguration.IsFaceliftedPagesEnabled.toLowerCase()==="true"?"#00a0d2":"#f29400";$(function(){c();yt();pt()})}()