$(document).ready(function(){


google.maps.event.addDomListener(window, "load", function () {

  /*
   * create map
   */
  var map = new google.maps.Map(document.getElementById("google-map"), {
    center: new google.maps.LatLng(46.755531,23.61814),
    zoom: 5,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  });

  /*
   * create infowindow (which will be used by markers)
   */
  var infoWindow = new google.maps.InfoWindow();

  /*
   * marker creater function (acts as a closure for html parameter)
   */
  function createMarker(options, html) {
    var marker = new google.maps.Marker(options);
    if (html) {
      google.maps.event.addListener(marker, "click", function () {
        infoWindow.setContent(html);
        infoWindow.open(options.map, this);
      });
    }
    return marker;
  }

  /*
   * add markers to map
   */

  var marker1 = createMarker({
    position: new google.maps.LatLng(46.755531,23.61814),
    map: map
  }, "<h1>KS</h1><p>KS</p>");

});

});