$('.content_sort a').click(function () {
    if ($(this).attr('data-sort'))
      query.set('sort', $(this).attr('data-sort'))
    else
      query.remove('sort')