if (Drupal.jsEnabled) {
  $(document).ready(function(){
    // Search field on top of all pages
    //$('#edit-search-block-form-keys').val('Search');

    $('#edit-search-block-form-keys').focus(function(){
      if ($(this).val() == 'Search') {
        $(this).val('');
      }
    })

    $('#edit-search-block-form-keys').blur(function(){
      if ($(this).val() == '') {
        $(this).val('Search');
      }
    })
    
    // Add a class to all checkboxes on the shopping cart page so we can
    // hide them if he user has javascript.
    $('#cart-form-products .form-checkbox').addClass('hidden');
    
    // Toggle checkboxes.
    $('#cart-form-products .checkbox').toggle(
      function(){
        $(this).addClass('checkbox-checked');
        $(this).parent().find('.form-checkbox').attr('checked', 'checked');
      },
      function() {
        $(this).removeClass('checkbox-checked');
        $(this).parent().find('.form-checkbox').removeAttr('checked');
      }
    );
  });
}