/* Author: 

*/

$(window).load(function() {

    $('.contact').hover(function () {
        $(this).css('cursor', 'pointer');
    });

     $('#slider').nivoSlider({
            effect: 'fade', //Specify sets like: 'fold,fade,sliceDown'
            animSpeed:500, //Slide transition speed
            controlNav: false,
            directionNav: false,
            pauseTime:8000
        });

	// initialize the map on the "map" div
	var attr = new L.Control.Attribution();
	attr.setPrefix('<a href="http://www.mdimap.us/">MD iMap</a>');
	var map = new L.Map('map', {attributionControl: false});
	map.addControl(attr);
	var baseMap = new L.TileLayer('http://{s}.tiles.mapbox.com/v3/mapbox.world-light/{z}/{x}/{y}.png', { maxZoom: 15 });
	
	//var imapURL = 'http://www.mdimap.us/ArcGIS/rest/services/ImageryBaseMapsEarthCover/MD.State.NAIPImagery.2007/MapServer/tile/{z}/{y}/{x}.png';	
	var imapURL = 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}.png';
	var imap = new L.TileLayer(imapURL, { attribution: 'MD iMAP'});

	// add the CloudMade layer to the map set the view to a given center and zoom
	map.addLayer(imap).setView(new L.LatLng(38.5, -77), 7);

	// create a marker in the given location and add it to the map
	var marker = new L.Marker(new L.LatLng(38.34065, -75.59948));
	map.addLayer(marker);

	// attach a given HTML content to the marker and immediately open it
	marker.bindPopup("ESRGC headquarters.");


});

















