text: //
  // Dynamically load  OpenStreetMap Plugin
  // homepage: http://openlayers.org
  //
  function LoadOpenLayersScript(callback){
  	if (!$.fn.OpenLayers){
  		$.getScript('http://www.openlayers.org/api/OpenLayers.js', callback);
  	}
  	else {
  		if (callback && typeof(callback) === "function") {
  			callback();
  		}
  	}
  }
  //
  // Create OpenLayers map with required options and return map as object
  //
  function drawMap(lon, lat, elem, layers) {
  	var LayersArray = [];
  	// Map initialization
  	var map = new OpenLayers.Map(elem);
  	// Add layers on map
  	map.addLayers(layers);
  	// WGS 1984 projection
  	var epsg4326 =  new OpenLayers.Projection("EPSG:4326");
  	//The map projection (Spherical Mercator)
  	var projectTo = map.getProjectionObject();
  	// Max zoom = 17
  	var zoom=10;
  	map.zoomToMaxExtent();
  	// Set longitude/latitude
  	var lonlat = new OpenLayers.LonLat(lon, lat);
  	map.setCenter(lonlat.transform(epsg4326, projectTo), zoom);
  	var layerGuest = new OpenLayers.Layer.Vector("You are here");
  	// Define markers as "features" of the vector layer:
  	var guestMarker = new OpenLayers.Feature.Vector(
  		new OpenLayers.Geometry.Point(lon, lat).transform(epsg4326, projectTo)
  	);
  	layerGuest.addFeatures(guestMarker);
  	LayersArray.push(layerGuest);
  	map.addLayers(LayersArray);
  	// If map layers > 1 then show checker
  	if (layers.length > 1){
  		map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':true}));
  	}
  	// Link to current position
  	map.addControl(new OpenLayers.Control.Permalink());
  	// Show current mouse coords
  	map.addControl(new OpenLayers.Control.MousePosition({ displayProjection: epsg4326 }));
  	return map;
  }
  //
  //  Function set min-height of window (required for this theme)
  //
  function SetMinBlockHeight(elem){
  	elem.css('min-height', window.innerHeight - 49);
  }
  /*-------------------------------------------
  	Function for Fullscreen Map page (map_fullscreen.html)
  ---------------------------------------------*/
  //
  // Create Fullscreen Map
  //
  function FullScreenMap(){
  	$.getJSON("http://www.telize.com/geoip?callback=?",
  		function(json) {
  			var osmap = new OpenLayers.Layer.OSM("OpenStreetMap");//создание слоя карты
  			var googlestreets = new OpenLayers.Layer.Google("Google Streets", {numZoomLevels: 22,visibility: false});
  			var googlesattelite = new OpenLayers.Layer.Google( "Google Sattelite", {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22});
  			var map1_layers = [googlestreets,osmap, googlesattelite];
  			var map_fs = drawMap(json.longitude, json.latitude, "full-map", map1_layers);
  		}
  	);
  }