function filterResultsGrid(){var n,t;$j(".resultGroup").addClass("filtered");$j("#masterFilterList").attr("class")===undefined?($j(".sectionGroupItem").removeClass("filtered"),$j(".resultGroup").removeClass("filtered")):(n="",$j("#masterFilterList").attr("class")!==undefined&&(n=$j("#masterFilterList").attr("class").split(/\s+/)),$j(".sectionGroupItem").each(function(){var t=!0;for(i=0;i<n.length;i++)($j(this).attr("data-filterValues")===undefined||$j(this).attr("data-filterValues").indexOf(n[i])<0)&&(t=!1);t?($j(this).removeClass("filtered"),$j(this).closest(".resultGroup").removeClass("filtered")):$j(this).addClass("filtered")}));t=$j(".resultGroup").not(".filtered").length;t>0?$j(".noSearchResultsMessage").addClass("hidden"):$j(".noSearchResultsMessage").removeClass("hidden")}function sortResultGroups(n,t,i){var r;r=t?i?$j("#searchResultsGrid .resultGroup").sort(function(t,i){return $j(i).data(n)-$j(t).data(n)}):$j("#searchResultsGrid .resultGroup").sort(function(t,i){return $j(t).data(n)>$j(i).data(n)?-1:1}):i?$j("#searchResultsGrid .resultGroup").sort(function(t,i){return $j(t).data(n)-$j(i).data(n)}):$j("#searchResultsGrid .resultGroup").sort(function(t,i){return $j(i).data(n)>$j(t).data(n)?-1:1});r.appendTo("#searchResultsGrid")}function updateDropdowns(n){var t=n.substr(0,n.indexOf("-"));$j(".filterDropdowns").find(".btn").each(function(){$j(this).data("filtertype")===t&&($j(this).html($j(this).next().find("[data-filter='"+n+"']").text()),$j(this).val($j(this).next().find("[data-filter='"+n+"']").data("filter")))})}function clearDropdown(n){var t=n.substr(0,n.indexOf("-"));$j(".filterDropdowns").find(".btn").each(function(){$j(this).data("filtertype")===t&&($j(this).html($j(this).attr("data-defaultLabel")),$j(this).val(""))})}var $j=jQuery.noConflict();$j(document).ready(function(){$j(".filterDropdowns").find("a").click(function(){$j("#masterFilterList").removeClass($j(this).parents(".dropdown").find(".btn").val());$j("#masterFilterList").addClass($j(this).attr("data-filter"));filterResultsGrid();$j(this).parents(".dropdown").find(".btn").html($j(this).text());$j(this).parents(".dropdown").find(".btn").val($j(this).data("filter"))});$j(".sortDropdowns").find("a").click(function(){sortResultGroups($j(this).data("sortname"),$j(this).data("sortreverse"),$j(this).data("sortnumeric"));$j(this).parents(".dropdown").find(".btn").html($j(this).text())});$j("#clearFilters").click(function(){$j(".filterDropdowns").find("a").each(function(){$j("#masterFilterList").removeClass($j(this).parents(".dropdown").find(".btn").val());$j(this).parents(".dropdown").find(".btn").html($j(this).parents(".dropdown").find(".btn").attr("data-defaultLabel"));$j(this).parents(".dropdown").find(".btn").val("")});filterResultsGrid()});$j("#filterButton").click(function(){$j(".filtersHideShow").is(":visible")?($j(".sortsHideShow").is(":visible")?$j(".filterTitle").slideDown():$j(".filterTitle").slideUp(),$j(".sortsHideShow").removeClass("shift"),$j(".filtersHideShow").slideUp()):($j(".filterTitle").slideDown(),$j(".sortsHideShow").addClass("shift"),$j(".filtersHideShow").slideDown())});$j("#sortButton").click(function(){$j(".sortsHideShow").is(":visible")?($j(".filtersHideShow").is(":visible")?$j(".filterTitle").slideDown():$j(".filterTitle").slideUp(),$j(".sortsHideShow").slideUp()):($j(".filterTitle").slideDown(),$j(".sortsHideShow").slideDown())});$j("#openAllButton").click(function(){$j(".groupHead").each(function(){$j(this).next().slideDown();$j(this).find("span").removeClass("fa-chevron-down");$j(this).find("span").addClass("fa-chevron-up");$j(this).find(".navButtonIcon").addClass("open")})});$j("#closeAllButton").click(function(){$j(".groupHead").each(function(){$j(this).next().slideUp();$j(this).find("span").removeClass("fa-chevron-up");$j(this).find("span").addClass("fa-chevron-down");$j(this).find(".navButtonIcon").removeClass("open")})})})