function updateUrlParam(name, value) {
        var queryParameters = {}, queryString = location.search.substring(1),
            re = /([^&=]+)=([^&]*)/g, m;
        while (m = re.exec(queryString)) {
            queryParameters[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
        }
        queryParameters[name] = value;


        if (history.pushState) {
            var newUrl = location.protocol + '//' + location.host + location.pathname + '?' + $.param(queryParameters);
            window.history.pushState({path: newUrl}, '', newUrl);
        }
    }