\');\n mapit(lat,lon,zoom,id);\n}\nfunction remove_map(id) {\n $(id).remove();\n}\n\n//functions to handle the "more" link\n// utility functions to create/remove camera info container\nfunction get_exif(obj,id) {\n //$(obj).parents().eq(2).append(\'
\');\n $(obj).parents().eq(3).append(\'
\'); $(obj).parents().eq(2).children(\'.meta\').clone().appendTo(\'#\'+id).css(\'visibility\', \'visible\');\n \n \n \n //deal with the variable height of div.legend\n $(\'#exif-container\').css({\n bottom: function(index, value) {\n return parseFloat($(obj).parent().parent().css("height"))-14;\n }\n });\n}\nfunction remove_exif(id) {\n $(\'#\'+id).remove();\n}\n$(document).ready(function(){ \n//set up click events for map button\n $(\'.map-link\').click( function() {\n var more_id = \'more-container-\'+$(this).parent().next().children(\'.more-link\').attr(\'id\').split(\'-\')[1];\n var id = \'#map-container-\'+$(this).attr(\'data-id\');\n if ($(\'#\'+more_id).is(":visible")){\n remove_exif(more_id);\n }\n if ($(id).is(":visible")) {\n remove_map(id); \n } else {\n create_map($(this));\n }\n return false;\n \n }); \n \n //set up click events for more info button\n $(\'.more-link\').click( function() {\n var map_id = \'#map-container-\'+$(this).parent().prev().children(\'.map-link\').attr(\'data-id\');\n var id = \'more-container-\'+this.id.split(\'-\')[1];\n if ($(map_id).is(":visible")){\n remove_map(map_id);\n }\n if ($(\'#\'+id).is(":visible")) {\n remove_exif(id);\n } else {\n get_exif(this, id);\n }\n return false;\n });\n\n});\n'