$(document).ready(function() { 
    // extend the default setting to always include the zebra widget. 
    $.tablesorter.defaults.widgets = ['zebra']; 
    // extend the default setting to always sort on the first column 
    $.tablesorter.defaults.sortList = [[0,0]]; 
    // call the tablesorter plugin 
    $("#myTable").tablesorter();
    
	$("tbody tr").mouseover(function() {
   		$(this).addClass("tablesortinghover");
	}).mouseout(function() {
   		$(this).removeClass("tablesortinghover");
	});


        $("tbody tr").click(function() {
             var link = $(this).find("a").attr("href");
             parent.location=link;
	});




	$(".aktivitet-item").click(function() {
		$(this).find(".foldout").css("height","200px");
	});





	$('.tx-foreningsguide-pi2 #add').click(function() {  
		return !$('#muligheder option:selected').remove().appendTo('#aktivitetstyper');
	});  
	$('.tx-foreningsguide-pi2 #remove').click(function() {  
		return !$('#aktivitetstyper option:selected').remove().appendTo('#muligheder');  
	}); 
	$('.tx-foreningsguide-pi2 form').submit(function() {  
		$('#aktivitetstyper option').each(function(i) {  
			$(this).attr("selected", "selected");
		});
	});  



}); 
