$(document).ready(function(){
	$('.abs-center').center();
	$('.maximage').maxImage({
		isBackground: true,
		overflow: 'auto'
	});
	
	$(window).bind('load', function() {
		$('.abs-center').center();		
	});
	
	$(window).bind('resize', function() {
		$('.abs-center').center();
	});
});

jQuery.fn.center = function () {
    this.css("position","absolute");
    this.css("top", ( $('#content').height() - this.height() ) / 2+$('#content').scrollTop() + "px");
    this.css("left", ( $('#content').width() - this.width() ) / 2+$('#content').scrollLeft() + "px");
    return this;
}
