jQuery(document).ready (
	function() 
	{ 
		jQuery.tablesorter.addParser(
			{
				  id: 'germandate',
				  is: function(s) {
						  return false;
				  },
				  format: function(s) {
					var a = s.split('.');
					var out = 0;
					if (typeof(a[1]) != 'undefined') 
					{
						a[1] = a[1].replace(/^[0]+/g,"");
						out = new Date(a.reverse().join("/")).getTime();
					}
					return out;
				  },
				  type: 'numeric'
			}
		);

		jQuery.tablesorter.addParser(
		{ 
			id: 'umlaute', 
			is: function(s) { 
				return false; 
			}, 
			format: function(s) { 
			
				a = s.toLowerCase();
				a = a.replace(/\u00e4/g,"a");
				a = a.replace(/\u00f6/g,"o");
				a = a.replace(/\u00fc/g,"u");
				a = a.replace(/\u00df/g,"s");	
				
				a = a.replace(/ä/g,"a");
				a = a.replace(/ö/g,"o");
				a = a.replace(/ü/g,"u");
				a = a.replace(/ß/g,"s");					
				
				return a;
			}, 
			type: 'text' 
		});         

		jQuery.tablesorter.addParser(
			{
				  id: 'germanshortdate',
				  is: function(s) {
						  return false;
				  },
				  format: function(s) {
					var a = s.split('/');
					var out = 0;
					if (typeof(a[1]) != 'undefined') 
					{
						a[0] = a[0].replace(/^[0]+/g,"");
						out = new Date(a.reverse().join("/")+"/01").getTime();
					}
					return out;
				  },
				  type: 'numeric'
			}
		);

		jQuery.tablesorter.addParser(
			{
				  id: 'germandaterange',
				  is: function(s) {
						  return false;
				  },
				  format: function(s) {
					var a = s.split('-');
					
					a = jQuery.trim(a[0]);					
					a = a.split('.');
					
					var out = 0;
					if (typeof(a[1]) != 'undefined') 
					{
						a[0] = a[0].replace(/^[0]+/g,"");
						out = new Date(a.reverse().join("/")+"/01").getTime();
					}
					return out;
				  },
				  type: 'numeric'
			}
		);
		
		jQuery.tablesorter.defaults.widgets = ['zebra']; 
	}
);
