//This addiitonal piece helps JQuery work within Silverstripe and the legacy fragments of Prototype
;(function($) {
	$(document).ready(function() {
 			
		/***************************
		Location Page Functions & Actions
		****************************/
		var streetAddress = $('#druryLocationHcard .street-address').text();
		var locality = $('#druryLocationHcard .locality').text();
		var region = $('#druryLocationHcard .region').text();
		
		var address = streetAddress + ', ' + locality + ', ' + region;
		
 		$("#map_canvas").gMap({ 
								markers: [{ address: address,
		                              		html: address,
		                              		popup: false,
		 									icon:
											    {
											        image:              "themes/drury/images/icon_drury_gmap.png",
											        shadow:             "themes/drury/images/icon_drury_gmap_shadow.png",
											        iconsize:           [40, 33],
											        shadowsize:         [40, 33],
											        iconanchor:         [25, 30],
											        infowindowanchor:   [20, 2]
											    }
										}],
		                  		zoom: 14,
								scrollwheel: false
							});
		

	// Standard jQuery footer
	});
})(jQuery);
