anchor.diff:          }]
       });
   });
  +</script>
  +
  +
  +<script>
  +$(function () {
  +    var colors = Highcharts.getOptions().colors,
  +        categories = [ 
  +        <%counter = 0%>
  +        <% @blocks.each do |block| %> 
  +        '<%= block.name%>', <%end%>],
  +        data = [ <% @blocks.each do |block| %>{
  +            y: 25.0,
  +            color: colors[<%=counter%>],
  +            drilldown: {
  +                name: 'Veranstaltung',
  +                categories: [ <% block.events.each do |event| %>' <%= event.title%>', <%end%>],
  +                data: [<% block.events.each do |event| %>
  +                <%=event.credits%>,<%end%>],
  +                color: colors[0]
  +            } 
  +        }, <%counter +=1%><%end%>],
  +        browserData = [],
  +        versionsData = [],
  +        i,
  +        j,
  +        dataLen = data.length,
  +        drillDataLen,
  +        brightness;
  +
  +
  +    // Build the data arrays
  +    for (i = 0; i < dataLen; i += 1) {
  +
  +        // add browser data
  +        browserData.push({
  +            name: categories[i],
  +            y: data[i].y,
  +            color: data[i].color
  +        });
  +
  +        // add version data
  +        drillDataLen = data[i].drilldown.data.length;
  +        for (j = 0; j < drillDataLen; j += 1) {
  +            brightness = 0.2 - (j / drillDataLen) / 5;
  +            versionsData.push({
  +                name: data[i].drilldown.categories[j],
  +                y: data[i].drilldown.data[j],
  +                color: Highcharts.Color(data[i].color).brighten(brightness).get()
  +            });
  +        }
  +    }
  +
  +    // Create the chart
  +    $('#container').highcharts({
  +        chart: {
  +            type: 'pie'
  +        },
  +        title: {
  +            text: 'Beliebheit der Veranstaltungen pro Block'
  +        },
  +        subtitle: {
  +            text: 'Source: <a href="http://netmarketshare.com/">netmarketshare.com</a>'
  +        },
  +        yAxis: {
  +            title: {
  +                text: 'Total percent market share'
  +            }
  +        },
  +        plotOptions: {
  +            pie: {
  +                shadow: false,
  +                center: ['50%', '50%']
  +            }
  +        },
  +        tooltip: {
  +            valueSuffix: '%'
  +        },
  +        series: [{
  +            name: 'Events',
  +            data: browserData,
  +            size: '60%',
  +            dataLabels: {
  +                formatter: function () {
  +                    return this.y > 5 ? this.point.name : null;
  +                },
  +                color: 'white',
  +                distance: -30
  +            }
  +        }, {
  +            name: 'Versions',
  +            data: versionsData,
  +            size: '80%',
  +            innerSize: '60%',
  +            dataLabels: {
  +                formatter: function () {
  +                    // display only if larger than 1
  +                    return this.y > 1 ? '<b>' + this.point.name + ':</b> ' + this.y + '%' : null;
  +                }
  +            }
  +        }]
  +    });
  +});
   </script>
positive.code:         <% @blocks.each do |block| %> 
          '<%= block.name%>', <%end%>],
          data = [ <% @blocks.each do |block| %>{
              y: 56.33,
              color: colors[<%=counter%>],
              drilldown: {
                  name: 'Veranstaltung',
                  categories: [ <% block.events.each do |event| %>' <%= event.title%>', <%end%>],
                  data: [1.06, 0.5, 17.2, 8.11, 5.33, 24.13],
                  color: colors[0]
              } 
          }, <%counter +=1%><%end%>],
  
negative.code:             type: 'pie'
          },
          title: {
              text: 'Erreichte Credits'
          },
          subtitle: {
              text: 'Source: <a href="http://netmarketshare.com/">netmarketshare.com</a>'
  