Instead of doing:

```javascript
    }).on('keydown', function(e) {
      if ( e.which === 13 && $('#WikiaSearch [name=search]').is(':focus') ) {
```

It's better to do:

```javascript
+    }).on('keydown', '[name="search"]', function(e) {
+      if ( e.which === 13 && $(this).is(':focus') ) {
```