(function($){ $.fn.extend({showMapPopup: function(options) { var trim_string = function(str) { return str.replace(/^\s+/, "").replace(/\s+$/, ""); } options.title = trim_string(options.title); options.address = trim_string(options.address); var content = $('
'); var width = $(window).width()/3*2; var height = $(window).height()/3*2; content.css('width', width); content.css('height', height); m = content.modal(); var c = $('#modalContainer'); c.css('margin-left', ($(window).width()-width)/2+'px'); c.css('top', ($(window).height()-height)/2+'px'); $('#modalOverlay').click(function(){m.close()}); content.showMap(options); $('div.gsmsc-controls').hide(); $('.gsmsc-mapDiv', '#map').css('height', height+'px'); $('.gsmsc-idleMapDiv', '#map').css('height', height+'px'); return false; }}); $(document).ready(function(){ $('a.small', '#feed_cool_places').click(function(){ var link = $(this); return link.showMapPopup({ title: $('div', link.parent()).text(), address: link.text() }); }); $('img', 'div.posttext').each(function(){ var src = this.src; if (src.match('/blog/')) { src = src.replace('/blog/', '/large/'); $(this).wrap(''); $(this).parent().click(function(e) { e.stopPropagation(); var img = $('