$(function() {		
		var months = {};
                months["JAN"] = "01";
                months["FEB"] = "02";
                months["MAR"] = "03";
                months["APR"] = "04";
                months["MAY"] = "05";
                months["JUN"] = "06";
                months["JUL"] = "07";
                months["AUG"] = "08";
                months["SEP"] = "09";
                months["OCT"] = "10";
                months["NOV"] = "11";
                months["DEC"] = "12";
                
                $.tablesorter.addParser({
                		id: 'DD-MMM-YY',
                		is: function(s) {
                			return false;
                		},
                		format: function(s) {
                			s = '' + s; //Make sure it's a string
                			var hit = s.match(/(\d{2})-([A-Za-z]{3})-(\d{2})/);
                			if (hit && hit.length == 4) {
                				if (hit[3] <= 50) {
                				return '20' + hit[3] + months[hit[2].toUpperCase()] +
                				hit[1];
                				} else {
                				return '19' + hit[3] + months[hit[2].toUpperCase()] +
                				hit[1];
                				}
                			}
                			else {
                				return s;
                			}
                		},
                		type: 'text'
                });
                
                $("#summary_f").tablesorter({headers: {3: {sorter: 'DD-MMM-YY'},7: {sorter: 'DD-MMM-YY'}, 8: {sorter: 'currency'}, 9: {sorter: false}}, sortList:[[0,0]], widgets: ['zebra']});
                $("#summary_m").tablesorter({headers: {3: {sorter: 'DD-MMM-YY'}, 8: {sorter: 'currency'}, 10: {sorter: false}}, sortList:[[0,0]], widgets: ['zebra']});
});	

