$(document).ready(function(){
	check_login();
});



function check_login(){
	$.post("/check_login.php",{id:"0"},function(data,textStatus){
	if(textStatus=='success')
		{
			if(data.flag==1)
			{
				$('#checklogin').empty().append('Welcome,'+data.firstname+',<a href="http://www.edhardyclothing4u.com/member.php">member center</a>');
			}else{
				$('#checklogin').empty().append('<a href="http://www.edhardyclothing4u.com/login.html">Login</a> or <a href="http://www.edhardyclothing4u.com/register.html">Register</a>');
			}
		}
			},"json");

}
