><%= t('search.at_least') %>
<%= hidden_field_tag :focus, params[:focus] %>
<%= text_field_tag :search_query, params[:search_query].present? ? params[:search_query] : nil ,:autocomplete => :off, :id => :global_search_input %>
<%= javascript_tag do %> $(function() { $.preloadImages ("assets/mini-loading.gif"); $('#search_form').submit(function() { query = $('#global_search_input').val(); if((query=="")||(query.length < 2)||(query=="<%= t('search.write') %>")){ $('#too_short_error').show(); $('#global_search_input').removeClass("searching"); $('#global_search_input').blur(); $('#global_search_input').focus(); return false; }else{ $('#global_search_input').addClass("searching"); $('#global_search_input').blur(); } return true; }); $("#global_search_input").Watermark("<%= I18n.t('search.write') %>"); }); <% end %>