(function() { var init_get_days_links; init_get_days_links = function() { return $('.get_days_link').each(function() { return $(this).click(function() { $('td.info').nextAll().remove(); $('td.info').after(loader_html); $('.spinner div').css("margin", "1px"); return jQuery.get($(this).data('url'), function(data) {}); }); }); }; $(function() { var docMapInstance; init_get_days_links(); if ($("#map").length > 0) { docMapInstance = new DocMap(); docMapInstance.setupAutocomplete(); docMapInstance.setupGeolocation($("#detectCL")); $(document).on("click", "a.markerList", function(event) { var id, marker; event.preventDefault(); id = parseInt($(this).text()) - 1; if (marker = docMapInstance.markers[id]) { docMapInstance.map.setCenter(marker.getPosition()); return docMapInstance.map.setZoom(16); } }); } $("#search .more").click(function(event) { event.preventDefault(); $("#search #more").toggle(); if ($(this).hasClass("up")) { return $(this).removeClass("up"); } else { return $(this).addClass("up"); } }); return $("#search .refresh").click(function(event) { event.preventDefault(); return typeof docMapInstance.fetch_data === "function" ? docMapInstance.fetch_data() : void 0; }); }); }).call(this);