(function(n){n.fn.dataTableExt.oApi.fnDisplayStart=function(n,t,i){typeof i=="undefined"&&(i=!0),n._iDisplayStart=t,n.oApi._fnCalculateEnd(n),i&&n.oApi._fnDraw(n)}})(jQuery),$.fn.dataTableExt.oApi.fnReloadAjax=function(n,t,i,r){if(t!==undefined&&t!==null&&(n.sAjaxSource=t),n.oFeatures.bServerSide){this.fnDraw();return}this.oApi._fnProcessingDisplay(n,!0);var u=this,e=n._iDisplayStart,f=[];this.oApi._fnServerParams(n,f),n.fnServerData.call(n.oInstance,n.sAjaxSource,f,function(t){var o,f;for(u.oApi._fnClearTable(n),o=n.sAjaxDataProp!==""?u.oApi._fnGetObjectDataFn(n.sAjaxDataProp)(t):t,f=0;f<o.length;f++)u.oApi._fnAddData(n,o[f]);n.aiDisplay=n.aiDisplayMaster.slice(),u.fnDraw(),r===!0&&(n._iDisplayStart=e,u.oApi._fnCalculateEnd(n),u.fnDraw(!1)),u.oApi._fnProcessingDisplay(n,!1),typeof i=="function"&&i!==null&&i(n)},n)},function(n){var t=nspace("ltc.viz.map");t.LocationHoverOverlayView=Backbone.View.extend({initialize:function(){this.dataReady=n.Deferred(),this.hoverDeferred=n.Deferred(),this.getTemplate(this.templatePath,this.hoverDeferred),this.model.bind("change:selections",this.updateHoverOverlay,this)},templatePath:"/js/ltc/viz/map/html/hoverOverlay.html",updateHoverOverlay:function(){var t=this;this.dataReady&&this.dataReady.state()=="pending"||(this.dataReady=n.Deferred());var i=this.model.get("selections"),r=parseInt(i.indicatorId),u=i.timeFrame,f=i.state,e="/map/locations/"+r+"/"+u+"/"+f;n.ajax({url:e,dataType:"json",success:function(n){t.cards=n,t.dataReady.resolve()},error:function(){t.dataReady.reject()}})},show:function(t){for(var i=this;chart=this.prevCharts.shift();)chart.destroy();n.when(this.hoverDeferred,this.dataReady).done(function(){var f=n(i.el),e=_.filter(i.cards,function(n){return n.id==t}),u;if(!e||e.length==0){f.hide();return}var r=[e[0]],s=r[0].parent,o=_.filter(i.cards,function(n){return n.id==s});for(o&&o.length>0&&r.push(o[0]),f.html(i.templates[i.templatePath]({cards:r})),u=0;u<r.length;u++)i.addChart(r[u]);f.show()})},addChart:function(t){if(!t.trend||t.trend.length==0){n("#locChart"+t.id).hide();return}this.prevCharts.push(new Highcharts.Chart({chart:{renderTo:"locChart"+t.id,type:"line",marginRight:5,marginBottom:25},title:{text:""},xAxis:{type:"datetime",minTickInterval:31536e7,labels:{formatter:function(){var n=new Date(this.value).getFullYear()+1;return"'"+n.toString().substr(2,2)}}},yAxis:{title:{text:""},minTickInterval:1e3,startOnTick:!1,endOnTick:!1},tooltip:{formatter:function(){var n=new Date(this.x).getFullYear()+1;return"<b>"+this.series.name+"<\/b><br/>"+n+": "+this.y}},legend:{enabled:!1},series:[{name:t.indName,data:[7,null,9.5,14.5,18.2,21.5,25.2,26.5,23.3,18.3,13.9,9.6],pointStart:Date.UTC(2e3,0,1),pointInterval:31536e6}]}))},prevCharts:[],getTemplate:function(t,i){this.templates||(this.templates={});var r=this;this.templates[t]?i.resolve():n.get(t,function(n){r.templates[t]=Mustache.compile(n),i.resolve()})},templates:{}})}(jQuery),function(n){var t=nspace("ltc.viz"),i=nspace("ltc.viz.map");i.FacilityTableView=Backbone.View.extend({initialize:function(){_.bindAll(this,"drawCallback","updateOptions"),n.fn.dataTableExt.oPagination.iFullNumbersShowPages=20,this.model.bind("change:selections",this.updateTable,this)},updateTable:function(){var t=this.model.get("selections"),f=parseInt(t.indicatorId),e=t.timeFrame,o=t.state,i="/map/table/"+f+"/"+e+"/"+o,s=n(this.el),r=n("#mapTable",s),u;n.fn.DataTable.fnIsDataTable(r.get(0))?(this.dataTable.fnReloadAjax(i),this.dataTable.fnDraw()):this.dataTable=r.dataTable({bFilter:!1,bLengthChange:!1,iDisplayLength:20,sPaginationType:"full_numbers",oLanguage:{oPaginate:{sFirst:"",sNext:"",sPrevious:"",sLast:""},sInfo:"Results _START_-_END_ of _TOTAL_"},sDom:'lfrt<"clearfix"ip>',fnDrawCallback:this.drawCallback,fnServerData:function(t,i,r,u){u.jqXHR=n.ajax({url:t,data:i,success:function(t){t.sError&&u.oApi._fnLog(u,0,t.sError);var i=t.sColumns.split(","),f=i[i.length-1];n("#valueHeader").html(f),n(u.oInstance).trigger("xhr",[u,t]),r(t)},dataType:"json",cache:!0,type:u.sServerMethod,error:function(n,t){t=="parsererror"&&u.oApi._fnLog(u,0,"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},bProcessing:!0,bServerSide:!1,sAjaxSource:i,bDeferRender:!0}),u=this,n.when(this.model.get("initialOptions")).done(function(){u.updateOptions()})},drawCallback:function(i){var e,o,s;if(!n("body").hasClass("fullscreen")){n("#mapTable tbody tr").not(":has(td.dataTables_empty)").length==0?n(".map_table").hide():n(".map_table").show();var u=this,r=new velir.collections.NameValueCollection,f=u.model.get("options");f&&r.addNameValueCollection(f),e=i.aaSorting[0][0].toString(),o=i.aaSorting[0][1],r.setValue(t.UrlParams.SortColumn,e),r.setValue(t.UrlParams.SortDirection,o),s=Math.ceil(i.fnDisplayEnd()/i._iDisplayLength),r.setValue(t.UrlParams.TablePage,s),u.model.set("options",r)}},updateOptions:function(){var u,o;if(!this.dataTable)throw"updateOptions called before dataTable was ready.";var i=this.dataTable.fnSettings(),r=this.model.get("options"),f=parseInt(r.getValue(t.UrlParams.SortColumn)),e=r.getValue(t.UrlParams.SortDirection);f&&e&&(i.aaSorting[0][0]=f,i.aaSorting[0][1]=e=="desc"?"desc":"asc",this.dataTable.fnDraw()),u=parseInt(r.getValue(t.UrlParams.TablePage)),u&&(o=u*i._iDisplayLength-i._iDisplayLength,n.fn.dataTableExt.oApi.fnDisplayStart(i,o,!0))}})}(jQuery),function(n){var t=nspace("ltc.viz"),i=nspace("ltc.viz.map");i.FiltersView=Backbone.View.extend({initialize:function(){var i=n(this.el),t=this;n("#indicatorSelector",i).chosen().change({view:this,model:this.model},this.changeIndicator),n("#timeFrameSelector",i).chosen().change({view:this,model:this.model},this.changeTimeFrame),n("#stateSelector",i).chosen().change({view:this,model:this.model},this.changeState),this.model.bind("change:noRoute",t.handleNoRoute,t),this.model.bind("change:selections",t.updateFilters,t),this.model.bind("change:unsavedSelections",t.changeFilters,t),this.handleNoRoute()},updateFilters:function(){var f=n(this.el),t=_.extend({},this.model.get("selections")),r=!0,e=n("#indicatorSelector",f).val(t.indicatorId),u,i;if(e.val()!=t.indicatorId?(t.indicatorId=e.val(),r=!1):e.trigger("liszt:updated"),u=n("#timeFrameSelector",f).val(t.timeFrame),u.val()!=t.timeFrame?(t.timeFrame=u.val(),r=!1):u.trigger("liszt:updated"),i=n("#stateSelector",f).val(t.state),i.val()!=t.state?(this.zoomToState(t.indicatorId,t.timeFrameId,i.val()),t.state=i.val(),r=!1):i.trigger("liszt:updated"),r){if(this.lastState&&this.lastState!=t.state){var o=t.indicatorId,s=t.timeFrame,h=t.state;this.zoomToState(o,s,h)}}else this.model.set("selections",t);this.lastState=t.state},changeFilters:function(){var t=n(this.el),i=this.model.get("unsavedSelections");n("#indicatorSelector",t).val(i.indicatorId).trigger("liszt:updated"),n("#timeFrameSelector",t).val(i.timeFrame).trigger("liszt:updated"),n("#stateSelector",t).val(i.state).trigger("liszt:updated")},handleNoRoute:function(){var i=n(this.el),t;this.model.get("noRoute")&&(t=_.extend({},this.model.get("unsavedSelections")),t.indicatorId=parseInt(n("#indicatorSelector",i).val()),t.timeFrame=n("#timeFrameSelector",i).val(),t.state=n("#stateSelector",i).val(),this.model.set("unsavedSelections",t),this.saveChanges())},saveChanges:function(){var n=_.extend({},this.model.get("selections")),t=this.model.get("unsavedSelections");n.indicatorId=t.indicatorId,n.timeFrame=t.timeFrame,n.state=t.state,this.model.set("selections",n)},events:{"click #updateMap":"updateMap","click #nationLink":"setNational"},changeIndicator:function(t){var r=n(t.currentTarget),u=n("#timeFrameSelector"),i=n("#stateSelector"),e=n("#timeFrameSelector").val(),o=n("#stateSelector").val(),f;n("option",u).remove().trigger("liszt:updated"),n("option",i).remove().trigger("liszt:updated"),n.ajax({dataType:"json",url:"/map/timeframes/"+r.val(),success:function(t){_.each(t,function(t){u.append(n('<option value="'+t.val+'">'+t.txt+"<\/option>"))}),u.val(e).trigger("liszt:updated")}}),n.ajax({dataType:"json",url:"/map/states/"+r.val(),success:function(t){i.append('<option value="US" selected="selected">All States<\/option>'),_.each(t,function(t){i.append(n('<option value="'+t.val+'">'+t.txt+"<\/option>"))}),i.val(o).trigger("liszt:updated")}}),f=_.extend({},t.data.model.get("unsavedSelections")),f.indicatorId=parseInt(r.val()),t.data.model.set("unsavedSelections",f)},changeTimeFrame:function(t){var r=n(t.currentTarget),i=_.extend({},t.data.model.get("unsavedSelections"));i.timeFrame=r.val(),t.data.model.set("unsavedSelections",i)},changeState:function(t){var r=n(t.currentTarget),i=_.extend({},t.data.model.get("unsavedSelections"));i.state=r.val(),t.data.model.set("unsavedSelections",i)},updateMap:function(n){var u,e;n.preventDefault();var f=this.model.get("selections"),i=this.model.get("unsavedSelections"),r=new velir.collections.NameValueCollection;return r.addNameValueCollection(this.model.get("options")),f.indicatorId!=i.indicatorId?(f.state!=i.state&&(r.remove(t.UrlParams.Latitude),r.remove(t.UrlParams.Longitude),r.remove(t.UrlParams.Zoom)),u="/map/"+i.indicatorId+"#"+i.timeFrame+"/"+i.state,e=r.toQueryString(),e&&(u+="/"+r.toQueryString()),window.location.href=u):this.model.set("selections",_.extend({},i)),!0},zoomToState:function(i,r,u){var e="/map/viewinfo/"+i+"/"+r+"/"+u,f=this;n.ajax({url:e,dataType:"json",success:function(n){if(n&&n.coord&&n.coord.X!=0&&n.coord.Y!=0&&n.zoom){var i=_.extend({},f.model.get("options")),r=new google.maps.LatLng(n.coord.Y,n.coord.X);i.setValue(t.UrlParams.Latitude,r.lat()),i.setValue(t.UrlParams.Longitude,r.lng()),i.setValue(t.UrlParams.Zoom,n.zoom),f.model.set("options",i)}}})},setNational:function(n){n.preventDefault();var t=_.extend({},this.model.get("unsavedSelections"));t.state="US",this.model.set("unsavedSelections",t)}})}(jQuery),function(n){var t=nspace("ltc.viz.map");t.MapModel=Backbone.Model.extend({initialize:function(n){var i=_.extend({},this.get("selections")),t;i.indicatorId=n.indicatorId,t=_.extend({},this.get("unsavedSelections")),t.indicatorId=n.indicatorId,this.set("unsavedSelections",t),this.set("selections",i)},defaults:{selections:{indicatorId:0,timeFrame:"",state:""},unsavedSelections:{indicatorId:0,timeFrame:"",state:""},initialOptions:n.Deferred(),options:new velir.collections.NameValueCollection,noRoute:!1,hover:"",polygon:"",facilityClicked:{},infoWindow:null}})}(jQuery),function(n){var t=nspace("ltc.viz.map.overlays");t.ChloroplethOverlayView=Backbone.View.extend({initialize:function(t){if(!t.map)throw"ChloroplethOverlayView requires a map.";if(!this.model)throw"ChloroplethOverlayView requires a model";_.bindAll(this,"handleIdle","handleBusy"),t.idle&&n(this).bind("idle",t.idle),t.busy&&n(this).bind("busy",t.busy),this.map=t.map,this.model=this.model,this.updateUrls(),this.model.bind("change:selections",this.updateUrls,this)},updateUrls:function(){var i=this.model.get("selections"),u=new t.ChloroplethMapType({projection:this.map.getProjection(),urls:["/map/chloropleth/"+i.indicatorId+"/"+i.timeFrame+"/"+i.state],idle:this.handleIdle,busy:this.handleBusy}),r;this.map.overlayMapTypes.getLength()>0&&(r=this.map.overlayMapTypes.removeAt(0),n(r).unbind("idle"),n(r).unbind("busy")),this.map.overlayMapTypes.insertAt(0,u)},handleIdle:function(){n(this).trigger("idle")},handleBusy:function(){n(this).trigger("busy")}})}(jQuery),function(n){var t=nspace("ltc.viz"),r=nspace("ltc.viz.map"),i=nspace("ltc.viz.map.overlays"),u=nspace("ltc.viz.map.helpers");r.MapView=Backbone.View.extend({initialize:function(){var u,f,r;(_.bindAll(this,"changeBounds","updateOptions","windowResize","filtersToggle","chloroplethIdle"),u=n(this.el),this.hoverView=new i.LocationCardOverlayView({el:n(".overlays",u),model:this.model}),google&&google.maps.Map)&&(n(".noJavascript").hide(),f={panControl:!1,zoomControl:!1,streetViewControl:!1,mapTypeControl:!1,center:new google.maps.LatLng(37.057136,-86.414345),zoom:4,mapTypeId:google.maps.MapTypeId.TERRAIN,draggableCursor:"progress"},r=this,this.map=new google.maps.Map(n("#map",u).get(0),f),this.containerHeight=n(".map_container").height(),this.containerWidth=n(".map_container").width(),google.maps.event.addListenerOnce(this.map,"idle",function(){var u,f,e;r.chloropleth=new i.ChloroplethOverlayView({map:r.map,model:r.model,busy:r.chlorplethBusy,idle:r.chloroplethIdle}),r.polygon=new i.RegionPolygonOverlayView({map:r.map,model:r.model}),r.facilityMarkers=new i.FacilityMarkerOverlayView({map:r.map,model:r.model}),r.legend=new i.LegendView({el:n(".legend",r.el),map:r.map,model:r.model}),r.facilityInfo=new i.FacilityInfoWindowView({map:r.map,model:r.model}),u=r.model.get("options"),u.getValue(t.UrlParams.Latitude)||u.getValue(t.UrlParams.Longitude)||u.getValue(t.UrlParams.Zoom)||(f=r.model.get("selections"),r.zoomToState(f.indicatorId,f.timeFrame,f.state)),r.updateOptions(),r.updateMap(),u=r.model.get("options"),e=u&&u.getValue(t.UrlParams.FullScreen)=="true",e&&r.fullscreenToggle(),google.maps.event.addListener(r.map,"center_changed",r.changeBounds),google.maps.event.addListener(r.map,"zoom_changed",r.changeBounds),r.model.bind("change:selections",r.updateMap,r),r.model.bind("change:options",r.updateOptions,r)}),n(window).resize(this.windowResize),n(".expander").click(this.handleHelp))},updateMap:function(){},updateOptions:function(){var n=this.model.get("options"),i,r,u;n&&(i=parseInt(n.getValue(t.UrlParams.Zoom)),i&&this.map.setZoom(i),r=parseFloat(n.getValue(t.UrlParams.Latitude)),u=parseFloat(n.getValue(t.UrlParams.Longitude)),r&&u&&this.map.setCenter(new google.maps.LatLng(r,u)))},events:{"click .fullscreen_toggle":"fullscreenToggle","click .continental":"panContinental","click .hawaii":"panHawaii","click .filtersToggle":"filtersToggle","click .fs_link":"openVariableDefinition"},panContinental:function(){this.map.panTo(new google.maps.LatLng(37.057136,-95.414345)),this.map.setZoom(4)},panHawaii:function(){this.map.panTo(new google.maps.LatLng(20.5667,-157.5)),this.map.setZoom(7)},fullscreenToggle:function(){var r=_.extend({},this.model.get("options")),i,u,f;n("body").hasClass("fullscreen")?(n("body").height("").width(""),n(".inner").height("").width(""),n("#map").height("").width(""),i=this.model.get("infoWindow"),u=i&&!i.IsHidden_,u&&(f=n(i.getContent()),f.has(".variableDefinition")&&(i.close(),this.model.set("infoWindow",null))),r.remove(t.UrlParams.FullScreen)):r.setValue(t.UrlParams.FullScreen,!0),this.model.set("options",r),n("body").toggleClass("fullscreen"),n(".notes").toggle(),n(".mapHelp").toggle(),n(".filters").is(":hidden")&&n(".filters").show(),this.windowResize()},windowResize:function(){var i,r,u,f,h;n("body").hasClass("fullscreen")?(i=n(window).height(),r=n(window).width(),n("body").height(i).width(r),n(".inner").height(i).width(r),u=i-75,f=r-50,n("#filters").is(":visible")&&(u=u-n("#filters").height()),n("#map").height(u).width(f)):(n("body").height("").width(""),n(".inner").height("").width(""),n("#map").height("").width("")),google.maps.event.trigger(this.map,"resize");var e=this.model.get("options"),o=parseFloat(e.getValue(t.UrlParams.Latitude)),s=parseFloat(e.getValue(t.UrlParams.Longitude));o&&s&&(h=this,google.maps.event.addListenerOnce(this.map,"idle",function(){h.map.setCenter(new google.maps.LatLng(o,s))}))},filtersToggle:function(){n(".filters").slideToggle();var r=n(".filtersToggle",n(this.el)),t,i;r.html()=="Hide Filters"?(r.html("Show Filters"),t=n(window).height()-50,i=n(window).width()-50,n("#map").height(t).width(i)):(r.html("Hide Filters"),setTimeout(function(){t=n(window).height()-75-n("#filters").height(),i=n(window).width()-50,n("#map").height(t).width(i)},405))},changeBounds:function(){if(!this.boundsChanging||this.boundsChanging.state()!="pending"){this.boundsChanging=n.Deferred();var i=this;google.maps.event.addListenerOnce(this.map,"idle",function(){var n=new velir.collections.NameValueCollection,u=i.model.get("options"),r,f;u&&n.addNameValueCollection(u),r=i.map.getCenter(),n.setValue(t.UrlParams.Latitude,r.lat()),n.setValue(t.UrlParams.Longitude,r.lng()),f=i.map.getZoom(),n.setValue(t.UrlParams.Zoom,f),i.model.set("options",n),i.boundsChanging.resolve()})}},chloroplethIdle:function(){this.map.setOptions({draggableCursor:null})},chlorplethBusy:function(){this.map.setOptions({draggableCursor:"progress"})},openVariableDefinition:function(t){var i,r;t.preventDefault(),this.variableContent||(this.variableContent=n(".variableDefinition",n(this.el)),this.variableContent.show(),n(".notes",this.variableContent).show()),i=this.model.get("infoWindow"),i&&i.close(),r=new InfoBox({content:this.variableContent[0],position:this.map.getCenter(),closeBoxMargin:"8px 7px",closeBoxURL:"/images/icons/icon_close.png",alignBottom:!0,pixelOffset:new google.maps.Size(-225,0),zIndex:5e3}),r.open(this.map),this.model.set("infoWindow",r)},zoomToState:function(i,r,u){var e="/map/viewinfo/"+i+"/"+r+"/"+u,f=this;n.ajax({url:e,dataType:"json",success:function(n){if(n&&n.coord&&n.coord.X!=0&&n.coord.Y!=0&&n.zoom){var i=_.extend({},f.model.get("options")),r=new google.maps.LatLng(n.coord.Y,n.coord.X);i.setValue(t.UrlParams.Latitude,r.lat()),i.setValue(t.UrlParams.Longitude,r.lng()),i.setValue(t.UrlParams.Zoom,n.zoom),f.model.set("options",i)}}})},handleHelp:function(t){var i=n(t.currentTarget);i.next(".expandee").slideToggle()}})}(jQuery),function(n){var t=nspace("ltc.viz.map");t.MapApp=function(){var i=parseInt(n("#indicatorId").val());this.model=new t.MapModel({indicatorId:i}),this.filters=new t.FiltersView({el:"#filters",model:this.model}),this.map=new t.MapView({el:".map_container",model:this.model}),this.table=new t.FacilityTableView({el:".map_table",model:this.model}),this.router=new t.MapRouter({model:this.model})},function(n){n.start=function(){Backbone.history.start()}}(t.MapApp.prototype)}(jQuery),function(n){var t=nspace("ltc.viz.map");t.MapRouter=Backbone.Router.extend({initialize:function(n){this.model=n.model,this.model.bind("change:selections",this.updateRoute,this),this.model.bind("change:options",this.updateRoute,this)},routes:{"":"defaultRoute",":timeFrame":"hydrateModel",":timeFrame/":"hydrateModel",":timeFrame/:state":"hydrateModel",":timeFrame/:state/":"hydrateModel",":timeFrame/:state/:options":"hydrateModel"},defaultRoute:function(){this.model.set("noRoute",!0)},hydrateModel:function(t,i,r){var u=_.extend({},this.model.get("selections")),f,e;if(!t){this.model.set("noRoute",!0);return}u.timeFrame=t,u.state=i?i:"",this.model.set("selections",u),f=_.extend({},u),this.model.set("unsavedSelections",f),r?(e=velir.collections.NameValueCollection.parseQueryString(r),this.model.set("options",e),this.model.get("initialOptions").resolve(),this.model.set("initialOptions",n.Deferred())):(this.model.get("initialOptions").reject(),this.model.set("initialOptions",n.Deferred()))},updateRoute:function(){var n=this.model.get("selections"),t;n.indicatorId!=0&&n.timeFrame!=""&&(t=this.model.get("options"),t?this.navigate(n.timeFrame+"/"+n.state+"/"+t.toQueryString(),{trigger:!1}):this.navigate(n.timeFrame+"/"+n.state,{trigger:!1}))}})}(jQuery),function(){var t=nspace("ltc.viz.map");t.Projection=function(){this.googleProj=new Proj4js.Proj("GOOGLE"),this.wgs84Proj=new Proj4js.Proj("WGS84")},function(n){n.googleToWgs84=function(n){var t=new Proj4js.Point(n.lng(),n.lat());return Proj4js.transform(this.wgs84Proj,this.googleProj,t),t},n.wgs84ToGoogle=function(n,t){var i=new Proj4js.Point(n,t);return Proj4js.transform(this.googleProj,this.wgs84Proj,i),new google.maps.LatLng(i.y,i.x)}}(t.Projection.prototype)}(jQuery),function(n){var t=nspace("ltc.viz.map.helpers");t.ViewInfo=Backbone.View.extend({initialize:function(n){if(!this.model)throw"ViewInfo requires a model.";if(!n.map)throw"ViewInfo requires a map.";t.proj||(t.proj=new t.Projection),this.map=n.map,this.updateView(),this.model.bind("change:selections",this.updateView,this)},updateView:function(){var t=this.model.get("selections"),r=t.indicatorId,u=t.timeFrame,f=t.state,e="/map/viewinfo/"+r+"/"+u+"/"+f,i=this;n.when(this.model.get("initialOptions")).fail(function(){n.ajax({url:e,dataType:"json",success:function(n){n&&n.coord&&n.coord.X!=0&&n.coord.Y!=0&&n.zoom&&(i.map.panTo(new google.maps.LatLng(n.coord.Y,n.coord.X)),i.map.setZoom(n.zoom))}})})}})}(jQuery),function(){var t=nspace("ltc.viz.map.helpers");t.Projection=function(){this.googleProj=new Proj4js.Proj("GOOGLE"),this.wgs84Proj=new Proj4js.Proj("WGS84")},function(n){n.googleToWgs84=function(n){var t=new Proj4js.Point(n.lng(),n.lat());return Proj4js.transform(this.wgs84Proj,this.googleProj,t),t},n.wgs84ToGoogle=function(n,t){var i=new Proj4js.Point(n,t);return Proj4js.transform(this.googleProj,this.wgs84Proj,i),new google.maps.LatLng(i.y,i.x)},n.getUrlBoundsFromGoogleLatLngs=function(n,i){var r=t.proj.googleToWgs84(i),u=t.proj.googleToWgs84(n);return u.x+","+u.y+","+r.x+","+r.y},n.getUrlBoundsFromGoogleBounds=function(n){var i=t.proj.googleToWgs84(n.getNorthEast()),r=t.proj.googleToWgs84(n.getSouthWest());return r.x+","+r.y+","+i.x+","+i.y}}(t.Projection.prototype)}(jQuery),function(n){var i=nspace("ltc.viz.map.overlays"),t=nspace("ltc.viz.map.helpers");i.ChloroplethMapType=function(i){if(!i.projection)throw"ChloroplethMapType requires a projection.";if(this._projection=i.projection,!i.urls)throw"ChloroplethMapType requires tile service urls";this.urls=i.urls,this._urlIndex=0,this._pendingTileUrls=[],this.tileSize=i.tileSize||new google.maps.Size(256,256),i.busy&&n(this).bind("busy",i.busy),i.idle&&n(this).bind("idle",i.idle),t.proj||(t.proj=new t.Projection)},function(i){i.getTile=function(t,i){var e=n("<div/>").css({"-webkit-user-select":"none","border-top-width":"0px","border-right-width":"0px","border-bottom-width":"0px","border-left-width":"0px","border-style":"initial","border-color":"initial","padding-top":"0px","padding-right":"0px","padding-bottom":"0px","padding-left":"0px","margin-top":"0px","margin-right":"0px","margin-bottom":"0px","margin-left":"0px",width:"256px",height:"256px",display:"inline"}),u=n("<img/>"),f=this;return u.bind("load error abort",function(t){(f.removePending(u[0]),f._pendingTileUrls.length===0&&n(f).trigger("idle"),t.type==="load")&&n(this).fadeIn(600)}),u.hide().attr("src",this.getTileUrl(t,i)).appendTo(e),e[0]},i.removePending=function(t){var r=t.src.substr(t.src.indexOf("/map/")),i=n.inArray(r,this._pendingTileUrls);i>-1&&this._pendingTileUrls.splice(i,1)},i.releaseTile=function(t){var i=this;n("img",t).each(function(){n(this).unbind(),i.removePending(this)})},i.getTileUrl=function(i,r){var u=this.tileSize.width,f=Math.pow(2,r),h=(i.y+1)*u/f,c=i.x*u/f,l=i.y*u/f,a=(i.x+1)*u/f,v=this._projection.fromPointToLatLng(new google.maps.Point(c,h)),y=this._projection.fromPointToLatLng(new google.maps.Point(a,l)),p=t.proj.getUrlBoundsFromGoogleLatLngs(v,y),o=new velir.collections.NameValueCollection,s,e;return o.add("bbox",p),s=this._urlIndex%this.urls.length,e=this.urls[s]+"?"+o.toQueryString(),this._urlIndex++,this._pendingTileUrls.push(e),this._pendingTileUrls.length===1&&n(this).trigger("busy"),e}}(i.ChloroplethMapType.prototype)}(jQuery),function(n){var t=nspace("ltc.viz.map.overlays");t.FacilityInfoWindowView=Backbone.View.extend({initialize:function(t){if(!t.map)throw"FacilityInfoWindowView requires a map.";if(this.map=t.map,!t.model)throw"FacilityInfoWindowView requires a model.";this.dataReady=n.Deferred(),this.templateReady=n.Deferred(),this.getTemplate(this.templatePath,this.templateReady),this.updateInfo(),this.model.bind("change:facilityClicked",this.handleFacilityClick,this),this.model.bind("change:selections",this.updateInfo,this)},templatePath:"/js/ltc/viz/map/html/facilityInfoOverlay.html",updateInfo:function(){this.dataReady&&this.dataReady.state()=="pending"||(this.dataReady=n.Deferred()),this.facilities={};var t=this.model.get("selections"),r="/map/facilityinfo/"+t.indicatorId+"/"+t.timeFrame+"/"+t.state,i=this;n.ajax({url:r,type:"GET",dataType:"json",success:function(n){_.each(n,function(n){i.facilities[n.fips]=n}),i.dataReady.resolve()},error:function(){i.dataReady.reject()}})},handleFacilityClick:function(){var i=this,r=this.model.get("facilityClicked"),f=this.model.get("infoWindow"),u,t;(f&&(f.close(),this.model.set("infoWindow",null)),r)&&(u=n('<div class="facilityInfo"><div class="title"><\/div><div class="content"><\/div><\/div>'),n(".title",u).html("Loading"),n(".content",u).html('<img src="/images/icons/loader-indicator-big2.gif" style="margin-left: auto; margin-right: auto;"/><br/><p style="margin: 15px 100px 150px;">Loading, please wait..<\/p>'),t=new InfoBox({content:u[0],position:r.marker.getPosition(),closeBoxMargin:"8px 7px",closeBoxURL:"/images/icons/icon_close.png",alignBottom:!0,pixelOffset:new google.maps.Size(-170,-35),infoBoxClearance:new google.maps.Size(250,25),zIndex:5e3}),t.open(this.map),this.model.set("infoWindow",t),n.when(this.dataReady,this.templateReady).done(function(){var u=i.facilities[r.fips],n;if(!u)throw"Could not find facility with fips "+r.fips;n=i.templates[i.templatePath](u),t&&!t.isHidden_?t.setContent(n):(t=new InfoBox({content:n,position:r.marker.getPosition(),closeBoxMargin:"8px 7px",closeBoxURL:"/images/icons/icon_close.png",alignBottom:!0,pixelOffset:new google.maps.Size(-170,-35),infoBoxClearance:new google.maps.Size(250,25),zIndex:5e3}),t.open(i.map),i.model.set("infoWindow",t))}).fail(function(){var u=n('<div class="facilityInfo"><div class="title"><\/div><div class="content"><\/div><\/div>');n(".title",u).html('<span style="color: #8b0100">Error<\/span>'),n(".content",u).html('<p style="color:#8b0100;">Sorry! An error occurred with our facility information. Please reload the page and try again later.<\/p>'),t&&!t.isHidden_?t.setContent(u[0]):(t=new InfoBox({content:u[0],position:r.marker.getPosition(),closeBoxMargin:"8px 7px",closeBoxURL:"/images/icons/icon_close.png",alignBottom:!0,pixelOffset:new google.maps.Size(-170,-35),infoBoxClearance:new google.maps.Size(250,25),zIndex:5e3}),t.open(i.map),i.model.set("infoWindow",t))}))},getTemplate:function(t,i){this.templates||(this.templates={});var r=this;this.templates[t]?i.resolve():n.get(t).done(function(n){n.indexOf("<head")!=-1?i.reject():(r.templates[t]=Mustache.compile(n),i.resolve())}).fail(function(){i.reject()})},templates:{}})}(jQuery),function(n){var t=nspace("ltc.viz.map.overlays");t.FacilityMarkerOverlayView=Backbone.View.extend({initialize:function(n){_.bindAll(this,"clickMarker","mouseoverMarker","mouseoutMarker"),this.map=n.map,this.model=n.model,this.updateMarkers(),this.model.bind("change:selections",this.updateMarkers,this)},updateMarkers:function(){var t=this,i=this.model.get("selections"),u,r,f;if(this.curMarkers){for(u in this.curMarkers)r=this.curMarkers[u],google.maps.event.clearListeners(r,"click"),google.maps.event.clearListeners(r,"mouseover"),google.maps.event.clearListeners(r,"mouseout"),r.setMap(null),delete this.curMarkers[u];this.curMarkers={}}else this.curMarkers={};i.state&&i.state!==""&&i.state!=="US"&&(f="/map/markers/"+i.indicatorId+"/"+i.timeFrame+"/"+i.state,n.ajax({url:f,type:"GET",dataType:"json",success:function(n){t.markerData={},_.each(n,function(n){t.markerData[n.fips]=n});var i=_.map(n,function(n){var t=new google.maps.MarkerImage(n.shadow,new google.maps.Size(26,20),new google.maps.Point(0,0),new google.maps.Point(9,18));return{fips:n.fips,marker:new google.maps.Marker({cursor:n.cursor,flat:n.flat,icon:new google.maps.MarkerImage(n.icon),position:new google.maps.LatLng(n.position.Y,n.position.X),shadow:t})}});_.each(i,function(n){n.marker.setMap(t.map),google.maps.event.addListener(n.marker,"click",function(){t.clickMarker(n.marker,n.fips)}),google.maps.event.addListener(n.marker,"mouseover",function(i){t.mouseoverMarker(i,n.fips)}),google.maps.event.addListener(n.marker,"mouseout",t.mouseoutMarker),t.curMarkers[n.fips]=n.marker})},error:function(){var i=n('<div class="facilityInfo"><div class="title"><\/div><div class="content"><\/div><\/div>'),r;n(".title",i).html('<span style="color:#8b0100;">Error<\/span>'),n(".content",i).html('<p style="color:#8b0100;"><b>Sorry!<\/b> An error occurred retrieving information for the facility pins. No facility pins can be displayed, at this time. Please try again later.<\/p>'),r=new InfoBox({content:i[0],position:t.map.getCenter(),closeBoxMargin:"8px 7px",closeBoxURL:"/images/icons/icon_close.png",alignBottom:!0,pixelOffset:new google.maps.Size(-170,-35),infoBoxClearance:new google.maps.Size(250,25),zIndex:5e3}),r.open(t.map),t.model.set("infoWindow",r)}}))},clickMarker:function(n,t){var i=this.model.get("facilityClicked");this.model.set("facilityClicked",{fips:t,marker:n}),i.fips==t&&this.model.trigger("change:facilityClicked")},mouseoverMarker:function(n,t){this.model.set("hover",t);var i=this.model.get("polygon");i!=this.markerData[t].parent&&this.model.set("polygon",this.markerData[t].parent)},mouseoutMarker:function(){window.clearTimeout(this.model.get("hoverTimeout"));var n=this;this.model.set("hoverTimeout",setTimeout(function(){n.model.set("hover","")},200))}})}(jQuery),function(n){var i=nspace("ltc.viz.map.overlays"),t=nspace("ltc.viz");i.LegendView=Backbone.View.extend({initialize:function(t){if(!this.model)throw new"LegendView requires a model.";if(n(this.el).length==0)throw new"LegendView requires an element.";if(!t||!t.map)throw"LegendView requires a map.";_.bindAll(this,"handleOptions"),this.map=t.map,this.dataReady=n.Deferred(),this.templateReady=n.Deferred(),this.getTemplate(this.templatePath,this.templateReady),this.updateLegend(),this.model.bind("change:selections",this.updateLegend,this),this.model.bind("change:options",this.handleOptions)},templatePath:"/js/ltc/viz/map/html/legendOverlay.html",updateLegend:function(){this.dataReady&&this.dataReady.state()=="pending"||(this.dataReady=n.Deferred());var i=this.model.get("selections"),r=parseInt(i.indicatorId),u=i.timeFrame,f=i.state,e="/map/legend/"+r+"/"+u+"/"+f,t=this;n.ajax({url:e,dataType:"json",success:function(n){t.legend=n,t.dataReady.resolve()},error:function(){t.dataReady.reject()}}),n.when(this.templateReady,this.dataReady).done(function(){var i=n(t.el);i.html(t.templates[t.templatePath](t.legend)),t.handleOptions()}).fail(function(){t.showError()})},handleOptions:function(){var u=this.model.get("options"),r,i;u&&(r=u.getValue(t.UrlParams.Legend),i=n(".btnSlide",n(this.el)),r&&r!="open"?i.hasClass("open")&&(i.removeClass("open"),n(".data_object",n(this.el)).slideToggle()):i.hasClass("open")||(i.addClass("open"),n(".data_object",n(this.el)).slideToggle()))},events:{"click .btnSlide":"legendCollapse"},legendCollapse:function(i){var f=n(i.currentTarget),r,u;n(".data_object",n(this.el)).slideToggle(),f.toggleClass("open"),r=new velir.collections.NameValueCollection,u=this.model.get("options"),u&&r.addNameValueCollection(u),f.hasClass("open")?r.setValue(t.UrlParams.Legend,"open"):r.setValue(t.UrlParams.Legend,"closed"),this.model.set("options",r)},getTemplate:function(t,i){this.templates||(this.templates={});var r=this;this.templates[t]?i.resolve():n.get(t).done(function(n){n.indexOf("<head")!=-1?i.reject():(r.templates[t]=Mustache.compile(n),i.resolve())}).fail(function(){i.reject()})},templates:{},showError:function(){var t=n('<div class="facilityInfo"><div class="title"><\/div><div class="content"><\/div><\/div>'),i;n(".title",t).html('<span style="color:#8b0100;">Error<\/span>'),n(".content",t).html('<p style="color:#8b0100;"><b>Sorry!<\/b> An error occurred retrieving information for the legend. The legend will not be visible at this time. Please try again later.<\/p>'),i=new InfoBox({content:t[0],position:this.map.getCenter(),closeBoxMargin:"8px 7px",closeBoxURL:"/images/icons/icon_close.png",alignBottom:!0,pixelOffset:new google.maps.Size(-170,-35),infoBoxClearance:new google.maps.Size(250,25),zIndex:5e3}),i.open(this.map),this.model.set("infoWindow",i)}})}(jQuery),function(n){var t=nspace("ltc.viz.map.overlays");t.LocationCardOverlayView=Backbone.View.extend({initialize:function(){_.bindAll(this,"mouseEnterCard","mouseLeaveCard"),this.dataReady=n.Deferred(),this.hoverDeferred=n.Deferred(),this.getTemplate(this.templatePath,this.hoverDeferred),this.updateHoverOverlay(),this.model.bind("change:selections",this.updateHoverOverlay,this),this.model.bind("change:hover",this.show,this)},templatePath:"/js/ltc/viz/map/html/hoverOverlay.html",updateHoverOverlay:function(){var i=this.model.get("selections"),r=parseInt(i.indicatorId),u=i.timeFrame,e=i.state,t,f;u&&r&&(t=this,this.dataReady&&this.dataReady.state()=="pending"||(this.dataReady=n.Deferred()),f="/map/locations/"+r+"/"+u+"/"+e,n.ajax({url:f,dataType:"json",success:function(n){t.cards=n,t.dataReady.resolve()},error:function(){t.dataReady.reject()}}))},show:function(){for(var u=this.model.get("hover"),i=this,t,r;chart=this.prevCharts.shift();)chart.destroy();window.clearTimeout(this.model.get("hoverTimeout")),t=n(i.el),r=n('<div class="item"><div class="title"><\/div><div class="content"><\/div><\/div>'),n(".title",r).html("Loading"),n(".content",r).html('<img src="/images/icons/loader-indicator-big2.gif" style="margin-left: auto; margin-right: auto;"/><br/><p style="margin: 25px;">Loading, please wait..<\/p>'),t.html(r.html()),t.show(),n.when(this.hoverDeferred,this.dataReady).done(function(){var e=_.filter(i.cards,function(n){return n.fips==u}),f;if(!e||e.length==0){t.hide();return}var n=[e[0]],o=n[0].parent,r=_.filter(i.cards,function(n){return n.id==o});for(r&&r.length>0&&r[0].val!="No Data"&&n.push(r[0]),t.html(i.templates[i.templatePath]({cards:n})),f=0;f<n.length;f++)i.addChart(n[f]);t.show()}).fail(function(){n(".title",t).html('<span style="color: #8b0100">Error<\/span>'),n(".content",t).html('<p style="color:#8b0100;"><b>Sorry!<\/b> An error occurred with our location cards. Please try again later.<\/p>')})},addChart:function(t){if(!t.trend||t.trend.length==0){n("#locChart"+t.id).hide();return}this.prevCharts.push(new Highcharts.Chart({chart:{renderTo:"locChart"+t.id,type:"line",marginRight:10,marginLeft:5,marginBottom:25},title:{text:""},xAxis:{type:"datetime",minTickInterval:31536e7,labels:{formatter:function(){var n=new Date(this.value).getFullYear()+1;return"'"+n.toString().substr(2,2)}}},yAxis:{title:{text:""},labels:{formatter:function(){return""}},minTickInterval:1e3,startOnTick:!0,endOnTick:!1},tooltip:{formatter:function(){return!1}},legend:{enabled:!1},series:[{name:t.indName,data:t.trend==null?[]:_.map(t.trend,function(n){return[Date.UTC(parseInt(n.tf),0,1),n.val]}),marker:{symbol:"circle",radius:3,hover:{radius:1}},color:"#4c4c4c",lineWidth:2}],credits:{enabled:!1}}))},prevCharts:[],events:{mouseenter:"mouseEnterCard",mouseleave:"mouseLeaveCard"},mouseEnterCard:function(){window.clearTimeout(this.model.get("hoverTimeout"))},mouseLeaveCard:function(){this.model.set("hover","")},getTemplate:function(t,i){this.templates||(this.templates={});var r=this;this.templates[t]?i.resolve():n.get(t).done(function(n){n.indexOf("<head")!=-1?i.reject():(r.templates[t]=Mustache.compile(n),i.resolve())}).fail(function(){i.reject()})},templates:{}})}(jQuery),typeof google!="undefined"&&function(n,t,i){function e(n){for(var i=n.split(", "),r=[],t=0;t<i.length;t++){var f=i[t].split(" "),e=parseFloat(f[1]),o=parseFloat(f[0]);r.push(u.proj.wgs84ToGoogle(o,e))}return r}function f(t){for(var u=[],f=n.trim(t).split(r.parenComma),s,i=0,o=f.length;i<o;++i)s=f[i].replace(r.trimParens,"$1"),u.push(e(s));return u}function o(t){for(var o,s=n.trim(t).split(r.doubleParenComma),h=[],e,u,i=0,c=s.length;i<c;++i)for(o=s[i].replace(r.trimParens,"$1"),e=f(o),u=0;u<e.length;u++)h.push(e[u]);return h}var u=nspace("ltc.viz.map.helpers"),r={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/};u.MapUtil={fromPositionToRelativePixels:function(n,t){var r=Math.pow(2,n.getZoom()),e=new i.maps.LatLng(n.getBounds().getNorthEast().lat(),n.getBounds().getSouthWest().lng()),u=n.getProjection().fromLatLngToPoint(e),f=n.getProjection().fromLatLngToPoint(t);return{x:Math.floor((f.x-u.x)*r),y:Math.floor((f.y-u.y)*r)}},wktToGooglePolygonPaths:function(n){var u=[],t,i,e;if(n=n.replace(/[\n\r]/g," "),t=r.typeStr.exec(n),t)if(i=t[1].toLowerCase(),e=t[2],i==="multipolygon")u=o(e);else if(i==="polygon")u=f(e);else throw"Unrecognized feature type: "+i;return u}}}(jQuery,Proj4js,google),function(n){var i=nspace("ltc.viz.map.overlays"),t=nspace("ltc.viz.map.helpers");i.RegionPolygonOverlayView=Backbone.View.extend({initialize:function(n){if(_.bindAll(this,"findAndDrawPoly","clearPolygons","polygonReentry","updateRefinedPolygons"),!n.model)throw new"Model is required for the RegionPolygonOverlayView.";if(!n.map)throw new"Map is required for RegionPolygonOverlayView.";t.proj||(t.proj=new t.Projection),this.refinedZoomLevel=n.refinedZoomLevel?n.refinedZoomLevel:8,this.map=n.map,this.model=n.model,this.updatePolygons(),this.model.bind("change:selections",this.updatePolygons,this),this.model.bind("change:hover",this.updateHover,this),this.model.bind("change:polygon",this.updatePolygon,this),google.maps.event.addListener(this.map,"mousemove",this.findAndDrawPoly),google.maps.event.addListener(this.map,"mouseout",this.clearPolygons),google.maps.event.addListener(this.map,"center_changed",this.updateRefinedPolygons),google.maps.event.addListener(this.map,"zoom_changed",this.updateRefinedPolygons)},drawnPolygons:[],updatePolygons:function(){var i=this.model.get("selections"),u="/map/polygons/"+i.indicatorId+"/"+i.timeFrame+"/"+i.state,f=this,r;this.polygons={},this.refinedPolygons={},r=this.getZoom(),r>=this.refinedZoomLevel?this.updateRefinedPolygons():this.geometries=this.polygons,n.ajax({url:u,type:"GET",dataType:"json",success:function(n){for(var r=0;r<n.length;r++){var i=n[r],u=t.MapUtil.wktToGooglePolygonPaths(i.wkt),e=new google.maps.Polygon({paths:u,strokeColor:i.strokeColor,strokeOpacity:i.strokeOpacity,strokeWeight:i.strokeWeight,fillColor:i.fillColor,fillOpacity:i.fillOpacity});f.polygons[i.fips]=e}}}),google.maps.event.trigger(t,"resize")},findAndDrawPoly:function(n){var i=this.geometries,t,r;for(t in i)if(i.hasOwnProperty(t)&&(r=i[t],r.contains(n.latLng))){this._drawPoly(t,r,!0);return}this.clearPolygons()},_drawPoly:function(n,t,i,r){var u=t?t:geometries[n],e=this.drawnPolygons&&this.samePoly(this.drawnPolygons[0],t),o=this.model.get("hover")==n,f;if(!o&&e){i&&this.model.set("hover",n),this.model.set("polygon",n);return}(!e||r)&&(this.removePoly(this.drawnPolygons.pop()),this.drawnPolygons.unshift(u),i&&this.model.set("hover",n),this.model.set("polygon",n),f=this,google.maps.event.addListener(u,"mouseover",function(){window.clearTimeout(f.model.get("hoverTimeout")),f.polygonReentry(n)}),google.maps.event.addListener(u,"mouseout",function(){}),u.setMap(this.map))},polygonReentry:function(n){this.model.set("hover",n)},removePoly:function(n){n&&(google.maps.event.clearListeners(n,"mouseover"),google.maps.event.clearListeners(n,"mouseout"),n.setMap(null))},clearPolygons:function(){var n=this;this.model.get("hoverTimeout")&&window.clearTimeout(this.model.get("hoverTimeout")),this.model.set("hoverTimeout",setTimeout(function(){while(n.drawnPolygons.length>0){var t=n.drawnPolygons.pop();google.maps.event.clearListeners(t,"mouseover"),google.maps.event.clearListeners(t,"mouseout"),t.setMap(null),n.model.set("hover",""),n.model.set("polygon","")}},200))},samePoly:function(n,t){return!n||!t?!1:n.__gm_id==t.__gm_id?!0:!1},refinedDeferred:null,updateRefinedPolygons:function(){if(!this.refinedDeferred||this.refinedDeferred.state()!="pending"){this.refinedDeferred=n.Deferred();var i=this;google.maps.event.addListenerOnce(this.map,"idle",function(){var r,e;if(i.refinedDeferred.resolve(),r=i.getZoom(),r>=i.refinedZoomLevel){i.geometries=i.refinedPolygons;var u=i.model.get("selections"),o=i.map.getBounds(),s=t.proj.getUrlBoundsFromGoogleBounds(o),f=new velir.collections.NameValueCollection;f.setValue("bbox",s),f.setValue("zoom",r),e="/map/polygons/"+u.indicatorId+"/"+u.timeFrame+"/"+u.state+"?"+f.toQueryString(),n.ajax({url:e,type:"GET",dataType:"json",success:function(n){for(var o=i.model.get("polygon"),e,u=0;u<n.length;u++){var r=n[u],f=r.fips,s=t.MapUtil.wktToGooglePolygonPaths(r.wkt),h=new google.maps.Polygon({paths:s,strokeColor:r.strokeColor,strokeOpacity:r.strokeOpacity,strokeWeight:r.strokeWeight,fillColor:r.fillColor,fillOpacity:r.fillOpacity});i.refinedPolygons[f]=h,f==o&&(e=i.geometries[f],i._drawPoly(f,e,!0,!0))}}})}else i.geometries=i.polygons,i.refinedPolygons={}})}},updateHover:function(){var n=this.model.get("hover");n||this.clearPolygons()},updatePolygon:function(){var n=this.model.get("polygon"),t=this.geometries[n];t&&this._drawPoly(n,t,!1)},getZoom:function(){var n=this.map.getZoom(),i=this.model.get("options"),t;return n}})}(jQuery)