function showAddress(address) {
  if (geocoder) {
    geocoder.getLatLng(
      address,
      function(point) {
        if (!point) {
          alert('Nie znaleziono adresu: '+address);
        } else {
          map.setCenter(point, 11);
          var marker = new GMarker(point);
          map.addOverlay(marker);
          //marker.openInfoWindowHtml(address);
        }
      }
    );
  }
}


$(function () {

    var form = $('<form>').attr('id', 'address-search').prependTo('#tab-map')
    $('<input>').attr('id', 'address').attr('name', 'address').appendTo(form)
    $('<button>').appendTo(form).click(function (e) {
        showAddress($('#address').val())
        e.preventDefault()
        return false
    })

})

