added itemSelected events on advancedSearchCtrl
updated typeahead to call on-selected events, added hidden fields to store ids
simplified reference to left and right ids in d3 code