$(function() {

    var marketId = []; //returned from the API
    var allLatlng = []; //returned from the API
    var allMarkers = []; //returned from the API
    var marketName = []; //returned from the API
    var infowindow = null;
    var pos;
    var userCords;
    var tempMarkerHolder = [];

    //Start geolocation

    if (navigator.geolocation) {

      function error(err) {
        console.warn('ERROR(' + err.code + '): ' + err.message);
      }

      function success(pos){
        userCords = pos.coords;

        //return userCords;
      }

      // Get the user's current position
      navigator.geolocation.getCurrentPosition(success, error);
      //console.log(pos.latitude + " " + pos.longitude);
      } else {
        alert('Geolocation is not supported in your browser');
      }

    //End Geo location

    //map options
    var mapOptions = {
      scrollwheel: false,
      zoom: 12,
      center: new google.maps.LatLng(37.7833, -122.4167),
      panControl: false,
      panControlOptions: {
        position: google.maps.ControlPosition.BOTTOM_LEFT
      },
      zoomControl: true,
      zoomControlOptions: {
        style: google.maps.ZoomControlStyle.LARGE,
        position: google.maps.ControlPosition.RIGHT_CENTER
      },
      scaleControl: false,
      styles: [{"elementType":"geometry","stylers":[{"hue":"#ff4400 "},{"saturation":-68},{"lightness":-4},{"gamma":0.72}]},{"featureType":"road","elementType":"labels.icon"},{"featureType":"landscape.man_made","elementType":"geometry","stylers":[{"hue":"#0077ff "},{"gamma":3.1}]},{"featureType":"water","stylers":[{"hue":"#00ccff "},{"gamma":0.44},{"saturation":-33}]},{"featureType":"poi.park","stylers":[{"hue":"#44ff00 "},{"saturation":-23}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"hue":"#007fff "},{"gamma":0.77},{"saturation":65},{"lightness":99}]},{"featureType":"water","elementType":"labels.text.stroke","stylers":[{"gamma":0.11},{"weight":5.6},{"saturation":99},{"hue":"#0091ff "},{"lightness":-86}]},{"featureType":"transit.line","elementType":"geometry","stylers":[{"lightness":-48},{"hue":"#ff5e00 "},{"gamma":1.2},{"saturation":-23}]},{"featureType":"transit","elementType":"labels.text.stroke","stylers":[{"saturation":-64},{"hue":"#ff9100 "},{"lightness":16},{"gamma":0.47},{"weight":2.7}]}]

    };

  //Adding infowindow option
  infowindow = new google.maps.InfoWindow({
    content: "holding..."
  });

  //Fire up Google maps and place inside the map-canvas div
  map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

  //grab form data
    $('#chooseZip').submit(function() { // bind function to submit event of form

    //define and set variables
    var userZip = $("#textZip").val();
    //console.log("This-> " + userCords.latitude);

    var accessURL;

    if(userZip){
      accessURL = "http://search.ams.usda.gov/farmersmarkets/v1/data.svc/zipSearch?zip=" + userZip;
    } else {
      accessURL = "http://search.ams.usda.gov/farmersmarkets/v1/data.svc/locSearch?lat=" + userCords.latitude + "&lng=" + userCords.longitude;
    }


      //Use the zip code and return all market ids in area.
      $.ajax({
        type: "GET",
        contentType: "application/json; charset=utf-8",
        url: accessURL,
        dataType: 'jsonp',
        success: function (data) {

           $.each(data.results, function (i, val) {
            marketId.push(val.id);
            marketName.push(val.marketname);
           });

          console.log(marketName);

          var counter = 0;
          //Now, use the id to get detailed info
          $.each(marketId, function (k, v){
            $.ajax({
              type: "GET",
              contentType: "application/json; charset=utf-8",
              // submit a get request to the restful service mktDetail.
              url: "http://search.ams.usda.gov/farmersmarkets/v1/data.svc/mktDetail?id=" + v,
              dataType: 'jsonp',
              success: function (data) {

              for (var key in data) {

                var results = data[key];

                console.log(results);

                //The API returns a link to Google maps containing lat and long. This pulls it apart.
                var googleLink = results['GoogleLink'];
                var latLong = decodeURIComponent(googleLink.substring(googleLink.indexOf("=")+1, googleLink.lastIndexOf("(")));

                var split = latLong.split(',');

                //covert values to floats, to play nice with .LatLng() below.
                var latitude = parseFloat(split[0]);
                var longitude = parseFloat(split[1]);

                //set the markers.
                myLatlng = new google.maps.LatLng(latitude,longitude);

                allMarkers = new google.maps.Marker({
                  icon: "https://cdn2.iconfinder.com/data/icons/thesquid-ink-40-free-flat-icon-pack/64/carrot-48.png",
                  animation: google.maps.Animation.DROP,
                  position: myLatlng,
                  map: map,
                  title: marketName[counter],
                  html:
                      '<div class="markerPop">' +
                      '<h1>' + marketName[counter].substring(4) + '</h1>' + //substring removes distance from title
                      '<h3>' + results['Address'] + '</h3>' +
                      '<p> <span class="bold">Products: </span>' + results['Products'].split(';') + '</p>' +
                      '<p> <span class="bold">Schedule: </span>' + results['Schedule'] + '</p>' +
                      '<p> <span class="bold">Accepts Special Supplemental Nutrition Program for Women, Infants, and Children (WIC): </span>' + "YES" + '</p>' +
                      '<p> <span class="bold">Accepts Supplemental Nutrition Assistance Program (SNAP): </span>' + "YES" + '</p>' +
                      '<p> <span class="bold">Accepts Senior Farmers Market Nutrition Program (SFMNP): </span>' + "YES" + '</p>' +
                      '</div>'
                });

                //put all lat long in array
                allLatlng.push(myLatlng);

                //Put the marketrs in an array
                tempMarkerHolder.push(allMarkers);

                counter++;
                //console.log(counter);
              };

                google.maps.event.addListener(allMarkers, 'click', function () {
                  infowindow.setContent(this.html);
                  infowindow.open(map, this);
                });


                //console.log(allLatlng);
                //  Make an array of the LatLng's of the markers you want to show
                //  Create a new viewpoint bound
                var bounds = new google.maps.LatLngBounds ();
                //  Go through each...
                for (var i = 0, LtLgLen = allLatlng.length; i < LtLgLen; i++) {
                  //  And increase the bounds to take this point
                  bounds.extend (allLatlng[i]);
                }
                //  Fit these bounds to the map
                map.fitBounds (bounds);


              }
            });
          }); //end .each
        }
      });

        return false; // important: prevent the form from submitting
    });
});

$(function() {
  $( "#searchZip" ).click(function() {
    $("#searchZip").hide();
    $( ".zipSearch" ).show();
  });
});

@@ -7235,127 +7235,4 @@
 %7D);%0A
-%0A$(function() %7B%0A  $( %22#searchZip%22 ).click(function() %7B%0A    $(%22#searchZip%22).hide();%0A    $( %22.zipSearch%22 ).show();%0A  %7D);%0A%7D);%0A

Update Jquery syntax