(function($) {

    $(function() {

        var t = null;

        $('a[href=#close]').click(function() {

            t = setTimeout((function() {
                location.href = '/';
            }), 1000);

            history.back(1);
            return false;
        });

        $(window).bind('unload', function() {
            clearTimeout(t);
        });

    });

})(jQuery);