Modify custom search box added in page.tpl.php My Drupal theme (Nexus) doesn't have a search bar in the header.
So added a custom header in page.tpl.php using the following code.

 &lt;?php if ($search_box):?&gt;&lt;div id="searchbar_right" style="float:right"&gt;&lt;?php print $search_box ; ?&gt;&lt;/div&gt;&lt;?php endif; ?&gt;


I wish to modify the search-box a bit, so I added the following lines
to nexus_form_alter function in template.php.

if ($form_id == 'search_block_form') {
    print $form_id;
    //$form['search_block_form']['#title'] = t('Search'); // Change the text on the label element
    $form['search_block_form']['#title_display'] = 'invisible'; // Toggle label visibility
    $form['search_block_form']['#size'] = 20;  // define size of the textfield
    $form['search_block_form']['#default_value'] = t('Search Site'); // Set a default value for the textfield
    $form['actions']['submit']['#value'] = t('GO!'); // Change the text on the submit button
    $form['actions']['submit']['#attributes']['alt'] = "Search Button"; //add alt tag
    unset($form['actions']['submit']['#value']); // Remove the value attribute from the input tag, since it is not valid when input type = image

    //$form['actions']['submit'] = array('#type' =&gt; 'image_button', '#src' =&gt; base_path() . path_to_theme() . '/images/icon-search.png');

// Add extra attributes to the text box
    $form['search_block_form']['#attributes']['onblur'] = "if (this.value == '') {this.value = 'Search Site';}";
    $form['search_block_form']['#attributes']['onfocus'] = "if (this.value == 'Search Site') {this.value = '';}";
  }


But the above piece of code doesn't have any effect on the search box that appeared on the top. I suppose that since I have manually printed the search
box at the header, hook_form_alter may not be of any use to me.

Can anybody suggest how to change my search-box characteristics.
I have finally resolved this one using a jquery which I have applied 
to the element using JS Injector Module.

jQuery(document).ready(function($) { 
  $('#edit-keys').attr('size', '20'); 
  $('#edit-keys--2').attr('size', '20'); 
});