/**
 * SqueezeBox - Modifications
 */

SqueezeBox.extend({

	toggleOverlay: function(state) {
		var full = this.doc.getSize().x;
		if (this.doc.body.offsetWidth) full = this.doc.body.offsetWidth;
		this.overlay.setStyle('display', (state) ? '' : 'none');
		this.doc.body[(state) ? 'addClass' : 'removeClass']('body-overlayed');
		if (state) {
			this.scrollOffset = this.doc.getWindow().getSize().x - full;
			this.doc.body.setStyle('margin-right', this.scrollOffset);
		} else {
			this.doc.body.setStyle('margin-right', '');
		}
	},

	/*
	reposition: function() {
		var size = this.doc.getSize(), scroll = this.doc.getScroll(), ssize = this.doc.getScrollSize();
		this.overlay.setStyles({
			width: ssize.x + 'px',
			height: ssize.y + 'px'
		});
		this.win.position({
    		relativeTo: $('container'),
    		position: { x: 'center', y: 'top' },
    		offset: { x: 0, y: (scroll.y + (size.y - this.win.offsetHeight) / 2).toInt() },
    		edge: 'center'
		});
	}
	*/

});


