﻿        var showSearch = function(term) {
            			
			if (term == '' || term == $('input.dropdown').attr('placeholder')) { 
				$('.json').hide();
				return; 
			}
						
            $.getJSON('/solutions/searchjson/' + term, function(data) {

                var msg = '', numResults = 0;
                $.each(data.ServicesFound, function(i, service) {
                    msg += '<p><a href="' + service.Url + '"><strong>' + service.Name + '</strong></a><br />';
                    msg += service.Description + '</p>';
                    numResults++;
                });
				
				if(numResults > 0) {
					$('.json').html(msg);
					$('.json').show();
                } else {
					$('.json').hide();
                }
            });
        }