update code that builds the site navigation elements (see message)
Restructure the single var pattern so that all the variables local to the parent function are at the top. Store the Underscore functionality that removes the duplicates in the "resourceTypes" array in a new variable called "linkType." Use "jQuery.forEach" to build out the links and store that process in a variable called "createTypeLink." Use "jQuery.Deferred()" to wait for the links to be fully initialized before the can be clicked on because not doing this returns an error. Add lots of comments & whitespace.