
$.fn.searchBox = function () {
  return this.each(function (){
    
		var textBox = $(this);
		var searchText = Drupal.settings.ind.search_text;
		
		textBox.blur(function () {
			if (textBox.val() == '') {
				textBox.val(searchText);
			}
			textBox.css('color', '#B0ACAC');
		});
		
		textBox.focus(function () {
			if (textBox.val() == searchText) {
				textBox.val('');
			}
			textBox.select();
			textBox.css('color', '#000000');
		});
    
  });
}

if (Drupal.jsEnabled) {
  $(document).ready(function() {
		$('div#search input[type="text"]').searchBox();
  });
}