function dom_init() {


  $('.customergroup-0 .quantity input[type=text], .customergroup-1 .quantity input[type=text], .customergroup-3 .quantity input[type=text]').each(function(){
    var number = this.value;
    var name   = this.name;
    var factor = Math.floor($(this).parent().attr('rel').substring(7));
    if (factor > 1) {
    var string = '<select name="'+name+'">';
    for (i = factor; i < factor * 10; i += factor) {
        if (i == number) { active = 'selected = "selected" '; } else { active = ''; }
        string += '<option '+active+'value="'+i+'">'+i+'</option>';
    }
    string += "</select>";
    $(this).parent().prepend(string);
    $(this).remove();
    }
  });  
  
  $('#countries #second').hide();
  $('#countries #first').click(function(){
    $('#second').show().prev().hide();
  });
  $('#countries #second').click(function(){
    $('#second').hide().prev().show();
  });
  
  //Sonderaktion 2009
  $('#cart_quantity .singleprice').each(function(){
    if ($(this).text().indexOf("0,00") > 0) {
      $(this).text('GRATIS!').next().text('').next().find('input').remove();
      $(this).parent().addClass('bonus').find('.quantity input[type=text]').attr('readonly', 'readonly');
      var name = $(this).parent().find('.productname a');
      $(name).replaceWith($(name).text());
    }
  });
  
}


var $buoop = {vs:{i:6,f:1,o:8,s:1,n:9}} 
$buoop.ol = window.onload; 
window.onload=function(){ 
 if ($buoop.ol) $buoop.ol(); 
 var e = document.createElement("script"); 
 e.setAttribute("type", "text/javascript"); 
 e.setAttribute("src", "http://browser-update.org/update.js"); 
 document.body.appendChild(e); 
} 

