/**
 * Requirements:
 * - jquery <http://jquery.com/>
 * - tablesorter <http://tablesorter.com/>
 *
 * @author Sebastiaan Wiersema <sebastiaan@buyways.nl>
 **/

$(document).ready(function(){
	// add parser through the tablesorter addParser method
	$.tablesorter.addParser({
		// set a unique id
		id: 'euros',
		is: function(s) {
			// return false so this parser is not auto detected
			return false;
		},
		format: function(s) {
			// format the data for normalization
			return s.substring(2).replace(/,/, '.');
		},
		type: 'numeric'
	});
	
	$("#tabletarieven").tablesorter({
		decimal: ',',
		headers: {
			0: { sorter: false },
			2: { sorter: false },
			4: { sorter: 'euros' }
		}
	});
});
