$(document).observe('dom:loaded', function() {
  window.onload = function() {
    fixed_floating = new Array("to_checkout_container", "col1_content");
    fixed_floating.each(function(el) {
      if ($(el) != null) {
        var pos = $(el).viewportOffset().top - 10;

        Event.observe(window, 'scroll', function() {
          var y = $(document).viewport.getScrollOffsets().top;
          if (y >= pos) {
            $(el).addClassName(el + '_fixed');
          } else {
            $(el).removeClassName(el + '_fixed');
          }
        });
      }
    });
  }
});