window.onLoadListeners.push(preload_images );

function preload_images()  {
    var 
        path = 'images/buttons/',
        suffix = '-over.jpg',
        images = new Array(
            'bookings',
            'calendar',
            'events',
            'imovies',
            'scenes',
            'support',
            'tickets',
            'youth',
            'staff',
            'contact',
            'feedback'
        );
    
    for( var i = 0; i < images.length; i++ )
        ( new Image() ).src = ( path + images[ i ] + suffix );
}

function onMouseOver( element )  {
    element.style.backgroundImage = ( 'url( images/buttons/' + element.id + '-over.jpg )' );
}

function onMouseOut( element )  {
    element.style.backgroundImage = ( 'url( images/buttons/' + element.id + '.jpg )' );
}
