How to modify the Search box input value?
The only line you'd need to set the value of the input is

$form['search_block_form']['#default_value'] = $form_default;


The last line is a basic JS placeholder implementation, but in this day and age the HTML5 placeholder attribute would be preferable:

function MYTHEME_form_search_block_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  $form['search_block_form']['#attributes']['placeholder'] = t('Placeholder text');
}