      $(function() {
        /*$('#test').colorbox({transition:'elastic', speed:500, iframe: "true", width:850, height:700});*/

        /*
        if( $('#content-billboard DIV').size() > 1 ) {
            setTimeout("changeSlide()", 4000);
        }*/
        if( $('#billboard-thumbnail-container a').size() > 1 ) {
            $('#billboard-thumbnail-container a').click( function() {
                var index = $('#billboard-thumbnail-container a').index(this);
                var next = $('#billboard-image-container div:eq(' + index + ')');
                var active = $('#billboard-image-container div.active');
                var active_index = $('#billboard-image-container div').index(active);

                var arrow = $('#billboard-thumbnail-arrow');
                
                if( active.size() > 1 || index == active_index ) {
                    exit();
                }

                active.addClass('last-active');

                // stop

                next.css({opacity: 0.0})
                    .addClass('active')
                    .animate({opacity: 1.0}, 1000, function() {
                        active.removeClass('active last-active');
                    });

                var top = (index * 78) + "px";
                arrow.animate({top: top}, 1000);
            });
        };

        if( $('#frontpage-billboard DIV').size() > 1 ) {
            $('#frontpage-billboard DIV').css({opacity: 0.0});
            $('#frontpage-billboard DIV:first').css({opacity: 1.0});
            last_active=0;
            $('#top-menu a').hover( function() {
                var index = $('#top-menu a').index(this);
                if( index >= $('#frontpage-billboard DIV').size() )
                    return;
                if( index == last_active )
                    return;

                var next = $('#frontpage-billboard div:eq(' + index + ')');
                var active = $('#frontpage-billboard div:eq(' + last_active + ')');
                last_active = index;
                next.animate({opacity: 1.0}, 1000);
                active.animate({opacity: 0.0}, 1000); 
            });
        };

      });

