13 Units'],['Brookfield',47.11819,-122.32096,29,'brookfield','Brookfield','Puyallup, WA 83 Units'],['Cambridge',47.55922,-122.01449,28,'cambridge','Cambridge','Fall City, WA 15 Units'],['Canyon Terrace',47.43181,-122.17675,27,'canyon-terrace','Canyon Terrace','Renton, WA 70 Units'],['Cedarbrook',47.68914,-122.17618,26,'cedarbrook','Cedarbrook','Kirkland, WA 9 Units'],['Forest Heights',47.5377446,-122.067917,25,'forest-heights','Forest Heights','Issaquah, WA 24 Units'],['Inneswood Estates',47.54089,-122.05536,24,'inneswood-estates','Inneswood Estates','Issaquah, WA 10 Units'],['Ivy Estates',47.59487,-122.0097,24,'ivy-estates','Ivy Estates','Sammamish, WA 10 Units'],['Jazz Run',47.5575884,-122.0327103,22,'jazz-run','Jazz Run','Issaquah, WA 19 Units'],['Pickering Estates',47.54089,-122.05536,21,'pickering-estates','Pickering Estates','Issaquah, WA 20 Units'],['Puget Meadows',47.0780279,-122.7490479,20,'puget-meadows','Puget Meadows','Lacey, WA 37 Units'],['LakePointe',47.3744435,-122.0844984,19,'lakepointe','LakePointe','Covington, WA 1159 Units'],['Maple Hills',47.3708832,-122.0667207,18,'maple-hills','Maple Hills','Renton, WA 220 Units'],['Summerwood',47.1306516,-122.3291588,17,'summerwood','Summerwood','Puyallup, WA 358 Units']];}
else if(post_slug=="nevada"){var points=[['Canyon View I, II, III',36.0488116,-115.2237189,30,'canyon-view','Canyon View I, II, III','CITY, NV 59 Units'],['Centennial Crossing',36.2780812,-115.3250206,29,'centennial-crossing','Centennial Crossing','Las Vegas, NV 22 Units'],['Valona',36.2895988,-115.3010148,28,'valona','Valona','Las Vegas, NV 25 Units'],['Hazelwood',36.0148753,-115.1350048,27,'hazelwood','Hazelwood','Las Vegas, NV 22 Units'],['Montclaire',36.3025932,-115.32516,26,'montclaire','Montclaire','Las Vegas, NV 48 Units'],['Mountain Terrace',36.23443,-115.3080261,25,'mountain-terrace','Mountain Terrace','Las Vegas, NV 12 Units'],['Piedmont',36.07369,-115.22047,24,'piedmont','Piedmont','Las Vegas, NV 9 Units'],['Shadow Pointe',36.2193577,-115.319699,23,'shadow-pointe','Shadow Pointe','Las Vegas, NV 36 Units'],['Duneville Meadows',36.0233404,-115.2233756,22,'duneville-meadows','Duneville Meadows','Las Vegas, NV 19 Units'],['Ford Ranch',36.02943,-115.27793,21,'ford-ranch','Ford Ranch','Las Vegas, NV 18 Units'],['Willow Ridge',36.0991517,-115.3034717,20,'willow-ridge','Willow Ridge','Las Vegas, NV 36 Units'],['Bermuda Ridge',36.006393, -115.155561,19,'bermuda-ridge','Bermuda Ridge','Las Vegas, NV 15 Units'],['Shelbourne Estates',36.03842,-115.16174,18,'shelbourne-estates','Shelbourne Estates','Las Vegas, NV 12 Units'],['Regina Ridge',36.276443,-115.297684,17,'regina-ridge','Regina Ridge','Las Vegas, NV 18 Units']];}
else if(post_slug=="arizona"){var points=[['Encue',33.501648,-112.0286071,30,'encue','Encue','Phoenix, AZ 46 Units'],['The Ridge at Troon North',33.745646,-111.865443,29,'the-ridge-at-troon-north','The Ridge at Troon North','Scottsdale, AZ 65 Units']];}
else if(post_slug=="colorado"){var points=[['Perry Row at Sloans',39.7422816,-105.0400472,30,'perry-row-at-sloans','Perry Row at Sloans','Denver, CO 64 Units'],['Richard\'s Farm',39.8284535,-105.145458,29,'richards-farm','Richard\'s Farm','Arvada, CO 125 Units']];}
else if(post_slug=="northern-california"){var points=[['Amber Field',37.957243,-121.710968,30,'amber-field','Amber Field','Brentwood, CA 36 Units'],['Autumnwood',38.7066049,-121.3023528,29,'autumnwood','Autumnwood','Citrus Heights, CA 46 Units'],['Brioso Reserve',38.3429479,-122.3328441,28,'brioso-reserve','Brioso Reserve','Napa, CA 18 Units'],['Curtis Park Village',38.5461852,-121.484735,27,'curtis-park','Curtis Park Village','Sacramento, CA 86 Units'],['Farmhouse at Willow Creek',38.6616418,-121.1787593,26,'farmhouse-at-willow-creek','Farmhouse at Willow Creek','Folsom, CA 126 Units'],['Decoto Crossing',37.5773293,-122.0259807,25,'decoto-crossing','Decoto Crossing','Fremont, CA 10 Units'],['Blume',38.42753,-122.75848,24,'blume','SBlume','Santa Rosa, CA 67 Units'],['The Commons',37.1220356,-121.6468048,23,'the-commons','The Commons','Morgan Hill, CA 12 Units'],['The Creamery at Alkali Flats',38.5871367,-121.4900324,22,'the-creamery-at-alkali-flats','The Creamery at Alkali Flats','Sacramento, CA 122 Units'],['The Village at Fair Oaks',38.6628775,-121.3052174,21,'the-village-at-fair-oaks','The Village at Fair Oaks','Fair Oaks, CA 55 Units'],['The Gables',37.107457,-121.6368484,20,'the-gables','The Gables','Morgan Hill, CA 37 Units'],['Woodbury at Davis Ranch',38.648228,-121.2632596,19,'woodbury-at-davis-ranch','Woodbury at Davis Ranch','Fair Oaks, CA 17 Units'],['Evergreen',37.132045,-121.6276092,18,'evergreen','Evergreen','Morgan Hill, CA 256 Units']];}
else if(post_slug=="central-coast"){var points=[['Bellasera',35.12869,-120.56289,30,'bellasera','Bellasera','Arroyo Grande, CA 11 Units'],['Carmel Canyon Estates',35.44564,-120.62258,29,'carmel-canyon-estates','Carmel Canyon Estates','Atascadero, CA 17 Units'],['Costa Azure',35.15979,-120.6731,28,'costa-azure','Costa Azure','Pismo Beach, CA 16 Units'],['Enclave at Costa Pacifica',34.99874,-120.44695,27,'enclave-at-costa-pacifica','Enclave at Costa Pacifica','Nipomo, CA 37 Units'],['Estancia Estates',35.45573,-120.62538,26,'estancia-estates','Estancia Estates','Atascadero, CA 10 Units'],['Heritage Square',34.93304,-120.45887,25,'heritage-square','Heritage Square','Santa Maria, CA 296 Units'],['Legacy at La Ventana',34.95486,-120.39726,24,'legacy-at-la-ventana','Legacy at La Ventana','Santa Maria, CA 120 Units'],['Monte Sereno',35.16874,-120.53829,23,'monte-sereno','Monte Sereno','Arroyo Grande, CA 13 Units'],['Seaside',35.139,-120.63988,22,'seaside','Seaside','Pismo Beach, CA 8 Units'],['SLO Terrace',35.27218,-120.65293,21,'slo-terrace','SLO Terrace','San Luis Obispo, CA 17 Units'],['Templeton Ranch',35.56144,-120.69948,20,'templeton-ranch','Templeton Ranch','Templeton, CA 107 Units'],['The Terraces at Las Ventanas',35.14533,-120.62796,19,'the-terraces-at-las-ventanas','The Terraces at Las Ventanas','Pismo Beach, CA 36 Units'],['The Village at Pacific West',35.13259,-120.60929,18,'the-village-at-pacific-west','The Village at Pacific West','Pismo Beach, CA 73 Units'],['Twin Oaks',35.46753,-120.65424,17,'twin-oaks','Twin Oaks','Atascadero, CA 32 Units'],['Vistas at Pismo Village',35.14366,-120.64327,16,'vistas-at-pismo-village','Vistas at Pismo Village','Pismo Beach, CA 32 Units'],['San Luis Ranch',35.2660941,-120.6417785,15,'san-luis-ranch','San Luis Ranch','San Luis Obispo, CA 580 Units'],['The Arroyos at Righetti',35.2526,-120.632202,14,'the-arroyos-at-righetti','The Arroyos at Righetti','San Luis Obispo, CA 60 Units'],['Heirloom',35.25937,-120.680404,13,'heirloom','Heirloom','San Luis Obispo, CA 83 Units'],['Legacy Collection',35.258801,-120.681649,12,'legacy-collection','Legacy Collection','San Luis Obispo, CA 198 Units'],['Fig',35.259003,-120.682402,11,'fig','Fig','San Luis Obispo, CA 80 Units'],['Harvest Vista',35.259849,-120.682322,10,'harvest-vista','Harvest Vista','San Luis Obispo, CA 96 Units']];}
else if(post_slug=="central-valley"){var points=[['Catalina',36.2073298,-119.3126446,30,'catalina','Catalina','Tulare, CA 71 Units'],['Chandler Park',36.310358,-119.671158,29,'chandler-park','Chandler Park','Hanford, CA 113 Units'],['Chelsea Place',36.3044,-119.2758,28,'chelsea-place','Chelsea Place','Visalia, CA 155 Units'],['Chelsea West',36.30481,-119.285,27,'chelsea-west','Chelsea West','Visalia, CA 145 Units'],['Hartley Grove',36.30636,-119.66778,26,'hartley-grove','Hartley Grove','Hanford, CA 182 Units'],['Pheasant Ridge',36.09265,-119.57525,25,'pheasant-ridge','Pheasant Ridge','Corcoran, CA 73 Units'],['Pine River Estates',36.34591,-119.26838,24,'pine-river-estates','Pine River Estates','Visalia, CA 144 Units'],['San Marino',36.35353,-119.36423,23,'san-marino','San Marino','Visalia, CA 95 Units'],['Savannah',36.21306,-119.37074,22,'savannah','Savannah','Tulare, CA 231 Units'],['Sedona at Palo Verde',36.21875,-119.31287,21,'sedona-at-palo-verde','Sedona at Palo Verde','Tulare, CA 106 Units'],['Tuscany Village',35.39867,-119.16657,20,'tuscany-village','Tuscany','Bakersfield, CA 116 Units'],['Viscaya',36.55187,-119.4029,19,'viscaya','Viscaya','Dinuba, CA 124 Units'],['Mountain View',36.30617,-119.66783,18,'mountain-view','Mountain View','Hanford, CA 32 Units'],['Catalina II',36.34862,-119.29912,17,'catalina-visalia','Catalina II','Visalia, CA 51 Units'],['Bella Vista',36.34968,-119.68615,16,'bella-vista','Bella Vista','Hanford, CA 247 Units'],['Brighton',36.242097, -119.318947,15,'brighton','Brighton','Tulare, CA 165 Units'],['Ashton Park',36.356634,-119.350006,14,'ashton-park','Ashton Park','Visalia, CA 93 Units'],['Greystone',36.356634,-119.350006,13,'greystone','Greystone','Visalia, CA 187 Units'],['Kensington',36.242097,-119.318947,12,'kensington','Kensington','Tulare, CA 255 Units'],['Cambria',36.081935,-119.076618,11,'cambria','Cambria','Porterville, CA 80 Units'],['Summerlyn',36.513511,-119.534158,10,'summerlyn','Summerlyn','Kingsburg, CA 150 Units'],['Vista Robles',36.562688,-119.401215,9,'vista-robles','Vista Robles','Dinuba, CA 139 Units'],['Bonterra',36.347637,-119.684286,8,'bonterra','Bonterra','Hanford, CA 300 Units'],['Tiffany Ranch',36.329039,-119.361581,7,'tiffany-ranch','Tiffany Ranch','Visalia, CA 125 Units'],['Arbor Gates',36.293815,-119.333842,6,'arbor-gates','Arbor Gates','Visalia, CA 91 Units'],['Cameron Court',36.297131,-119.293852,5,'cameron-court','Cameron Court','Visalia, CA 30 Units'],['San Rio',36.620616,-119.446164,4,'san-rio','San Rio','Reedley, CA 150 Units'],['Hidden Oaks',36.302007,-119.667715,3,'hidden-oaks','Hidden Oaks','Hanford, CA 238 Units'],['Sterling Oaks',36.302007,-119.667715,2,'sterling-oaks','Sterling Oaks','Hanford, CA 106 Units'],['Pheasant Court',35.788719,-119.272037,31,'pheasant-court','Pheasant Court','Delano, CA 148 Units'],['Quail Run',35.788719,-119.272037,32,'quail-run','Quail Run','Delano, CA 133 Units'],['Cypress Park',36.245864, -119.316337,33,'cypress-park','Cypress Park','Tulare, CA 154 Units'],['Vista del Sol',36.304482, -119.268026,34,'vista-del-sol','Cypress Park','Visalia, CA 94 Units'],['Montebella',36.554449,-119.410746,35,'montebella','Montebella','Dinuba, CA 175 Units'],['Maplewood',36.332797,-119.269808,36,'maplewood','Maplewood','Visalia, CA 138 Units'],['Brookside',36.089558,-119.068574,37,'brookside','Brookside','Porterville CA 110 Units'],['Granite Hills',36.34349,-119.432947,38,'granite-hills','Granite Hills CA 75 Units'],['Laurelwood',36.089558,-119.068574,39,'laurelwood','Laurelwood CA 118 Units'],['Stonebrook',36.34349,-119.432947,40,'stonebrook','Stonebrook CA 93 Units'],['Sycamore Ranch',36.562688,-119.401215,41,'sycamore-ranch','Sycamore Ranch CA 92 Units']];}
else if(post_slug=="southern-california"){var points=[['Afton Way',33.1718316,-117.3264152,30,'afton-way','Afton Way','Carlsbad, CA 8 Units'],['Indigo',34.0788071,-117.9712558,29,'indigo','Indigo','Baldwin Park, CA 50 Units'],['Otay Ranch',32.6120683,-116.9910264,28,'otay-ranch','Otay Ranch','Chula Vista, CA 233 Units'],['Pacific Ridge',33.2167804,-117.2916055,27,'pacific-ridge','Pacific Ridge','Oceanside, CA 314 Units'],['Phantom Trail',34.4711555,-118.5148671,26,'phantom-trail','Phantom Trail','Santa Clarita, CA 29 Units'],['Tesoro at Vista del Sur',32.5648901,-117.0136213,25,'tesoro-at-vista-del-sur','Tesoro at Vista del Sur','San Diego, CA 134 Units'],['The Cove at Citrus',33.679863,-116.2695095,24,'the-cove-at-citrus','The Cove at Citrus','La Quinta, CA 29 Units'],['The Enclave at Ventura',34.2754241,-119.1487831,23,'the-enclave-at-ventura','The Enclave at Ventura','Ventura, CA 91 Units'],['The Preserve',33.177278,-117.3039114,22,'the-preserve','The Preserve','Carlsbad, CA 636 Units'],['The Promontory',33.5643556,-117.1229267,21,'the-promontory','The Promontory','French Valley, CA 268 Units'],['Tovara',34.30233,-118.42376,20,'tovara','Tovara','Sylmar, CA 74 Units'],['River View Village',32.8029763,-117.0806283,19,'river-view-village','River View Village','San Diego, CA 16 Units'],['Westerly at Rancho Tesoro',33.11979,-117.16736,18,'westerly-at-rancho-tesoro','Westerly at Rancho Tesoro','San Marcos, CA 71 Units'],['Virada',33.7916312,-116.2683964,17,'virada','Virada','Indio, CA 1,291 Units'],['Veranda at River Park',34.2525252,-119.1703233,16,'veranda-at-river-park','Veranda at River Park','Oxnard, CA 95 Units'],['Pacific Villas',34.08508,-117.96266,15,'pacific-villas','Pacific Villas','Baldwin Park, CA 47 Units'],['New Heights',34.221699,-118.511237,14,'new-heights','New Heights','West Hills, CA 43 Units'],['Riker Ranch ',32.845157,-116.897612,13,'riker-ranch','Riker Ranch ','Lakeside, CA 20 Units'],['Tovara West',34.30233,-118.42376,12,'tovara-west','Tovara West','Sylmar, CA 125 Units'],['Rosewood',34.372492,-119.067211,11,'rosewood','Rosewood','Santa Paula, CA 36 Units'],['Laurel Heights',32.834663,-117.027920,10,'laurel-heights','Laurel Heights','Santee, CA 80 Units'],['Finch Ranch',34.407328,-118.796623,9,'finch-ranch','Finch Ranch','Piru, CA 74 Units']];}
else if(post_slug=="idaho"){var points=[['Lakes at Telaga',43.7103855,-116.554631,30,'lakes-at-telaga','Lakes at Telaga','Middleton, ID 78 Units'],['Southcreek',43.5639585,-116.2989199,29,'southcreek','Southcreek','Boise, ID 215 Units'],['Hadley',43.712133,-116.500647,28,'hadley','Hadley','Star, ID 282 Units']];}
else if(post_slug=="utah"){var points=[['Axis at North Station',40.5622,-111.9297,30,'axis-at-north-station','Axis at North Station','South Jordan, UT 77 Units']];}
jQuery(document).ready(function(){});var markers=[];var contents=[];var infowindows=[];var ib=[];var bounds=new google.maps.LatLngBounds();var totalMarkers=0;function setMarkers(map,locations){var shape={coord:[1,1,1,64,64,64,64,1],type:'poly'};for(var i=0;i
'+place[5]+'
'+place[6]+'
';var boxOptions={content:boxText,disableAutoPan:true,maxWidth:0,pixelOffset:new google.maps.Size(-70,-70),zIndex:null,enableEventPropagation:true,boxStyle:{},closeBoxMargin:"10px 2px 2px 2px",closeBoxURL:"",infoBoxClearance:new google.maps.Size(1,1),isHidden:false,pane:"floatPane",enableEventPropagation:false,url:targetURL};ib[i]=new InfoBox(boxOptions);google.maps.event.addListener(markers[i],'mouseover',function(){ib[this.index].open(map,this);});google.maps.event.addListener(markers[i],'mouseout',function(){});google.maps.event.addListener(markers[i],'click',function(){});google.maps.event.addDomListener(ib[i].content_,'click',(function(markers,i){return function(){window.location.href=markers[i].url;}})(markers,i));google.maps.event.addDomListener(ib[i].content_,'mouseout',(function(markers,i){return function(){}})(markers,i));totalMarkers++;console.log('done: '+place[0]);}
google.maps.event.addDomListener(window,'resize',function(){map.fitBounds(bounds);});}
function paddedBounds(npad,spad,epad,wpad){var SW=map.getBounds().getSouthWest();var NE=map.getBounds().getNorthEast();var topRight=map.getProjection().fromLatLngToPoint(NE);var bottomLeft=map.getProjection().fromLatLngToPoint(SW);var scale=Math.pow(2,map.getZoom());var SWtopoint=map.getProjection().fromLatLngToPoint(SW);var SWpoint=new google.maps.Point(((SWtopoint.x-bottomLeft.x)*scale)+wpad,((SWtopoint.y-topRight.y)*scale)-spad);var SWworld=new google.maps.Point(SWpoint.x/scale+bottomLeft.x,SWpoint.y/scale+topRight.y);var pt1=map.getProjection().fromPointToLatLng(SWworld);var NEtopoint=map.getProjection().fromLatLngToPoint(NE);var NEpoint=new google.maps.Point(((NEtopoint.x-bottomLeft.x)*scale)-epad,((NEtopoint.y-topRight.y)*scale)+npad);var NEworld=new google.maps.Point(NEpoint.x/scale+bottomLeft.x,NEpoint.y/scale+topRight.y);var pt2=map.getProjection().fromPointToLatLng(NEworld);return new google.maps.LatLngBounds(pt1,pt2);}
var map;function initMap(){var myOptions={scrollwheel:false,mapTypeId:'mystyle',zoom:9};map=new google.maps.Map(document.getElementById("map-container"),myOptions);setMarkers(map,points);map.fitBounds(bounds);var oldZoom=null;var oldCenter=null;google.maps.event.addListenerOnce(map,"center_changed",function(){oldCenter=map.getCenter();});google.maps.event.addListenerOnce(map,"zoom_changed",function(){oldZoom=map.getZoom();console.log('total markers added= '+totalMarkers);console.log('map zoom: '+map.getZoom());if(totalMarkers>1){console.log('used fit bounds');}else{console.log('setting zoom');map.setZoom(7);}});map.mapTypes.set('mystyle',new google.maps.StyledMapType(myStyle,{name:'My Style'}));}
var myStyle=[{"featureType":"administrative","elementType":"geometry","stylers":[{"visibility":"off"}]},{"featureType":"administrative","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"administrative.land_parcel","stylers":[{"visibility":"off"}]},{"featureType":"administrative.neighborhood","stylers":[{"visibility":"off"}]},{"featureType":"landscape.man_made","stylers":[{"visibility":"off"}]},{"featureType":"landscape.natural","stylers":[{"color":"#cacaca"}]},{"featureType":"poi","stylers":[{"visibility":"off"}]},{"featureType":"poi","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"road.arterial","stylers":[{"visibility":"off"}]},{"featureType":"road.highway","stylers":[{"color":"#9f9f9f"}]},{"featureType":"road.highway","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"road.local","stylers":[{"visibility":"off"}]},{"featureType":"transit","stylers":[{"visibility":"off"}]},{"featureType":"water","stylers":[{"color":"#eeeeee"}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#d8d8d8"}]},{"featureType":"water","elementType":"labels.text","stylers":[{"visibility":"off"}]},{"featureType":"administrative.locality","elementType":"labels.text","stylers":[{"visibility":"simplified"},{"color":"#000000"}]},{"featureType":"landscape","elementType":"labels.text","stylers":[{"visibility":"off"}]}];
/*!
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
function InfoBox(opt_opts){opt_opts=opt_opts||{};google.maps.OverlayView.apply(this,arguments);this.content_=opt_opts.content||"";this.disableAutoPan_=opt_opts.disableAutoPan||false;this.maxWidth_=opt_opts.maxWidth||0;this.pixelOffset_=opt_opts.pixelOffset||new google.maps.Size(0,0);this.position_=opt_opts.position||new google.maps.LatLng(0,0);this.zIndex_=opt_opts.zIndex||null;this.boxClass_=opt_opts.boxClass||"infoBox";this.boxStyle_=opt_opts.boxStyle||{};this.closeBoxMargin_=opt_opts.closeBoxMargin||"2px";this.closeBoxURL_=opt_opts.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif";if(opt_opts.closeBoxURL===""){this.closeBoxURL_="";}
this.infoBoxClearance_=opt_opts.infoBoxClearance||new google.maps.Size(1,1);if(typeof opt_opts.visible==="undefined"){if(typeof opt_opts.isHidden==="undefined"){opt_opts.visible=true;}else{opt_opts.visible=!opt_opts.isHidden;}}
this.isHidden_=!opt_opts.visible;this.alignBottom_=opt_opts.alignBottom||false;this.pane_=opt_opts.pane||"floatPane";this.enableEventPropagation_=opt_opts.enableEventPropagation||false;this.div_=null;this.closeListener_=null;this.moveListener_=null;this.contextListener_=null;this.eventListeners_=null;this.fixedWidthSet_=null;}
InfoBox.prototype=new google.maps.OverlayView();InfoBox.prototype.createInfoBoxDiv_=function(){var i;var events;var bw;var me=this;var cancelHandler=function(e){e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}};var ignoreHandler=function(e){e.returnValue=false;if(e.preventDefault){e.preventDefault();}
if(!me.enableEventPropagation_){cancelHandler(e);}};if(!this.div_){this.div_=document.createElement("div");this.setBoxStyle_();if(typeof this.content_.nodeType==="undefined"){this.div_.innerHTML=this.getCloseBoxImg_()+this.content_;}else{this.div_.innerHTML=this.getCloseBoxImg_();this.div_.appendChild(this.content_);}
this.getPanes()[this.pane_].appendChild(this.div_);this.addClickHandler_();if(this.div_.style.width){this.fixedWidthSet_=true;}else{if(this.maxWidth_!==0&&this.div_.offsetWidth>this.maxWidth_){this.div_.style.width=this.maxWidth_;this.div_.style.overflow="auto";this.fixedWidthSet_=true;}else{bw=this.getBoxWidths_();this.div_.style.width=(this.div_.offsetWidth-bw.left-bw.right)+"px";this.fixedWidthSet_=false;}}
this.panBox_(this.disableAutoPan_);if(!this.enableEventPropagation_){this.eventListeners_=[];events=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"];for(i=0;i";}
return img;};InfoBox.prototype.addClickHandler_=function(){var closeBox;if(this.closeBoxURL_!==""){closeBox=this.div_.firstChild;this.closeListener_=google.maps.event.addDomListener(closeBox,"click",this.getCloseClickHandler_());}else{this.closeListener_=null;}};InfoBox.prototype.getCloseClickHandler_=function(){var me=this;return function(e){e.cancelBubble=true;if(e.stopPropagation){e.stopPropagation();}
google.maps.event.trigger(me,"closeclick");me.close();};};InfoBox.prototype.panBox_=function(disablePan){var map;var bounds;var xOffset=0,yOffset=0;if(!disablePan){map=this.getMap();if(map instanceof google.maps.Map){if(!map.getBounds().contains(this.position_)){map.setCenter(this.position_);}
bounds=map.getBounds();var mapDiv=map.getDiv();var mapWidth=mapDiv.offsetWidth;var mapHeight=mapDiv.offsetHeight;var iwOffsetX=this.pixelOffset_.width;var iwOffsetY=this.pixelOffset_.height;var iwWidth=this.div_.offsetWidth;var iwHeight=this.div_.offsetHeight;var padX=this.infoBoxClearance_.width;var padY=this.infoBoxClearance_.height;var pixPosition=this.getProjection().fromLatLngToContainerPixel(this.position_);if(pixPosition.x<(-iwOffsetX+padX)){xOffset=pixPosition.x+iwOffsetX-padX;}else if((pixPosition.x+iwWidth+iwOffsetX+padX)>mapWidth){xOffset=pixPosition.x+iwWidth+iwOffsetX+padX-mapWidth;}
if(this.alignBottom_){if(pixPosition.y<(-iwOffsetY+padY+iwHeight)){yOffset=pixPosition.y+iwOffsetY-padY-iwHeight;}else if((pixPosition.y+iwOffsetY+padY)>mapHeight){yOffset=pixPosition.y+iwOffsetY+padY-mapHeight;}}else{if(pixPosition.y<(-iwOffsetY+padY)){yOffset=pixPosition.y+iwOffsetY-padY;}else if((pixPosition.y+iwHeight+iwOffsetY+padY)>mapHeight){yOffset=pixPosition.y+iwHeight+iwOffsetY+padY-mapHeight;}}
if(!(xOffset===0&&yOffset===0)){var c=map.getCenter();map.panBy(xOffset,yOffset);}}}};InfoBox.prototype.setBoxStyle_=function(){var i,boxStyle;if(this.div_){this.div_.className=this.boxClass_;this.div_.style.cssText="";boxStyle=this.boxStyle_;for(i in boxStyle){if(boxStyle.hasOwnProperty(i)){this.div_.style[i]=boxStyle[i];}}
this.div_.style.WebkitTransform="translateZ(0)";if(typeof this.div_.style.opacity!=="undefined"&&this.div_.style.opacity!==""){this.div_.style.MsFilter="\"progid:DXImageTransform.Microsoft.Alpha(Opacity="+(this.div_.style.opacity*100)+")\"";this.div_.style.filter="alpha(opacity="+(this.div_.style.opacity*100)+")";}
this.div_.style.position="absolute";this.div_.style.visibility='hidden';if(this.zIndex_!==null){this.div_.style.zIndex=this.zIndex_;}}};InfoBox.prototype.getBoxWidths_=function(){var computedStyle;var bw={top:0,bottom:0,left:0,right:0};var box=this.div_;if(document.defaultView&&document.defaultView.getComputedStyle){computedStyle=box.ownerDocument.defaultView.getComputedStyle(box,"");if(computedStyle){bw.top=parseInt(computedStyle.borderTopWidth,10)||0;bw.bottom=parseInt(computedStyle.borderBottomWidth,10)||0;bw.left=parseInt(computedStyle.borderLeftWidth,10)||0;bw.right=parseInt(computedStyle.borderRightWidth,10)||0;}}else if(document.documentElement.currentStyle){if(box.currentStyle){bw.top=parseInt(box.currentStyle.borderTopWidth,10)||0;bw.bottom=parseInt(box.currentStyle.borderBottomWidth,10)||0;bw.left=parseInt(box.currentStyle.borderLeftWidth,10)||0;bw.right=parseInt(box.currentStyle.borderRightWidth,10)||0;}}
return bw;};InfoBox.prototype.onRemove=function(){if(this.div_){this.div_.parentNode.removeChild(this.div_);this.div_=null;}};InfoBox.prototype.draw=function(){this.createInfoBoxDiv_();var pixPosition=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.style.left=(pixPosition.x+this.pixelOffset_.width)+"px";if(this.alignBottom_){this.div_.style.bottom=-(pixPosition.y+this.pixelOffset_.height)+"px";}else{this.div_.style.top=(pixPosition.y+this.pixelOffset_.height)+"px";}
if(this.isHidden_){this.div_.style.visibility="hidden";}else{this.div_.style.visibility="visible";jQuery(this.div_).hide().fadeIn();}};InfoBox.prototype.setOptions=function(opt_opts){if(typeof opt_opts.boxClass!=="undefined"){this.boxClass_=opt_opts.boxClass;this.setBoxStyle_();}
if(typeof opt_opts.boxStyle!=="undefined"){this.boxStyle_=opt_opts.boxStyle;this.setBoxStyle_();}
if(typeof opt_opts.content!=="undefined"){this.setContent(opt_opts.content);}
if(typeof opt_opts.disableAutoPan!=="undefined"){this.disableAutoPan_=opt_opts.disableAutoPan;}
if(typeof opt_opts.maxWidth!=="undefined"){this.maxWidth_=opt_opts.maxWidth;}
if(typeof opt_opts.pixelOffset!=="undefined"){this.pixelOffset_=opt_opts.pixelOffset;}
if(typeof opt_opts.alignBottom!=="undefined"){this.alignBottom_=opt_opts.alignBottom;}
if(typeof opt_opts.position!=="undefined"){this.setPosition(opt_opts.position);}
if(typeof opt_opts.zIndex!=="undefined"){this.setZIndex(opt_opts.zIndex);}
if(typeof opt_opts.closeBoxMargin!=="undefined"){this.closeBoxMargin_=opt_opts.closeBoxMargin;}
if(typeof opt_opts.closeBoxURL!=="undefined"){this.closeBoxURL_=opt_opts.closeBoxURL;}
if(typeof opt_opts.infoBoxClearance!=="undefined"){this.infoBoxClearance_=opt_opts.infoBoxClearance;}
if(typeof opt_opts.isHidden!=="undefined"){this.isHidden_=opt_opts.isHidden;}
if(typeof opt_opts.visible!=="undefined"){this.isHidden_=!opt_opts.visible;}
if(typeof opt_opts.enableEventPropagation!=="undefined"){this.enableEventPropagation_=opt_opts.enableEventPropagation;}
if(this.div_){this.draw();}};InfoBox.prototype.setContent=function(content){this.content_=content;if(this.div_){if(this.closeListener_){google.maps.event.removeListener(this.closeListener_);this.closeListener_=null;}
if(!this.fixedWidthSet_){this.div_.style.width="";}
if(typeof content.nodeType==="undefined"){this.div_.innerHTML=this.getCloseBoxImg_()+content;}else{this.div_.innerHTML=this.getCloseBoxImg_();this.div_.appendChild(content);}
if(!this.fixedWidthSet_){this.div_.style.width=this.div_.offsetWidth+"px";if(typeof content.nodeType==="undefined"){this.div_.innerHTML=this.getCloseBoxImg_()+content;}else{this.div_.innerHTML=this.getCloseBoxImg_();this.div_.appendChild(content);}}
this.addClickHandler_();}
google.maps.event.trigger(this,"content_changed");};InfoBox.prototype.setPosition=function(latlng){this.position_=latlng;if(this.div_){this.draw();}
google.maps.event.trigger(this,"position_changed");};InfoBox.prototype.setZIndex=function(index){this.zIndex_=index;if(this.div_){this.div_.style.zIndex=index;}
google.maps.event.trigger(this,"zindex_changed");};InfoBox.prototype.setVisible=function(isVisible){this.isHidden_=!isVisible;if(this.div_){this.div_.style.visibility=(this.isHidden_?"hidden":"visible");}};InfoBox.prototype.getContent=function(){return this.content_;};InfoBox.prototype.getPosition=function(){return this.position_;};InfoBox.prototype.getZIndex=function(){return this.zIndex_;};InfoBox.prototype.getVisible=function(){var isVisible;if((typeof this.getMap()==="undefined")||(this.getMap()===null)){isVisible=false;}else{isVisible=!this.isHidden_;}
return isVisible;};InfoBox.prototype.show=function(){this.isHidden_=false;if(this.div_){this.div_.style.visibility="visible";}};InfoBox.prototype.hide=function(){this.isHidden_=true;if(this.div_){this.div_.style.visibility="hidden";}};InfoBox.prototype.open=function(map,anchor){var me=this;if(anchor){this.position_=anchor.getPosition();this.moveListener_=google.maps.event.addListener(anchor,"position_changed",function(){me.setPosition(this.getPosition());});}
this.setMap(map);if(this.div_){this.panBox_();}};InfoBox.prototype.close=function(){var i;if(this.closeListener_){google.maps.event.removeListener(this.closeListener_);this.closeListener_=null;}
if(this.eventListeners_){for(i=0;i