		var found = '';
		$(document).ready(function() {
			$.tablesorter.defaults.widgets = ['zebra'];
			// call the tablesorter plugin
			$("#produkts").tablesorter({
				// sort on the 2nd column order asc
				sortList: [[1,0]],
				headers: {2: {sorter: 'price'},  3: {sorter: false}, 4: {sorter: false} },
				textExtraction: findsortable});

			$(".toggle").click(function() {
				$('#' + $(this).attr('rel')).toggle();
				$('#' + 'o' + $(this).attr('rel')).toggle();
				$('#' + 'c' + $(this).attr('rel')).toggle();
				return false;
			});
			
			$(".showonjavascript").show();
		});


			
		
		$.tablesorter.addParser({
		        // set a unique id
		        id: 'price',
		        is: function(s) {
		            // return false so this parser is not auto detected
		            return false;
		        },
		        format: function(s) {
		            // format your data for normalization
		            s = s.replace('£','').replace('&nbsp;','').replace('&pound;','').replace(' ','').replace('from','');
		            return s;
		        },
		        // set type, either numeric or text
		        type: 'numeric'
    	});

		var findsortable = function(node)
		{
			// extract data from markup and return it
			var value = '';
			if ($(node).hasClass('pricearea')) {
				value = findchildelement($(node), 'price');
			} else if ($(node).hasClass('produktinfo')) {
				value = findchildelement($(node), 'produktname');
			} else if ($(node).hasClass('markeninfo')) {
				value = findchildelement($(node), 'marke');
			} else {
				value = $(node).html();
			}

			return value;
		}

		function findchildelement (parent, classtofind) {
			$(parent).children().each(function(){
				if ($(this).hasClass(classtofind)) {
					found = $(this).html();
					return false;
				} else {
					return findchildelement($(this), classtofind);
				}
			});
			return found;
		}

