// Clear text input values
var swap_text_boxes = []; 
function init_swap_text_boxes(){
  //Store the default value for each box
  $('input[type=text][value],input[type=password][value]').each(function() {
    swap_text_boxes[$(this).attr('id')] = $(this).attr('value');
  });
  //Add focus and blur events to set or clear the value
  $('input[type=text][value],input[type=password][value]').bind('focus', function() {
    if($(this).val() == swap_text_boxes[$(this).attr('id')]) {
        if (swap_text_boxes[$(this).attr('id')] == 'Enter keywords')
        {
            $(this).val('');
        }else{
            //if search word present then don't delete
        }
    }
  });
  $('input[type=text][value],input[type=password][value]').bind('blur', function() {
    if($(this).val() == '') {
      //$(this).val(swap_text_boxes[$(this).attr('id')]);
      $(this).val('Enter keywords');
      swap_text_boxes[$(this).attr('id')] = 'Enter keywords';
    }
  });
} 
$(document).ready(function(){ init_swap_text_boxes(); });