I have added a jsfiddle example here - http://jsfiddle.net/BaXyR/
basically
$('.clickme').click(function(){
if($('#moveme').hasClass('marginleft260')){
$('#moveme').animate({
marginLeft: "-=260px",
}, 5000, function() {
$(this).removeClass('marginleft260');
});
}else{
$('#moveme').animate({
marginLeft: "+=260px",
}, 5000, function() {
$(this).addClass('marginleft260');
});
}
});