(function($) {
	$.fn.calculatePositions = function() {

	var minWidth = 880; // minimum possible window size for design to render OK
	var realWinWidth = $(window).width(); // actual window width
	var winWidth = realWinWidth+15; // adding my scrollbar width, for calculation purposes
	var sideColWidth; // extra space on each side according to resolution and window size
	var screenDif; // difference between minimum and actual window size
	var bgPosition; // the final position the background image will adopt
	var bgOffset = 145; // offset between bg image and the actual container wrapper
	var boxPosition; // the final position of the side column boxes
	var boxOffset = 580; // offset between boxes and actual container wrapper
	

	if (winWidth > minWidth) { // check if window with is superior to minimum with
		screenDif = (winWidth-minWidth);
		sideColWidth = (screenDif/2);
		bgPosition = sideColWidth-bgOffset;
		boxPosition = sideColWidth+boxOffset;
	}
	
	$("div#right-col")
		.attr({
			style: "left:"+boxPosition+"px"
		});
	$("div#glyph")
		.attr({
			style: "background-position:"+bgPosition+"px 0"
		});
	}
})(jQuery);
