function urlencode(str) {
    return escape(str).replace('+', '%2B').replace('%20', '+').replace('*', '%2A').replace('/', '%2F').replace('@', '%40');
}

function urldecode(str) {
    return unescape(str.replace('+', ' '));
}

$(document).ready(function() {
    //Add the current class to all links pointing to the current page
    search = window.location.search;
    $("*").find("a[href='" + search + "']").each(function(){
        $(this).parent('li').addClass("current");
        //add your own logic here if needed
    })
})

