/*
jQuery Google Bubbles: Google Maps Custom Info Windows - v0.7 - 10/23/2010
http://timmywillison.com/samples/bubbles/example.html
Copyright (c) 2010 timmy willison
Dual licensed under the MIT and GPL licences.
http://timmywillison.com/licence/
*/
(function(g){var p=function(){return new o.init(arguments)},o=p.prototype={opts:{center:{lat:36.915,lng:-95.225},markers:[{lat:35.289,lng:-94.756,title:"woot",content:'
'}],markerIcon:"images/google-maps-icon.png",markerShadow:"images/google-maps-shadow.png",windowImage:"images/google-maps-infobox.png",closeImage:"images/google-maps-close.png",offsetVertical:-226,offsetHorizontal:-20,iwWidth:208,iwHeight:165},init:function(b){b=Array.prototype.slice.call(b);
this.mapEl=g(b.shift());this.opts.map=new google.maps.Map(this.mapEl[0],{zoom:4,scrollwheel:0,center:new google.maps.LatLng(this.opts.center.lat,this.opts.center.lng),mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:true,navigationControlOptions:{style:google.maps.NavigationControlStyle.ZOOM_PAN}});g.extend(this.opts,b[0]||{});this.setMarkers(this.opts.map,this.opts.markers)},setMarkers:function(b,a){for(var c=0;c").css({border:"0 none",position:"absolute",background:"url("+this.windowImage+") no-repeat top left",width:this.width,height:this.height,padding:"10px 20px 30px 20px"});var c=g("").css({textAlign:"right",marginBottom:"-5px"}),h=g("").css({width:11,height:11,cursor:"pointer"}).attr("src",this.closeImage).appendTo(c);google.maps.event.addDomListener(h[0],"click",function(f){return function(){f.setMap(null)}}(this));c.appendTo(a);g(this.content).appendTo(a);a.remove().appendTo(b.floatPane);
this.panMap()}};k.prototype.panMap=function(){var b=this.map,a=b.getBounds();if(a){var c=this.latlng,h=this.width,f=this.height,i=this.offsetHorizontal,j=this.offsetVertical,e=b.getDiv(),d=e.offsetWidth;e=e.offsetHeight;var l=a.toSpan(),m=l.lng(),n=l.lat();l=m/d;n=n/e;e=a.getSouthWest().lng();m=a.getNorthEast().lng();d=a.getNorthEast().lat();a=a.getSouthWest().lat();var q=c.lng()+(i-40)*l;i=c.lng()+(i+h+40)*l;h=c.lat()-(j-40)*n;c=c.lat()-(j+f+40)*n;f=(qm?m-i:0);c=(h>d?d-h:0)+(c