﻿$(document).ready(function() {
    // only need to call the data every 2.5 minutes, data is cached for 5mins, so 2.5 is the average amount of wait before data is updated.
    setInterval(GetFlightInfo, 150000);    
});

function GetFlightInfo() {
    $.get('/common/handlers/arrivals.ashx', function(data) {
        $('#flights-body').html(data);
        SetRowColors();
    });
}

function SetRowColors() {
    $("#flights tr:odd td").addClass("row");
    $("#flights tr:even td").addClass("alt-row");
}