anchor.diff:         		    	else if (! facet){
          		    		// user hits enter before autosuggest pops up	
          		    		// ie, facet info is unknown
  -       		    		//alert('enter-2');
          		    		
  -       		    		if ( $('ul#facetFilter li.ftag').size() == 0 ){
  -       		    			// if there is no existing facet filter, reload with q
  -       		    			document.location.href = baseUrl + '/search?q=' + input;
  -       		    		}
  +       		    		if (input.match(/HP\\%3A\d+/)){
  +       		    			// work out the mapped mp_id and fire off the query
  +	       		    		_convertHp2MpAndSearch(input);
  +       		    		} 
          		    		else {
  -       		    			// facet will be figured out by code
  -       		    			var fqStr = $.fn.getCurrentFq(facet);
  -           		    		document.location.href = baseUrl + '/search?q=' + input + '#fq=' + fqStr;
  +	       		    		if ( $('ul#facetFilter li.ftag').size() == 0 ){
  +	       		    			// if there is no existing facet filter, reload with q
  +	       		    			document.location.href = baseUrl + '/search?q=' + input;
  +	       		    		}
  +	       		    		else {
  +	       		    			// facet will be figured out by code
  +	       		    			var fqStr = $.fn.getCurrentFq(facet);
  +	           		    		document.location.href = baseUrl + '/search?q=' + input + '#fq=' + fqStr;
  +	       		    		}
          		    		}
          		    	}
          		    	else {	
  -       		    		//alert('enter-3');
  -       		    		var fqStr = $.fn.getCurrentFq(facet);
  -       		    		document.location.href = baseUrl + '/search?q=' + input + '#fq=' + fqStr + '&facet=' + facet;
  +       		    		if (input.match(/HP\\%3A\d+/)){
  +	       		    		// work out the mapped mp_id and fire off the query
  +	       		    		_convertHp2MpAndSearch(input);
  +       		    		} 
  +       		    		else {
  +       		    			var fqStr = $.fn.getCurrentFq(facet);
  +       		    			document.location.href = baseUrl + '/search?q=' + input + '#fq=' + fqStr + '&facet=' + facet;
  +       		    		}
          		    	}
          		    }
          		});
  +       		
  +       		function _convertHp2MpAndSearch(input){
  +	    		
  +	    		$.ajax({
  +	       			url: "${solrUrl}/autosuggest/select?wt=json&fl=hpmp_id&rows=1&q=hp_id:\""+input+"\"",				       			
  +	       			dataType: "jsonp",
  +	       			jsonp: 'json.wrf',
  +	       			type: 'post',
  +	    	    	async: false,
  +	       			success: function( json ) {
  +		    				input = json.response.docs[0].hpmp_id;
  +		    				document.location.href = baseUrl + '/search?q=' + input + '#fq=top_level_mp_term:*&facet=mp';
  +	       			}
  +   				});
  +       		}
          		
          		$('span#rmFilters').click(function(){
          			
  
positive.code:        		    
         		    	//alert('enter: '+ MPI2.searchAndFacetConfig.matchedFacet)
         		    	var input = $('input#s').val().trim();
         		    	//alert(input)
         		    	input = /^\*\**?\*??$/.test(input) ? '' : input;  // lazy matching
         		    	
         		    	var re = new RegExp("^'(.*)'$");
  
negative.code: 	       				////console.log(this.value + ' vs ' + ui.item.label);
  	       				//var oriText = $(ui.item.label).text();
  	       				
  	       				var facet = $(ui.item.label).attr('class') == 'hp' ? 'mp' : $(ui.item.label).attr('class');
  	       				
  	       				// handed over to hash change to fetch for results	
  	       				var q;
  	       				var matched = this.value.match(/.+  (MP:\d+) - .+/);
  	       				if ( matched ){
  	       					q = matched[1];
  	       				}
  	       				else {
  	       					q = this.value;
  	       				}	
  	       				q = encodeURIComponent(q);
  	       				
  	       				var fq = $.fn.getCurrentFq(facet);
  
  	       				document.location.href = baseUrl + '/search?q="' + q + '"#fq=' + fq + '&facet=' + facet; 	
  	       				
  	       				// prevents escaped html tag displayed in input box
  