﻿
function initSmallGoogleMap(gmap) {
    gmap.enableScrollWheelZoom();
    gmap.enableDoubleClickZoom();

    var uiOptions = new GMapUIOptions(new GSize(100, 100));

    uiOptions.maptypes.satellite = false;
    uiOptions.maptypes.hybrid = false;
    uiOptions.maptypes.physical = false;
    uiOptions.controls.maptypecontrol = false;
    uiOptions.controls.menumaptypecontrol = false;

    gmap.setUI(uiOptions);

};

function initDefaultGoogleMap(gmap) {
    gmap.enableScrollWheelZoom();
    gmap.enableDoubleClickZoom();
    gmap.setUIToDefault();
    //gmap.addMapType(G_SATELLITE_MAP);
    //gmap.addControl(new GLargeMapControl3D());
    //gmap.addControl(new GMapTypeControl());
};

jQuery.extend(server, {

    LoadSavedOffers: function(e, trigger) {
        zajaxm.call({
            async: false,
            assembly: "CentrSource.Web",
            methodClass: "consumer_library_master",
            methodName: 'GetSavedOffers',
            args: null,
            onError: function() {
                //alert("Error while trying to perform request.");
            },
            onOk: function(response) {
                $(e.target).find('.menu_content').html(response);
            }
        });
    },

    LoadLastViewedOffers: function(e, trigger) {
        zajaxm.call({
            async: false,
            assembly: "CentrSource.Web",
            methodClass: "consumer_library_master",
            methodName: 'GetLastViewedOffers',
            args: null,
            onError: function() {
                //alert("Error while trying to perform request.");
            },
            onOk: function(response) {
                $(e.target).find('.menu_content').html(response);
            }
        });
    }

});
