(function($){
	// Create global object to store jmap in
	$.jmap = $.jmap || {};

	// Create object containing project details
	$.jmap.JDetails = {
		version: "2.0b",
		releaseDate: "03/03/2008",
		author: "Tane Piper <digitalspaghetti@gmail.com>",
		blog: "http://digitalspaghetti.me.uk",
		repository: "http://hg.digitalspaghetti.me.uk/jmaps",
		googleGroup: "http://groups.google.com/group/jmaps",
		licenceType: "MIT",
		licenceURL: "http://www.opensource.org/licenses/mit-license.php"
	};
	
	// Create object of errors, allows for i18n.
	$.jmap.JErrors = {
		en : {
			addressNotFound: "This address cannot be found.  Please modify your search.",
			browserNotCompatible: "This browser is reported as being not compatible with Google Maps.",
			cannotLoad: "Cannot load the Google Maps API at this time.  Please check your connection."
		},
		fr : {
			addressNotFound: "Cette adresse ne peut pas être trouvée. Veuillez modifier votre recherche.",
			browserNotCompatible: "Ce navigateur est rapporté en tant qu'étant non compatible avec des cartes de Google.",
			cannotLoad: "Ne peut pas charger les cartes api de Google actuellement. Veuillez vérifier votre raccordement."
		},
		de : {
			addressNotFound: "Diese Adresse kann nicht gefunden werden. Ändern Sie bitte Ihre Suche.",
			browserNotCompatible: "Diese Datenbanksuchroutine wird als seiend nicht kompatibel mit Google Diagrammen berichtet.",
			cannotLoad: "Kann nicht die Google Diagramme API diesmal laden. Überprüfen Sie bitte Ihren Anschluß."
		},
		nl : {
			addressNotFound: "Dit adres kan worden gevonden niet. Gelieve te wijzigen uw onderzoek.",
			browserNotCompatible: "Dit browser wordt gemeld zoals zijnd niet compatibel met Kaarten Google.",
			cannotLoad: "Kan de Google Kaarten API op dit moment laden niet. Gelieve te controleren uw verbinding."
		},
		es : {
			addressNotFound: "Esta dirección no puede ser encontrada. Modifique por favor su búsqueda.",
			browserNotCompatible: "Este browser se divulga como siendo no compatible con los mapas de Google.",
			cannotLoad: "No puede cargar los mapas API de Google en este tiempo. Compruebe por favor su conexión."
		},
		sv : {
			addressNotFound: "Denna adress kunde ej hittas. Var god justera din sökning",
			browserNotCompatible: "Denna webbläsare är ej kompatibel med Google Maps",
			cannotLoad: "Kan inte ladda Google Maps API för tillfället. Var god kontrollera din anslutning."
		}
	};
	
	/**
	 *	jMaps Default Options
	 **/
	$.jmap.JDefaults = {
		// Initial type of map to display
		language: "en",
		// Options: "map", "sat", "hybrid"
		mapType: "map",
		// Initial map center
		mapCenter: [55.958858,-3.162302],
		// Initial map size
		mapDimensions: [400, 400],
		// Initial zoom level
		mapZoom: 12,
		// Initial map control size
		// Options: "large", "small", "none"
		mapControlSize: "small",
		// Initialise type of map control
		mapEnableType: false,
		// Initialise small map overview
		mapEnableOverview: false,
		// Enable map dragging when left button held down
		mapEnableDragging: true,
		// Enable map info windows
		mapEnableInfoWindows: true,
		// Enable double click zooming
		mapEnableDoubleClickZoom: false,
		// Enable zooming with scroll wheel
		mapEnableScrollZoom: false,
		// Enable smooth zoom
		mapEnableSmoothZoom: false,
		// Enable Google Bar
		mapEnableGoogleBar: false,
		// Enables scale bar
		mapEnableScaleControl: false,
		//Debug Mode
		debugMode: false
	}
	
	$.jmap.JAdsManagerDefaults = {
		// Google Adsense publisher ID
		publisherId: ""
	};
	
	$.jmap.JFeedDefaults = {
		// URL of the feed to pass (required)
		feedUrl: "",
		// Position to center the map on (optional)
		mapCenter: []
	}
	
	$.jmap.JGroundOverlayDefauts = {
		// South West Boundry
		overlaySouthWestBounds: [],
		// North East Boundry
		overlayNorthEastBounds: [],
		// Image
		overlayImage: ""
	}
	
	$.jmap.JIconDefaults = {
		iconImage: "",
		iconShadow: "",
		iconSize: null,
		iconShadowSize: null,
		iconAnchor: null,
		iconInfoWindowAnchor: null,
		iconPrintImage: "",
		iconMozPrintImage: "",
		iconPrintShadow: "",
		iconTransparent: ""
	};
	
	// Marker manager default options
	$.jmap.JMarkerManagerDefaults = {
		// Border Padding in pixels
		borderPadding: 100,
		// Max zoom level 
		maxZoom: 17,
		// Track markers
		trackMarkers: false
	};
	
	// Default options for a point to be created
	$.jmap.JMarkerDefaults = {
		// Point lat & lng
		pointLatLng: [],
		// Point HTML for infoWindow
		pointHTML: null,
		// Event to open infoWindow (click, dblclick, mouseover, etc)
		pointOpenHTMLEvent: "click",
		// Point is draggable?
		pointIsDraggable: false,
		// Point is removable?
		pointIsRemovable: false,
		// Event to remove on (click, dblclick, mouseover, etc)
		pointRemoveEvent: "dblclick",
		// These two are only required if adding to the marker manager
		pointMinZoom: 4,
		pointMaxZoom: 17,
		// Optional Icon to pass in (not yet implemented)
		pointIcon: null,
		// For maximizing infoWindows (not yet implemented)
		pointMaxContent: null,
		pointMaxTitle: null
	};
	
	// Defaults for a Polygon
	$.jmap.JPolygonDefaults = {
		// An array of GLatLng objects
		polygonPoints: [],
		// The outer stroke colour
	 	polygonStrokeColor: "#000000",
	 	// Stroke thickness
	 	polygonStrokeWeight: 5,
	 	// Stroke Opacity
	 	polygonStrokeOpacity: 1,
	 	// Fill colour
	 	polygonFillColor: "#ff0000",
	 	// Fill opacity
	 	polygonFillOpacity: 1,
	 	// Optional center map
	 	mapCenter: [],
	 	// Is polygon clickable?
	 	polygonClickable: true
	};
	
	// Default options for a Polyline
	$.jmap.JPolylineDefaults = {
		// An array of GLatLng objects
		polylinePoints: [],
		// Colour of the line
		polylineStrokeColor: "#ff0000",
		// Width of the line
		polylineStrokeWidth: 10,
		// Opacity of the line
		polylineStrokeOpacity: 1,
		// Optional center map
		mapCenter: [],
		// Is line Geodesic (i.e. bends to the curve of the earth)?
		polylineGeodesic: false,
		// Is line clickable?
		polylineClickable: true
	};
	
	$.jmap.JSearchAddressDefaults = {
		// Address to search for
		address: null,
		// Option to add marker for address
		addMarker: false,
		// Show address in infoWindow of point is added
		showAddress: false,
		// Optional Cache to store Geocode Data (not implemented yet)
		cache: {},
		// Country code for localisation (not implemented yet)
		countryCode: 'uk'
	};
	
	$.jmap.JSearchDirectionsDefault = {
		// From address
		fromAddress: "",
		// To address
		toAddress: "",
		// Optional panel to show text directions
		directionsPanel: ""
	};
	
	$.jmap.JTrafficDefaults = {
		// Can pass in "create" (default) or "destroy" which will remove the layer
		method: "create",
		// Center the map on this point (optional)
		mapCenter: []
	};
	
	$.jmap.JMoveToDefaults = {
		centerMethod: 'normal',
		mapType: null,
		mapCenter: [],
		mapZoom: null
	}
	
	$.jmap.JSavePositionDefaults = {
		recall: false
	}
	
	$.jmap.variables = {
		mapType: "Unknown",
		mapCenter: []
	}
	
})(jQuery);