

 $(document).ready(function(){

    $("#contacts-form").submit(function(){

        if($(this).hasClass("error")){
          /**/
        }
        else{
            $("#cloading").css("visibility", "visible");
            $("#contact-submit").attr("onclick", "");
            var name = document.getElementById('Cname').value;
            var email = document.getElementById('Cemail').value;
            var phone = document.getElementById('Cphone').value;
            var subject = document.getElementById('Csubject').value;
            var message = document.getElementById('Cmessage').value;

            $.post("http://wroughtironbg.com/contact_form.php", {name:name, email:email, phone:phone, subject:subject, message:message}, function(){
                $("#contacts-form").animate({"opacity":"0"}, function(){
                   //zaradi renda na ie-tata 
                    $("#contacts-form").replaceWith("<form id='contacts-form'><br /><h2>Thank you! Your message has been sent.</h2></form>");

                })

            });
        }

        return false;
    });

 });

google.load("maps", "2");
  function createMarker(point,html) {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        return marker;
  }

 $(document).ready(function(){
    $(window).load(function(){
        function initialize() {
          var map = new google.maps.Map2(document.getElementById("map-content"));
          map.setMapType(G_HYBRID_MAP);
          map.addControl(new GSmallMapControl());
          map.addControl(new GMapTypeControl());


          map.setCenter(new google.maps.LatLng(42.764754, 23.203205), 13);
          var point = new GLatLng(42.764754, 23.203205);
          var marker = createMarker(point,'<div style="width:auto;color:#0C0D1E;font:13px Arial">Bulgaria, Sofia, Bozhurishte, <br />Malina 5 str. <\/div>');
          map.addOverlay(marker);
        }
        initialize();
    });
 });

    $(window).unload(function(){
         GUnload();
    });
