
function expandBox(id_nr) {

	// Remove underline from sublinks
	$("a")
	    .filter(function() {
	        return this.id.match(/sublink_*/) && this.id != "sublink_"+id_nr;
	    })
	    .css("text-decoration", "none");

	// Underline clicked sublink
	$("#sublink_"+id_nr).css("text-decoration", "underline");

	// Show selected and hide others
	$("#wrapbox_"+id_nr).slideDown("slow", hideTheOthers(id_nr));

}

function hideTheOthers(id_nr) {

	$("div")
		.filter(function() {
			return this.id.match(/wrapbox_*/) && this.id != "wrapbox_"+id_nr;
		})
		.slideUp("slow");

}



// OLD VERSION
// 
// function expandBox(id_nr) {
// 
// 	// Remove underline from sublinks
// 	$("a")
// 	    .filter(function() {
// 	        return this.id.match(/sublink_*/) && this.id != "sublink_"+id_nr;
// 	    })
// 	    .css("text-decoration", "none");
// 
// 	// Underline clicked sublink
// 	$("#sublink_"+id_nr).css("text-decoration", "underline");
// 
// 	// Show Selected box
// 	$("#box_"+id_nr).css("display", "block");
// 
// 	// Hide "mehr" link
// 	$("#link_"+id_nr).css("display", "none");
// 	
// 	// Show selected box
// 	$("#wrapbox_"+id_nr).css("display", "block");
// 
// 	// Hide non selected wrapbox
// 	$("div")
// 		.filter(function() {
// 			return this.id.match(/wrapbox_*/) && this.id != "wrapbox_"+id_nr;
// 		})
// 		.css("display", "none");
// 
// }*/