function postFBMessage(session,data)
	{
	var message,picture;

	//message = "I just signed up for oneGoodLove.com where I can find my perfect partner";
	message = "I just joined oneGoodLove.com to find my future partner. Are you my oneGoodLove? Take the Personality Profile Test now and see if we're a match!";
	
	if (data.gender) picture = data.gender == 'male' ? getFBPic('m') : getFBPic('f');
	else picture = getFBPic();

	var send = {
		access_token:session.access_token,
		name:"oneGoodLove.com - a dating community for relationship-minded gays and lesbian",
		message:message,
		description:"oneGoodLove is a relationship-focused dating site for the gay and lesbian community. oneGoodLove was created for the LGBT community, and unlike other dating sites out there our Personality Profile Test was created specifically for you. Join today and find your oneGoodLove when you're ready.",
		picture:picture,
		link:"http://www.onegoodlove.com/"
		};
	FB.api('/me/feed','post',send,function(data)
		{

		});
	}

function getFBPic(g)
	{
	var fcount = 13, mcount = 16;
	var img_url = 'http://www.onegoodlove.com/images/';
	var num_it = function(num,places)
		{
		num = ''+num;
		while (num.length < places) num = '0'+num;
		return num;
		};
	if (g)
		{
		if (g == 'm') img_url += 'fbimgm'+num_it(Math.round(Math.random()*(mcount-1)+1),3)+'.jpg';
		else img_url += 'fbimgf'+num_it(Math.round(Math.random()*(fcount-1)+1),3)+'.jpg';
		}
	else img_url += 'fbimgm001.jpg';
	return img_url;
	}

$(function()
	{
	var e = document.createElement('script');
	e.type = 'text/javascript';
	e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
	e.async = true;
	if (!$("#fb-root").length) $("body").append('<div id="fb-root"></div>');
	document.getElementById('fb-root').appendChild(e);
	});

window.fbAsyncInit = function()
	{
	FB.init({appId: '141698895848101', status: true, cookie: true, xfbml: true});
	};
