window.addEventListener("load",(function(){$(".liz-project-img").parent().mouseenter((function(){$(this).find(".liz-project-desc").slideDown()})).mouseleave((function(){$(this).find(".liz-project-desc").hide()})).click((function(){var e=$(this);return window.location=e.parent().find("a.liz-project-view").attr("href"),!1})),function(){if(0!==$("#content.container li .liz-project-title").length){$("#toggle-search, #search-project").tooltip(),$("#toggle-search").click((function(){"#"===$(this).text()?($(this).text("T"),$(".project-keyword").addClass("hide"),$("#search-project-keywords-selected").text("")):($(this).text("#"),$(".project-keyword").removeClass("hide")),$("#content.container .liz-repository-project-item").show(),$("#content.container .liz-repository-title").show(),$("#search-project").keyup()}));var e=function(e,t,r){return r.indexOf(e)===t},t=function(){var t=[];return $(".liz-repository-project-item :visible .keywordList").each((function(){if(""!==$(this).text()){var e=$(this).text().toUpperCase().split(", ");if(s)for(var r=0;r<e.length;r++)t=t.concat(e[r].split("/"));else t=t.concat(e)}})),t.filter(e)},r=function(){var e=o();0===e.length?($("#content.container .liz-repository-project-item").show(),$("#content.container .liz-repository-title").show()):($("#content.container .liz-repository-project-item").hide(),$("#content.container .liz-repository-title").hide(),$(".keywordList").each((function(){var t=!1,r=$(this).text().toUpperCase().split(", ");if(s){for(var o=e.join("/"),i=0;i<r.length;i++)if(-1!==r[i].indexOf(o)){t=!0;break}}else t=e.every((function(e){return-1!==r.indexOf(e)}));t&&($(this).closest(".liz-repository-project-item").show(),$(this).closest(".liz-repository-project-list").prev(".liz-repository-title").show())})))},o=function(){var e=[];return $("#search-project-keywords-selected .keyword-label").each((function(){e.push($(this).text().toUpperCase())})),e},i=function(){var e;if(0===(n=o()).length)$("#search-project-result .project-keyword").removeClass("hide");else{$("#search-project-result .project-keyword").addClass("hide");for(var r=t(),i=0;i<r.length;i++)-1===n.indexOf(r[i])&&$("#search-project-result .project-keyword.hide").filter((function(){return $(this).text().toUpperCase()===r[i]})).removeClass("hide");if(s){$("#search-project-result .project-keyword").addClass("hide");var n,c=(e=[],$(".liz-repository-project-item :visible .keywordList").each((function(){if(""!==$(this).text())for(var t=$(this).text().toUpperCase().split(", "),r=0;r<t.length;r++)for(var o=t[r].split("/"),i=0;i<o.length-1;i++)e.push([o[i],o[i+1]])})),e),l=(n=o())[n.length-1],a=$("#search-project-result .project-keyword.hide");for(i=0;i<a.length;i++)for(var p=a.eq(i),h=0;h<c.length;h++)c[h][0]===l&&c[h][1]===p.text().toUpperCase()&&p.removeClass("hide")}}$("#search-project-result .project-keyword").each((function(){$(this).text($(this).text())}))};$("#search-project").keyup((function(){$("html").animate({scrollTop:$("#anchor-top-projects").offset().top-$("#header").height()},500);var e=this.value.trim().toUpperCase();"#"===$("#toggle-search").text()?(i(),""===e&&0===o().length?$("#search-project-result .project-keyword").addClass("hide"):$("#search-project-result .project-keyword:visible").each((function(){var t=$(this).text().toUpperCase();if(-1!==t.indexOf(e)){var r=new RegExp(e,"g"),o=t.replace(r,'<span class="highlight">'+e+"</span>");$(this).html(o.toLowerCase())}else $(this).addClass("hide")}))):""===e?($("#content.container .liz-repository-project-item").show(),$("#content.container .liz-repository-title").show()):($("#content.container .liz-repository-project-item").hide(),$("#content.container .liz-repository-title").hide(),$("#content.container li .liz-project-title").filter((function(){return-1!=$(this).text().toUpperCase().indexOf(e)})).closest(".liz-repository-project-item").show(),$("#content.container li .liz-project-title").filter((function(){return-1!=$(this).text().toUpperCase().indexOf(e)})).closest(".liz-repository-project-list").prev(".liz-repository-title").show())}));var s=!1,n=t();if(n.length>0){for(var c=0;c<n.length;c++)if(-1!==n[c].indexOf("/")){s=!0,n=t();break}var l="";for(c=0;c<n.length;c++)l+='<span class="project-keyword hide">'+n[c].toLowerCase()+"</span>";$("#search-project-result").html(l),$(".project-keyword").click((function(){$("#search-project-keywords-selected").append('<span class="project-keyword"><span class="keyword-label">'+$(this).text()+'</span><span class="remove-keyword">x</span></span>'),$("#search-project-keywords-selected .remove-keyword").click((function(){$(this).parent().remove(),r(),0===$("#search-project-keywords-selected .remove-keyword").length?$("#search-project-result .project-keyword").addClass("hide"):i()})),r(),$("#search-project").val(""),i()}))}else $("#toggle-search").hide().parent().removeClass("input-prepend")}else $("#search").hide()}()}));
//# sourceMappingURL=view.js.map