added AJAX behaviour to sidebar