/************************************************
* -- Luja Scaling -- v1.1

© Concept 
James Atkins & Luke Scheybeler
jamesatkinsdesign.com & scheybeler.com

Realisation
this .js chunk by Sam Sharp (mediamongrels.com) and James Atkins

Go away responsive webdesign. 
Design it once. Scale it from there.
************************************************/ 

$(document).ready(function() {
	// When the document is ready...

	// Scale the fonts when the page loads
	scaleFonts();

	// Scale each time the page is resized
	$(window).resize(function() {
		scaleFonts();
	});    
});  
 
function scaleFonts() {
	var width = 0;
	var basefont = 10;
	
	// returns viewport width in px
	width = Math.round($(window).width());
	
	// calculate the font size from the width
	basefont = Math.round(width*1)/20;
	
	// add the font-size to the body tag
	$('body').css('font-size',basefont+'px');
}


/************************************************
changelog
v1.1 added rounding to stop widow wrapping at weird sizes
v1.0 first working version
************************************************/ 

