$(function(){
    var delta = 140;
    var transition = 250;


    var envelope = $('#envelope');
    var container = $('#envelope-container');
    var top = parseInt(container.css('top'));
    var height = parseInt(container.css('height'));

    envelope.mouseenter(function(){
        container.stop().animate({
            top: top - delta,
            height: height + delta
        }, transition, function() {
            $('.click-link').show();
        });
    });

    var city_select = $("#city-select");

    envelope.mouseleave(function(){
        $('.click-link').hide();

        container.stop().animate({
            top: top,
            height: height
        }, transition);

        /*if($.browser.safari) {
            city_select.hide();
            setTimeout(function() { city_select.show(); }, 20);
        }*/
    });
});
