restore:function(dialog) {
var original = $(dialog).data("original");
var dwidth = parseInt(original.width);
var dheight = parseInt(original.height);
$(dialog).css({
top:original.top,
left:original.left,
width:dwidth,
height:dheight
});
$.pdialog._resizeContent(dialog,dwidth,dheight);
$("a.maximize",dialog).show();
$("a.restore",dialog).hide();
$.pdialog.attachShadow(dialog);
},
minimize:function(dialog){
$(dialog).hide();
$("div.shadow").hide();
var task = $.taskBar.getTask($(dialog).data("id"));
$(".resizable").css({
top: $(dialog).css("top"),
left: $(dialog).css("left"),
height:$(dialog).css("height"),
width:$(dialog).css("width")
}).show().animate({top:$(window).height()-60,left:task.position().left,width:task.outerWidth(),height:task.outerHeight()},250,function(){
$(this).hide();
$.taskBar.inactive($(dialog).data("id"));
});
},
_resizeContent:function(dialog,width,height) {
var content = $(".dialogContent", dialog);
content.css({width:(width-12) + "px",height:height - $(".dialogHeader", dialog).outerHeight() - $(".dialogFooter", dialog).outerHeight() - 6});
content.find("[layoutH]").layoutH(content);
$(".pageContent", dialog).css("width", (width-14) + "px");
$(window).trigger("resizeGrid");
}
};
})(jQuery);