// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function showEvent(eventId){
    hideAllByClass('popup');
    $('displayEvent'+eventId).show();
}

function hideAllByClass(hide_class){
    $$('[class="' + hide_class + '"]').each(function(item){
        item.hide();
    });
}

function schedule(task) {
    setTimeout(task, 15000);
}

function display_consultant(i, cons) {
    $('consultant' + i).fade();
    i = (i + 1) % cons;
    $('consultant' + i).appear();
    
    schedule("display_consultant(" + i + "," + cons + ")");
}

