/*!
 *  GMAP3 Plugin for jQuery
 *  Version   : 6.1.0
 *  Date      : 2014-04-25
 *  Author    : DEMONTE Jean-Baptiste
 *  Contact   : jbdemonte@gmail.com
 *  Web site  : http://gmap3.net
 *  Licence   : GPL v3 : http://www.gnu.org/licenses/gpl.html
 *  
 *  Copyright (c) 2010-2014 Jean-Baptiste DEMONTE
 *  All rights reserved.
 */
!function(a,b){function h(a){return"object"==typeof a}function i(a){return"string"==typeof a}function j(a){return"number"==typeof a}function k(a){return a===b}function l(){d=google.maps,c||(c={verbose:!1,queryLimit:{attempt:5,delay:250,random:250},classes:function(){var b={};return a.each("Map Marker InfoWindow Circle Rectangle OverlayView StreetViewPanorama KmlLayer TrafficLayer TransitLayer BicyclingLayer GroundOverlay StyledMapType ImageMapType".split(" "),function(a,c){b[c]=d[c]}),b}(),map:{mapTypeId:d.MapTypeId.ROADMAP,center:[46.578498,2.457275],zoom:2},overlay:{pane:"floatPane",content:"",offset:{x:0,y:0}},geoloc:{getCurrentPosition:{enableHighAccuracy:!0,maximumAge:6e4,timeout:5e3}}})}function m(a,b){return k(a)?"gmap3_"+(b?e+1:++e):a}function n(a){var b,c=d.version.split(".");for(a=a.split("."),b=0;b<c.length;b++)c[b]=parseInt(c[b],10);for(b=0;b<a.length;b++){if(a[b]=parseInt(a[b],10),!c.hasOwnProperty(b))return!1;if(c[b]<a[b])return!1}return!0}function o(b,c,e,f,h){function k(c,d){c&&a.each(c,function(a,c){var f=b,i=c;g(c)&&(f=c[0],i=c[1]),d(e,a,function(a){i.apply(f,[h||e,a,j])})})}var i=c.td||{},j={id:f,data:i.data,tag:i.tag};k(i.events,d.event.addListener),k(i.onces,d.event.addListenerOnce)}function p(a){var b,c=[];for(b in a)a.hasOwnProperty(b)&&c.push(b);return c}function q(a,b){var c,d=arguments;for(c=2;c<d.length;c++)if(b in d[c]&&d[c].hasOwnProperty(b))return void(a[b]=d[c][b])}function r(b,c){var d,e,f=["data","tag","id","events","onces"],g={};if(b.td)for(d in b.td)b.td.hasOwnProperty(d)&&"options"!==d&&"values"!==d&&(g[d]=b.td[d]);for(e=0;e<f.length;e++)q(g,f[e],c,b.td);return g.options=a.extend({},b.opts||{},c.options||{}),g}function s(){if(c.verbose){var a,b=[];if(window.console&&f(console.error)){for(a=0;a<arguments.length;a++)b.push(arguments[a]);console.error.apply(console,b)}else{for(b="",a=0;a<arguments.length;a++)b+=arguments[a].toString()+" ";alert(b)}}}function t(a){return(j(a)||i(a))&&""!==a&&!isNaN(a)}function u(a){var b,c=[];if(!k(a))if(h(a))if(j(a.length))c=a;else for(b in a)c.push(a[b]);else c.push(a);return c}function v(b){if(b)return f(b)?b:(b=u(b),function(c){var d;if(k(c))return!1;if(h(c)){for(d=0;d<c.length;d++)if(a.inArray(c[d],b)>=0)return!0;return!1}return a.inArray(c,b)>=0})}function w(a,b,c){var e=b?a:null;return!a||i(a)?e:a.latLng?w(a.latLng):a instanceof d.LatLng?a:t(a.lat)?new d.LatLng(a.lat,a.lng):!c&&g(a)&&t(a[0])&&t(a[1])?new d.LatLng(a[0],a[1]):e}function x(a){var b,c;return!a||a instanceof d.LatLngBounds?a||null:(g(a)?2===a.length?(b=w(a[0]),c=w(a[1])):4===a.length&&(b=w([a[0],a[1]]),c=w([a[2],a[3]])):"ne"in a&&"sw"in a?(b=w(a.ne),c=w(a.sw)):"n"in a&&"e"in a&&"s"in a&&"w"in a&&(b=w([a.n,a.e]),c=w([a.s,a.w])),b&&c?new d.LatLngBounds(c,b):null)}function y(a,b,e,f,g){var h=!!e&&w(f.td,!1,!0),j=h?{latLng:h}:!!f.td.address&&(i(f.td.address)?{address:f.td.address}:f.td.address),k=!!j&&D.get(j),l=this;j?(g=g||0,k?(f.latLng=k.results[0].geometry.location,f.results=k.results,f.status=k.status,b.apply(a,[f])):(j.location&&(j.location=w(j.location)),j.bounds&&(j.bounds=x(j.bounds)),E().geocode(j,function(h,i){i===d.GeocoderStatus.OK?(D.store(j,{results:h,status:i}),f.latLng=h[0].geometry.location,f.results=h,f.status=i,b.apply(a,[f])):i===d.GeocoderStatus.OVER_QUERY_LIMIT&&g<c.queryLimit.attempt?setTimeout(function(){y.apply(l,[a,b,e,f,g+1])},c.queryLimit.delay+Math.floor(Math.random()*c.queryLimit.random)):(s("geocode failed",i,j),f.latLng=f.results=!1,f.status=i,b.apply(a,[f]))}))):(f.latLng=w(f.td,!1,!0),b.apply(a,[f]))}function z(b,c,d,e){function h(){do g++;while(g<b.length&&!("address"in b[g]));return g>=b.length?void d.apply(c,[e]):void y(f,function(c){delete c.td,a.extend(b[g],c),h.apply(f,[])},!0,{td:b[g]})}var f=this,g=-1;h()}function A(a,b,c){var e=!1;navigator&&navigator.geolocation?navigator.geolocation.getCurrentPosition(function(f){e||(e=!0,c.latLng=new d.LatLng(f.coords.latitude,f.coords.longitude),b.apply(a,[c]))},function(){e||(e=!0,c.latLng=!1,b.apply(a,[c]))},{enableHighAccuracy:!0,maximumAge:6e4,timeout:5e3}):(c.latLng=!1,b.apply(a,[c]))}function B(a){var b,c=!1;if(h(a)&&a.hasOwnProperty("get")){for(b in a)if("get"!==b)return!1;c=!a.get.hasOwnProperty("callback")}return c}function E(){return C.geocoder||(C.geocoder=new d.Geocoder),C.geocoder}function F(){var a=[];this.get=function(b){if(a.length){var c,d,e,g,i,j=p(b);for(c=0;c<a.length;c++){for(g=a[c],i=j.length===g.keys.length,d=0;d<j.length&&i;d++)e=j[d],i=e in g.request,i&&(i=h(b[e])&&"equals"in b[e]&&f(b[e])?b[e].equals(g.request[e]):b[e]===g.request[e]);if(i)return g.results}}},this.store=function(b,c){a.push({request:b,keys:p(b),results:c})}}function G(){var a=[],b=this;b.empty=function(){return!a.length},b.add=function(b){a.push(b)},b.get=function(){return!!a.length&&a[0]},b.ack=function(){a.shift()}}function H(){function e(a){return{id:a.id,name:a.name,object:a.obj,tag:a.tag,data:a.data}}function g(a){f(a.setMap)&&a.setMap(null),f(a.remove)&&a.remove(),f(a.free)&&a.free(),a=null}var b={},c={},d=this;d.add=function(a,e,f,g){var h=a.td||{},i=m(h.id);return b[e]||(b[e]=[]),i in c&&d.clearById(i),c[i]={obj:f,sub:g,name:e,id:i,tag:h.tag,data:h.data},b[e].push(i),i},d.getById=function(a,b,d){var f=!1;return a in c&&(f=b?c[a].sub:d?e(c[a]):c[a].obj),f},d.get=function(a,d,f,g){var h,i,j=v(f);if(!b[a]||!b[a].length)return null;for(h=b[a].length;h;)if(h--,i=b[a][d?h:b[a].length-h-1],i&&c[i]){if(j&&!j(c[i].tag))continue;return g?e(c[i]):c[i].obj}return null},d.all=function(a,d,f){var g=[],h=v(d),i=function(a){var d,i;for(d=0;d<b[a].length;d++)if(i=b[a][d],i&&c[i]){if(h&&!h(c[i].tag))continue;g.push(f?e(c[i]):c[i].obj)}};if(a in b)i(a);else if(k(a))for(a in b)i(a);return g},d.rm=function(a,e,f){var g,h;if(!b[a])return!1;if(e)if(f)for(g=b[a].length-1;g>=0&&(h=b[a][g],!e(c[h].tag));g--);else for(g=0;g<b[a].length&&(h=b[a][g],!e(c[h].tag));g++);else g=f?b[a].length-1:0;return g in b[a]&&d.clearById(b[a][g],g)},d.clearById=function(a,d){if(a in c){var e,f=c[a].name;for(e=0;k(d)&&e<b[f].length;e++)a===b[f][e]&&(d=e);return g(c[a].obj),c[a].sub&&g(c[a].sub),delete c[a],b[f].splice(d,1),!0}return!1},d.objGetById=function(a){var d,e;if(b.clusterer)for(e in b.clusterer)if((d=c[b.clusterer[e]].obj.getById(a))!==!1)return d;return!1},d.objClearById=function(a){var d;if(b.clusterer)for(d in b.clusterer)if(c[b.clusterer[d]].obj.clearById(a))return!0;return null},d.clear=function(a,c,e,f){var g,h,i,j=v(f);if(a&&a.length)a=u(a);else{a=[];for(g in b)a.push(g)}for(h=0;h<a.length;h++)if(i=a[h],c)d.rm(i,j,!0);else if(e)d.rm(i,j,!1);else for(;d.rm(i,j,!1););},d.objClear=function(d,e,f,g){var h;if(b.clusterer&&(a.inArray("marker",d)>=0||!d.length))for(h in b.clusterer)c[b.clusterer[h]].obj.clear(e,f,g)}}function I(b,d,e){function l(a){var b={};return b[a]={},b}function m(){var a;for(a in e)if(e.hasOwnProperty(a)&&!g.hasOwnProperty(a))return a}var j,g={},h=this,k={latLng:{map:!1,marker:!1,infowindow:!1,circle:!1,overlay:!1,getlatlng:!1,getmaxzoom:!1,getelevation:!1,streetviewpanorama:!1,getaddress:!0},geoloc:{getgeoloc:!0}};i(e)&&(e=l(e)),h.run=function(){for(var h,i;h=m();){if(f(b[h]))return j=h,i=a.extend(!0,{},c[h]||{},e[h].options||{}),void(h in k.latLng?e[h].values?z(e[h].values,b,b[h],{td:e[h],opts:i,session:g}):y(b,b[h],k.latLng[h],{td:e[h],opts:i,session:g}):h in k.geoloc?A(b,b[h],{td:e[h],opts:i,session:g}):b[h].apply(b,[{td:e[h],opts:i,session:g}]));g[h]=null}d.apply(b,[e,g])},h.ack=function(a){g[j]=a,h.run.apply(h,[])}}function J(){return C.ds||(C.ds=new d.DirectionsService),C.ds}function K(){return C.dms||(C.dms=new d.DistanceMatrixService),C.dms}function L(){return C.mzs||(C.mzs=new d.MaxZoomService),C.mzs}function M(){return C.es||(C.es=new d.ElevationService),C.es}function N(a,b){function d(){var a=this;return a.onAdd=function(){},a.onRemove=function(){},a.draw=function(){},c.classes.OverlayView.apply(a,[])}d.prototype=c.classes.OverlayView.prototype;var e=new d;return e.setMap(a),e}function O(b,e,g){function E(a){A[a]||(delete B[a].options.map,A[a]=new c.classes.Marker(B[a].options),o(b,{td:B[a]},A[a],B[a].id))}function F(){return(j=D.getProjection())?(s=!0,w.push(d.event.addListener(e,"zoom_changed",K)),w.push(d.event.addListener(e,"bounds_changed",K)),void M()):void setTimeout(function(){F.apply(u,[])},25)}function G(a){h(x[a])?(f(x[a].obj.setMap)&&x[a].obj.setMap(null),f(x[a].obj.remove)&&x[a].obj.remove(),f(x[a].shadow.remove)&&x[a].obj.remove(),f(x[a].shadow.setMap)&&x[a].shadow.setMap(null),delete x[a].obj,delete x[a].shadow):A[a]&&A[a].setMap(null),delete x[a]}function H(){var a,b,c,e,f,g,h,i,j=Math.cos,k=Math.sin,l=arguments;return l[0]instanceof d.LatLng?(a=l[0].lat(),c=l[0].lng(),l[1]instanceof d.LatLng?(b=l[1].lat(),e=l[1].lng()):(b=l[1],e=l[2])):(a=l[0],c=l[1],l[2]instanceof d.LatLng?(b=l[2].lat(),e=l[2].lng()):(b=l[2],e=l[3])),f=Math.PI*a/180,g=Math.PI*c/180,h=Math.PI*b/180,i=Math.PI*e/180,6371e3*Math.acos(Math.min(j(f)*j(h)*j(g)*j(i)+j(f)*k(g)*j(h)*k(i)+k(f)*k(h),1))}function I(){var a=H(e.getCenter(),e.getBounds().getNorthEast()),b=new d.Circle({center:e.getCenter(),radius:1.25*a});return b.getBounds()}function J(){var a,b={};for(a in x)b[a]=!0;return b}function K(){clearTimeout(i),i=setTimeout(M,25)}function L(a){var b=j.fromLatLngToDivPixel(a),c=j.fromDivPixelToLatLng(new d.Point(b.x+g.radius,b.y-g.radius)),e=j.fromDivPixelToLatLng(new d.Point(b.x-g.radius,b.y+g.radius));return new d.LatLngBounds(e,c)}function M(){if(!p&&!r&&s){var b,c,f,h,j,m,n,o,u,v,w,i=!1,y=[],z={},A=e.getZoom(),D="maxZoom"in g&&A>g.maxZoom,E=J();for(q=!1,A>3&&(j=I(),i=j.getSouthWest().lng()<j.getNorthEast().lng()),b=0;b<B.length;b++)!B[b]||i&&!j.contains(B[b].options.position)||k&&!k(C[b])||y.push(b);for(;;){for(b=0;z[b]&&b<y.length;)b++;if(b===y.length)break;if(h=[],t&&!D){w=10;do for(o=h,h=[],w--,n=o.length?j.getCenter():B[y[b]].options.position,j=L(n),c=b;c<y.length;c++)z[c]||j.contains(B[y[c]].options.position)&&h.push(c);while(o.length<h.length&&h.length>1&&w)}else for(c=b;c<y.length;c++)if(!z[c]){h.push(c);break}for(m={indexes:[],ref:[]},u=v=0,f=0;f<h.length;f++)z[h[f]]=!0,m.indexes.push(y[h[f]]),m.ref.push(y[h[f]]),u+=B[y[h[f]]].options.position.lat(),v+=B[y[h[f]]].options.position.lng();u/=h.length,v/=h.length,m.latLng=new d.LatLng(u,v),m.ref=m.ref.join("-"),m.ref in E?delete E[m.ref]:(1===h.length&&(x[m.ref]=!0),l(m))}a.each(E,function(a){G(a)}),r=!1}}var i,j,k,l,n,p=!1,q=!1,r=!1,s=!1,t=!0,u=this,w=[],x={},y={},z={},A=[],B=[],C=[],D=N(e,g.radius);F(),u.getById=function(a){return a in y&&(E(y[a]),A[y[a]])},u.rm=function(a){var b=y[a];A[b]&&A[b].setMap(null),delete A[b],A[b]=!1,delete B[b],B[b]=!1,delete C[b],C[b]=!1,delete y[a],delete z[b],q=!0},u.clearById=function(a){if(a in y)return u.rm(a),!0},u.clear=function(a,b,c){var d,e,f,g,h,i=[],j=v(c);for(a?(d=B.length-1,e=-1,f=-1):(d=0,e=B.length,f=1),g=d;g!==e&&(!B[g]||j&&!j(B[g].tag)||(i.push(z[g]),!b&&!a));g+=f);for(h=0;h<i.length;h++)u.rm(i[h])},u.add=function(a,b){a.id=m(a.id),u.clearById(a.id),y[a.id]=A.length,z[A.length]=a.id,A.push(null),B.push(a),C.push(b),q=!0},u.addMarker=function(a,c){c=c||{},c.id=m(c.id),u.clearById(c.id),c.options||(c.options={}),c.options.position=a.getPosition(),o(b,{td:c},a,c.id),y[c.id]=A.length,z[A.length]=c.id,A.push(a),B.push(c),C.push(c.data||{}),q=!0},u.td=function(a){return B[a]},u.value=function(a){return C[a]},u.marker=function(a){return a in A&&(E(a),A[a])},u.markerIsSet=function(a){return Boolean(A[a])},u.setMarker=function(a,b){A[a]=b},u.store=function(a,b,c){x[a.ref]={obj:b,shadow:c}},u.free=function(){var b;for(b=0;b<w.length;b++)d.event.removeListener(w[b]);w=[],a.each(x,function(a){G(a)}),x={},a.each(B,function(a){B[a]=null}),B=[],a.each(A,function(a){A[a]&&(A[a].setMap(null),delete A[a])}),A=[],a.each(C,function(a){delete C[a]}),C=[],y={},z={}},u.filter=function(a){k=a,M()},u.enable=function(a){t!==a&&(t=a,M())},u.display=function(a){l=a},u.error=function(a){n=a},u.beginUpdate=function(){p=!0},u.endUpdate=function(){p=!1,q&&M()},u.autofit=function(a){var b;for(b=0;b<B.length;b++)B[b]&&a.extend(B[b].options.position)}}function P(a,b){var c=this;c.id=function(){return a},c.filter=function(a){b.filter(a)},c.enable=function(){b.enable(!0)},c.disable=function(){b.enable(!1)},c.add=function(a,c,d){d||b.beginUpdate(),b.addMarker(a,c),d||b.endUpdate()},c.getById=function(a){return b.getById(a)},c.clearById=function(a,c){var d;return c||b.beginUpdate(),d=b.clearById(a),c||b.endUpdate(),d},c.clear=function(a,c,d,e){e||b.beginUpdate(),b.clear(a,c,d),e||b.endUpdate()}}function Q(b,e,f,g){var h=this,i=[];c.classes.OverlayView.call(h),h.setMap(b),h.onAdd=function(){var b=h.getPanes();e.pane in b&&a(b[e.pane]).append(g),a.each("dblclick click mouseover mousemove mouseout mouseup mousedown".split(" "),function(b,c){i.push(d.event.addDomListener(g[0],c,function(b){a.Event(b).stopPropagation(),d.event.trigger(h,c,[b]),h.draw()}))}),i.push(d.event.addDomListener(g[0],"contextmenu",function(b){a.Event(b).stopPropagation(),d.event.trigger(h,"rightclick",[b]),h.draw()}))},h.getPosition=function(){return f},h.setPosition=function(a){f=a,h.draw()},h.draw=function(){var a=h.getProjection().fromLatLngToDivPixel(f);g.css("left",a.x+e.offset.x+"px").css("top",a.y+e.offset.y+"px")},h.onRemove=function(){var a;for(a=0;a<i.length;a++)d.event.removeListener(i[a]);g.remove()},h.hide=function(){g.hide()},h.show=function(){g.show()},h.toggle=function(){g&&(g.is(":visible")?h.show():h.hide())},h.toggleDOM=function(){h.setMap(h.getMap()?null:b)},h.getDOMElement=function(){return g[0]}}function R(e){function v(){!t&&(t=l.get())&&t.run()}function y(){t=null,l.ack(),v.call(j)}function z(a){var b,c=a.td.callback;c&&(b=Array.prototype.slice.call(arguments,1),f(c)?c.apply(e,b):g(c)&&f(c[1])&&c[1].apply(c[0],b))}function A(a,b,c){c&&o(e,a,b,c),z(a,b),t.ack(b)}function B(b,d){d=d||{};var f=d.td&&d.td.options?d.td.options:0;q?f&&(f.center&&(f.center=w(f.center)),q.setOptions(f)):(f=d.opts||a.extend(!0,{},c.map,f||{}),f.center=b||w(f.center),q=new c.classes.Map(e.get(0),f))}function C(c){var k,l,d=new O(e,q,c),f={},g={},h=[],i=/^[0-9]+$/;for(l in c)i.test(l)?(h.push(1*l),g[l]=c[l],g[l].width=g[l].width||0,g[l].height=g[l].height||0):f[l]=c[l];return h.sort(function(a,b){return a>b}),k=f.calculator?function(b){var c=[];return a.each(b,function(a,b){c.push(d.value(b))}),f.calculator.apply(e,[c])}:function(a){return a.length},d.error(function(){s.apply(j,arguments)}),d.display(function(i){var l,m,n,p,r,s,t=k(i.indexes);if(c.force||t>1)for(l=0;l<h.length;l++)h[l]<=t&&(m=g[h[l]]);m?(r=m.offset||[-m.width/2,-m.height/2],n=a.extend({},f),n.options=a.extend({pane:"overlayLayer",content:m.content?m.content.replace("CLUSTER_COUNT",t):"",offset:{x:("x"in r?r.x:r[0])||0,y:("y"in r?r.y:r[1])||0}},f.options||{}),p=j.overlay({td:n,opts:n.options,latLng:w(i)},!0),n.options.pane="floatShadow",n.options.content=a(document.createElement("div")).width(m.width+"px").height(m.height+"px").css({cursor:"pointer"}),s=j.overlay({td:n,opts:n.options,latLng:w(i)},!0),f.data={latLng:w(i),markers:[]},a.each(i.indexes,function(a,b){f.data.markers.push(d.value(b)),d.markerIsSet(b)&&d.marker(b).setMap(null)}),o(e,{td:f},s,b,{main:p,shadow:s}),d.store(i,p,s)):a.each(i.indexes,function(a,b){d.marker(b).setMap(q)})}),d}function D(b,c,f){var h=[],i="values"in b.td;return i||(b.td.values=[{options:b.opts}]),b.td.values.length?(B(),a.each(b.td.values,function(a,i){var j,k,l,m,n=r(b,i);if(n.options[f])if(n.options[f][0][0]&&g(n.options[f][0][0]))for(k=0;k<n.options[f].length;k++)for(l=0;l<n.options[f][k].length;l++)n.options[f][k][l]=w(n.options[f][k][l]);else for(k=0;k<n.options[f].length;k++)n.options[f][k]=w(n.options[f][k]);n.options.map=q,m=new d[c](n.options),h.push(m),j=p.add({td:n},c.toLowerCase(),m),o(e,{td:n},m,j)}),void A(b,i?h:h[0])):void A(b,!1)}var t,j=this,l=new G,p=new H,q=null;j._plan=function(a){var b;for(b=0;b<a.length;b++)l.add(new I(j,y,a[b]));v()},j.map=function(a){B(a.latLng,a),o(e,a,q),A(a,q)},j.destroy=function(a){p.clear(),e.empty(),q&&(q=null),A(a,!0)},j.overlay=function(b,d){var f=[],g="values"in b.td;return g||(b.td.values=[{latLng:b.latLng,options:b.opts}]),b.td.values.length?(Q.__initialised||(Q.prototype=new c.classes.OverlayView,Q.__initialised=!0),a.each(b.td.values,function(c,g){var h,i,j=r(b,g),k=a(document.createElement("div")).css({border:"none",borderWidth:0,position:"absolute"});k.append(j.options.content),i=new Q(q,j.options,w(j)||w(g),k),f.push(i),k=null,d||(h=p.add(b,"overlay",i),o(e,{td:j},i,h))}),d?f[0]:void A(b,g?f:f[0])):void A(b,!1)},j.marker=function(b){var f,g,h,i="values"in b.td,k=!q;return i||(b.opts.position=b.latLng||w(b.opts.position),b.td.values=[{options:b.opts}]),b.td.values.length?(k&&B(),b.td.cluster&&!q.getBounds()?void d.event.addListenerOnce(q,"bounds_changed",function(){j.marker.apply(j,[b])}):void(b.td.cluster?(b.td.cluster instanceof P?(g=b.td.cluster,h=p.getById(g.id(),!0)):(h=C(b.td.cluster),g=new P(m(b.td.id,!0),h),p.add(b,"clusterer",g,h)),h.beginUpdate(),a.each(b.td.values,function(a,c){var d=r(b,c);d.options.position=w(d.options.position?d.options.position:c),d.options.position&&(d.options.map=q,k&&(q.setCenter(d.options.position),k=!1),h.add(d,c))}),h.endUpdate(),A(b,g)):(f=[],a.each(b.td.values,function(a,d){var g,h,i=r(b,d);i.options.position=w(i.options.position?i.options.position:d),i.options.position&&(i.options.map=q,k&&(q.setCenter(i.options.position),k=!1),h=new c.classes.Marker(i.options),f.push(h),g=p.add({td:i},"marker",h),o(e,{td:i},h,g))}),A(b,i?f:f[0])))):void A(b,!1)},j.getroute=function(a){a.opts.origin=w(a.opts.origin,!0),a.opts.destination=w(a.opts.destination,!0),J().route(a.opts,function(b,c){z(a,c===d.DirectionsStatus.OK&&b,c),t.ack()})},j.getdistance=function(a){var b;for(a.opts.origins=u(a.opts.origins),b=0;b<a.opts.origins.length;b++)a.opts.origins[b]=w(a.opts.origins[b],!0);for(a.opts.destinations=u(a.opts.destinations),b=0;b<a.opts.destinations.length;b++)a.opts.destinations[b]=w(a.opts.destinations[b],!0);K().getDistanceMatrix(a.opts,function(b,c){z(a,c===d.DistanceMatrixStatus.OK&&b,c),t.ack()})},j.infowindow=function(d){var f=[],g="values"in d.td;g||(d.latLng&&(d.opts.position=d.latLng),d.td.values=[{options:d.opts}]),a.each(d.td.values,function(a,h){var i,j,l=r(d,h);l.options.position=w(l.options.position?l.options.position:h.latLng),q||B(l.options.position),j=new c.classes.InfoWindow(l.options),j&&(k(l.open)||l.open)&&(g?j.open(q,l.anchor||b):j.open(q,l.anchor||(d.latLng?b:d.session.marker?d.session.marker:b))),f.push(j),i=p.add({td:l},"infowindow",j),o(e,{td:l},j,i)}),A(d,g?f:f[0])},j.circle=function(b){var d=[],f="values"in b.td;return f||(b.opts.center=b.latLng||w(b.opts.center),b.td.values=[{options:b.opts}]),b.td.values.length?(a.each(b.td.values,function(a,f){var g,h,i=r(b,f);i.options.center=w(i.options.center?i.options.center:f),q||B(i.options.center),i.options.map=q,h=new c.classes.Circle(i.options),d.push(h),g=p.add({td:i},"circle",h),o(e,{td:i},h,g)}),void A(b,f?d:d[0])):void A(b,!1)},j.getaddress=function(a){z(a,a.results,a.status),t.ack()},j.getlatlng=function(a){z(a,a.results,a.status),t.ack()},j.getmaxzoom=function(a){L().getMaxZoomAtLatLng(a.latLng,function(b){z(a,b.status===d.MaxZoomStatus.OK&&b.zoom,status),t.ack()})},j.getelevation=function(a){var b,c=[],e=function(b,c){z(a,c===d.ElevationStatus.OK&&b,c),t.ack()};if(a.latLng)c.push(a.latLng);else for(c=u(a.td.locations||[]),b=0;b<c.length;b++)c[b]=w(c[b]);if(c.length)M().getElevationForLocations({locations:c},e);else{if(a.td.path&&a.td.path.length)for(b=0;b<a.td.path.length;b++)c.push(w(a.td.path[b]));c.length?M().getElevationAlongPath({path:c,samples:a.td.samples},e):t.ack()}},j.defaults=function(b){a.each(b.td,function(b,d){h(c[b])?c[b]=a.extend({},c[b],d):c[b]=d}),t.ack(!0)},j.rectangle=function(b){var d=[],f="values"in b.td;return f||(b.td.values=[{options:b.opts}]),b.td.values.length?(a.each(b.td.values,function(a,f){var g,h,i=r(b,f);i.options.bounds=x(i.options.bounds?i.options.bounds:f),q||B(i.options.bounds.getCenter()),i.options.map=q,h=new c.classes.Rectangle(i.options),d.push(h),g=p.add({td:i},"rectangle",h),o(e,{td:i},h,g)}),void A(b,f?d:d[0])):void A(b,!1)},j.polyline=function(a){D(a,"Polyline","path")},j.polygon=function(a){D(a,"Polygon","paths")},j.trafficlayer=function(a){B();var b=p.get("trafficlayer");b||(b=new c.classes.TrafficLayer,b.setMap(q),p.add(a,"trafficlayer",b)),A(a,b)},j.transitlayer=function(a){B();var b=p.get("transitlayer");b||(b=new c.classes.TransitLayer,b.setMap(q),p.add(a,"transitlayer",b)),A(a,b)},j.bicyclinglayer=function(a){B();var b=p.get("bicyclinglayer");b||(b=new c.classes.BicyclingLayer,b.setMap(q),p.add(a,"bicyclinglayer",b)),A(a,b)},j.groundoverlay=function(a){a.opts.bounds=x(a.opts.bounds),a.opts.bounds&&B(a.opts.bounds.getCenter());var b,d=new c.classes.GroundOverlay(a.opts.url,a.opts.bounds,a.opts.opts);d.setMap(q),b=p.add(a,"groundoverlay",d),A(a,d,b)},j.streetviewpanorama=function(b){b.opts.opts||(b.opts.opts={}),b.latLng?b.opts.opts.position=b.latLng:b.opts.opts.position&&(b.opts.opts.position=w(b.opts.opts.position)),b.td.divId?b.opts.container=document.getElementById(b.td.divId):b.opts.container&&(b.opts.container=a(b.opts.container).get(0));var d,e=new c.classes.StreetViewPanorama(b.opts.container,b.opts.opts);e&&q.setStreetView(e),d=p.add(b,"streetviewpanorama",e),A(b,e,d)},j.kmllayer=function(b){var d=[],f="values"in b.td;return f||(b.td.values=[{options:b.opts}]),b.td.values.length?(a.each(b.td.values,function(a,f){var g,h,i,j=r(b,f);q||B(),i=j.options,j.options.opts&&(i=j.options.opts,j.options.url&&(i.url=j.options.url)),i.map=q,h=n("3.10")?new c.classes.KmlLayer(i):new c.classes.KmlLayer(i.url,i),d.push(h),g=p.add({td:j},"kmllayer",h),o(e,{td:j},h,g)}),void A(b,f?d:d[0])):void A(b,!1)},j.panel=function(b){B();var c,d,f=0,g=0,h=a(document.createElement("div"));h.css({position:"absolute",zIndex:1e3,visibility:"hidden"}),b.opts.content&&(d=a(b.opts.content),h.append(d),e.first().prepend(h),k(b.opts.left)?k(b.opts.right)?b.opts.center&&(f=(e.width()-d.width())/2):f=e.width()-d.width()-b.opts.right:f=b.opts.left,k(b.opts.top)?k(b.opts.bottom)?b.opts.middle&&(g=(e.height()-d.height())/2):g=e.height()-d.height()-b.opts.bottom:g=b.opts.top,h.css({top:g,left:f,visibility:"visible"})),c=p.add(b,"panel",h),A(b,h,c),h=null},j.directionsrenderer=function(b){b.opts.map=q;var c,e=new d.DirectionsRenderer(b.opts);b.td.divId?e.setPanel(document.getElementById(b.td.divId)):b.td.container&&e.setPanel(a(b.td.container).get(0)),c=p.add(b,"directionsrenderer",e),A(b,e,c)},j.getgeoloc=function(a){A(a,a.latLng)},j.styledmaptype=function(a){B();var b=new c.classes.StyledMapType(a.td.styles,a.opts);q.mapTypes.set(a.td.id,b),A(a,b)},j.imagemaptype=function(a){B();var b=new c.classes.ImageMapType(a.opts);q.mapTypes.set(a.td.id,b),A(a,b)},j.autofit=function(b){var c=new d.LatLngBounds;a.each(p.all(),function(a,b){b.getPosition&&b.getPosition()?c.extend(b.getPosition()):b.getBounds&&b.getBounds()?(c.extend(b.getBounds().getNorthEast()),c.extend(b.getBounds().getSouthWest())):b.getPaths&&b.getPaths()?b.getPaths().forEach(function(a){a.forEach(function(a){c.extend(a)})}):b.getPath&&b.getPath()?b.getPath().forEach(function(a){c.extend(a)}):b.getCenter&&b.getCenter()?c.extend(b.getCenter()):"function"==typeof P&&b instanceof P&&(b=p.getById(b.id(),!0),b&&b.autofit(c))}),c.isEmpty()||q.getBounds()&&q.getBounds().equals(c)||("maxZoom"in b.td&&d.event.addListenerOnce(q,"bounds_changed",function(){this.getZoom()>b.td.maxZoom&&this.setZoom(b.td.maxZoom)}),q.fitBounds(c)),A(b,!0)},j.clear=function(b){if(i(b.td)){if(p.clearById(b.td)||p.objClearById(b.td))return void A(b,!0);b.td={name:b.td}}b.td.id?a.each(u(b.td.id),function(a,b){p.clearById(b)||p.objClearById(b)}):(p.clear(u(b.td.name),b.td.last,b.td.first,b.td.tag),p.objClear(u(b.td.name),b.td.last,b.td.first,b.td.tag)),A(b,!0)},j.get=function(c,d,e){var f,h,j=d?c:c.td;return d||(e=j.full),i(j)?(h=p.getById(j,!1,e)||p.objGetById(j),h===!1&&(f=j,j={})):f=j.name,"map"===f&&(h=q),h||(h=[],j.id?(a.each(u(j.id),function(a,b){h.push(p.getById(b,!1,e)||p.objGetById(b))}),g(j.id)||(h=h[0])):(a.each(f?u(f):[b],function(b,c){var d;j.first?(d=p.get(c,!1,j.tag,e),d&&h.push(d)):j.all?a.each(p.all(c,j.tag,e),function(a,b){h.push(b)}):(d=p.get(c,!0,j.tag,e),d&&h.push(d))}),j.all||g(f)||(h=h[0]))),h=g(h)||!j.all?h:[h],d?h:void A(c,h)},j.exec=function(b){a.each(u(b.td.func),function(c,d){a.each(j.get(b.td,!0,!b.td.hasOwnProperty("full")||b.td.full),function(a,b){d.call(e,b)})}),A(b,!0)},j.trigger=function(b){if(i(b.td))d.event.trigger(q,b.td);else{var c=[q,b.td.eventName];b.td.var_args&&a.each(b.td.var_args,function(a,b){c.push(b)}),d.event.trigger.apply(d.event,c)}z(b),t.ack()}}var c,d,e=0,f=a.isFunction,g=a.isArray,C={},D=new F;a.fn.gmap3=function(){var b,c=[],d=!0,e=[];for(l(),b=0;b<arguments.length;b++)arguments[b]&&c.push(arguments[b]);return c.length||c.push("map"),a.each(this,function(){var b=a(this),f=b.data("gmap3");d=!1,f||(f=new R(b),b.data("gmap3",f)),1!==c.length||"get"!==c[0]&&!B(c[0])?f._plan(c):"get"===c[0]?e.push(f.get("map",!0)):e.push(f.get(c[0].get,!0,c[0].get.full))}),e.length?1===e.length?e[0]:e:this}}(jQuery);
/*Richmarker*/
function RichMarker(opt_options){var options=opt_options||{};this.ready_=false;this.dragging_=false;if(opt_options['visible']==undefined){opt_options['visible']=true;}
if(opt_options['shadow']==undefined){opt_options['shadow']='7px -3px 5px rgba(88,88,88,0.7)';}
if(opt_options['anchor']==undefined){opt_options['anchor']=RichMarkerPosition['BOTTOM'];}
this.setValues(options);}
RichMarker.prototype=new google.maps.OverlayView();window['RichMarker']=RichMarker;RichMarker.prototype.getVisible=function(){return(this.get('visible'));};RichMarker.prototype['getVisible']=RichMarker.prototype.getVisible;RichMarker.prototype.setVisible=function(visible){this.set('visible',visible);};RichMarker.prototype['setVisible']=RichMarker.prototype.setVisible;RichMarker.prototype.visible_changed=function(){if(this.ready_){this.markerWrapper_.style['display']=this.getVisible()?'':'none';this.draw();}};RichMarker.prototype['visible_changed']=RichMarker.prototype.visible_changed;RichMarker.prototype.setFlat=function(flat){this.set('flat',!!flat);};RichMarker.prototype['setFlat']=RichMarker.prototype.setFlat;RichMarker.prototype.getFlat=function(){return(this.get('flat'));};RichMarker.prototype['getFlat']=RichMarker.prototype.getFlat;RichMarker.prototype.getWidth=function(){return(this.get('width'));};RichMarker.prototype['getWidth']=RichMarker.prototype.getWidth;RichMarker.prototype.getHeight=function(){return(this.get('height'));};RichMarker.prototype['getHeight']=RichMarker.prototype.getHeight;RichMarker.prototype.setShadow=function(shadow){this.set('shadow',shadow);this.flat_changed();};RichMarker.prototype['setShadow']=RichMarker.prototype.setShadow;RichMarker.prototype.getShadow=function(){return(this.get('shadow'));};RichMarker.prototype['getShadow']=RichMarker.prototype.getShadow;RichMarker.prototype.flat_changed=function(){if(!this.ready_){return;}
this.markerWrapper_.style['boxShadow']=this.markerWrapper_.style['webkitBoxShadow']=this.markerWrapper_.style['MozBoxShadow']=this.getFlat()?'':this.getShadow();};RichMarker.prototype['flat_changed']=RichMarker.prototype.flat_changed;RichMarker.prototype.setZIndex=function(index){this.set('zIndex',index);};RichMarker.prototype['setZIndex']=RichMarker.prototype.setZIndex;RichMarker.prototype.getZIndex=function(){return(this.get('zIndex'));};RichMarker.prototype['getZIndex']=RichMarker.prototype.getZIndex;RichMarker.prototype.zIndex_changed=function(){if(this.getZIndex()&&this.ready_){this.markerWrapper_.style.zIndex=this.getZIndex();}};RichMarker.prototype['zIndex_changed']=RichMarker.prototype.zIndex_changed;RichMarker.prototype.getDraggable=function(){return(this.get('draggable'));};RichMarker.prototype['getDraggable']=RichMarker.prototype.getDraggable;RichMarker.prototype.setDraggable=function(draggable){this.set('draggable',!!draggable);};RichMarker.prototype['setDraggable']=RichMarker.prototype.setDraggable;RichMarker.prototype.draggable_changed=function(){if(this.ready_){if(this.getDraggable()){this.addDragging_(this.markerWrapper_);}else{this.removeDragListeners_();}}};RichMarker.prototype['draggable_changed']=RichMarker.prototype.draggable_changed;RichMarker.prototype.getPosition=function(){return(this.get('position'));};RichMarker.prototype['getPosition']=RichMarker.prototype.getPosition;RichMarker.prototype.setPosition=function(position){this.set('position',position);};RichMarker.prototype['setPosition']=RichMarker.prototype.setPosition;RichMarker.prototype.position_changed=function(){this.draw();};RichMarker.prototype['position_changed']=RichMarker.prototype.position_changed;RichMarker.prototype.getAnchor=function(){return(this.get('anchor'));};RichMarker.prototype['getAnchor']=RichMarker.prototype.getAnchor;RichMarker.prototype.setAnchor=function(anchor){this.set('anchor',anchor);};RichMarker.prototype['setAnchor']=RichMarker.prototype.setAnchor;RichMarker.prototype.anchor_changed=function(){this.draw();};RichMarker.prototype['anchor_changed']=RichMarker.prototype.anchor_changed;RichMarker.prototype.htmlToDocumentFragment_=function(htmlString){var tempDiv=document.createElement('DIV');tempDiv.innerHTML=htmlString;if(tempDiv.childNodes.length==1){return(tempDiv.removeChild(tempDiv.firstChild));}else{var fragment=document.createDocumentFragment();while(tempDiv.firstChild){fragment.appendChild(tempDiv.firstChild);}
return fragment;}};RichMarker.prototype.removeChildren_=function(node){if(!node){return;}
var child;while(child=node.firstChild){node.removeChild(child);}};RichMarker.prototype.setContent=function(content){this.set('content',content);};RichMarker.prototype['setContent']=RichMarker.prototype.setContent;RichMarker.prototype.getContent=function(){return(this.get('content'));};RichMarker.prototype['getContent']=RichMarker.prototype.getContent;RichMarker.prototype.content_changed=function(){if(!this.markerContent_){return;}
this.removeChildren_(this.markerContent_);var content=this.getContent();if(content){if(typeof content=='string'){content=content.replace(/^\s*([\S\s]*)\b\s*$/,'$1');content=this.htmlToDocumentFragment_(content);}
this.markerContent_.appendChild(content);var that=this;var images=this.markerContent_.getElementsByTagName('IMG');for(var i=0,image;image=images[i];i++){google.maps.event.addDomListener(image,'mousedown',function(e){if(that.getDraggable()){if(e.preventDefault){e.preventDefault();}
e.returnValue=false;}});google.maps.event.addDomListener(image,'load',function(){that.draw();});}
google.maps.event.trigger(this,'domready');}
if(this.ready_){this.draw();}};RichMarker.prototype['content_changed']=RichMarker.prototype.content_changed;RichMarker.prototype.setCursor_=function(whichCursor){if(!this.ready_){return;}
var cursor='';if(navigator.userAgent.indexOf('Gecko/')!==-1){if(whichCursor=='dragging'){cursor='-moz-grabbing';}
if(whichCursor=='dragready'){cursor='-moz-grab';}
if(whichCursor=='draggable'){cursor='pointer';}}else{if(whichCursor=='dragging'||whichCursor=='dragready'){cursor='move';}
if(whichCursor=='draggable'){cursor='pointer';}}
if(this.markerWrapper_.style.cursor!=cursor){this.markerWrapper_.style.cursor=cursor;}};RichMarker.prototype.startDrag=function(e){if(!this.getDraggable()){return;}
if(!this.dragging_){this.dragging_=true;var map=this.getMap();this.mapDraggable_=map.get('draggable');map.set('draggable',false);this.mouseX_=e.clientX;this.mouseY_=e.clientY;this.setCursor_('dragready');this.markerWrapper_.style['MozUserSelect']='none';this.markerWrapper_.style['KhtmlUserSelect']='none';this.markerWrapper_.style['WebkitUserSelect']='none';this.markerWrapper_['unselectable']='on';this.markerWrapper_['onselectstart']=function(){return false;};this.addDraggingListeners_();google.maps.event.trigger(this,'dragstart');}};RichMarker.prototype.stopDrag=function(){if(!this.getDraggable()){return;}
if(this.dragging_){this.dragging_=false;this.getMap().set('draggable',this.mapDraggable_);this.mouseX_=this.mouseY_=this.mapDraggable_=null;this.markerWrapper_.style['MozUserSelect']='';this.markerWrapper_.style['KhtmlUserSelect']='';this.markerWrapper_.style['WebkitUserSelect']='';this.markerWrapper_['unselectable']='off';this.markerWrapper_['onselectstart']=function(){};this.removeDraggingListeners_();this.setCursor_('draggable');google.maps.event.trigger(this,'dragend');this.draw();}};RichMarker.prototype.drag=function(e){if(!this.getDraggable()||!this.dragging_){this.stopDrag();return;}
var dx=this.mouseX_-e.clientX;var dy=this.mouseY_-e.clientY;this.mouseX_=e.clientX;this.mouseY_=e.clientY;var left=parseInt(this.markerWrapper_.style['left'],10)-dx;var top=parseInt(this.markerWrapper_.style['top'],10)-dy;this.markerWrapper_.style['left']=left+'px';this.markerWrapper_.style['top']=top+'px';var offset=this.getOffset_();var point=new google.maps.Point(left-offset.width,top-offset.height);var projection=this.getProjection();this.setPosition(projection.fromDivPixelToLatLng(point));this.setCursor_('dragging');google.maps.event.trigger(this,'drag');};RichMarker.prototype.removeDragListeners_=function(){if(this.draggableListener_){google.maps.event.removeListener(this.draggableListener_);delete this.draggableListener_;}
this.setCursor_('');};RichMarker.prototype.addDragging_=function(node){if(!node){return;}
var that=this;this.draggableListener_=google.maps.event.addDomListener(node,'mousedown',function(e){that.startDrag(e);});this.setCursor_('draggable');};RichMarker.prototype.addDraggingListeners_=function(){var that=this;if(this.markerWrapper_.setCapture){this.markerWrapper_.setCapture(true);this.draggingListeners_=[google.maps.event.addDomListener(this.markerWrapper_,'mousemove',function(e){that.drag(e);},true),google.maps.event.addDomListener(this.markerWrapper_,'mouseup',function(){that.stopDrag();that.markerWrapper_.releaseCapture();},true)];}else{this.draggingListeners_=[google.maps.event.addDomListener(window,'mousemove',function(e){that.drag(e);},true),google.maps.event.addDomListener(window,'mouseup',function(){that.stopDrag();},true)];}};RichMarker.prototype.removeDraggingListeners_=function(){if(this.draggingListeners_){for(var i=0,listener;listener=this.draggingListeners_[i];i++){google.maps.event.removeListener(listener);}
this.draggingListeners_.length=0;}};RichMarker.prototype.getOffset_=function(){var anchor=this.getAnchor();if(typeof anchor=='object'){return(anchor);}
var offset=new google.maps.Size(0,0);if(!this.markerContent_){return offset;}
var width=this.markerContent_.offsetWidth;var height=this.markerContent_.offsetHeight;switch(anchor){case RichMarkerPosition['TOP_LEFT']:break;case RichMarkerPosition['TOP']:offset.width=-width/2;break;case RichMarkerPosition['TOP_RIGHT']:offset.width=-width;break;case RichMarkerPosition['LEFT']:offset.height=-height/2;break;case RichMarkerPosition['MIDDLE']:offset.width=-width/2;offset.height=-height/2;break;case RichMarkerPosition['RIGHT']:offset.width=-width;offset.height=-height/2;break;case RichMarkerPosition['BOTTOM_LEFT']:offset.height=-height;break;case RichMarkerPosition['BOTTOM']:offset.width=-width/2;offset.height=-height;break;case RichMarkerPosition['BOTTOM_RIGHT']:offset.width=-width;offset.height=-height;break;}
return offset;};RichMarker.prototype.onAdd=function(){if(!this.markerWrapper_){this.markerWrapper_=document.createElement('DIV');this.markerWrapper_.style['position']='absolute';}
if(this.getZIndex()){this.markerWrapper_.style['zIndex']=this.getZIndex();}
this.markerWrapper_.style['display']=this.getVisible()?'':'none';if(!this.markerContent_){this.markerContent_=document.createElement('DIV');this.markerWrapper_.appendChild(this.markerContent_);var that=this;google.maps.event.addDomListener(this.markerContent_,'click',function(e){google.maps.event.trigger(that,'click');});google.maps.event.addDomListener(this.markerContent_,'mouseover',function(e){google.maps.event.trigger(that,'mouseover');});google.maps.event.addDomListener(this.markerContent_,'mouseout',function(e){google.maps.event.trigger(that,'mouseout');});}
this.ready_=true;this.content_changed();this.flat_changed();this.draggable_changed();var panes=this.getPanes();if(panes){panes.overlayMouseTarget.appendChild(this.markerWrapper_);}
google.maps.event.trigger(this,'ready');};RichMarker.prototype['onAdd']=RichMarker.prototype.onAdd;RichMarker.prototype.draw=function(){if(!this.ready_||this.dragging_){return;}
var projection=this.getProjection();if(!projection){return;}
var latLng=(this.get('position'));var pos=projection.fromLatLngToDivPixel(latLng);var offset=this.getOffset_();this.markerWrapper_.style['top']=(pos.y+offset.height)+'px';this.markerWrapper_.style['left']=(pos.x+offset.width)+'px';var height=this.markerContent_.offsetHeight;var width=this.markerContent_.offsetWidth;if(height==0){height=this.markerContent_.firstChild.offsetHeight;};if(width==0){width=this.markerContent_.firstChild.offsetWidth;};if(width!=this.get('width')){this.set('width',width);}
if(height!=this.get('height')){this.set('height',height);}};RichMarker.prototype['draw']=RichMarker.prototype.draw;RichMarker.prototype.onRemove=function(){if(this.markerWrapper_&&this.markerWrapper_.parentNode){this.markerWrapper_.parentNode.removeChild(this.markerWrapper_);}
this.removeDragListeners_();};RichMarker.prototype['onRemove']=RichMarker.prototype.onRemove;var RichMarkerPosition={'TOP_LEFT':1,'TOP':2,'TOP_RIGHT':3,'LEFT':4,'MIDDLE':5,'RIGHT':6,'BOTTOM_LEFT':7,'BOTTOM':8,'BOTTOM_RIGHT':9};window['RichMarkerPosition']=RichMarkerPosition;