var divids = ["about_me","link_about_me","link_movies","link_things","link_pictures"]; 
function move_this(divid,speed){
    if($("#"+divid).data('isbusy')){
        return;
    }
    var pos = $("#"+divid).css('left');
    pos = parseFloat(pos);
    if(pos>900){
       $("#"+divid).fadeOut('slow',function(){
           $(this).css('left',"0px");
           $(this).fadeIn('slow',function(){})
       })
    }
    pos = pos+speed;
    pos = new String(pos);
    $("#"+divid).css('left',pos+"px");
}
function move(){
    for(i=0;i<divids.length;i++){
        var speed = (i%4)+1; // we do this so that everything else moves even those with indice a multiple of 4	
        move_this(divids[i],speed);
    }
    setTimeout(move,40);
}
function init(){
    for(i=0;i<divids.length;i++){
        var divid = divids[i];
        $("#"+divid).data("isbusy",false);
        $("#"+divid).mouseover(function(){
            $(this).data("isbusy",true);
            $(this).children().css('color','blue');
        });
        $("#"+divid).mouseleave(function(){
            $(this).data("isbusy",false);
            $(this).children().css('color','white');
        });
    }
    move();
}
