function share_on_facebook(u){window.open(u,'sharer','toolbar=0,status=0,width=626,height=436');return false;}

$(document).ready(function() {

  $('.choose_another_cat').click(function() {
    var answer = confirm("Are you sure you want to navigate away from this page?\n\nIf you leave you will lose your selections in this category.\n\nPress OK to continue or Cancel to stay on the current page.")
    if (answer) {
      document.messages.submit();
    } else {
      return false;
    }
  });

});

