define([ "jquery" ], function($) {

  "use strict";

  var iconColors = [],
      $intro = $(".js-styleguide-intro--icons"),
      $colorSelect = $intro.find(".js-select"),
      $icons = $(".js-icon"),
      $iconCards = $icons.closest(".js-card"),
      $searchBox = $("#js-icon-filter"),
      iconInQueryString = window.location.search.match(/q=([^&]*)/),

  showMatchingIcons = function(query) {
    $iconCards.addClass("is-hidden").each(function() {
      var element = $(this);
      element.data("icon").match(query) && element.removeClass("is-hidden");
    });

    if ($iconCards.filter(".is-hidden").length) {
      $intro.addClass("is-closed");
    } else {
      $intro.removeClass("is-closed");
    }
  };

  if ($colorSelect.length) {
    $.each($colorSelect.get(0).options, function(_, option) {
      iconColors.push("icon--" + option.value);
    });
  }

  if (iconInQueryString) {
    $searchBox.val(iconInQueryString[1]);
    showMatchingIcons(iconInQueryString[1]);
  }

  $colorSelect.on("change", function() {
    $icons.removeClass(iconColors.join(" "));
    $icons.addClass("icon--" + this.value);
    if (this.value == "white") {
      $icons.closest(".js-card").addClass("is-white");
    } else {
      $icons.closest(".js-card").removeClass("is-white");
    }
  });

  $searchBox.on("keyup", function() {
    showMatchingIcons(this.value);
  });

  if ($searchBox.val()) {
    showMatchingIcons($searchBox.val());
  }

});

@@ -354,16 +354,20 @@
 %5D*)/),%0A%0A
+    
   showMa
@@ -394,24 +394,28 @@
 on(query) %7B%0A
+    
     $iconCar
@@ -463,16 +463,20 @@
 %7B%0A      
+   
+ 
 var elem
@@ -490,16 +490,20 @@
 (this);%0A
+    
       el
@@ -567,24 +567,28 @@
 s-hidden%22);%0A
+    
     %7D);%0A%0A   
@@ -584,24 +584,28 @@
    %7D);%0A%0A    
+  
+  
 if ($iconCar
@@ -634,24 +634,28 @@
 ).length) %7B%0A
+    
       $intro
@@ -674,24 +674,28 @@
 s-closed%22);%0A
+    
     %7D else %7B
@@ -697,24 +697,28 @@
 lse %7B%0A      
+ 
+   
 $intro.remov
@@ -742,18 +742,26 @@
 %22);%0A    
-%7D%0A
+    %7D%0A    
   %7D;%0A%0A  

normalise indentation