var graphs = {}; $(document).ready(function() { dataset = [ { label: 'Teplota (°C)', data: [[1766530816000,3.20000000],[1766531008000,3.12500000],[1766531264000,3.12000000],[1766531584000,3.16000000],[1766531904000,3.10000000],[1766532160000,3.10000000],[1766532480000,3.16000000],[1766532800000,3.20000000],[1766533053000,3.20000000],[1766533376000,3.20000000],[1766533696000,3.20000000],[1766533952000,3.20000000],[1766534272000,3.20000000],[1766534592000,3.20000000],[1766534912000,3.20000000],[1766535168000,3.22000000],[1766535488000,3.30000000],[1766535808000,3.30000000],[1766536064000,3.32000000],[1766536384000,3.38000000],[1766536706000,3.30000000],[1766536961000,3.30000000],[1766537297000,3.30000000],[1766537553000,3.30000000],[1766537873000,3.32000000],[1766538193000,3.30000000],[1766538513000,3.30000000],[1766538769000,3.24000000],[1766539089000,3.26000000],[1766539409000,3.20000000],[1766539665000,3.22000000],[1766539985000,3.20000000],[1766540305000,3.20000000],[1766540561000,3.20000000],[1766540881000,3.20000000],[1766541201000,3.20000000],[1766541457000,3.30000000],[1766541777000,3.30000000],[1766542098000,3.30000000],[1766542353000,3.38000000],[1766542673000,3.32000000],[1766542993000,3.40000000],[1766543252000,3.42000000],[1766543584000,3.50000000],[1766543905000,3.55000000],[1766544161000,3.60000000],[1766544482000,3.60000000],[1766544752000,3.72000000],[1766545072000,3.90000000],[1766545392000,3.92000000],[1766545712000,4.00000000],[1766545968000,4.00000000],[1766546288000,4.00000000],[1766546608000,4.00000000],[1766546864000,4.00000000],[1766547184000,4.00000000],[1766547504000,4.00000000],[1766547760000,4.08000000],[1766548080000,4.16000000],[1766548400000,4.20000000],[1766548656000,4.20000000],[1766548976000,4.20000000],[1766549313000,4.20000000],[1766549569000,4.12000000],], color: '#d6212a' }, { label: 'Rosný bod (°C)', data: [[1766530816000,2.8],[1766531008000,2.7],[1766531264000,2.7],[1766531584000,2.7],[1766531904000,2.7],[1766532160000,2.7],[1766532480000,2.7],[1766532800000,2.8],[1766533053000,2.8],[1766533376000,2.8],[1766533696000,2.8],[1766533952000,2.8],[1766534272000,2.8],[1766534592000,2.8],[1766534912000,2.8],[1766535168000,2.8],[1766535488000,3],[1766535808000,3],[1766536064000,3],[1766536384000,3.1],[1766536706000,3],[1766536961000,3],[1766537297000,3],[1766537553000,3],[1766537873000,3],[1766538193000,3],[1766538513000,3],[1766538769000,3],[1766539089000,3],[1766539409000,2.9],[1766539665000,2.9],[1766539985000,2.9],[1766540305000,2.9],[1766540561000,3.1],[1766540881000,3.1],[1766541201000,3.1],[1766541457000,3.2],[1766541777000,3.2],[1766542098000,3.2],[1766542353000,3.2],[1766542673000,3.2],[1766542993000,3.3],[1766543252000,3.3],[1766543584000,3.4],[1766543905000,3.4],[1766544161000,3.5],[1766544482000,3.5],[1766544752000,3.6],[1766545072000,3.8],[1766545392000,3.8],[1766545712000,3.8],[1766545968000,3.7],[1766546288000,3.7],[1766546608000,3.6],[1766546864000,3.6],[1766547184000,3.4],[1766547504000,3.3],[1766547760000,3.1],[1766548080000,3],[1766548400000,2.8],[1766548656000,2.7],[1766548976000,2.7],[1766549313000,2.8],[1766549569000,2.8],], color: '#5b9f4a' } ]; var options = { xaxes: [{ axisLabel: 'temperature', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1°C' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-temperature-legend' } }; graphs['#chart-temperature'] = $.plot('#chart-temperature', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Vlhkosť (%)', data: [[1766530816000,97.00000000],[1766531008000,97.00000000],[1766531264000,97.00000000],[1766531584000,97.00000000],[1766531904000,97.00000000],[1766532160000,97.00000000],[1766532480000,97.00000000],[1766532800000,97.00000000],[1766533053000,97.00000000],[1766533376000,97.00000000],[1766533696000,97.00000000],[1766533952000,97.00000000],[1766534272000,97.00000000],[1766534592000,97.00000000],[1766534912000,97.00000000],[1766535168000,97.00000000],[1766535488000,98.00000000],[1766535808000,98.00000000],[1766536064000,98.00000000],[1766536384000,98.00000000],[1766536706000,98.00000000],[1766536961000,98.00000000],[1766537297000,98.00000000],[1766537553000,98.00000000],[1766537873000,98.00000000],[1766538193000,98.00000000],[1766538513000,98.00000000],[1766538769000,98.00000000],[1766539089000,98.00000000],[1766539409000,98.00000000],[1766539665000,98.00000000],[1766539985000,98.00000000],[1766540305000,98.25000000],[1766540561000,99.00000000],[1766540881000,99.00000000],[1766541201000,99.00000000],[1766541457000,99.00000000],[1766541777000,99.00000000],[1766542098000,99.00000000],[1766542353000,99.00000000],[1766542673000,99.00000000],[1766542993000,99.00000000],[1766543252000,99.00000000],[1766543584000,99.00000000],[1766543905000,99.00000000],[1766544161000,99.00000000],[1766544482000,99.00000000],[1766544752000,99.00000000],[1766545072000,99.00000000],[1766545392000,99.00000000],[1766545712000,98.75000000],[1766545968000,98.00000000],[1766546288000,98.00000000],[1766546608000,97.50000000],[1766546864000,97.00000000],[1766547184000,96.00000000],[1766547504000,95.00000000],[1766547760000,93.60000000],[1766548080000,92.00000000],[1766548400000,90.50000000],[1766548656000,90.20000000],[1766548976000,90.40000000],[1766549313000,90.50000000],[1766549569000,91.00000000],], color: '#ff9000' } ]; var options = { xaxes: [{ axisLabel: 'humidity', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1%' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-humidity-legend' } }; graphs['#chart-humidity'] = $.plot('#chart-humidity', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Atmosférický tlak (hPa)', data: [[1766530816000,1021.8],[1766531008000,1021.9],[1766531264000,1021.9],[1766531584000,1021.9],[1766531904000,1021.9],[1766532160000,1022],[1766532480000,1022],[1766532800000,1022],[1766533053000,1022.1],[1766533376000,1022.1],[1766533696000,1022],[1766533952000,1022.1],[1766534272000,1022.1],[1766534592000,1022],[1766534912000,1022],[1766535168000,1022],[1766535488000,1022],[1766535808000,1022],[1766536064000,1022.1],[1766536384000,1022],[1766536706000,1022],[1766536961000,1022],[1766537297000,1022],[1766537553000,1022.1],[1766537873000,1022.1],[1766538193000,1022],[1766538513000,1022.1],[1766538769000,1022.1],[1766539089000,1022.1],[1766539409000,1022.1],[1766539665000,1022.1],[1766539985000,1022.2],[1766540305000,1022.3],[1766540561000,1022.2],[1766540881000,1022.2],[1766541201000,1022.3],[1766541457000,1022.2],[1766541777000,1022.1],[1766542098000,1022.1],[1766542353000,1022.2],[1766542673000,1022.2],[1766542993000,1022.2],[1766543252000,1022.2],[1766543584000,1022.2],[1766543905000,1022.2],[1766544161000,1022.2],[1766544482000,1022.1],[1766544752000,1022.1],[1766545072000,1022.1],[1766545392000,1022.1],[1766545712000,1022],[1766545968000,1022.1],[1766546288000,1022],[1766546608000,1022.1],[1766546864000,1022.1],[1766547184000,1022.1],[1766547504000,1022],[1766547760000,1022],[1766548080000,1022],[1766548400000,1021.9],[1766548656000,1022],[1766548976000,1022],[1766549313000,1022],[1766549569000,1022.2],], color: '#000000' } ]; var options = { xaxes: [{ axisLabel: 'pressure', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1hPa' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-pressure-legend' } }; graphs['#chart-pressure'] = $.plot('#chart-pressure', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Rýchlosť vetra (km/h)', data: [[1766530816000,0],[1766531008000,0],[1766531264000,0],[1766531584000,0],[1766531904000,0],[1766532160000,0],[1766532480000,0],[1766532800000,0],[1766533053000,0],[1766533376000,0],[1766533696000,0],[1766533952000,0],[1766534272000,0],[1766534592000,0],[1766534912000,0],[1766535168000,0.072],[1766535488000,0],[1766535808000,0],[1766536064000,0],[1766536384000,0],[1766536706000,0],[1766536961000,0],[1766537297000,0],[1766537553000,0],[1766537873000,0],[1766538193000,0],[1766538513000,0],[1766538769000,0],[1766539089000,0],[1766539409000,0],[1766539665000,0],[1766539985000,0],[1766540305000,0],[1766540561000,0],[1766540881000,0],[1766541201000,0],[1766541457000,0],[1766541777000,0],[1766542098000,0],[1766542353000,0],[1766542673000,0],[1766542993000,0],[1766543252000,0.432],[1766543584000,0],[1766543905000,0],[1766544161000,0],[1766544482000,0],[1766544752000,2.952],[1766545072000,3.672],[1766545392000,3.384],[1766545712000,1.89],[1766545968000,2.376],[1766546288000,1.8],[1766546608000,2.07],[1766546864000,2.592],[1766547184000,2.664],[1766547504000,5.13],[1766547760000,5.328],[1766548080000,5.976],[1766548400000,4.14],[1766548656000,2.304],[1766548976000,3.672],[1766549313000,2.43],[1766549569000,1.584],], color: '#002f80', points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, }, { label: 'Náraz vetra (km/h)', data: [[1766530816000,0],[1766531008000,0],[1766531264000,0],[1766531584000,0],[1766531904000,0],[1766532160000,0],[1766532480000,0],[1766532800000,0],[1766533053000,0],[1766533376000,0],[1766533696000,0],[1766533952000,0],[1766534272000,0],[1766534592000,0],[1766534912000,0],[1766535168000,0.504],[1766535488000,0],[1766535808000,0],[1766536064000,0],[1766536384000,0],[1766536706000,0],[1766536961000,0],[1766537297000,0],[1766537553000,0],[1766537873000,0],[1766538193000,0],[1766538513000,0],[1766538769000,0],[1766539089000,0],[1766539409000,0],[1766539665000,0],[1766539985000,0],[1766540305000,0],[1766540561000,0],[1766540881000,0],[1766541201000,0],[1766541457000,0],[1766541777000,0],[1766542098000,0],[1766542353000,0],[1766542673000,0],[1766542993000,0],[1766543252000,1.008],[1766543584000,0],[1766543905000,0],[1766544161000,0],[1766544482000,0],[1766544752000,4.536],[1766545072000,4.536],[1766545392000,4.032],[1766545712000,3.15],[1766545968000,3.528],[1766546288000,3.528],[1766546608000,3.15],[1766546864000,4.032],[1766547184000,4.536],[1766547504000,7.56],[1766547760000,6.552],[1766548080000,8.64],[1766548400000,5.04],[1766548656000,4.032],[1766548976000,5.04],[1766549313000,4.41],[1766549569000,2.52],], color: '#EF9856', points: { show: true }, lines: { show: false }, } ]; var options = { xaxes: [{ axisLabel: 'wind', }], xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1km/h' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-wind-legend' } }; graphs['#chart-wind'] = $.plot('#chart-wind', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Smer vetra', data: [[1766530816000,341.33333333],[1766531008000,344.25000000],[1766531264000,350.00000000],[1766531584000,350.60000000],[1766531904000,345.25000000],[1766532160000,345.00000000],[1766532480000,345.00000000],[1766532800000,345.00000000],[1766533053000,345.00000000],[1766533376000,345.20000000],[1766533696000,347.00000000],[1766533952000,349.80000000],[1766534272000,354.40000000],[1766534592000,351.80000000],[1766534912000,264.25000000],[1766535168000,346.40000000],[1766535488000,346.00000000],[1766535808000,331.75000000],[1766536064000,330.60000000],[1766536384000,337.00000000],[1766536706000,337.00000000],[1766536961000,340.80000000],[1766537297000,342.00000000],[1766537553000,344.00000000],[1766537873000,347.00000000],[1766538193000,347.00000000],[1766538513000,347.00000000],[1766538769000,347.00000000],[1766539089000,347.00000000],[1766539409000,347.00000000],[1766539665000,347.00000000],[1766539985000,347.00000000],[1766540305000,346.75000000],[1766540561000,346.00000000],[1766540881000,346.00000000],[1766541201000,345.00000000],[1766541457000,344.00000000],[1766541777000,344.00000000],[1766542098000,343.00000000],[1766542353000,341.60000000],[1766542673000,342.00000000],[1766542993000,341.50000000],[1766543252000,346.00000000],[1766543584000,341.00000000],[1766543905000,263.50000000],[1766544161000,336.40000000],[1766544482000,342.00000000],[1766544752000,16.40000000],[1766545072000,87.60000000],[1766545392000,9.60000000],[1766545712000,7.25000000],[1766545968000,7.60000000],[1766546288000,14.00000000],[1766546608000,23.50000000],[1766546864000,22.80000000],[1766547184000,25.40000000],[1766547504000,36.25000000],[1766547760000,84.00000000],[1766548080000,42.80000000],[1766548400000,62.50000000],[1766548656000,57.20000000],[1766548976000,89.60000000],[1766549313000,44.25000000],[1766549569000,43.60000000],], color: '#002f80', points: { show: true }, lines: { show: false }, } ]; var options = { xaxes: [{ axisLabel: 'wind_direction', }], xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, yaxis: { min: 0, max: 360, ticks: [[0, 'S'], [90, 'V'], [180, 'J'], [270, 'Z'], [360, 'S']] }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: function(label, xval, yval, flotItem) { dir = meteo_wind_direction_name(yval); format_date = moment(xval).format('DD.MM., hh:mm') return format_date+' - '+dir; } }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-wind-direction-legend' } }; graphs['#chart-wind-direction'] = $.plot('#chart-wind-direction', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Slnečné žiarenie (W/m2)', data: [[1766530816000,0.00000000],[1766531008000,0.00000000],[1766531264000,0.00000000],[1766531584000,0.00000000],[1766531904000,0.00000000],[1766532160000,0.00000000],[1766532480000,0.00000000],[1766532800000,0.00000000],[1766533053000,0.00000000],[1766533376000,0.00000000],[1766533696000,0.00000000],[1766533952000,0.00000000],[1766534272000,0.00000000],[1766534592000,0.00000000],[1766534912000,0.00000000],[1766535168000,0.00000000],[1766535488000,0.00000000],[1766535808000,0.00000000],[1766536064000,0.00000000],[1766536384000,0.00000000],[1766536706000,0.00000000],[1766536961000,0.00000000],[1766537297000,0.00000000],[1766537553000,0.00000000],[1766537873000,0.00000000],[1766538193000,0.00000000],[1766538513000,0.00000000],[1766538769000,0.00000000],[1766539089000,0.00000000],[1766539409000,0.00000000],[1766539665000,0.00000000],[1766539985000,0.00000000],[1766540305000,0.00000000],[1766540561000,0.00000000],[1766540881000,0.00000000],[1766541201000,0.00000000],[1766541457000,0.00000000],[1766541777000,0.00000000],[1766542098000,0.00000000],[1766542353000,0.00000000],[1766542673000,0.00000000],[1766542993000,0.00000000],[1766543252000,0.00000000],[1766543584000,0.00000000],[1766543905000,0.00000000],[1766544161000,0.00000000],[1766544482000,0.00000000],[1766544752000,0.00000000],[1766545072000,0.00000000],[1766545392000,0.00000000],[1766545712000,0.00000000],[1766545968000,0.00000000],[1766546288000,0.00000000],[1766546608000,0.00000000],[1766546864000,0.00000000],[1766547184000,0.00000000],[1766547504000,0.00000000],[1766547760000,0.00000000],[1766548080000,0.00000000],[1766548400000,0.00000000],[1766548656000,0.00000000],[1766548976000,0.00000000],[1766549313000,0.00000000],[1766549569000,0.00000000],], color: '#ffb92f' } ]; var options = { xaxes: [{ axisLabel: 'solar_radiation', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, yaxis: { min: 0, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.1W/m2' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-solar-radiation-legend' } }; graphs['#chart-solar-radiation'] = $.plot('#chart-solar-radiation', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'UV žiarenie', data: [[1766530816000,0.00000000],[1766531008000,0.00000000],[1766531264000,0.00000000],[1766531584000,0.00000000],[1766531904000,0.00000000],[1766532160000,0.00000000],[1766532480000,0.00000000],[1766532800000,0.00000000],[1766533053000,0.00000000],[1766533376000,0.00000000],[1766533696000,0.00000000],[1766533952000,0.00000000],[1766534272000,0.00000000],[1766534592000,0.00000000],[1766534912000,0.00000000],[1766535168000,0.00000000],[1766535488000,0.00000000],[1766535808000,0.00000000],[1766536064000,0.00000000],[1766536384000,0.00000000],[1766536706000,0.00000000],[1766536961000,0.00000000],[1766537297000,0.00000000],[1766537553000,0.00000000],[1766537873000,0.00000000],[1766538193000,0.00000000],[1766538513000,0.00000000],[1766538769000,0.00000000],[1766539089000,0.00000000],[1766539409000,0.00000000],[1766539665000,0.00000000],[1766539985000,0.00000000],[1766540305000,0.00000000],[1766540561000,0.00000000],[1766540881000,0.00000000],[1766541201000,0.00000000],[1766541457000,0.00000000],[1766541777000,0.00000000],[1766542098000,0.00000000],[1766542353000,0.00000000],[1766542673000,0.00000000],[1766542993000,0.00000000],[1766543252000,0.00000000],[1766543584000,0.00000000],[1766543905000,0.00000000],[1766544161000,0.00000000],[1766544482000,0.00000000],[1766544752000,0.00000000],[1766545072000,0.00000000],[1766545392000,0.00000000],[1766545712000,0.00000000],[1766545968000,0.00000000],[1766546288000,0.00000000],[1766546608000,0.00000000],[1766546864000,0.00000000],[1766547184000,0.00000000],[1766547504000,0.00000000],[1766547760000,0.00000000],[1766548080000,0.00000000],[1766548400000,0.00000000],[1766548656000,0.00000000],[1766548976000,0.00000000],[1766549313000,0.00000000],[1766549569000,0.00000000],], color: '#802674' } ]; var options = { xaxes: [{ axisLabel: 'uv', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, yaxis: { min: 0, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.0' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-uv-legend' } }; graphs['#chart-uv'] = $.plot('#chart-uv', dataset, options); }); $(document).ready(function() { dataset = [ { label: 'Zrážky', data: [[1766530816000,0.00000000],[1766531008000,0.00000000],[1766531264000,0.00000000],[1766531584000,0.00000000],[1766531904000,0.00000000],[1766532160000,0.00000000],[1766532480000,0.00000000],[1766532800000,0.00000000],[1766533053000,0.00000000],[1766533376000,0.00000000],[1766533696000,0.10150000],[1766533952000,0.20300000],[1766534272000,0.20300000],[1766534592000,0.26400000],[1766534912000,0.50800000],[1766535168000,0.50800000],[1766535488000,0.67040000],[1766535808000,0.71100000],[1766536064000,0.71100000],[1766536384000,0.71100000],[1766536706000,0.99100000],[1766536961000,0.99100000],[1766537297000,0.99100000],[1766537553000,0.99100000],[1766537873000,1.15340000],[1766538193000,1.19400000],[1766538513000,1.19400000],[1766538769000,1.19400000],[1766539089000,1.19400000],[1766539409000,1.19400000],[1766539665000,1.19400000],[1766539985000,1.19400000],[1766540305000,1.27025000],[1766540561000,1.49900000],[1766540881000,1.49900000],[1766541201000,1.49900000],[1766541457000,1.49900000],[1766541777000,1.58020000],[1766542098000,1.70200000],[1766542353000,1.70200000],[1766542673000,1.70200000],[1766542993000,1.70200000],[1766543252000,1.70200000],[1766543584000,1.70200000],[1766543905000,1.77825000],[1766544161000,2.00700000],[1766544482000,2.00700000],[1766544752000,2.00700000],[1766545072000,2.00700000],[1766545392000,2.00700000],[1766545712000,2.00700000],[1766545968000,2.00700000],[1766546288000,2.00700000],[1766546608000,2.00700000],[1766546864000,2.00700000],[1766547184000,2.00700000],[1766547504000,2.00700000],[1766547760000,2.00700000],[1766548080000,2.00700000],[1766548400000,2.00700000],[1766548656000,2.00700000],[1766548976000,2.00700000],[1766549313000,2.00700000],[1766549569000,2.00700000],], color: '#008fbf' } ]; var options = { xaxes: [{ axisLabel: 'rain', }], points: { show: false }, lines: { show: true, lineWidth: 2, fill: false, }, yaxis: { min: 0, }, xaxis: { mode: 'time', minTickSize: [1, 'hour'], timeformat: '%d.%m.\, %H:%M', timezone: 'browser', }, grid: { hoverable: true, clickable: true, borderWidth: 0, }, tooltip: { show: true, content: '%x - %y.3mm' }, crosshair: { mode: 'x' }, legend: { show: true, container: '#chart-rain-legend' } }; graphs['#chart-rain'] = $.plot('#chart-rain', dataset, options); }); $('.modal').on('hide.bs.modal', function() { var memory = $(this).html(); $(this).html(memory); }); function meteo_wind_direction_name(wind_direction) { if (wind_direction >= 0.00 && wind_direction <= 11.25) { ret = 'S'; } else if (wind_direction > 11.25 && wind_direction <= 33.75) { ret = 'SSV'; } else if (wind_direction > 33.75 && wind_direction <= 56.25) { ret = 'SV'; } else if (wind_direction > 56.25 && wind_direction <= 78.75) { // 67.5 ret = 'VSV'; } else if (wind_direction > 78.75 && wind_direction <= 101.25) { // 90 ret = 'V'; } else if (wind_direction > 101.25 && wind_direction <= 123.75) { //112.5 ret = 'VJV'; } else if (wind_direction > 123.75 && wind_direction <= 146.25) { // 135 ret = 'JV'; } else if (wind_direction > 146.25 && wind_direction <= 168.75) { // 157.5 ret = 'JJV'; } else if (wind_direction > 168.75 && wind_direction <= 191.25) { // 180 ret = 'J'; } else if (wind_direction > 191.25 && wind_direction <= 213.75) { // 202.5 ret = 'JJZ'; } else if (wind_direction > 213.75 && wind_direction <= 236.25) { // 225 ret = 'JZ'; } else if (wind_direction > 236.25 && wind_direction <= 258.75) { // 247.5 ret = 'ZJZ'; } else if (wind_direction > 258.75 && wind_direction <= 281.25) { // 270 ret = 'Z'; } else if (wind_direction > 281.25 && wind_direction <= 303.75) { // 292.5 ret = 'ZSZ'; } else if (wind_direction > 303.75 && wind_direction <= 326.25) { // 315 ret = 'SZ'; } else if (wind_direction > 326.25 && wind_direction <= 348.75) { // 337.5 ret = 'SSZ'; } else if (wind_direction > 348.75 && wind_direction <= 360.0) { // 337.5 ret = 'S'; } else { return ''; } return ret; }