Please extend 'show' and 'hide' methods for the window component.
$.extend($.fn.window.methods, {
hide: function(jq){
return jq.each(function(){
var w = $(this);
var state = w.data('window');
state.window.hide();
if (state.shadow){state.shadow.hide();}
if (state.mask){state.mask.hide();}
})
},
show: function(jq){
return jq.each(function(){
var w = $(this);
var state = w.data('window');
state.window.show();
if (state.shadow){state.shadow.show();}
if (state.mask){state.mask.show();}
})
}
})
Usage examples.
$('#w').window('show'); // display the window
$('#w').window('hide'); // hide the window without closing it