$(document).ready(function() {
  var $searchForm = $("#cse-search-box");
  // change the action attribute of the form first
  if (!window.searchURL) {
    window.searchURL = "/search/";
  }
  $searchForm.attr("action", window.searchURL);
  
  // configure the submit action to embed the site restriction into the search string rather than as another input submission
   /*$searchForm.bind("submit", function(){
      var $criteria = $searchForm.find("input[type=hidden][name=q]");
      var criteriaText = $criteria.val();
      $criteria.remove();
      var searchInput = $searchForm.find("input[name=q]").val();
      $searchForm.find("input[name=q]").val(searchInput + " " + criteriaText);
   });*/
});