// JavaScript Document
jQuery(function($) { 
  
  //alert("JS online");
  var fc = $.cookie('fc_FashionClub'); // get cookie
  msg = "";
	if(fc){
		var user = parse_cookie(fc);
		var id = user[0];
		var email = user[1];
		var first = user[2];
		var last = user[3];
		//alert("parsing..." + last);
		msg = "<p>Hello <strong>" + first + "</strong>! <a href='http://fashionclub.fidm-admin.com/fc_index.php/club/logout' />LOGOUT</a> or <a href='http://fashionclub.fidm-admin.com/fc_index.php/club/profile' />EDIT PROFILE</a></p>";	  
	} else {
	  	msg = "<p>Register here for full access to FashionClub.com! <a href='http://206.135.17.181/leads/Display_Form.do?formid=8&col=6764' target='_blank' />REGISTER</a> or <a href='http://fashionclub.fidm-admin.com/fc_index.php/club' />LOGIN</a></p>"; 
	}
	
	$('#headertext').html(msg);
});

function parse_cookie(msg)
{
	//alert("cookie >> " + msg);
	var ret = msg.split("&");
	
	return ret;
	
}