


var prevpos = 0;
function ani(field) {
    $('#hoverfield').stop(true, true).fadeOut();

    $('#hoverfield').css({
        "display" : "block"
    });
    //			var  fieldpos = $('#hoverfield').offset().left;
    var  menupos = $('#'+field).offset().left;
		
    var nowgoto = menupos-firstpos;
    var correct = nowgoto;
			
    //$('#hoverfield').html(nowgoto+' '+prevpos)

    if(nowgoto>prevpos) {
        nowgoto += 30;
        correct = nowgoto -30;
    } else if (nowgoto<prevpos) {
        nowgoto -=30;
        correct = nowgoto +30;
    }
			
    $('#hoverfield').animate({
        "left" : nowgoto
    }, 200);
    prevpos = nowgoto;
    if(correct!=nowgoto) {
        $('#hoverfield').animate({
            "left" : correct
        }, 200);
        prevpos = correct;
    }

		
}

function hide () {
    $('#hoverfield').css({
        "display" : "none"
    });
}


$(document).ready(function(){
    i = 0;
    $('.tea').each(function(){
        i++;
        $(this).show('slow').animate({
            opacity: 1.0
        }, i* 500);
    });
});