EDIT:
Try this new JSFiddle
I call the function after toggle was finished:
$("span:eq(0)").click(function(){
$(".box1").toggle("slow", function(){
changeProperty();
});
});
I think that when you verify if is hidden or not, the element have ever the property display = block, but if you call after toggle()
it return the real state of element.
function changeProperty(){
if($(".box1").is(":hidden")){
$(".box2").css({"left":"210px"});
}
else
{
$(".box2").css({"left":"0"});
}
}