Ciao Xinod!!
guarda, ho provato sia così:

Codice PHP:
<script>
        
mrg=0;
        function 
righrarrow () {
            if(
mrg>-900){
                
mrg=mrg-180;
                $(
"#secondB").css("margin-left",mrg);
            }
        }
        function 
leftrarrow () {
            if(
mrg!=0){
                
mrg=mrg+180;
                $(
"#secondB").css("margin-left",mrg);
            }
        }
        $(
"#secondB").animate({"margin-left":mrg},'slow');
    
</script> 
...sia così...

Codice PHP:
<script>
        
mrg=0;
        function 
righrarrow () {
            if(
mrg>-900){
                
mrg=mrg-180;
                $(
"#secondB").css("margin-left",mrg).animate({"margin-left":mrg},'slow');
            }
        }
        function 
leftrarrow () {
            if(
mrg!=0){
                
mrg=mrg+180;
                $(
"#secondB").css("margin-left",mrg).animate({"margin-left":mrg},'slow');
            }
        }
    
</script> 
..ma non va