/*******************************************************************************************************
* 	Paccar: noScroll.js
*	Prevents horizontal scrollbars in the event the browser window is anything larger than 1024px wide.
*	The use-case is for laptops with 1024px resolution; they will see scrollbars in fullscreen because
*	of the drop-shadow on the body.
*	
*******************************************************************************************************/

function screenSizeCheck() {
	var containerWidth = parseInt($("#pageContainer").css("width").replace("px", ""));
	var windowWidth = $(window).width();
	if(windowWidth < containerWidth && windowWidth > (containerWidth - 16))
		{
		 	$("html").css({"overflow-x": "hidden"});
		}else{
			$("html").css({"overflow-x": "auto"});
		}
}

function setupScreenListeners() {
	$(window).resize(screenSizeCheck);
}

$(document).ready(function(){
	screenSizeCheck();
	setupScreenListeners();
});

