!function(){var e={7292:function(){Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),a=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var i=arguments[1],o=0;o<a;){var n=t[o];if(e.call(i,n,o,t))return n;o++}}})}},t={};function a(i){var o=t[i];if(void 0!==o)return o.exports;var n=t[i]={exports:{}};return e[i](n,n.exports,a),n.exports}!function(){"use strict";function e(e,t){return 0===e.length?t:t.locations.find((function(t){return t.name===e}))}function t(t){const a=function(){try{return function(){try{const e=sessionStorage.getItem("locationDataExpireAt");if(e){const t=parseInt(e);return t<(new Date).getTime()}}catch(e){console.error(e)}return!0}()?(sessionStorage.removeItem("locationData"),!1):JSON.parse(sessionStorage.getItem("locationData"))}catch(e){console.error(e)}return!1}();return void 0===t&&(t=""),a?$.Deferred().resolve(e(t,a)):$.getJSON("https://ftco.air-resource.net/ftcodatajson.txt").then((function(a){return a.locations?(function(e){sessionStorage.setItem("locationDataExpireAt",(new Date).getTime()+0),sessionStorage.setItem("locationData",JSON.stringify(e))}(a),e(t,a)):$.Deferred().reject()}))}a(7292),$(document).ready((function(){var e=$("html").hasClass("csstransitions");$(".nav-pill").on("click",(function(e){a()})),$("body").click((function(e){var t=$(e.target);i()&&!t.is(".nav-pill, .burger-line")&&-1===t.parents().index($(".nav"))&&a()}));var a=function(){i()?($(".nav").removeClass("nav-visible"),e||$(".nav").animate({left:"-282"},500),$(".nav-pill").removeClass("nav-visible"),$(".nav > li > a").unbind("click")):($(".nav").addClass("nav-visible"),e||$(".nav").animate({left:"0"},500),$(".nav-pill").addClass("nav-visible"),$(".nav > li > a").click((function(e){$(this).parent().find("ul").length&&(e.preventDefault(),n(),o(this))})))},i=function(){return!!$(".nav").hasClass("nav-visible")},o=function(e){var t=$(e).parent().find("ul");$(t).is(":visible")?$(t).slideUp():$(t).slideDown()},n=function(){$(".nav > li > ul").each((function(){$(this).is(":visible")&&o(this)}))};function r(e){if("-99"==e||"-99.0"==e)return"--";if("-99&deg;"==e)return"--";if("-99.00"==e)return"--";if("nothing"==e)return"";if(" "==e)return"No Data Available";var t=parseInt(e);return isNaN(t),e}function l(e){$("#timelapse"+e).is(":visible")&&function(e){$.ajax({url:"https://ftco.air-resource.net/ftcoimagejson"+e+".txt",dataType:"text",cache:!1,success:function(t){var a=$.parseJSON(t);!function(e,t){Galleria.loadTheme("./js/vendor/themes/classic/galleria.classic.min.js"),Galleria.run(".galleria-timelapse"+e,{dataSource:t,wait:!0,playTime:100,transitionSpeed:1,show:t.length-1,extend:function(){var t=this;$("#playButton"+e).on("click",(function(){t.playToggle(),$(this).toggleClass("pause")}))}})}(e,a.imagelist)},error:function(t,a,i){$("#imagedate"+e).html("-----")}})}(e),$("#landmarks"+e).is(":visible")&&function(e){$.ajax({url:"https://ftco.air-resource.net/ftcoimagejson"+e+".txt",dataType:"text",cache:!1,success:function(t){var a=$.parseJSON(t);!function(e,t,a){$("#webcam-landmark-src"+e).css("margin-left",t+"px"),$("#webcam-landmark-src"+e).css("margin-top",a+"px")}(e,a.LandmarksLeftMargin,a.LandmarksTopMargin)},error:function(e,t,a){}})}(e),function(e){if($("#camera"+e).is(":visible")){var t=new Date;$("#webcam-image-src"+e).attr("src","https://ftco.air-resource.net/images/photos-timelapse/"+e+".jpg?"+t.getTime()),s(e)}}(e),$("#monitoring-sites").is(":visible")&&s(e)}function s(e){$.ajax({url:"https://ftco.air-resource.net/images/photos-timelapse/"+e+"_JSON_IMAGE.txt",dataType:"text",success:function(t){var a=$.parseJSON(t);$("#imagedate"+e).html(a.imagedate)},error:function(t,a,i){$("#imagedate"+e).html("-----")}})}function c(){var e,t;t=.562*(e=$("#cameraDIS")).width()+"px",e.css("height",t),t=.562*(e=$("#landmarksDIS")).width()+"px",e.css("height",t),t=.562*(e=$("#cameraSOP")).width()+"px",e.css("height",t),t=.562*(e=$("#landmarksSOP")).width()+"px",e.css("height",t),t=.562*(e=$("#cameraFOS")).width()+"px",e.css("height",t),t=.562*(e=$("#landmarksFOS")).width()+"px",e.css("height",t)}$(window).resize((function(){$(document).width()>750&&$(".nav > li > ul").css("display",""),c()})),navigator.userAgent.match(/(iPod|iPhone|iPad)/i)&&$("body").css("cursor","pointer"),window.location.hash&&function(e,t){e(t).on("hashchange load",(function(){var t;(t=e(":target")).length>0&&e("html, body").stop().animate({scrollTop:t.offset().top-90},200)}))}(jQuery,window),$((function(){$("#tabs").tabs({activate:function(e,t){c()}}),$("#inner-tabsFTC").tabs({beforeActivate:function(e,t){if(t.oldPanel.find(".galleria-container").length>0){var a=!1;if(Galleria.get().forEach((function(e){e.isPlaying()&&(a=!0,e.pause(),$(e._target).parent().find(".play-button-holder > span").removeClass("pause"))})),a){var i=$(this),o=t.newTab.index();return setTimeout((function(){i.tabs("option","active",o)}),100),e.stopPropagation(),!1}}},activate:function(e,t){if("simulate-haze"===t.oldTab.attr("aria-controls"))getImageDate();else if("simulate-haze"===t.newTab.attr("aria-controls")){var a=Galleria.get(0).getData();a&&$("#imagedateFTC").html(a.description)}}}),$("#inner-tabsDIS").tabs({beforeActivate:function(e,t){if(t.oldPanel.find(".galleria-container").length>0){var a=!1;if(Galleria.get().forEach((function(e){e.isPlaying()&&(a=!0,e.pause(),$(e._target).parent().find(".play-button-holder > span").removeClass("pause"))})),a){var i=$(this),o=t.newTab.index();return setTimeout((function(){i.tabs("option","active",o)}),100),e.stopPropagation(),!1}}},activate:function(e,t){if("simulate-haze"===t.oldTab.attr("aria-controls"))getImageDate();else if("simulate-haze"===t.newTab.attr("aria-controls")){var a=Galleria.get(0).getData();a&&$("#imagedateDIS").html(a.description)}}}),$("#inner-tabsSOP").tabs({beforeActivate:function(e,t){if(t.oldPanel.find(".galleria-container").length>0){var a=!1;if(Galleria.get().forEach((function(e){e.isPlaying()&&(a=!0,e.pause(),$(e._target).parent().find(".play-button-holder > span").removeClass("pause"))})),a){var i=$(this),o=t.newTab.index();return setTimeout((function(){i.tabs("option","active",o)}),100),e.stopPropagation(),!1}}},activate:function(e,t){if("simulate-haze"===t.oldTab.attr("aria-controls"))getImageDate();else if("simulate-haze"===t.newTab.attr("aria-controls")){var a=Galleria.get(0).getData();a&&$("#imagedateSOP").html(a.description)}}}),$(".controlgroup").controlgroup({direction:"vertical"}),$("#dialogParticulate, #dialogOzone, #dialogVisibility, #dialogNOx, #dialogDisclaimer").css("visibility","visible"),$("#ozone-index-dialog").dialog({closeOnEscape:!0,draggable:!1,resizable:!1,autoOpen:!1,minWidth:250,width:800,modal:!0,open:function(e,t){jQuery(".ui-widget-overlay").on("click",(function(){jQuery("#ozone-index-dialog").dialog("close")}))},show:{effect:"fade",duration:500},hide:{effect:"fade",duration:500}}),$("body").on("click",".open-air-quality-dialog-class",(function(){$("#ozone-index-dialog").dialog("open")})),$("#dialogOzone").dialog({closeOnEscape:!0,draggable:!1,resizable:!1,autoOpen:!1,minWidth:250,width:800,modal:!0,open:function(e,t){jQuery(".ui-widget-overlay").on("click",(function(){jQuery("#dialogOzone").dialog("close")}))},show:{effect:"fade",duration:500},hide:{effect:"fade",duration:500}}),$("body").on("click",".openerOzone",(function(){$("#dialogOzone").dialog("open")})),$("#dialogNOx").dialog({closeOnEscape:!0,draggable:!1,resizable:!1,autoOpen:!1,minWidth:250,width:800,modal:!0,open:function(e,t){jQuery(".ui-widget-overlay").on("click",(function(){jQuery("#dialogNOx").dialog("close")}))},show:{effect:"fade",duration:500},hide:{effect:"fade",duration:500}}),$("body").on("click",".openerNOx",(function(){$("#dialogNOx").dialog("open")})),$("#dialogParticulate").dialog({closeOnEscape:!0,draggable:!1,resizable:!1,autoOpen:!1,minWidth:250,width:800,modal:!0,open:function(e,t){jQuery(".ui-widget-overlay").on("click",(function(){jQuery("#dialogParticulate").dialog("close")}))},show:{effect:"fade",duration:500},hide:{effect:"fade",duration:500}}),$("body").on("click",".openerParticulate",(function(){$("#dialogParticulate").dialog("open")})),$("#dialogVisibility").dialog({closeOnEscape:!0,draggable:!1,resizable:!1,autoOpen:!1,minWidth:250,width:800,modal:!0,open:function(e,t){jQuery(".ui-widget-overlay").on("click",(function(){jQuery("#dialogVisibility").dialog("close")}))},show:{effect:"fade",duration:500},hide:{effect:"fade",duration:500}}),$("body").on("click",".openerVisibility",(function(){$("#dialogVisibility").dialog("open")})),$("#dialogDisclaimer").dialog({closeOnEscape:!0,draggable:!1,resizable:!1,autoOpen:!1,minWidth:250,width:800,modal:!0,open:function(e,t){jQuery(".ui-widget-overlay").on("click",(function(){jQuery("#dialogDisclaimer").dialog("close")}))},show:{effect:"fade",duration:500},hide:{effect:"fade",duration:500}}),$("body").on("click",".openerDisclaimer",(function(){$("#dialogDisclaimer").dialog("open")}))})),t().then((function(e){var t;if(window.dd=e,$(".date-and-time").html(e.datadate),$(".home-8-hour-ozone").html(r(e.currentOzoneNowcast)),$(".home-8-hour-ozone-color").addClass(e.currentOzoneNowcastAQIcolor),$(".home-8-hour-ozone-text").html(r(e.currentOzoneNowcastAQItext)),$(".pm-25-1-hour").html(r(e.currentPM25)),$(".pm-25-1-hour-color").addClass(e.currentPM25AQIcolor),$(".pm-25-1-hour-text").html(r(e.currentPM25AQItext)),$(".home-1-hour-nox").html(r(e.currentNOx)),$(".pm-25-24-hour").html(r(e.currentPM25Nowcast)),$(".pm-25-24-hour-color").addClass(e.currentPM25NowcastAQIcolor),$(".pm-25-24-hour-text").html(r(e.currentPM25NowcastAQItext)),$(".pm-10-24-hour").html(r(e.currentPM10Nowcast)),$(".pm-10-24-hour-color").addClass(e.currentPM10NowcastAQIcolor),$(".pm-10-24-hour-text").html(r(e.currentPM10NowcastAQItext)),$(".home-visibility").html(r(e.currentVisibility)),$(".home-visibility-color").addClass(e.currentVisibilityAQIcolor),$(".home-visibility-text").html(r(e.currentVisibilityAQItext)),$(".generic-latitude").html(e.locations[5].latitude),$(".generic-longitude").html(e.locations[5].longitude),$(".generic-elevation").html(e.locations[5].elevation),$(".generic-reporting-agency").html(e.locations[5].agency),$("body").is(".mason-street, .edison-street, .laporte-street, .remington-street, .gardens-on-spring-creek, .new-belgium, .museum-of-discovery, .soapstone-prairie, .fossil-creek")){switch(document.body.getAttribute("class")){case"mason-street":t=0;break;case"edison-street":t=1;break;case"laporte-street":t=2;break;case"remington-street":t=3;break;case"gardens-on-spring-creek":t=4;break;case"new-belgium":t=5;break;case"museum-of-discovery":t=6;break;case"soapstone-prairie":t=7;break;case"fossil-creek":t=8}if($(".weather-station-name").html(r(e.locations[t].name)),$(".date-and-time").html(e.locations[t].datadate),$(".lat").html(e.locations[t].latitude),$(".long").html(e.locations[t].longitude),$(".elevation").html(e.locations[t].elevation),$(".reporting-agency").html(e.locations[t].agency),e.locations[t].hasOwnProperty("nox")){var a=document.getElementById("nox-data-panel");$(a).css("display","table"),$(".sidebar-1-hour-nox").html(r(e.locations[t].nox.current))}else $("#nox-data-panel").remove();if(e.locations[t].hasOwnProperty("ozone")?(a=document.getElementById("ozone-data-panel"),$(a).css("display","table"),$(".sidebar-8-hour-ozone").html(r(e.locations[t].ozone.currentNowcast)),$(".sidebar-8-hour-ozone-color").addClass(e.locations[t].ozone.currentNowcastAQIcolor),$(".sidebar-8-hour-ozone-text").html(r(e.locations[t].ozone.currentNowcastAQItext))):$("#ozone-data-panel").remove(),e.locations[t].hasOwnProperty("pm25")||e.locations[t].hasOwnProperty("pm10")?(a=document.getElementById("particulate-data-panel"),$(a).css("display","table"),$(".sidebar-pm-25-1-hour").html(r(e.locations[t].pm25.current)),$(".sidebar-pm-25-1-hour-color").addClass(e.locations[t].pm25.currentAQIcolor),$(".sidebar-pm-25-1-hour-text").html(r(e.locations[t].pm25.currentAQItext)),$(".sidebar-pm-25-24-hour").html(r(e.locations[t].pm25.currentNowcast)),$(".sidebar-pm-25-24-hour-color").addClass(e.locations[t].pm25.currentNowcastAQIcolor),$(".sidebar-pm-25-24-hour-text").html(r(e.locations[t].pm25.currentNowcastAQItext)),$(".sidebar-pm-10-24-hour").html(r(e.locations[t].pm10.currentNowcast)),$(".sidebar-pm-10-24-hour-color").addClass(e.locations[t].pm10.currentNowcastAQIcolor),$(".sidebar-pm-10-24-hour-text").html(r(e.locations[t].pm10.currentNowcastAQItext))):$("#particulate-data-panel").remove(),e.locations[t].hasOwnProperty("Visibility")?(a=document.getElementById("visibility-data-panel"),$(a).css("display","table"),$(".sidebar-visibility").html(r(e.locations[t].Visibility.current)),$(".sidebar-visibility-color").addClass(e.locations[t].Visibility.currentAQIcolor),$(".sidebar-visibility-text").html(e.locations[t].Visibility.currentAQItext)):$("#visibility-data-panel").remove(),e.locations[t].hasOwnProperty("airTemperature")?(a=document.getElementById("temperature-data-panel"),$(a).css("display","table"),$(".sidebar-temperature").html(r(e.locations[t].airTemperature.current))):$("#temperature-data-panel").remove(),e.locations[t].hasOwnProperty("relativeHumidity")?(a=document.getElementById("humidity-data-panel"),$(a).css("display","table"),$(".sidebar-humidity").html(r(e.locations[t].relativeHumidity.current))):$("#humidity-data-panel").remove(),e.locations[t].hasOwnProperty("windSpeed")){function i(e){return e>348.75?"N":e>326.25?"NNW":e>303.75?"NW":e>281.25?"WNW":e>258.75?"W":e>236.25?"WSW":e>213.75?"SW":e>191.25?"SSW":e>168.75?"S":e>146.25?"SSE":e>123.75?"SE":e>101.25?"ESE":e>78.75?"E":e>56.25?"ENE":e>33.75?"NE":e>11.25?"NNE":e>=0?"N":null}var o=i(e.locations[t].windDirection.current);i(),a=document.getElementById("wind-data-panel"),$(a).css("display","table"),$(".sidebar-wind-speed").html(r(e.locations[t].windSpeed.current)),$(".sidebar-wind-direction").html(o)}else $("#wind-data-panel").remove();e.locations[t].hasOwnProperty("precipitation")?(a=document.getElementById("precipitation-data-panel"),$(a).css("display","table"),$(".sidebar-precipitation").html(r(e.locations[t].precipitation.current))):$("#precipitation-data-panel").remove(),e.locations[t].hasOwnProperty("evapotranspiration")?(a=document.getElementById("evapotranspiration-data-panel"),$(a).css("display","table"),$(".sidebar-evapotranspiration").html(r(e.locations[t].evapotranspiration.current))):$("#evapotranspiration-data-panel").remove()}})),l("FTC"),l("DIS"),l("SOP"),l("FOS")})),$(window).on("load",(function(){$(".loading-aside").fadeOut("slow")}))}()}();