$(document).ready(function() {
    
    // wenn cookies vorhanden sind die sessionids aus den urls entfernen
    if(document.cookie.length > 0) {
        $('[href*="sid="]').each(function() {
            $(this).attr('href',
                $(this).attr('href').replace(/\?sid=[^&]*$/, '').replace(/\?sid=[^&]*&/, '?').replace(/&sid=[^&]*&/, '&')
            );
        });
    }
});
