$(function () {
    var d;
    var w = $(window);
    $('.draggable').draggable().mousedown(function () {
        $('.draggable').css('z-index', 4);
        $(this).css('z-index', 5);
    }).dblclick(function () {
        var item = $(this);
        item.animate({
            'top': w.height() - item.height()
        }, 1000, 'easeOutBounce');
    });
//    $('#resizable').resizable({
//        maxHeight: w.height(),
//        maxWidth: w.width(),
//        resize: function (event, ui) {
//            if (ui.element.width() == 900 && ui.element.height() == 558) {
//                d = (new Date().getTime() - d) / 1000;
//                $('.burnlogo').show();
//                ui.element.draggable('destroy');
//                ui.element.animate({
//                    'width': 0,
//                    'height': 0
//                }, 1000, 'easeOutBounce');
//            }
//        }
//    }
//    });
});