 $(function() {


var $td = $('#catcontent td').addClass('grid_3');
    $td.filter(':not(:first-child,:last-child)').addClass('middle');
    $td.filter(':first-child').addClass('first alpha');
    $td.filter(':last-child').addClass('last omega');

/* add pipes between menu in the footer menu */

$("#footermenu ul li:not(:last)").append(' | ');

// Get the current file name from window.location.pathname
var file = window.location.pathname.split("/").pop();

// Look for <a> elements whose `href` matches the file 
$("#submenu a[href$='"+file+"']").addClass("active");

})
