$(document).ready(function(){
    $("#boxLogosClients").hover(function(){
        clearTimeout(oWaitScrollLeft);
    }, function(){
        divScroll(1,40);
    });

    $("#btnScrollLeft").hover(function(){
        clearTimeout(oWaitScrollLeft);
        divScroll(-5,1);
    }, function(){
        clearTimeout(oWaitScrollLeft);
        divScroll(1,40);
    });

    $("#btnScrollRight").hover(function(){
        clearTimeout(oWaitScrollLeft);
        divScroll(5,1);
    }, function(){
        clearTimeout(oWaitScrollLeft);
        divScroll(1,40);
    });
});

function divScroll(value,delay) {
    iScrollPosition += value
    if (iStart-iScrollPosition < 0 && iScrollPosition-iStart >= iWidth) {
        iScrollPosition = iStart+(iScrollPosition-iStart-iWidth);
    }
    if (iStart-iScrollPosition > 0 && iStart-iScrollPosition >= iWidth) {
        iScrollPosition = iStart-(iStart-iScrollPosition-iWidth);
    }

    $("#boxLogosClients").scrollLeft(iScrollPosition);
    oWaitScrollLeft = setTimeout("divScroll("+value+","+delay+")", delay);
}
