web_shop = {
  my_orders_products:function(ns){
    var ns=genshi2js.merge(genshi2js.util, ns);
    var stack=new Array();
    var result_html=new Array();
    with(genshi2js.fill_vars(ns,stack,result_html)){
    html_push("<div"+genshi2js.attribute("class", "products")+">");
      genshi2js.iterate(ns.data,function(item){
        ns.product=item;
        html_push("<div"+genshi2js.attribute("class", "product clearfix")+">");
          html_push("<div"+genshi2js.attribute("class", "title")+">");
            html_push("<span"+genshi2js.attribute("class", "link")+genshi2js.attribute("onclick", "return application.show_song("+ns.product.song_id+", "+ns.product.product_id+")")+">");
              secure_push(ns.product.title);
            html_push("</span>");
          html_push("</div>");
          html_push("<div"+genshi2js.attribute("class", "icon")+">");
            html_push("<img"+genshi2js.attribute("src", ns.product.media_icon_small)+genshi2js.attribute("title", ns.product.resource_description)+"/>");
          html_push("</div>");
          switch(ns.product.can_download){
            case true:
              html_push("<div"+genshi2js.attribute("class", "download_info")+">");
                secure_push(ns.trans("expires_in"));
                secure_push(" ");
                secure_push(ns.product.expires);
              html_push("</div>");
              html_push("<div"+genshi2js.attribute("class", "download")+">");
                html_push("<span"+genshi2js.attribute("class", "link")+genshi2js.attribute("onclick", "application.download_product("+ns.order_id+", "+ns.product.product_id+")")+">");
                  secure_push(ns.trans("download_link"));
                html_push("</span>");
              html_push("</div>");
              break;
            default:
              html_push("<div"+genshi2js.attribute("class", "download_info")+">");
                secure_push(ns.trans("reloads_left"));
                secure_push(" ");
                secure_push(ns.product.reloads);
              html_push("</div>");
              html_push("<div"+genshi2js.attribute("class", "download")+">");
                html_push("<span"+genshi2js.attribute("class", "link")+genshi2js.attribute("onclick", "application.create_license("+ns.order_id+", "+ns.product.product_id+")")+">");
                  secure_push(ns.trans("reload_link"));
                html_push("</span>");
              html_push("</div>");
          }
        html_push("</div>");
      });
    html_push("</div>");
    return new genshi2js.Stream(result_html);
  }},
  login:function(ns){
    var ns=genshi2js.merge(genshi2js.util, ns);
    var stack=new Array();
    var result_html=new Array();
    with(genshi2js.fill_vars(ns,stack,result_html)){
    html_push("<form"+genshi2js.attribute("id", "login")+">");
      html_push("<ul>");
        html_push("<li>");
          html_push("<label>");
            secure_push(ns.trans("username"));
          html_push("</label>");
          html_push("<input"+genshi2js.attribute("id", "username")+"/>");
        html_push("</li>");
        html_push("<li>");
          html_push("<label>");
            secure_push(ns.trans("password"));
          html_push("</label>");
          html_push("<input"+genshi2js.attribute("type", "password")+genshi2js.attribute("id", "password")+"/>");
        html_push("</li>");
      html_push("</ul>");
    html_push("</form>");
    return new genshi2js.Stream(result_html);
  }},
  main_navigation:function(ns){
    var ns=genshi2js.merge(genshi2js.util, ns);
    var stack=new Array();
    var result_html=new Array();
    with(genshi2js.fill_vars(ns,stack,result_html)){
    html_push("<ul"+genshi2js.attribute("class", "plainlist clearfix")+">");
      genshi2js.iterate(ns.enumerate(ns.application.tabs),function(item){
        (function(v){ns.i=v[0];ns.tab=v[1]})(item);
        ns=stack_increment(ns);
          ns.data=ns.tab.tab_data();
          html_push("<li"+genshi2js.attribute("class", (ns.tab===ns.application.active_tab?"active":""))+">");
            if(ns.data.title){
              html_push("<div"+genshi2js.attribute("class", " button "+(ns.i==0?"start":(ns.i==(ns.application.tabs.length-1)?"end":"middle")))+genshi2js.attribute("onclick", ns.data.onclick+"()")+">");
                secure_push(ns.data.title);
              html_push("</div>");
            }
            if(ns.data.content){
              html_push("<div"+genshi2js.attribute("class", (ns.i==0?"start":(ns.i==(ns.application.tabs.length-1)?"end":"middle")))+genshi2js.attribute("onclick", (ns.data.onclick?ns.data.onclick+"()":ns.None))+">");
                secure_push(ns.data.content);
              html_push("</div>");
            }
          html_push("</li>");
        ns=stack_decrement();
      });
    html_push("</ul>");
    return new genshi2js.Stream(result_html);
  }},
  my_products:function(ns){
    var ns=genshi2js.merge(genshi2js.util, ns);
    var stack=new Array();
    var result_html=new Array();
    with(genshi2js.fill_vars(ns,stack,result_html)){
    html_push("<div"+genshi2js.attribute("class", "container")+">");
      genshi2js.iterate(ns.orders,function(item){
        ns.order=item;
        html_push("<div"+genshi2js.attribute("id", "order_"+ns.order.id)+genshi2js.attribute("class", "order")+">");
          html_push("<div"+genshi2js.attribute("class", "clearfix")+">");
            html_push("<div"+genshi2js.attribute("class", "order_number")+genshi2js.attribute("onClick", "application.my_products.toggle("+ns.order.id+")")+">");
              secure_push("#");
              secure_push(ns.order.id);
            html_push("</div>");
            html_push("<div"+genshi2js.attribute("class", "purchase_date")+genshi2js.attribute("onClick", "application.my_products.toggle("+ns.order.id+")")+">");
              secure_push(ns.order.date);
            html_push("</div>");
            html_push("<div"+genshi2js.attribute("class", "download_link")+">");
              html_push("<span"+genshi2js.attribute("class", "link")+genshi2js.attribute("onclick", "return application.create_licenses("+ns.order.id+")")+">");
                secure_push(ns.trans("download_link"));
              html_push("</span>");
            html_push("</div>");
          html_push("</div>");
        html_push("</div>");
      });
    html_push("</div>");
    return new genshi2js.Stream(result_html);
  }},
  basket:function(ns){
    var ns=genshi2js.merge(genshi2js.util, ns);
    var stack=new Array();
    var result_html=new Array();
    with(genshi2js.fill_vars(ns,stack,result_html)){
    genshi2js.iterate(ns.enumerate(ns.songs),function(item){
      (function(v){ns.i=v[0];ns.song=v[1]})(item);
      html_push("<div"+genshi2js.attribute("class", "clearfix "+(ns.i%2?"odd":"even"))+">");
        html_push("<div"+genshi2js.attribute("class", "song_title")+">");
          html_push("<span"+genshi2js.attribute("class", "link")+genshi2js.attribute("onClick", "application.show_song("+ns.song.song_id+")")+">");
            secure_push(ns.song.title);
          html_push("</span>");
        html_push("</div>");
        html_push("<div"+genshi2js.attribute("class", "resources")+">");
          genshi2js.iterate(ns.song.products,function(item){
            ns.product=item;
            html_push("<span>");
              html_push("<img"+genshi2js.attribute("src", ns.product.media_icon_small)+genshi2js.attribute("title", ns.product.resource_description)+"/>");
              secure_push(ns.product.basket_price_display);
            html_push("</span>");
          });
        html_push("</div>");
        html_push("<div"+genshi2js.attribute("class", "price")+">");
          secure_push(ns.application.format_price(ns.song.price));
        html_push("</div>");
        html_push("<div"+genshi2js.attribute("class", "remove")+">");
          html_push("<span"+genshi2js.attribute("class", "link")+genshi2js.attribute("onclick", util.call(ns.song.song_id, "application.basket.remove", ns.song.products))+">");
            secure_push(ns.trans("remove"));
          html_push("</span>");
        html_push("</div>");
      html_push("</div>");
    });
    return new genshi2js.Stream(result_html);
  }},
  remove_popup:function(ns){
    var ns=genshi2js.merge(genshi2js.util, ns);
    var stack=new Array();
    var result_html=new Array();
    with(genshi2js.fill_vars(ns,stack,result_html)){
    html_push("<div"+genshi2js.attribute("class", "popup")+">");
      html_push("<img"+genshi2js.attribute("src", ns.application.url.image("popup.close.png"))+genshi2js.attribute("class", "link close_icon")+genshi2js.attribute("onclick", "application.basket.active_popup.close()")+"/>");
      html_push("<h1>");
        secure_push(ns.trans("basket"));
      html_push("</h1>");
      html_push("<h3>");
        secure_push(ns.trans("delete_media_resources"));
      html_push("</h3>");
      html_push("<ol>");
        genshi2js.iterate(ns.products,function(item){
          ns.product=item;
          html_push("<li"+genshi2js.attribute("class", "clearfix")+">");
            switch(ns.application.basket.has_product(ns.product.product_id)){
              case true:
                html_push("<img"+genshi2js.attribute("src", ns.application.url.image("basket.png"))+genshi2js.attribute("class", "basket")+"/>");
                break;
              default:
                html_push("<img"+genshi2js.attribute("src", ns.application.url.image("out_basket.png"))+genshi2js.attribute("class", "basket")+"/>");
            }
            html_push("<img"+genshi2js.attribute("src", ns.product.media_icon_small)+genshi2js.attribute("class", "icon")+genshi2js.attribute("title", ns.product.resource_description)+"/>");
            switch(ns.application.basket.has_product(ns.product.product_id)){
              case true:
                html_push("<div"+genshi2js.attribute("class", "link title")+genshi2js.attribute("onclick", "application.basket.active_popup.remove("+ns.product.product_id+")")+">");
                  secure_push(ns.product.resource_title);
                html_push("</div>");
                break;
              default:
                html_push("<div"+genshi2js.attribute("class", "link title")+genshi2js.attribute("onclick", "application.basket.active_popup.add("+ns.product.product_id+")")+">");
                  secure_push(ns.product.resource_title);
                html_push("</div>");
            }
          html_push("</li>");
        });
      html_push("</ol>");
      html_push("<div"+genshi2js.attribute("class", "delete")+">");
        html_push("<div"+genshi2js.attribute("class", "link")+genshi2js.attribute("onclick", "application.basket.active_popup.remove_all()")+">");
          secure_push(ns.trans("delete_all"));
        html_push("</div>");
      html_push("</div>");
    html_push("</div>");
    return new genshi2js.Stream(result_html);
  }},
  downloads:function(ns){
    var ns=genshi2js.merge(genshi2js.util, ns);
    var stack=new Array();
    var result_html=new Array();
    with(genshi2js.fill_vars(ns,stack,result_html)){
    html_push("<div"+genshi2js.attribute("id", "track")+">");
      html_push("<h2>");
        secure_push(ns.trans("my_downloads"));
      html_push("</h2>");
      html_push("<ul>");
        genshi2js.iterate(ns.content,function(item){
          ns.track=item;
          html_push("<li>");
            html_push("<a"+genshi2js.attribute("href", ns.track.link)+">");
              secure_push(ns.track.title);
            html_push("</a>");
          html_push("</li>");
        });
      html_push("</ul>");
    html_push("</div>");
    return new genshi2js.Stream(result_html);
  }},
  drilldown_alphabet:function(ns){
    var ns=genshi2js.merge(genshi2js.util, ns);
    var stack=new Array();
    var result_html=new Array();
    with(genshi2js.fill_vars(ns,stack,result_html)){
    html_push("<span"+genshi2js.attribute("id", "drilldown_alphabet")+">");
      html_push("<a"+genshi2js.attribute("onclick", "application.handle_tab_click(this, 'prefix', null, null, null); return false")+">");
        secure_push(ns.application.trans("top"));
      html_push("</a>");
      html_push("<a"+genshi2js.attribute("onclick", "application.handle_tab_click(this, 'prefix', '0', null, null); return false")+">");
        secure_push("0..9");
      html_push("</a>");
      genshi2js.iterate(["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"],function(item){
        ns.label=item;
        html_push("<a"+genshi2js.attribute("onclick", "application.handle_tab_click(this, 'prefix', '"+ns.label+"', null, null); return false")+">");
          secure_push(ns.label);
        html_push("</a>");
      });
    html_push("</span>");
    return new genshi2js.Stream(result_html);
  }},
  bundle:function(ns){
    var ns=genshi2js.merge(genshi2js.util, ns);
    var stack=new Array();
    var result_html=new Array();
    with(genshi2js.fill_vars(ns,stack,result_html)){
    html_push("<div"+genshi2js.attribute("id", "bundle")+">");
      html_push("<div"+genshi2js.attribute("class", "clearfix")+">");
        if(ns.content.cover){
          html_push("<img"+genshi2js.attribute("src", ns.content.cover)+genshi2js.attribute("class", "cover")+"/>");
        }
        html_push("<ul"+genshi2js.attribute("class", "plainlist tags")+">");
          html_push("<li"+genshi2js.attribute("class", "big")+">");
            html_push("<div"+genshi2js.attribute("class", "type")+">");
              secure_push(ns.trans("type"));
            html_push("</div>");
            html_push("<div"+genshi2js.attribute("class", "name")+">");
              secure_push(ns.trans("album"));
            html_push("</div>");
          html_push("</li>");
          html_push("<li"+genshi2js.attribute("class", "big")+">");
            html_push("<div"+genshi2js.attribute("class", "type")+">");
              secure_push(ns.trans("title"));
            html_push("</div>");
            html_push("<div"+genshi2js.attribute("class", "name")+">");
              secure_push(ns.content.title);
            html_push("</div>");
          html_push("</li>");
          html_push("<li"+genshi2js.attribute("class", "clearfix")+">");
            html_push("<div"+genshi2js.attribute("class", "type")+">");
              secure_push(ns.trans("description"));
            html_push("</div>");
            html_push("<div"+genshi2js.attribute("class", "name")+">");
              secure_push(ns.content.description);
            html_push("</div>");
          html_push("</li>");
        html_push("</ul>");
      html_push("</div>");
      html_push("<table"+genshi2js.attribute("class", "product")+">");
        genshi2js.iterate(ns.content.products,function(item){
          ns.product=item;
          html_push("<tr>");
            html_push("<td"+genshi2js.attribute("class", "track_number")+">");
              secure_push(ns.product.track_number);
              secure_push(".");
            html_push("</td>");
            html_push("<td"+genshi2js.attribute("class", "icon")+">");
              if(ns.product.media_icon_small){
                html_push("<img"+genshi2js.attribute("src", ns.product.media_icon_small)+genshi2js.attribute("title", ns.product.resource_description)+"/>");
              }
            html_push("</td>");
            html_push("<td"+genshi2js.attribute("class", "title")+">");
              html_push("<a"+genshi2js.attribute("href", ns.application.url.song(ns.product.song_id))+genshi2js.attribute("class", "link")+genshi2js.attribute("onclick", "return application.show_song("+ns.product.song_id+")")+">");
                secure_push(ns.product.title);
              html_push("</a>");
            html_push("</td>");
            if(ns.product.preview){
              html_push("<td>");
                switch(ns.product.media_type){
                  case "audio":
                    html_push("<div"+genshi2js.attribute("class", "small_button")+genshi2js.attribute("onclick", "application.download_preview("+ns.product.product_id+")")+">");
                      secure_push(ns.trans("prelisten"));
                    html_push("</div>");
                    break;
                  default:
                    html_push("<div"+genshi2js.attribute("class", "small_button")+genshi2js.attribute("onclick", "application.download_preview("+ns.product.product_id+")")+">");
                      secure_push(ns.trans("preview"));
                    html_push("</div>");
                }
              html_push("</td>");
            }
            html_push("<td"+genshi2js.attribute("class", "price")+">");
              secure_push(ns.application.calculator.calculate(ns.product.credit_type, ns.product.price).display);
            html_push("</td>");
            html_push("<td"+genshi2js.attribute("class", "basket")+">");
              switch(ns.application.product_state(ns.product.product_id)){
                case ns.application.product_state.basket:
                  html_push("<div"+genshi2js.attribute("class", "small_in_cart_button")+genshi2js.attribute("onclick", "application.basket.remove_product("+ns.product.product_id+")")+">");
                    secure_push(ns.trans("basket"));
                  html_push("</div>");
                  break;
                case ns.application.product_state.bought:
                  html_push("<div"+genshi2js.attribute("class", "small_button")+genshi2js.attribute("onclick", "application.basket.add_product("+ns.product.product_id+")")+">");
                    secure_push(ns.trans("basket"));
                  html_push("</div>");
                  break;
                default:
                  html_push("<div"+genshi2js.attribute("class", "small_button")+genshi2js.attribute("onclick", "application.basket.add_product("+ns.product.product_id+")")+">");
                    secure_push(ns.trans("basket"));
                  html_push("</div>");
              }
            html_push("</td>");
          html_push("</tr>");
        });
      html_push("</table>");
    html_push("</div>");
    return new genshi2js.Stream(result_html);
  }},
  static:function(ns){
    var ns=genshi2js.merge(genshi2js.util, ns);
    var stack=new Array();
    var result_html=new Array();
    with(genshi2js.fill_vars(ns,stack,result_html)){
    secure_push(ns.content.data);
    return new genshi2js.Stream(result_html);
  }}
}