jQuery.fn.miniMap=function(a){return this.each(function(){var d=jQuery.extend({minZoom:5,maxZoom:14,zoom:8,site:{lat:0,lng:0,siteCode:"",accommodationCode:"",name:"",sleepText:"",price:"",introText:"",image:""},airportsAndPorts:[]},a);var g;if(GBrowserIsCompatible()){g=new GMap2(this);GEvent.addListener(g,"load",b);g.enableScrollWheelZoom();g.addControl(new GMapTypeControl());g.addControl(new GLargeMapControl());g.addControl(new GScaleControl());G_PHYSICAL_MAP.getMinimumResolution=function(){return 4;};G_NORMAL_MAP.getMinimumResolution=function(){return 4;};G_SATELLITE_MAP.getMinimumResolution=function(){return 4;};G_HYBRID_MAP.getMinimumResolution=function(){return 4;};G_PHYSICAL_MAP.getMaximumResolution=function(){return 12;};G_NORMAL_MAP.getMaximumResolution=function(){return 12;};G_SATELLITE_MAP.getMaximumResolution=function(){return 12;};G_HYBRID_MAP.getMaximumResolution=function(){return 12;};c();f(d.airportsAndPorts);bMapLoaded=true;}function b(){var i="Loading Map...";var j=document.createElement("div");j.appendChild(document.createTextNode(i));j.setAttribute("id","mapLoading");j.style.position="relative";j.style.padding="2em";j.style.fontWeight="bold";j.style.fontSize="12px";j.style.color="#000";this.getContainer().insertBefore(j,this.getContainer().firstChild);}function c(){var k=new GLatLng(parseFloat(d.site.lat),parseFloat(d.site.lng));g.setCenter(k,d.zoom);var i=new GMarker(k,e());var j=h(i);GEvent.addListener(i,"click",j);g.addOverlay(i);GEvent.trigger(i,"click");}function e(){var i=new GIcon();i.image="../../Images/EUVilla/GoogleMapIcons/Complex.png";i.iconAnchor=new GPoint(24,15);i.infoWindowAnchor=new GPoint(16,0);i.iconSize=new GSize(49,31);return i;}function h(i){return function(){i.openInfoWindowHtml('<table id="balloon">            <tr>              <td>                <a id="balloonTitle" target="_parent" href="../EUVilla/ProductDetailPage.aspx?ISDLNK=1&amp;SCODE='+d.site.siteCode+"&ACODE="+d.site.accommodationCode+'&TID=villaComplex                  ">'+d.site.name+'</a>                <br/>                <span class="SleepLbl">Sleeps: </span><span class="SleepText">'+d.site.sleepText+'</span>                <p id="introText">'+d.site.introText+'</p>              </td>              <td>                <a target="_parent" href="../EUVilla/ProductDetailPage.aspx?ISDLNK=1&amp;SCODE='+d.site.siteCode+"&ACODE="+d.site.accommodationCode+'&TID=villaComplex                   "><img id="searchResultImage" src="'+d.site.image+'"></a>              </td>            </tr>            <tr >              <td>                <div id="viewComplex">                  <a target="_parent" href="../EUVilla/ProductDetailPage.aspx?ISDLNK=1&amp;SCODE='+d.site.siteCode+"&ACODE="+d.site.accommodationCode+'&TID=villaComplex">Read more>></a>                </div>              </td>            </tr>          </table>');return false;};}function f(m){var o=new GIcon(G_DEFAULT_ICON);o.shadow="http://www.google.com/mapfiles/shadow50.png";o.iconSize=new GSize(24,24);o.shadowSize=new GSize(37,24);o.iconAnchor=new GPoint(12,12);o.infoWindowAnchor=new GPoint(9,2);for(var l=0;l<m.length;l++){var n=new GIcon(o);n.image=m[l].type=="airport"?"../../Images/EUVilla/GoogleMapIcons/airportIcon.png":"../../Images/EUVilla/GoogleMapIcons/ferryIcon.png";var j=new GMarker(new GLatLng(m[l].lat,m[l].lng),n);GEvent.addListener(j,"click",i(j,m[l]));g.addOverlay(j);}function i(k,p){return function(){k.openInfoWindowHtml('<table id="balloon">              <tr>                <td>                  <h3>'+p.name+(p.code?" ("+p.code+")":"")+"</h3>                  <p>Distance: "+p.distance+" miles.</p>                </td>              </tr>            </table>");};}}});};
