
/*var isLocked = false;*/
var MINHEIGHT = 416;
var PADDING_MAIN = 100;




function getOffset(){
	var y = getOffsetY();

	if( y >= MINHEIGHT ){
		headerFixed();	
	}
	else{
		headerRelative();
	}
	
}

function headerFixed(){
	$('#headerwrapper').css({'position':'fixed','top':'0','left':'0'});
	$('#main').css({'padding-top': PADDING_MAIN + 'px'});

	
	if (navigator.appVersion.indexOf("MSIE") != -1){
		$('#headerwrapper').css({'position':'fixed','top':'0','border-bottom':'1px solid #ccc'});
	}

}

function headerRelative(){
	$('#headerwrapper').css({'position':'relative'});
	$('#main').css({'padding-top':'0'});
	
	if (navigator.appVersion.indexOf("MSIE") != -1){
		$('#headerwrapper').css({'position':'relative','border-bottom':'1px solid #ccc'});
	}
}

/*
function lock() {
	isLocked = true;
	setTimeout("unlock()", 100);
}

function unlock(){
	isLocked = false;
}
*/
