Made ajax search function and put into application js in order to use only one document ready function and have all event listeners in one place