$(document).ready(function() { 
    
    // add parser for german dates
    $.tablesorter.addParser({
     id: 'germandate',
     is: function(s) {
       return false;
     },
     format: function(s) {
    var a = s.split('.');
    a[1] = a[1].replace(/^[0]+/g,"");
    return new Date(a.reverse().join("/")).getTime();
     },
     type: 'numeric'
    });

    
    // call the tablesorter plugin 
    $("table#spieldaten").tablesorter({ 
		headers: { 0: { sorter:'germandate' }},
    	widgets: ['zebra'] 
    }); 



}); 
