$(function() {

    var GMlatitude = $('#GMlatitude').text();
    var GMlongitude = $('#GMlongitude').text();

    var map_set = {
        latitude : GMlatitude,
        longitude : GMlongitude,
        width : 400,
        height : 300,
        zoom : 14
    }

    if (map_set.latitude && map_set.longitude && GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));
        
        var point = new GLatLng(map_set.latitude, map_set.longitude);
        map.setCenter(point, map_set.zoom);

        new GKeyboardHandler(map);
        map.enableContinuousZoom();

        map.removeMapType(G_HYBRID_MAP);
        map.addMapType(G_NORMAL_MAP);
        map.setMapType(G_NORMAL_MAP);

        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
        
        markerIcon = new GIcon();
        markerIcon.image = '/company/img/ic_google.png';
        markerIcon.iconAnchor = new GPoint(13, 38);
        iconopt = {icon:markerIcon};

        var markerPoint = new GLatLng(map_set.latitude, map_set.longitude);
        var marker = new GMarker(markerPoint, iconopt);
        map.addOverlay(marker);
    }

});