function wrap(n){return'<a href="'+n+'" target="_blank">'+n+"<\/a>"}function closeBar(){$("#rufs-cookie-bar").css("display","none")}function closeHeaderBar(){$("#rufs-header-cookie-bar").css("display","none")}var rufsAjaxService=function(){var n=function(n,t,i,r,u,f,e,o,s){var h,c,l;return f&&f.indexOf(" ")!=-1&&(h=f.split(" ")[0],c=f.split(" ")[1],f=h+"&types="+c),l=(n?n:"/")+"search?take="+t+(i?"&skip="+i:"")+(r?"&year="+r:"")+(u?"&month="+u:"")+(f?"&types="+f:"")+(e?"&query="+e:"")+(o?"&pubsubject="+o:"")+(s?"&pubtype="+s:""),$.ajax({dataType:"json",method:"GET",url:l})},t=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v){var y=(n?n:"/")+"search?take="+t+(i?"&skip="+i:"")+(r?"&query="+r:"")+(u?"&goalfilters="+u:"")+(f?"&sustainabilityfilters="+f:"")+(e?"&thematicfilters="+e:"")+(o?"&orgfilters="+o:"")+(s?"&budgetfilters="+s:"")+(h?"&typeofactionfilters="+h:"")+(c?"&financefilters="+c:"")+(l?"&municipalityfilters="+l:"")+(a?"&geofilters="+a:"")+(v?"&currentYear="+v:"");return $.ajax({traditional:!0,dataType:"json",method:"GET",url:y})};return{searchNewsEventsDocumentsPages:n,searchProjects:t}}(),rufsGlobalMenuService=function(){var n=function(n,t,i){$button=$(n);switch(t){case"focus":$button.addClass(i);break;case"blur":$button.removeClass(i);break;default:console.log("error")}},t=function(n,t,i,r){if($stickyHeaderSelector=$(i),!n){$(window).off("scroll touchmove");$stickyHeaderSelector.removeClass(t);return}$(window).off("scroll touchmove");$(window).on("scroll touchmove",function(){$(document).scrollTop()>=r?$stickyHeaderSelector.addClass(t):$stickyHeaderSelector.removeClass(t)})};return{toggleSearchButtonState:n,globalMenuSmallSticky:t}}(),rufsSearchContentService=function(){var f=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b){var k=(n!=null?"&take="+n:"")+(t!=null?"&skip="+t:"")+(i!=null?"&year="+i:"")+(r!=null?"&month="+r:"")+(u!=null?"&type="+u:"")+(e!=null?"&pubsubject="+encodeURIComponent(e):"")+(o!=null?"&pubtype="+encodeURIComponent(o):"")+(s!=null?"&goaltype="+s:"")+(h!=null?"&sustainabilitytype="+h:"")+(c!=null?"&thematictype="+c:"")+(l!=null?"&orgtype="+l:"")+(a!=null?"&budgettype="+a:"")+(v!=null?"&typeofactiontype="+v:"")+(y!=null?"&financetype="+y:"")+(p!=null?"&municipalitytype="+p:"")+(w!=null?"&geotype="+w:"")+(b!=null?"&ongoing="+b:"");location.hash="#"+k.substr(1)},u="",t=null,i=null,r=null,n=null,e=function(r,e,o,s,h,c,l,a,v){var k,b;i=i||r;t=t?t:$("button[data-ajax-take]");n=n?n:$(".rufs-searchpage-nrofhitsforquery");u=i.attr("data-ajax-uri");var p=e?e:i.attr("data-ajax-take"),y=o?o:0,d=s?s:null,g=h?h:null,nt=c?c:null,w=l?encodeURIComponent(l):null,tt=a?a:null,it=v?v:null;p=parseInt(p);y=parseInt(y);k=null;b="";n.length&&n.addClass("hide");t.addClass("hide");f(p,y,d,g,nt,w,tt,it,null,null,null,null,null,null,null,null,null,null);y||i.html("");rufsAjaxService.searchNewsEventsDocumentsPages(u,p,y,d,g,nt,w,tt,it).then(function(r){var f,e,u;k=r.Hits;f=$.templates("#searchHitTemplate");b=f.render(k,{toUpper:function(n){return n.toUpperCase()}});y?(e=i.find("a:last-child"),i.append(b),setTimeout(function(){$("html, body").animate({scrollTop:e.offset().top},500)},500)):i.html(b);i.find("a").length<r.TotalCount?t.removeClass("hide"):t.addClass("hide");n.length&&w&&(n.find("span:first-child").html(r.TotalCount+" "),n.find("span:last-child").html(" "+decodeURIComponent(w)),n.removeClass("hide"));u="";i.find(".month-name").each(function(){$(this).attr("data-month-name")!==""&&($(this).attr("data-month-name")===u?($(this).attr("data-month-name",""),$(this).html("")):u=$(this).attr("data-month-name"))})},function(){console.log("ERROR GETTING searchNewsEventsDocumentsPages")}).always(function(){})},o=function(i,e,o,s,h,c,l,a,v,y,p,w,b,k){var it,tt;r=r||i;t=t?t:$("button[data-ajax-take]");n=n?n:$(".rufs-searchpage-nrofhitsforquery");u=r.attr("data-ajax-uri");var g=e?e:r.attr("data-ajax-take"),d=o?o:0,rt=s?s:null,ut=h?h:null,ft=c?c:null,et=l?l:null,ot=a?a:null,st=v?v:null,ht=y?y:null,ct=p?p:null,lt=w?w:null,at=b?b:null,nt=k?encodeURIComponent(k):null;g=parseInt(g);d=parseInt(d);it=null;tt="";n.length&&n.addClass("hide");t.addClass("hide");f(g,d,null,null,null,nt,null,null,rt,ut,ft,et,ot,st,ht,ct,lt,at);d||r.html("");rufsAjaxService.searchProjects(u,g,d,nt,rt,ut,ft,et,ot,st,ht,ct,lt,b).then(function(i){var u,f;it=i.Hits;u=$.templates("#searchHitTemplate");tt=u.render(it,{toUpper:function(n){return n.toUpperCase()}});d?(f=r.find("a:last-child"),r.append(tt),setTimeout(function(){$("html, body").animate({scrollTop:f.offset().top},500)},500)):r.html(tt);r.find("a").length<i.TotalCount?t.removeClass("hide"):t.addClass("hide");n.length&&nt&&(n.find("span:first-child").html(i.TotalCount+" "),n.find("span:last-child").html(" "+decodeURIComponent(nt)),n.removeClass("hide"))},function(){console.log("ERROR GETTING searchProjects")}).always(function(){})},s=function(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))},h=function(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\#&]"+n+"=([^&]*)"),t=i.exec(location.hash);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))};return{getAndRenderAjaxData:e,getParameterByName:s,getHashtagByName:h,getAndRenderProjectAjaxData:o}}(),rufsLatestEventsAndNewsBlockService=function(){var n=function(n){var t=n.find("ul[data-ajax-take-news]"),o=n.find("ul[data-ajax-take-event]"),e=t.attr("data-ajax-take-news"),s=o.attr("data-ajax-take-event"),h=t.attr("data-ajax-take-twitter"),u=n.find("ul.rufs-latestlist-block-ul"),v=parseInt(e)+parseInt(h),c=t.html(),l=u.html(),r;t.html("");u.html("");n.addClass("display-none");var i=null,f="",a=0;rufsAjaxService.searchNewsEventsDocumentsPages("/latestlistblock/",e,0,null,null,"NewsPage",null,null).then(function(n){i=n.Hits;var t=$.templates("#latestListBlockNewsTemplate");f=t.render(i,{toUpper:function(n){return n.toUpperCase()}})},function(){console.log("ERROR GETTING searchNewsEventsDocumentsPages")}).always(function(){f+=c;t.html(f);n.removeClass("display-none");$(".rufs-latestlist-block-ul-left li").each(function(){$(this).is(":last-child")||(a+=$(this).outerHeight(!0))});equalize()});i=null;r="";rufsAjaxService.searchNewsEventsDocumentsPages("/latestlistblock/",s,0,null,null,"EventPage ImportedEventPage",null,null).then(function(n){i=n.Hits;var t=$.templates("#latestListBlockEventTemplate");r=t.render(i,{toUpper:function(n){return n.toUpperCase()}})},function(){console.log("ERROR GETTING searchNewsEventsDocumentsPages")}).always(function(){r+=l;u.html(r);n.removeClass("display-none")})};return{getAndRenderAjaxData:n}}(),onBeginSendForm,onSendFormComplete,equalize;(function(){window.rufsGlobals={ycordForMobileStickyTrigger:10};$(document).foundation();$("ul.twitter li .tweet").each(function(){$(this).html($(this).html().replace(/#([^ ]+)/g,"<a class='hashtag' href='https://twitter.com/hashtag/$1?src=hash' target='_blank'>#$1<\/a>"))});$("ul.rufs-latestlist-block-ul-left li .tweet").each(function(){$(this).html($(this).html().replace(/#([^ ]+)/g,"<a class='hashtag' href='https://twitter.com/hashtag/$1?src=hash' target='_blank'>#$1<\/a>"))});var n=navigator.platform.toUpperCase().indexOf("MAC")>=0;n&&$("head").append("<style type='text/css'>input[type='search']::-webkit-search-cancel-button,input[type='search']::-webkit-search-decoration {-webkit-appearance: none;}<\/style>")})(),function(){if(window.publicationPage&&window.publicationPage.pageIsInEditMode)return $("#orderButton").attr("disabled","disabled"),$("#orderForm").show(),!1}();onBeginSendForm=function(){$("#orderButton").attr("disabled","disabled");$("#errorPanel").empty();$("#errorPanel").hide();$(".validation-summary-errors").empty()};onSendFormComplete=function(n){return($("#orderButton").removeAttr("disabled"),$("#successPanel").empty(),$("#successPanel").hide(),n.responseJSON.Errors!=null)?($("#errorPanel").html(n.responseJSON.Errors),$("#errorPanel").show(),!1):($("#orderForm").hide(),$("#orderForm").trigger("reset"),$("#successPanel").html(n.responseJSON.Message),$("#successPanel").show(),!0)},function(){$(".rufs-submenu-parent-list .rufs-chevron").on("click",function(){$(this).toggleClass("rufs-chevron-down rufs-chevron-right");$(this).parent("li").toggleClass("rufs-child-expanded");$(this).next("ul").first().toggleClass("rufs-expanded rufs-collapsed")});$(".rufs-submenu-parent-list > li > a").on("click",function(){$(this).next("span").toggleClass("rufs-chevron-down rufs-chevron-right");$(this).parent("li").toggleClass("rufs-child-expanded");$(this).siblings("ul").first().toggleClass("rufs-expanded rufs-collapsed")});$(".rufs-submenu-parent-list a").on("click",function(){$(".rufs-submenu-parent-list a").parent("li").removeClass("rufs-active");$(this).parent("li").addClass("rufs-active")});$("body").on("click",".chevron-toggle",function(n){n.preventDefault();var t=$("#"+$(this).attr("data-target"))||null;t&&($(this).toggleClass("active"),$(t).slideToggle("fast",function(){}))})}(),function(){$("input[data-global-search-field]").on("focus blur",function(n){rufsGlobalMenuService.toggleSearchButtonState("button[data-global-search-button]",n.type,"rufs-active")});$("input[data-global-searchproject-field]").on("focus blur",function(n){rufsGlobalMenuService.toggleSearchButtonState("button[data-global-search-project-button]",n.type,"rufs-active")});$("a").on("click",function(){var t=$(this).attr("data-year"),n;t==undefined&&(t="");n=$(this).attr("data-month");n==undefined&&(n="");$("#news-archive button[data-ajax-user-type='NewsPage']").attr("data-year",t);$("#news-archive button[data-ajax-user-type='NewsPage']").attr("data-month",n);$("#news-archive button[data-ajax-user-type='NewsPage']").trigger("click");$("#news-archive select[data-ajax-user-type-select='NewsPage']").attr("data-year",t);$("#news-archive select[data-ajax-user-type-select='NewsPage']").attr("data-month",n);$("#news-archive select[data-ajax-user-type-select='NewsPage']").trigger("change")});$("#rufs-searchbutton").on("click",function(){var n=$(this).attr("data-global-search-button-ef"),t=$("#rufs-searchinput").val();window.location.href=n+encodeURIComponent(t)});$("#rufs-searchbutton-page").on("click",function(){var n=$(this).attr("data-global-search-button-ef"),t=$("#rufs-searchinput-page").val();window.location.href=n+encodeURIComponent(t)});$("#rufs-searchbutton-small").on("click",function(){var n=$(this).attr("data-global-search-button-ef"),t=$("#rufs-searchinput-small").val();window.location.href=n+encodeURIComponent(t)});$("#rufs-searchinput").on("keyup",function(n){if(n.keyCode==13){var t=$("#rufs-searchbutton").attr("data-global-search-button-ef"),i=$(this).val();window.location.href=t+encodeURIComponent(i)}});$("#rufs-searchinput-page").on("keyup",function(n){if(n.keyCode==13){var t=$("#rufs-searchbutton-page").attr("data-global-search-button-ef"),i=$(this).val();window.location.href=t+encodeURIComponent(i)}});$("#rufs-searchbutton-project").on("click",function(){var n=$(this).attr("data-global-searchproject-button-ef"),t=$("#rufs-searchinput-project").val();window.location.href=n+encodeURIComponent(t)});$("#rufs-searchbuttonmobile-project").on("click",function(){var n=$(this).attr("data-global-searchproject-button-ef"),t=$("#rufs-searchinputmobile-project").val();window.location.href=n+encodeURIComponent(t)});$("#rufs-searchinput-project").on("keyup",function(n){if(n.keyCode==13){var t=$("#rufs-searchbutton-project").attr("data-global-searchproject-button-ef"),i=$(this).val();window.location.href=t+encodeURIComponent(i)}});$("#rufs-searchinputmobile-project").on("keyup",function(n){if(n.keyCode==13){var t=$("#rufs-searchbuttonmobile-project").attr("data-global-searchproject-button-ef"),i=$(this).val();window.location.href=t+encodeURIComponent(i)}});var n=function(){Foundation.utils.is_xlarge_up()||$("body").hasClass("rufs-fixed")?rufsGlobalMenuService.globalMenuSmallSticky(!1,"rufs-sticky",".rufs-global-area-small-hamburger"):rufsGlobalMenuService.globalMenuSmallSticky(!0,"rufs-sticky",".rufs-global-area-small-hamburger",window.rufsGlobals.ycordForMobileStickyTrigger)};n()}(),function(){if(!Foundation.utils.is_xlarge_up()){var r=$(".rufs-global-area-small-hamburger .small-4 img"),u=$(".rufs-submenu-area-for-medium-down"),i=$(".rufs-global-area-small-hamburger"),n=$("body"),e=$("html"),f=$(".rufs-site-container-medium-down-headermenu"),t=0;r.on("click",function(){n.hasClass("rufs-fixed")||(t=$(document).scrollTop());u.toggleClass("rufs-hide");n.toggleClass("rufs-fixed");f.toggleClass("mobilemenu-is-open");setTimeout(function(){n.hasClass("rufs-fixed")||($(document).scrollTop(t),t>=window.rufsGlobals.ycordForMobileStickyTrigger?i.addClass("rufs-sticky"):i.removeClass("rufs-sticky"))},250)})}}(),function(){function ft(n){return n==="1"?"0-1 mnkr":n==="2"?"0-5 mnkr":n==="3"?"0-10 mnkr":n==="4"?"0-50 mnkr":(n==="5","0-50+ mnkr")}var lt=$("p[data-rufs-search-isproject]").length?!0:!1,f=$("div[data-rufs-search-content]"),c=$("div[data-rufs-search-content]"),s=$("div[data-rufs-search-leftmenucontent]"),rt,ut,i,wt,bt,dt;if(f.length){var et=f.find("div[data-ajax-take]"),at=f.find("div[data-ajax-take]"),o=$("button[data-ajax-take]"),r=null,n=null,t=null,p=[],w=[],b=[],k=[],l="",d=[],g=[],nt=[],tt=[],ii=new Date,it="",h=null,a=null,v="",ot=f.find("div.rufs-searchpage-filter-dropdowns");ot.hide();var ri=$("#rufs-searchbutton-project"),vt=$("#rufs-searchinput-project"),ui=$("#rufs-searchbuttonmobile-project"),yt=$("#rufs-searchinputmobile-project"),st=$("#selected-year"),ht=$("#selected-month"),u=$("#all-btn"),ct=$("#period-steppers"),y=$("#month-btn"),gt=$("#clear-filters"),oi=gt.attr("style"),ni=$("#clear-mobilefilters"),si=ni.attr("style"),e=!0,pt=function(){ht.html("");st.html("");t=null;n=null},fi=function(){var i=new Date;t=i.getMonth()+1;ht.html(rufs.monthNames[t-1]);n=i.getFullYear();st.html(n)};if(!lt)if(Foundation.utils.is_large_up()){v=f.find("div.show-for-large-up button[data-ajax-user-type]");v.on("click",function(i){var s,c;v.removeClass("rufs-active");$(this).addClass("rufs-active");r=$(this).attr("data-ajax-user-type");r==="PublicationPage"?ot.show():(ot.hide(),f.find("select[data-ajax-subject-select]").val(""),h=null,f.find("select[data-ajax-rapport-type-select]").val(""),a=null);pt();ct.hide();r==="EventPage ImportedEventPage"?(u.addClass("rufs-active"),y.removeClass("rufs-active"),u.html("Kommande")):(u.addClass("rufs-active"),y.removeClass("rufs-active"),u.html("Alla"));o.attr("data-ajax-skip",o.attr("data-ajax-take"));var l=null,p=null,w=null;e===!0&&(l=et,p=rufsSearchContentService.getHashtagByName("pubsubject"),w=rufsSearchContentService.getHashtagByName("pubtype"),n=rufsSearchContentService.getHashtagByName("year"),t=rufsSearchContentService.getHashtagByName("month"),n!==""&&t!==""?(u.removeClass("rufs-active"),st.html(n),y.addClass("rufs-active"),(t<1||t>12)&&(t=(new Date).getMonth()+1),ht.html(rufs.monthNames[t-1]),ct.show()):(n=null,t=null),e=!1);s="";c="";i.currentTarget.attributes.getNamedItem("data-year")&&(s=i.currentTarget.attributes.getNamedItem("data-year").value);i.currentTarget.attributes.getNamedItem("data-month")&&(c=i.currentTarget.attributes.getNamedItem("data-month").value);s.length>0&&(n=s);c.length>0&&(t=c);rufsSearchContentService.getAndRenderAjaxData(l,null,0,n,t,r,rufsSearchContentService.getParameterByName("query"),p,w)})}else{v=f.find("div.hide-for-large-up select[data-ajax-user-type-select]");v.on("change",function(i){var s,c;if(v.removeClass("rufs-active"),$(this).addClass("rufs-active"),r=$(this).val(),r!=null){r.toLowerCase()=="twitter"?($("#latestcontent").css("display","none"),$("#loadmorebutton").css("display","none"),$("#selectyear").prop("disabled",!0),$("#period-container").hide()):($("#latestcontent").css("display","initial"),$("#loadmorebutton").css("display","initial"),$("#selectyear").prop("disabled",!1),u.addClass("rufs-active"),y.removeClass("rufs-active"),ct.hide(),pt(),$("#period-container").show());r.toLowerCase()==="newspage"?u.html("Alla"):u.html("Kommande");r=="PublicationPage"?ot.show():(ot.hide(),f.find("select[data-ajax-subject-select]").val(""),h=null,f.find("select[data-ajax-rapport-type-select]").val(""),a=null);o.attr("data-ajax-skip",o.attr("data-ajax-take"));var l=null,p=null,w=null;e===!0&&(l=et,p=rufsSearchContentService.getHashtagByName("pubsubject"),w=rufsSearchContentService.getHashtagByName("pubtype"),e=!1);r.toLowerCase()!="twitter"&&(s="",c="",i.currentTarget.attributes.getNamedItem("data-year")&&(s=i.currentTarget.attributes.getNamedItem("data-year").value),i.currentTarget.attributes.getNamedItem("data-month")&&(c=i.currentTarget.attributes.getNamedItem("data-month").value),s.length>0&&(n=s),c.length>0&&(t=c),rufsSearchContentService.getAndRenderAjaxData(l,null,0,n,t,r,rufsSearchContentService.getParameterByName("query"),p,w))}})}if(lt)if(Foundation.utils.is_large_up()){$userSelectGoalTypeButton=c.find("div.rufs-searchpage-filter button[data-ajax-goal-type]");$userSelectOngoingTypeButton=s.find("span.ongoing-btn");$userSelectSustainabilityTypeButton=s.find("input[data-ajax-sustainability-type]");$userSelectThematicTypeButton=s.find("input[data-ajax-thematic-type]");$userSelectOrgTypeButton=s.find("input[data-ajax-org-type]");$userSelectBudgetTypeButton=s.find("input[data-ajax-budget-type]");$userSelectTypeOfActionTypeButton=s.find("input[data-ajax-typeofaction-type]");$userSelectFinanceTypeButton=s.find("input[data-ajax-finance-type]");$userSelectMunicipalityTypeButton=s.find("input[data-ajax-municipality-type]");$userSelectGeoTypeButton=s.find("input[data-ajax-geo-type]");rt=document.getElementById("desktopRange");ut=document.getElementById("desktopslidervalue");ut.innerHTML=ft(rt.value);rufsSearchContentService.getAndRenderProjectAjaxData(at,null,0,p,w,b,k,l,d,g,nt,tt,it,rufsSearchContentService.getParameterByName("query"));rt.oninput=function(){ut.innerHTML=ft(this.value);$(this).removeClass("rufs-active");i(this)};$userSelectGoalTypeButton.on("click",function(){i(this)});$userSelectOngoingTypeButton.on("click",function(){i(this)});$userSelectSustainabilityTypeButton.on("click",function(){i(this)});$userSelectThematicTypeButton.on("click",function(){i(this)});$userSelectOrgTypeButton.on("click",function(){i(this)});$userSelectBudgetTypeButton.on("click",function(){i(this)});$userSelectTypeOfActionTypeButton.on("click",function(){i(this)});$userSelectFinanceTypeButton.on("click",function(){i(this)});$userSelectMunicipalityTypeButton.on("click",function(){i(this)});$userSelectGeoTypeButton.on("click",function(){i(this)})}else{$userSelectGoalTypeButton=c.find("div.rufs-searchpage-filter button[data-ajax-goal-type]");$mobileuserSelectSustainabilityTypeButton=c.find("input[data-ajax-sustainability-type]");$mobileuserSelectOngoingTypeButton=c.find("span.ongoing-btn");$mobileuserSelectOrgTypeButton=c.find("input[data-ajax-org-type]");$mobileuserSelectTypeOfActionTypeButton=c.find("input[data-ajax-typeofaction-type]");$mobileuserSelectMunicipalityTypeButton=c.find("input[data-ajax-municipality-type]");$mobileuserSelectThematicTypeButton=c.find("input[data-ajax-thematic-type]");rt=document.getElementById("mobileRange");ut=document.getElementById("mobileslidervalue");ut.innerHTML=ft(rt.value);rufsSearchContentService.getAndRenderProjectAjaxData(at,null,0,p,w,b,k,l,d,g,nt,tt,it,rufsSearchContentService.getParameterByName("query"));rt.oninput=function(){ut.innerHTML=ft(this.value);$(this).removeClass("rufs-active");i(this)};$mobileuserSelectOngoingTypeButton.on("click",function(){i(this)});$mobileuserSelectOrgTypeButton.on("click",function(){i(this)});$mobileuserSelectTypeOfActionTypeButton.on("click",function(){i(this)});$mobileuserSelectMunicipalityTypeButton.on("click",function(){i(this)});$mobileuserSelectThematicTypeButton.on("click",function(){i(this)});$userSelectGoalTypeButton.on("click",function(){i(this)});$mobileuserSelectSustainabilityTypeButton.on("click",function(){i(this)})}i=function(n){$(n).toggleClass("rufs-active");$(n).blur();p=[];w=[];b=[];k=[];l="";d=[];g=[];nt=[];tt=[];it="";$("span").each(function(){$(this).hasClass("rufs-active")&&$(this).hasClass("ongoing-btn")&&(it=ii.getFullYear())});$("input").each(function(){if(Foundation.utils.is_large_up()&&$(this).hasClass("desktopslider")&&$(this).hasClass("rufs-active")&&(l=this.value),Foundation.utils.is_large_up()||$(this).hasClass("mobileslider")&&$(this).hasClass("rufs-active")&&(l=this.value),$(this).hasClass("rufs-active")){var o=$(this).attr("data-ajax-sustainability-type"),n=$(this).attr("data-ajax-thematic-type"),t=$(this).attr("data-ajax-org-type"),i=$(this).attr("data-ajax-budget-type"),r=$(this).attr("data-ajax-typeofaction-type"),u=$(this).attr("data-ajax-finance-type"),f=$(this).attr("data-ajax-municipality-type"),e=$(this).attr("data-ajax-geo-type");typeof o!=typeof undefined&&n!==!1&&w.push($(this).attr("data-ajax-sustainability-type"));typeof n!=typeof undefined&&n!==!1&&b.push($(this).attr("data-ajax-thematic-type"));typeof t!=typeof undefined&&t!==!1&&k.push($(this).attr("data-ajax-org-type"));typeof i!=typeof undefined&&i!==!1&&l.push($(this).attr("data-ajax-budget-type"));typeof r!=typeof undefined&&r!==!1&&d.push($(this).attr("data-ajax-typeofaction-type"));typeof u!=typeof undefined&&u!==!1&&g.push($(this).attr("data-ajax-finance-type"));typeof f!=typeof undefined&&f!==!1&&nt.push($(this).attr("data-ajax-municipality-type"));typeof e!=typeof undefined&&e!==!1&&tt.push($(this).attr("data-ajax-geo-type"))}});$("button").each(function(){if($(this).hasClass("rufs-active")){var n=$(this).attr("data-ajax-goal-type");typeof n!=typeof undefined&&n!==!1&&p.push($(this).attr("data-ajax-goal-type"))}});o.attr("data-ajax-skip",o.attr("data-ajax-take"));var t=null;e===!0&&(t=at,e=!1);rufsSearchContentService.getAndRenderProjectAjaxData(t,null,0,p,w,b,k,l,d,g,nt,tt,it,rufsSearchContentService.getParameterByName("query"))};u.on("click",function(){u.addClass("rufs-active");y.removeClass("rufs-active");ct.hide();pt();rufsSearchContentService.getAndRenderAjaxData(null,null,0,n,t,r,rufsSearchContentService.getParameterByName("query"),null,null)});gt.on("click",function(){var n,t,r,u;vt.val()===""?($("span").each(function(){$(this).hasClass("rufs-active")&&$(this).removeClass("rufs-active")}),$("input").each(function(){$(this).hasClass("rufs-active")&&$(this).removeClass("rufs-active")}),$("input[type=checkbox]").each(function(){this.checked&&(this.checked=!1)}),$("button").each(function(){$(this).hasClass("postfix")||$(this).hasClass("rufs-active")&&$(this).removeClass("rufs-active")}),n=document.getElementById("desktopRange"),n.value=n.max,t=document.getElementById("desktopslidervalue"),t.innerHTML=ft(n.value),i(this)):(vt.val(""),r=ri.attr("data-global-searchproject-button-ef"),u=vt.val(),window.location.href=r+encodeURIComponent(u))});ni.on("click",function(){var n,t,r,u;yt.val()===""?($("span").each(function(){$(this).hasClass("rufs-active")&&$(this).removeClass("rufs-active")}),$("input").each(function(){$(this).hasClass("rufs-active")&&$(this).removeClass("rufs-active")}),$("input[type=checkbox]").each(function(){this.checked&&(this.checked=!1)}),$("button").each(function(){$(this).hasClass("postfix")||$(this).hasClass("rufs-active")&&$(this).removeClass("rufs-active")}),n=document.getElementById("mobileRange"),n.value=n.max,t=document.getElementById("mobileslidervalue"),t.innerHTML=ft(n.value),i(this)):(yt.val(""),r=ui.attr("data-global-searchproject-button-ef"),u=yt.val(),window.location.href=r+encodeURIComponent(u))});y.on("click",function(){u.removeClass("rufs-active");y.addClass("rufs-active");fi();ct.show();rufsSearchContentService.getAndRenderAjaxData(null,null,0,n,t,r,rufsSearchContentService.getParameterByName("query"),null,null)});$("#decreasePeriodButton").on("click",function(){if(u.removeClass("rufs-active"),t===1&&n===2015)return!1;t--;t<1&&(t=12,n--);ht.html(rufs.monthNames[t-1]);n=parseInt(n)||(new Date).getFullYear();n<2015&&(n=2015);st.html(n);rufsSearchContentService.getAndRenderAjaxData(null,null,0,n,t,r,rufsSearchContentService.getParameterByName("query"),null,null)});$("#increasePeriodButton").on("click",function(){u.removeClass("rufs-active");t=parseInt(t)+1||(new Date).getMonth();t>12&&(t=1,n++);ht.html(rufs.monthNames[t-1]);n=parseInt(n)||(new Date).getFullYear();n<2015&&(n=2015);st.html(n);rufsSearchContentService.getAndRenderAjaxData(null,null,0,n,t,r,rufsSearchContentService.getParameterByName("query"),null,null)});wt=f.find("select[data-ajax-subject-select]");h=rufsSearchContentService.getHashtagByName("pubsubject");h!==""&&wt.val(h);wt.on("change",function(){h=$(this).val();o.attr("data-ajax-skip",o.attr("data-ajax-take"));var n=null;e===!0&&(n=et,e=!1);rufsSearchContentService.getAndRenderAjaxData(n,null,0,null,null,r,rufsSearchContentService.getParameterByName("query"),h,a)});bt=f.find("select[data-ajax-rapport-type-select]");a=rufsSearchContentService.getHashtagByName("pubtype");a!==""&&bt.val(a);bt.on("change",function(){a=$(this).val();o.attr("data-ajax-skip",o.attr("data-ajax-take"));var n=null;e===!0&&(n=et,e=!1);rufsSearchContentService.getAndRenderAjaxData(n,null,0,null,null,r,rufsSearchContentService.getParameterByName("query"),h,a)});o.on("click",function(i){var u=$(this).attr("data-ajax-take"),f=$(this).attr("data-ajax-skip"),o;u=parseInt(u);f=parseInt(f);$(this).attr("data-ajax-skip",u+f);o=null;e===!0&&(o=et,e=!1);lt?rufsSearchContentService.getAndRenderProjectAjaxData(o,u,f,p,w,b,k,l,d,g,nt,tt,it,rufsSearchContentService.getParameterByName("query")):rufsSearchContentService.getAndRenderAjaxData(o,u,f,n,t,r,rufsSearchContentService.getParameterByName("query"),h);i.preventDefault()});var ti=$("button[data-ajax-user-type='']"),ei=$("select[data-ajax-user-type-select]"),kt=rufsSearchContentService.getHashtagByName("type");kt&&(dt=$("button[data-ajax-user-type='"+kt+"']"),dt.length===1?ti=dt[0]:$("#search-panel-and-results").hide(),$(ei).val(kt));$(v).trigger("change");ti.click()}}(),function(){var i=$(".rufs-mediaelement-container"),u=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,f=navigator.userAgent.toLowerCase().indexOf("android")>-1,r,n,t;if(!u&&!f)for(i.each(function(){var n=$(this);n.attr("href")===""&&n.replaceWith(function(){return $("<div/>",{html:this.innerHTML})})}),r={features:["playpause","progress","current","duration","tracks","volume"],pluginPath:"/content/img/mediaelement/",flashName:"flashmediaelement.swf",enableAutosize:!0,iPadUseNativeControls:!0,iPhoneUseNativeControls:!0,AndroidUseNativeControls:!0,pauseOtherPlayers:!0},n=[],$("video,audio").each(function(){n.push(new MediaElementPlayer(this,r))}),t=0;t<n.length;t++)n[t].hideControls(!1);i.each(function(){$(this).css("visibility","visible")})}(),function(){var n=$(".standardblock-link");n.each(function(){var n=$(this);n.attr("href")===""&&n.replaceWith(function(){return $("<div/>",{html:this.innerHTML})})})}(),function(){var n=$(".block.latestlistblock"),t=$(".block.latestnewsblock"),i=$(".block.eventblock"),r;if(!n.length&&!t.length&&!i.length){r=$("a[data-year]").not("a[data-month]")[0];r!=undefined&&r.click();return}n.length&&rufsLatestEventsAndNewsBlockService.getAndRenderAjaxData(n);t.length&&rufsLatestEventsAndNewsBlockService.getAndRenderAjaxData(t);i.length&&rufsLatestEventsAndNewsBlockService.getAndRenderAjaxData(i)}();$(document).ready(function(){function t(){var n=new Date,t;n.setFullYear(n.getFullYear()+1);t="expires="+n.toUTCString();document.cookie="rufs-cookie=accepted; "+t+";domain="+window.location.hostname.replace("www","")+"; path=/"}function i(n){for(var r,u,i=document.cookie.split(";"),t=0;t<i.length;t++)if(r=i[t].substr(0,i[t].indexOf("=")),u=i[t].substr(i[t].indexOf("=")+1),r=r.replace(/^\s+|\s+$/g,""),r==n)return unescape(u)}var n=i("rufs-cookie");n=="accepted"?$("#rufs-cookie-bar").css("display","none"):$("#rufs-cookie-bar").css("display","block");$("#cookie-button").click(function(){t();$("#rufs-cookie-bar").css("display","none")})});$(document).ready(function(){function t(){var n=new Date,t;n.setFullYear(n.getFullYear()+1);t="expires="+n.toUTCString();document.cookie="rufs-header-cookie=accepted; "+t+";domain="+window.location.hostname.replace("www","")+"; path=/"}function i(n){for(var r,u,i=document.cookie.split(";"),t=0;t<i.length;t++)if(r=i[t].substr(0,i[t].indexOf("=")),u=i[t].substr(i[t].indexOf("=")+1),r=r.replace(/^\s+|\s+$/g,""),r==n)return unescape(u)}var n=i("rufs-header-cookie");n=="accepted"?$("#rufs-header-cookie-bar").css("display","none"):$("#rufs-header-cookie-bar").css("display","block");$("#cookie-header-button").click(function(){t();$("#rufs-header-cookie-bar").css("display","none")})});$(document).ready(function(){function n(){$(".imagesliderblock").slick()}n()});equalize=function(){var t=!1,n={getSettings:function(n){var i={stacked:!1,stackedOnMobile:!1},r,u;return n.attr("data-app-dom-equalize")==""?(t&&console.log("equalize.utils.getSettings - default settings"),i):(r=jQuery.parseJSON(n.attr("data-app-dom-equalize")),u={stacked:r.stacked||i.stacked,stackedOnMobile:r.stackedOnMobile||i.stackedOnMobile},t&&console.log("equalize.utils.getSettings - custom settings"),u)},hasChildSets:function(n){return n.find("[data-app-dom-equalize-watch*='set']").length>0?(t&&console.log("equalize.utils.hasChildSets - true"),!0):!1},getChildSets:function(n){var t={},i=n.find("[data-app-dom-equalize-watch]");return i.each(function(){var i=jQuery(this),n=jQuery.parseJSON(i.attr("data-app-dom-equalize-watch")).set;typeof t[n]=="undefined"&&(t[n]=[]);t[n].push(i)}),t},getChildren:function(n){if(n.find("[data-app-dom-equalize-watch]").length==0)return!1;var i=[];return n.find("[data-app-dom-equalize-watch]").each(function(){i.push(jQuery(this))}),t&&console.log("equalize.utils.getChildren: "+i.length),i},getHeight:function(n){return n?n.map(function(n){return jQuery(n).height()}):0},getMaxHeight:function(n){if(n)return Math.max.apply(null,n)},setHeight:function(n,t){n&&t&&n.map(function(n){jQuery(n).height(t)})},releaseHeight:function(n){n&&n.map(function(n){jQuery(n).css("height","auto")})},removeHeight:function(n){n&&n.map(function(n){jQuery(n).css("height","")})},isStacked:function(n){if(n)return jQuery(n[0]).offset().top-jQuery(n[n.length-1]).offset().top!=0?(t&&console.log("equalize.utils.isStacked: true"),!0):(t&&console.log("equalize.utils.isStacked: false"),!1)}},r=function(){if(jQuery("[data-app-dom-equalize]").length!==-1){t&&console.log("equalize.init");var r=jQuery("[data-app-dom-equalize]");r.each(function(){t&&console.log("equalize.item.begin");var r=jQuery(this);Foundation.utils.is_large_up()?i(r):$(n.getChildren(r)).css("height","");jQuery(window).on("resize",function(){Foundation.utils.is_large_up()?(n.releaseHeight(n.getChildren(r)),i(r)):$(n.getChildren(r)).css("height","")});t&&console.log("equalize.item.end")});t&&console.log("equalize.done")}},i=function(i){t&&console.log("equalize.create");var r=jQuery(i);return n.hasChildSets(r)?f(r):u(r)},u=function(i){var f,e;t&&console.log("equalize.singleInstance");var u=jQuery(i),r=n.getChildren(u),o=n.getSettings(u);r&&(o.stacked||!n.isStacked(r))&&(n.releaseHeight(r),f=n.getHeight(r),e=n.getMaxHeight(f),n.setHeight(r,e))},f=function(i){var r,u,o,s;t&&console.log("equalize.multipleInstance");var f=jQuery(i),h=n.getSettings(f),e=n.getChildSets(f);for(r in e)t&&console.log("equalize.set ["+r+"] begin"),u=e[r],n.releaseHeight(u),o=n.getHeight(u),s=n.getMaxHeight(o),n.setHeight(u,s),t&&console.log("equalize.set ["+r+"] end")};r()};jQuery(window).on("load",function(){equalize()});(function(){var n=$(".category-info-window"),t=n.find(".category-info-window__close"),i=window.matchMedia("(max-width: 640px)");$("body").on("click",".category-info-icon",function(){var t=$(this),r=t.offset().top,u=t.attr("id");n.removeClass("show");$(n).each(function(){var n=$(this);n.attr("id")===u&&(n.addClass("show"),i.matches?(n.css("top","calc("+r+"px - 100px)"),n.css("margin-right","10px")):n.css("top","calc("+r+"px - 350px"))})});t.on("click",function(){n.removeClass("show")});$(document).click(function(n){$(n.target).closest(".category-info-window, .category-info-icon").length||$("body").find(".category-info-window").removeClass("show")})})();!function(n,t){var i=t.jQuery;"object"==typeof exports?module.exports=i?n(t,i):function(i){if(i&&!i.fn)throw"Provide jQuery or null";return n(t,i)}:"function"==typeof define&&define.amd?define(function(){return n(t)}):n(t,!1)}(function(n,t){"use strict";function ni(n,t){return function(){var r,i=this,u=i.base;return i.base=n,r=t.apply(i,arguments),i.base=u,r}}function ti(n,t){return h(t)&&(t=ni(n?n._d?n:ni(ht,n):ht,t),t._d=1),t}function st(n,t){for(var i in t.props)bi.test(i)&&(n[i]=ti(n[i],t.props[i]))}function ii(n){return n}function ht(){return""}function nr(n){try{throw console.log("JsRender dbg breakpoint: "+n),"dbg breakpoint";}catch(t){}return this.base?this.baseApply(arguments):n}function ct(n){this.name=(t.link?"JsViews":"JsRender")+" Error";this.message=n||this.name}function r(n,t){for(var i in t)n[i]=t[i];return n}function tr(n,t,r){return n?(u.delimiters=[n,t,rt=r?r.charAt(0):rt],tt=n.charAt(0),it=n.charAt(1),p=t.charAt(0),d=t.charAt(1),n="\\"+tt+"(\\"+rt+")?\\"+it,t="\\"+p+"\\"+d,w="(?:(\\w+(?=[\\/\\s\\"+p+"]))|(\\w+)?(:)|(>)|(\\*))\\s*((?:[^\\"+p+"]|\\"+p+"(?!\\"+d+"))*?)",i.rTag="(?:"+w+")",w=new RegExp("(?:"+n+w+"(\\/)?|\\"+tt+"(\\"+rt+")?\\"+it+"(?:(?:\\/(\\w+))\\s*|!--[\\s\\S]*?--))"+t,"g"),vi=new RegExp("<.*>|([^\\\\]|^)[{}]|"+n+".*"+t),s):u.delimiters}function ir(n,t){t||n===!0||(t=n,n=void 0);var f,u,e,r,i=this,o=!t||"root"===t;if(n){if(r=t&&i.type===t&&i,!r)if(f=i.views,i._.useKey){for(u in f)if(r=t?f[u].get(n,t):f[u])break}else for(u=0,e=f.length;!r&&e>u;u++)r=t?f[u].get(n,t):f[u]}else if(o)for(;i.parent;)r=i,i=i.parent;else for(;i&&!r;)r=i.type===t?i:void 0,i=i.parent;return r}function ri(){var n=this.get("item");if(n)return n.index}function ui(){return this.index}function rr(t){var u,f=this,e=f.linkCtx,i=(f.ctx||{})[t];return void 0===i&&e&&e.ctx&&(i=e.ctx[t]),void 0===i&&(i=bt[t]),i&&h(i)&&!i._wrp&&(u=function(){return i.apply(this&&this!==n?this:f,arguments)},u._wrp=f,r(u,i)),u||i}function ur(n){return n&&(n.fn?n:this.getRsc("templates",n)||o(n))}function fr(n,t,u,f){var e,o,h="number"==typeof u&&t.tmpl.bnds[u-1],s=t.linkCtx;return void 0!==f?u=f={props:{},args:[f]}:h&&(u=h(t.data,t,i)),o=u.args[0],(n||h)&&(e=s&&s.tag,e||(e=r(new i._tg,{_:{inline:!s,bnd:h,unlinked:!0},tagName:":",cvt:n,flow:!0,tagCtx:u}),s&&(s.tag=e,e.linkCtx=s),u.ctx=c(u.ctx,(s?s.view:t).ctx)),e._er=f&&o,st(e,u),u.view=t,e.ctx=u.ctx||{},u.ctx=void 0,o=e.cvtArgs(e.convert||"true"!==n&&n)[0],o=h&&t._.onRender?t._.onRender(o,t,e):o),void 0!=o?o:""}function er(n){var r=this,u=r.tagCtx,f=u.view,t=u.args;return n=r.convert||n,n=n&&(""+n===n?f.getRsc("converters",n)||v("Unknown converter: '"+n+"'"):n),t=t.length||u.index?n?t.slice():t:[f.data],n&&(n.depends&&(r.depends=i.getDeps(r.depends,r,n.depends,n)),t[0]=n.apply(r,t)),t}function or(n,t){for(var r,u,i=this;void 0===r&&i;)u=i.tmpl&&i.tmpl[n],r=u&&u[t],i=i.parent;return r||f[n][t]}function sr(n,t,r,u,f,e){t=t||g;var o,ot,vt,ht,d,nt,h,ct,w,s,tt,it,at,yt,y,a,rt,wt,ut,p="",l=t.linkCtx||0,k=t.ctx,pt=r||t.tmpl,et="number"==typeof u&&t.tmpl.bnds[u-1];for("tag"===n._is?(o=n,n=o.tagName,u=o.tagCtxs,vt=o.template):(ot=t.getRsc("tags",n)||v("Unknown tag: {{"+n+"}} "),vt=ot.template),void 0!==e?(p+=e,u=e=[{props:{},args:[]}]):et&&(u=et(t.data,t,i)),ct=u.length,h=0;ct>h;h++)s=u[h],(!l||!l.tag||h&&!l.tag._.inline||o._er)&&((it=pt.tmpls&&s.tmpl)&&(it=s.content=pt.tmpls[it-1]),s.index=h,s.tmpl=it,s.render=lt,s.view=t,s.ctx=c(s.ctx,k)),(r=s.props.tmpl)&&(s.tmpl=t.getTmpl(r)),o||(o=new ot._ctr,at=!!o.init,o.parent=nt=k&&k.tag,o.tagCtxs=u,ut=o.dataMap,l&&(o._.inline=!1,l.tag=o,o.linkCtx=l),(o._.bnd=et||l.fn)?o._.arrVws={}:o.dataBoundOnly&&v("{^{"+n+"}} tag must be data-bound")),u=o.tagCtxs,ut=o.dataMap,s.tag=o,ut&&u&&(s.map=u[h].map),o.flow||(tt=s.ctx=s.ctx||{},ht=o.parents=tt.parentTags=k&&c(tt.parentTags,k.parentTags)||{},nt&&(ht[nt.tagName]=nt),ht[o.tagName]=tt.tag=o);if(!(o._er=e)){for(st(o,u[0]),o.rendering={},h=0;ct>h;h++)s=o.tagCtx=u[h],rt=s.props,a=o.cvtArgs(),(yt=rt.dataMap||ut)&&(a.length||rt.dataMap)&&(y=s.map,(!y||y.src!==a[0]||f)&&(y&&y.src&&y.unmap(),y=s.map=yt.map(a[0],rt,void 0,!o._.bnd)),a=[y.tgt]),o.ctx=s.ctx,h||(at&&(wt=o.template,o.init(s,l,o.ctx),at=void 0),l&&(l.attr=o.attr=l.attr||o.attr),d=o.attr,o._.noVws=d&&d!==ft),w=void 0,o.render&&(w=o.render.apply(o,a)),a.length||(a=[t]),void 0===w&&(w=s.render(a[0],!0)||(f?void 0:"")),p=p?p+(w||""):w;o.rendering=void 0}return o.tagCtx=u[0],o.ctx=o.tagCtx.ctx,o._.noVws&&o._.inline&&(p="text"===d?b.html(p):""),et&&t._.onRender?t._.onRender(p,t,o):p}function a(n,t,i,r,u,f,e,o){var h,c,l,s=this,a="array"===t;s.content=o;s.views=a?[]:{};s.parent=i;s.type=t||"top";s.data=r;s.tmpl=u;l=s._={key:0,useKey:a?0:1,id:""+fu++,onRender:e,bnds:{}};s.linked=!!e;i?(h=i.views,c=i._,c.useKey?(h[l.key="_"+c.useKey++]=s,s.index=di,s.getIndex=ri):h.length===(l.key=s.index=f)?h.push(s):h.splice(f,0,s),s.ctx=n||i.ctx):s.ctx=n}function hr(n){var t,u,r,f,o,e,s;for(t in ot)if(o=ot[t],(e=o.compile)&&(u=n[t+"s"]))for(r in u)f=u[r]=e(r,u[r],n,0),f._is=t,f&&(s=i.onStore[t])&&s(r,f,e)}function cr(n,t,u){function l(){var t=this;t._={inline:!0,unlinked:!0};t.tagName=n}var s,e,c,f=new i._tg;if(h(t)?t={depends:t.depends,render:t}:""+t===t&&(t={template:t}),e=t.baseTag){t.flow=!!t.flow;t.baseTag=e=""+e===e?u&&u.tags[e]||k[e]:e;f=r(f,e);for(c in t)f[c]=ti(e[c],t[c])}else f=r(f,t);return void 0!==(s=f.template)&&(f.template=""+s===s?o[s]||o(s):s),f.init!==!1&&((l.prototype=f).constructor=f._ctr=l),u&&(f._parentTmpl=u),f}function lr(n){return this.base.apply(this,n)}function fi(n,i,u,f){function c(i){var r,e;if(""+i===i||i.nodeType>0&&(s=i)){if(!s)if(/^\.\/[^\\:*?"<>]*$/.test(i))(e=o[n=n||i])?i=e:s=document.getElementById(i);else if(t.fn&&!vi.test(i))try{s=t(document).find(i)[0]}catch(h){}s&&(f?i=s.innerHTML:(r=s.getAttribute(gt),r?r!==l?(i=o[r],delete o[r]):t.fn&&(i=t.data(s)[l]):(n=n||(t.fn?l:i),i=fi(n,s.innerHTML,u,f)),i.tmplName=n=n||r,n!==l&&(o[n]=i),s.setAttribute(gt,n),t.fn&&t.data(s,l,i)));s=void 0}else i.fn||(i=void 0);return i}var s,h,e=i=i||"";return 0===f&&(f=void 0,e=c(e)),f=f||(i.markup?i:{}),f.tmplName=n,u&&(f._parentTmpl=u),!e&&i.markup&&(e=c(i.markup))&&e.fn&&(e=e.markup),void 0!==e?(e.fn||i.fn?e.fn&&(h=e):(i=oi(e,f),at(e.replace(gr,"\\$&"),i)),h||(hr(f),h=r(function(){return i.render.apply(i,arguments)},i)),n&&!u&&n!==l&&(gi[n]=h),h):void 0}function ei(n){function t(t,i){this.tgt=n.getTgt(t,i)}return h(n)&&(n={getTgt:n}),n.baseMap&&(n=r(r({},n.baseMap),n)),n.map=function(n,i){return new t(n,i)},n}function oi(n,i){var u,e=y._wm||{},f=r({tmpls:[],links:{},bnds:[],_is:"template",render:lt},i);return f.markup=n,i.htmlTag||(u=iu.exec(n),f.htmlTag=u?u[1].toLowerCase():""),u=e[f.htmlTag],u&&u!==e.div&&(f.markup=t.trim(f.markup)),f}function ar(n,t){function r(e,o,s){var a,h,l,c;if(e&&typeof e===dt&&!e.nodeType&&!e.markup&&!e.getTgt){for(l in e)r(l,e[l],o);return f}return void 0===o&&(o=e,e=void 0),e&&""+e!==e&&(s=o,o=e,e=void 0),c=s?s[u]=s[u]||{}:r,h=t.compile,null===o?e&&delete c[e]:(o=h?h.call(c,e,o,s,0):o,e&&(c[e]=o)),h&&o&&(o._is=n),o&&(a=i.onStore[n])&&a(e,o,h),o}var u=n+"s";f[u]=r}function si(n){s[n]=function(t){return arguments.length?(u[n]=t,s):u[n]}}function lt(n,t,r,u,f,e){var h,p,l,s,a,v,w,b,o=u,c="";if(t===!0?(r=t,t=void 0):typeof t!==dt&&(t=void 0),(l=this.tag)?(a=this,o=o||a.view,s=o.getTmpl(l.template||a.tmpl),arguments.length||(n=o)):s=this,s){if(!o&&n&&"view"===n._is&&(o=n),o&&n===o&&(n=o.data),v=!o,ut=ut||v,o||((t=t||{}).root=n),!ut||y.useViews||s.useViews||o&&o!==g)c=vr(s,n,t,r,o,f,e,l);else{if(o?(w=o.data,b=o.index,o.index=di):(o=g,o.data=n,o.ctx=t),nt(n)&&!r)for(h=0,p=n.length;p>h;h++)o.index=h,o.data=n[h],c+=s.fn(n[h],o,i);else o.data=n,c+=s.fn(n,o,i);o.data=w;o.index=b}v&&(ut=void 0)}return c}function vr(n,t,u,f,o,s,h,l){function ut(n){k=r({},u);k[y]=n}var p,ft,v,tt,it,rt,b,d,et,y,k,w,g="";if(l&&(et=l.tagName,w=l.tagCtx,u=u?c(u,l.ctx):l.ctx,n===o.content?b=n!==o.ctx._wrp?o.ctx._wrp:void 0:n!==w.content?n===l.template?(b=w.tmpl,u._wrp=w.content):b=w.content||o.content:b=o.content,w.props.link===!1&&(u=u||{},u.link=!1),(y=w.props.itemVar)&&("~"!==y.charAt(0)&&e("Use itemVar='~myItem'"),y=y.slice(1))),o&&(h=h||o._.onRender,u=c(u,o.ctx)),s===!0&&(rt=!0,s=0),h&&(u&&u.link===!1||l&&l._.noVws)&&(h=void 0),d=h,h===!0&&(d=void 0,h=o._.onRender),u=n.helpers?c(n.helpers,u):u,k=u,nt(t)&&!f)for(v=rt?o:void 0!==s&&o||new a(u,"array",o,t,n,s,h),o&&o._.useKey&&(v._.bnd=!l||l._.bnd&&l),y&&(v.it=y),y=v.it,p=0,ft=t.length;ft>p;p++)y&&ut(t[p]),tt=new a(k,"item",v,t[p],n,(s||0)+p,h,b),it=n.fn(t[p],tt,i),g+=v._.onRender?v._.onRender(it,tt):it;else y&&ut(t),v=rt?o:new a(k,et||"data",o,t,n,s,h,b),l&&!l.flow&&(v.tag=l),g+=n.fn(t,v,i);return d?d(g,v):g}function yr(n,t,i){var r=void 0!==i?h(i)?i.call(t.data,n,t):i||"":"{Error: "+n.message+"}";return u.onError&&void 0!==(i=u.onError.call(t.data,n,i&&r,t))&&(r=i),t&&!t.linkCtx?b.html(r):r}function v(n){throw new i.Err(n);}function e(n){v("Syntax error\n"+n)}function at(n,t,i,r,f){function g(t){t-=h;t&&a.push(n.substr(h,t).replace(kt,"\\n"))}function v(t,i){t&&(t+="}}",e((i?"{{"+i+"}} block has {{/"+t+" without {{"+t:"Unmatched or missing {{/"+t)+", in template:\n"+n))}function nt(u,s,c,y,w,d,nt,tt,it,rt,ut,et){(nt&&s||it&&!c||tt&&":"===tt.slice(-1)||rt)&&e(u);d&&(w=":",y=ft);it=it||i&&!f;var ot=(s||i)&&[[]],ht="",ct="",lt="",at="",vt="",yt="",pt="",wt="",st=!it&&!w;c=c||(tt=tt||"#data",w);g(et);h=et+u.length;nt?k&&a.push(["*","\n"+tt.replace(/^:/,"ret+= ").replace(wi,"$1")+";\n"]):c?("else"===c&&(tu.test(tt)&&e('for "{{else if expr}}" use "{{else expr}}"'),ot=o[7]&&[[]],o[8]=n.substring(o[8],et),o=l.pop(),a=o[2],st=!0),tt&&li(tt.replace(kt," "),ot,t).replace(nu,function(n,t,i,r,u,f,e,o){return r="'"+u+"':",e?(ct+=f+",",at+="'"+o+"',"):i?(lt+=r+f+",",yt+=r+"'"+o+"',"):t?pt+=f:("trigger"===u&&(wt+=f),ht+=r+f+",",vt+=r+"'"+o+"',",b=b||bi.test(u)),""}).slice(0,-1),ot&&ot[0]&&ot.pop(),p=[c,y||!!r||b||"",st&&[],hi(at||(":"===c?"'#data',":""),vt,yt),hi(ct||(":"===c?"data,":""),ht,lt),pt,wt,ot||0],a.push(p),st&&(l.push(o),o=p,o[8]=h)):ut&&(v(ut!==o[0]&&"else"!==o[0]&&ut,o[0]),o[8]=n.substring(o[8],et),o=l.pop());v(!o&&ut);a=o[2]}var y,p,b,k=u.allowCode||t&&t.allowCode||s.allowCode===!0,c=[],h=0,l=[],a=c,o=[,,c];return k&&(t.allowCode=k),i&&(void 0!==r&&(n=n.slice(0,-r.length-2)+d),n=tt+n+d),v(l[0]&&l[0][2].pop()[0]),n.replace(w,nt),g(n.length),(h=c[c.length-1])&&v(""+h!==h&&+h[8]===h[8]&&h[0]),i?(y=yt(c,n,i),vt(y,[c[0][7]])):y=yt(c,t),y}function vt(n,t){var r,i,u=0,f=t.length;for(n.deps=[];f>u;u++){i=t[u];for(r in i)"_jsvto"!==r&&i[r].length&&(n.deps=n.deps.concat(i[r]))}n.paths=i}function hi(n,t,i){return[n.slice(0,-1),t.slice(0,-1),i.slice(0,-1)]}function ci(n,t){return"\n\t"+(t?t+":{":"")+"args:["+n[0]+"]"+(n[1]||!t?",\n\tprops:{"+n[1]+"}":"")+(n[2]?",\n\tctx:{"+n[2]+"}":"")}function li(n,t,i){function k(k,d,g,nt,tt,rt,ut,ft,et,ot,st,ht,ct,lt,vt,yt,pt,wt,bt,kt){function ri(n,i,s,h,c,l,v,y){var p="."===s;if(s&&(tt=tt.slice(i.length),/^\.?constructor$/.test(y||tt)&&e(n),p||(n=(h?'view.hlp("'+h+'")':c?"view":"data")+(y?(l?"."+l:h?"":c?"":"."+s)+(v||""):(y=h?"":c?l||"":s,"")),n+=y?"."+y:"",n=i+("view.data"===n.slice(0,9)?n.slice(5):n)),u)){if(gt="linkTo"===o?a=t._jsvto=t._jsvto||[]:f.bd,dt=p&&gt[gt.length-1]){if(dt._jsv){for(;dt.sb;)dt=dt.sb;dt.bnd&&(tt="^"+tt.slice(1));dt.sb=tt;dt.bnd=dt.bnd||"^"===tt.charAt(0)}}else gt.push(tt);b[r]=bt+(p?1:0)}return n}nt=u&&nt;nt&&!ft&&(tt=nt+tt);rt=rt||"";g=g||d||ht;tt=tt||et;ot=ot||pt||"";var ii,ti,gt,dt,ni;if(!ut||h||s){if(u&&yt&&!h&&!s&&(!o||y||a)&&(ii=b[r-1],kt.length-1>bt-(ii||0))){if(ii=kt.slice(ii,bt+k.length),ti!==!0)if(gt=a||c[r-1].bd,dt=gt[gt.length-1],dt&&dt.prm){for(;dt.sb&&dt.sb.prm;)dt=dt.sb;ni=dt.sb={path:dt.sb,bnd:dt.bnd}}else gt.push(ni={path:gt.pop()});yt=it+":"+ii+" onerror=''"+p;ti=w[yt];ti||(w[yt]=!0,w[yt]=ti=at(yt,i,!0));ti!==!0&&ni&&(ni._jsv=ti,ni.prm=f.bd,ni.bnd=ni.bnd||ni.path&&ni.path.indexOf("^")>=0)}return h?(h=!ct,h?k:ht+'"'):s?(s=!lt,s?k:ht+'"'):(g?(b[r]=bt++,f=c[++r]={bd:[]},g):"")+(wt?r?"":(l=kt.slice(l,bt),(o?(o=y=a=!1,"\b"):"\b,")+l+(l=bt+k.length,u&&t.push(f.bd=[]),"\b")):ft?(r&&e(n),u&&t.pop(),o=tt,y=nt,l=bt+k.length,nt&&(u=f.bd=t[o]=[]),tt+":"):tt?tt.split("^").join(".").replace(kr,ri)+(ot?(f=c[++r]={bd:[]},v[r]=!0,ot):rt):rt?rt:vt?(v[r]=!1,f=c[--r],vt+(ot?(f=c[++r],v[r]=!0,ot):"")):st?(v[r]||e(n),","):d?"":(h=ct,s=lt,'"'))}e(n)}var o,a,y,s,h,u=t&&t[0],f={bd:u},c={0:f},l=0,w=i?i.links:u&&(u.links=u.links||{}),r=0,v={},b={},d=(n+(i?" ":"")).replace(dr,k);return!r&&d||e(n)}function yt(n,t,i){var nt,f,o,a,rt,wt,bt,ii,dt,ht,tt,s,w,ut,et,b,ct,d,v,g,ot,gt,it,ni,ti,lt,l,p,at,pt,h=0,c=y.useViews||t.useViews||t.tags||t.templates||t.helpers||t.converters,r="",st={},ri=n.length;for(""+t===t?(d=i?'data-link="'+t.replace(kt," ").slice(1,-1)+'"':t,t=0):(d=t.tmplName||"unnamed",t.allowCode&&(st.allowCode=!0),t.debug&&(st.debug=!0),tt=t.bnds,ct=t.tmpls),nt=0;ri>nt;nt++)if(f=n[nt],""+f===f)r+='\n+"'+f+'"';else if(o=f[0],"*"===o)r+=";\n"+f[1]+"\nret=ret";else{if(a=f[1],ot=!i&&f[2],rt=ci(f[3],"params")+"},"+ci(w=f[4]),p=f[5],pt=f[6],gt=f[8]&&f[8].replace(wi,"$1"),(ti="else"===o)?s&&s.push(f[7]):(h=0,tt&&(s=f[7])&&(s=[s],h=tt.push(1))),c=c||w[1]||w[2]||s||/view.(?!index)/.test(w[0]),(lt=":"===o)?(a&&(o=a===ft?">":a+o),pt=f[6]||u.trigger):(ot&&(v=oi(gt,st),v.tmplName=d+"/"+o,v.useViews=v.useViews||c,yt(ot,v),c=v.useViews,ct.push(v)),ti||(g=o,c=c||o&&(!k[o]||!k[o].flow),ni=r,r=""),it=n[nt+1],it=it&&"else"===it[0]),at=p?";\ntry{\nret+=":"\n+",ut="",et="",lt&&(s||pt||a&&a!==ft)){if(l="return {"+rt+"};",b='c("'+a+'",view,',l=new Function("data,view,j,u"," // "+d+" "+h+" "+o+"\n"+l),l._er=p,ut=b+h+",",et=")",l._tag=o,i)return l;vt(l,s);ht=!0}if(r+=lt?(i?(p?"\ntry{\n":"")+"return ":at)+(ht?(ht=void 0,c=dt=!0,b+(s?(tt[h-1]=l,h):"{"+rt+"}")+")"):">"===o?(bt=!0,"h("+w[0]+")"):(ii=!0,"((v="+w[0]+')!=null?v:"")')):(wt=!0,"\n{view:view,tmpl:"+(ot?ct.length:"0")+","+rt+"},"),g&&!it){if(r="["+r.slice(0,-1)+"]",b='t("'+g+'",view,this,',i||s){if(r=new Function("data,view,j,u"," // "+d+" "+h+" "+g+"\nreturn "+r+";"),r._er=p,r._tag=g,s&&vt(tt[h-1]=r,s),i)return r;ut=b+h+",undefined,";et=")"}r=ni+at+b+(h||r)+")";s=0;g=0}p&&(c=!0,r+=";\n}catch(e){ret"+(i?"urn ":"+=")+ut+"j._err(e,view,"+p+")"+et+";}\n"+(i?"":"ret=ret"))}r="// "+d+"\nvar v"+(wt?",t=j._tag":"")+(dt?",c=j._cnvt":"")+(bt?",h=j._html":"")+(i?";\n":',ret=""\n')+(st.debug?"debugger;":"")+r+(i?"\n":";\nreturn ret;");u.debugMode!==!1&&(r="try {\n"+r+"\n}catch(e){\nreturn j._err(e, view);\n}");try{r=new Function("data,view,j,u",r)}catch(ui){e("Compiled template code:\n\n"+r+'\n: "'+ui.message+'"')}return t&&(t.fn=r,t.useViews=!!c),r}function c(n,t){return n&&n!==t?t?r(r({},t),n):n:t&&r({},t)}function pr(n){return ki[n]||(ki[n]="&#"+n.charCodeAt(0)+";")}function wr(n){var i,t,r=[];if(typeof n===dt)for(i in n)t=n[i],t&&t.toJSON&&!t.toJSON()||h(t)||r.push({key:i,prop:t});return r}function ai(n,i,r){var u=this.jquery&&(this[0]||v('Unknown template: "'+this.selector+'"')),f=u.getAttribute(gt);return lt.call(f?t.data(u)[l]:o(u),n,i,r)}function pt(n){return void 0!=n?ru.test(n)&&(""+n).replace(uu,pr)||n:""}var br=t===!1;t=t&&t.fn?t:n.jQuery;var wt,w,vi,g,f,h,nt,o,b,bt,k,i,u,y,s,tt,it,p,d,rt,yi,ut,pi="v0.9.75",kr=/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,dr=/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(!*?[#~]?[\w$.^]+)?\s*((\+\+|--)|\+|-|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=\s*[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,kt=/[ \t]*(\r\n|\n|\r)/g,wi=/\\(['"])/g,gr=/['"\\]/g,nu=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$_\.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,tu=/^if\s/,iu=/<(\w+)[>\s]/,ru=/[\x00`><\"'&]/,bi=/^on[A-Z]|^convert(Back)?$/,uu=/[\x00`><"'&]/g,fu=0,ki={"&":"&amp;","<":"&lt;",">":"&gt;","\x00":"&#0;","'":"&#39;",'"':"&#34;","`":"&#96;"},ft="html",dt="object",gt="data-jsv-tmpl",l="jsvTmpl",di="For #index in nested block use #getIndex().",gi={},et=n.jsrender,eu=et&&t&&!t.render,ot={template:{compile:fi},tag:{compile:cr},helper:{},converter:{}};if(f={jsviews:pi,sub:{View:a,Err:ct,tmplFn:at,parse:li,extend:r,extendCtx:c,syntaxErr:e,onStore:{},addSetting:si,settings:{allowCode:!1},advSet:ht,_ths:st,_tg:function(){},_cnvt:fr,_tag:sr,_er:v,_err:yr,_html:pt},settings:{delimiters:tr,advanced:function(n){return n?(r(y,n),i.advSet(),s):y}},map:ei},(ct.prototype=new Error).constructor=ct,ri.depends=function(){return[this.get("item"),"index"]},ui.depends="index",a.prototype={get:ir,getIndex:ui,getRsc:or,getTmpl:ur,hlp:rr,_is:"view"},!(et||t&&t.render)){for(wt in ot)ar(wt,ot[wt]);o=f.templates;b=f.converters;bt=f.helpers;k=f.tags;i=f.sub;s=f.settings;i._tg.prototype={baseApply:lr,cvtArgs:er};g=i.topView=new a;t?(t.fn.render=ai,t.observable&&(r(i,t.views.sub),f.map=t.views.map)):(t={},br&&(n.jsrender=t),t.renderFile=t.__express=t.compile=function(){throw"Node.js: use npm jsrender, or jsrender-node.js";},t.isFunction=function(n){return"function"==typeof n},t.isArray=Array.isArray||function(n){return"[object Array]"==={}.toString.call(n)},i._jq=function(n){n!==t&&(r(n,t),t=n,t.fn.render=ai,delete t.jsrender)},t.jsrender=pi);u=i.settings;u.allowCode=!1;h=t.isFunction;nt=t.isArray;t.render=gi;t.views=f;t.templates=o=f.templates;for(yi in u)si(yi);(s.debugMode=function(n){return void 0===n?u.debugMode:(u.debugMode=n,u.onError=n+""===n?new Function("","return '"+n+"';"):h(n)?n:void 0,s)})(!1);y=u.advanced={useViews:!1,_jsv:!1};k({"if":{render:function(n){var t=this,i=t.tagCtx;return t.rendering.done||!n&&(arguments.length||!i.index)?"":(t.rendering.done=!0,t.selected=i.index,i.render(i.view,!0))},flow:!0},"for":{render:function(n){var t,u=!arguments.length,i=this,r=i.tagCtx,f="",e=0;return i.rendering.done||(t=u?r.view.data:n,void 0!==t&&(f+=r.render(t,u),e+=nt(t)?t.length:1),(i.rendering.done=e)&&(i.selected=r.index)),f},flow:!0},props:{baseTag:"for",dataMap:ei(wr),flow:!0},include:{flow:!0},"*":{render:ii,flow:!0},":*":{render:ii,flow:!0},dbg:bt.dbg=b.dbg=nr});b({html:pt,attr:pt,url:function(n){return void 0!=n?encodeURI(""+n):null===n?n:""}});s.delimiters("{{","}}","^")}return eu&&et.views.sub._jq(t),t||et},window)