//Utility functions for map info window function mapit(latlontitle) { lat = parseFloat(latlontitle.split(',')[0]); lon = parseFloat(latlontitle.split(',')[1]); title= latlontitle.split(',')[2]; centerCoord = new google.maps.LatLng(lat, lon); var mapitinit; if (mapitinit == true) { mapPanTo(); } else { mapInit(); } function mapInit() { var mapOptions = { zoom: 8, center: centerCoord, disableDefaultUI: true, navigationControl: true, mapTypeId: google.maps.MapTypeId.TERRAIN, navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL} }; map = new google.maps.Map(document.getElementById("map-wrapper"), mapOptions); var marker = new google.maps.Marker({ position: centerCoord, map: map, title: title }); mapitinit = true; } function mapPanTo(){ var marker = new google.maps.Marker({ position: centerCoord, map: map, title: title }); map.panTo(centerCoord); } } // utility functions to create/remove map container function create_map(obj) { //create container divs $(obj).parent().parent().parent().append('
'); $('#map-container').append('
'); //deal with the variable height of div.legend $('#map-container').css({ bottom: function(index, value) { return parseFloat($(obj).parent().parent().height())-2; } }); mapit(obj.title); } function remove_map() { $('#map-container').remove(); } // utility functions to create/remove camera info container function get_exif(obj,id) { $(obj).parents().eq(2).append('
'); $(obj).parents().eq(2).children('.meta').clone().appendTo('#exif-container').css('display', 'block'); //deal with the variable height of div.legend $('#exif-container').css({ bottom: function(index, value) { return parseFloat($(obj).parent().parent().height())-14; } }); } function remove_exif() { $("#exif-container").remove(); } // $(document).ready(function(){ //Add navigation $('#breadcrumbs').after(''); //activate pause button //state var var show_state = 'playing'; $('#play').click(function() { if (show_state == 'playing') { $('#slides').cycle('pause'); $(this).html('▶'); $(this).attr('title','Play slideshow'); show_state = 'paused'; } else { $('#slides').cycle('resume', true); $(this).html('▐▐'); $(this).attr('title','Pause slideshow'); show_state= 'playing'; } return false; }); //set up click events for map button $('.map-link').click( function() { if ($("#exif-container").is(":visible")){ remove_exif(); } if ($('#map-container').is(":visible")) { remove_map(); } else { create_map(this); } return false; }); //set up click events camera info button $('.exif-link').click( function() { if ($('#map-container').is(":visible")){ remove_map(); } if ($('#exif-container').is(":visible")) { remove_exif(); } else { get_exif(this); } return false; }); // create and hide nav buttons (needed for keyboard shortcuts $('#slides').append(''); $('.slidenav').css("display","none"); var is_permalink = false; //find out if we should display a specific slide var index = 0, hash = window.location.hash; if (hash) { index = /\d+/.exec(hash)[0]; index = (parseInt(index) || 1) - 1; // slides are zero-based //if this is a permalink, then don't autoplay: is_permalink = true; } // initialize the cycle slideshow $('#slides .bigimg').wrapAll('
').parents('#slides').append('