');mapit(lat,lon,zoom,id);}
function remove_map(id){$(id).remove();}
function createPolygons(areajson,bounds){var coords=areajson.coordinates;var polygons=_(coords).reduce([],function(memo_n,n){var polygonpaths=_(n).reduce(new google.maps.MVCArray(),function(memo_o,o){var polygoncords=_(o).reduce(new google.maps.MVCArray(),function(memo_p,p){var mylatlng=new google.maps.LatLng(p[1],p[0]);if(bounds){bounds.extend(mylatlng);}
memo_p.push(mylatlng);return memo_p;});memo_o.push(polygoncords);return memo_o;});var polygon=new google.maps.Polygon({paths:polygonpaths,strokeColor:"#201a11",strokeOpacity:0.8,strokeWeight:2,fillColor:"#201a11",fillOpacity:0.35});memo_n.push(polygon);return memo_n;});return polygons;}
function get_exif(obj,id){$(obj).parents().eq(3).append('
');$(obj).parents().eq(2).children('.meta').clone().appendTo('#'+id).css('visibility','visible');$('#exif-container').css({bottom:function(index,value){return parseFloat($(obj).parent().parent().css("height"))-14;}});}
function remove_exif(id){$('#'+id).remove();}
$(document).ready(function(){$('.map-link').click(function(){var more_id='more-container-'+$(this).parent().next().children('.more-link').attr('id').split('-')[1];var id='#map-container-'+this.title.split(',')[3];if($('#'+more_id).is(":visible")){remove_exif(more_id);}
if($(id).is(":visible")){remove_map(id);}else{create_map(this);}
return false;});$('.more-link').click(function(){var map_id='#map-container-'+$(this).parent().prev().children('.map-link').attr('title').split(',')[3];var id='more-container-'+this.id.split('-')[1];if($(map_id).is(":visible")){remove_map(map_id);}
if($('#'+id).is(":visible")){remove_exif(id);}else{get_exif(this,id);}
return false;});});