suit/colorbox — pull request #1 by Dampas (2013-04-03 23:31:57+00:00)
Title: Resizing photos on windows resize

Calling $colorbox.resize() is not resizing photos inside container.
This code allow that.

Function to make call to resize is:

var timeoutId;
$(window).resize(function(){
if (timeoutId) {
clearTimeout(timeoutId);
}

timeoutId = setTimeout(function() {
if ($('#colorbox:visible').length) {
$.colorbox.resize({
width: '90%',
height: '90%',
maxHeight: 500,
maxWidth: 1200
})
}
}, 250);
});