/**
 * Name:         PGE.Map Object
 * Description: External js file used to encapsulate each map instantiation.
 * Dependencies: JQuery
 *                     map.js
 *                     jquery.modal.js
 *
 * @ Array - containing the datapoints for  each areas on the first default map
  **/

if (typeof PGE=="undefined"||!PGE){var PGE={};}

// Global namespace for rec areas map
PGE.recreationalAreas = '';

$(document).ready(function() {

	if (typeof PGE.Map=="undefined"||!PGE.Map){
		return false;
		//alert("Error, map object not available.\nMake sure map.js is included before this file");
	}
	else {
		PGE.recreationalAreas = new PGE.Map(
			[
				{
					id    : "pit_river",
					label : "Pit River / Hat Creek / Battle Creek",
					desc  : "This recreational area contains Lake Britton to the north, McArthur Swamp to the east, Lakes Nora and Grace to the south and Iron Canyon Reservoir to the west.",
					lat   : 41.0337,
					long  : -121.6512
				},
				{
					id    : "feather_river",
					label : "Lake Almanor / Feather River",
					desc  : "Some of the popular spots in the Feather River area are Lake Almanor, Bucks Lake, Philbrook Reservoir and facilities along the Feather River Canyon.",
					lat   : 40.1955,
					long  : -121.1128
				},
				{
					id    : "eel_river",
					label : "Lake Pillsbury / Eel River",
					desc  : "This area includes facilities at Lake Pillsbury, as well as along the Eel River.",
					lat   : 39.4381,
					long  : -122.9401
				},
				{
					id    : "i_80_donner_summit",
					label : "I-80 corridor Donner Summit to Auburn",
					desc  : "This area has over 20 great locations to choose from including Lake Spaulding, Lake Valley Reservoir and Kidd Lake, to name a few.",
					lat   : 39.3211,
					long  : -120.6341
				},
				{
					id    : "upper_mokelumne",
					label : "Upper Mokelumne River",
					desc  : "This recreation area surrounds the Mokelumne River. Beginning at the Blue Lakes complex to the east and flowing west through Salt Springs Reservoir down to the Electra Day Use Area.",
					lat   : 38.6273,
					long  : -119.9386
				},
				{
					id    : "lyons_merced",
					label : "Lyons Reservoir & Merced Falls Reservoir",
					desc  : "Lyons Reservoir offers hiking and shoreline fishing. Merced Falls Reservoir features access to fishing in two locations.",
					lat   : 38.0950,
					long  : -120.1630
				},
				{
					id    : "manzanita_kerckhoff",
					label : "Manzanita Lake & Kerckhoff Reservoir",
					desc  : "These two reservoirs offer camping and hiking experiences.",
					lat   : 37.1497,
					long  : -119.5135
				},
				{
					id    : "kings_river",
					label : "Courtright Lake & Lake Wishon",
					desc  : "Among camping and hiking, this area has many fishing areas to choose from.",
					lat   : 37.1015,
					long  : -118.9827
				},
				{
					id    : "diablo_canyon_trails",
					label : "Pecho Coast and Point Buchon Hiking Trails",
					desc  : "The Diablo Canyon Power Plant provides pedestrian hiking opportunities on specific coastal portions of its property. Through its Land Stewardship Program, Pacific Gas and Electric Company has preserved these areas, providing examples of the Central Coast in its natural, open space context.",
					lat   : 35.2074265575081,
					long  : -120.815368678084
				}
			],
			"map",
			6,
			[38.1863,-118],
			'<style type="text/css">.camp_legend{padding: 10px 0;width:300px}.camp_legend dt{float:left;margin-right:10px;width:34px}.camp_legend dd{float:left;font-size:12px;height:35px;margin: 0;padding:10px 10px 0 0;text-align:right;width:95px;}</style><dl class="camp_legend"><dd>Campground</dd><dt><img src="/includes/images/map/NPS-campground.png" /></dt><dd>Picnic Area</dd><dt><img src="/includes/images/map/NPS-picnic-area.png" /></dt><dd>Swimming</dd><dt><img src="/includes/images/map/NPS-swimming.png" /></dt><dd>Boat Launch</dd><dt><img src="/includes/images/map/NPS-boat-launch.png" /></dt><dd>Fishing</dd><dt><img src="/includes/images/map/NPS-fishing.png" /></dt><dd>Trailhead</dd><dt><img src="/includes/images/map/NPS-trailhead.png" /></dt><dd>Information</dd><dt><img src="/includes/images/map/NPS-information.png" /></dt><dd>Scenic Viewpoint</dd><dt><img src="/includes/images/map/NPS-scenic-viewpoint.png" /></dt><dd>Parking</dd><dt><img src="/includes/images/map/NPS-parking.png" /></dt></dl>'
		);

		// Open up the modal overlay
		$("#map_modal").jqm();
	}
});




