if ( getViewportSize() > 768) {
	// do lazy loading here
	loadJS('/min/g=js');
}
		
		
/**
 * Lazy loading JavaScript file in the header
 * @param {string} url, the location of the script 
 * @return N/A
 */
function loadJS(url) {
	var d		= document,
		t		= 'script',
		s		= d.createElement(t),
		x		= d.getElementsByTagName(t)[0];
		s.async = true;
		s.src	= url;

	d.body.appendChild(s);				
	x.parentNode.insertBefore(s,x);		
}


/**
 * Read the viewport size
 * @param the specified window or the current window if no argument 
 * @return the viewport size
 */
function getViewportSize(w) {

	w = w || window;

	// This works for all browsers except IE8 and before 
	if (w.innerWidth != null) {
		return w.innerWidth;
	}
	
	// For IE (or any browser) in Standards mode 
	var d = w.document;
	if (document.compatMode == "CSS1Compat") {
		return d.documentElement.clientWidth;
	}
	
	// For browsers in Quirks mode 
	return d.body.clientWidth;
}

