// JavaScript Document

$(document).ready(function() {
	centreContent();
	$(window).bind('resize',function(){
		centreContent();
	});
});

function centreContent(){
	var elementWidth = $("#content").outerWidth();
	var windowWidth = $(window).width();
	
	if (elementWidth < windowWidth){
		X2 = windowWidth/2 - elementWidth/2;}
	else {
		X2 = 0;	
	}

	$("#content").css({
		'left':X2,
		'margin-left':0,
	});						
}
