//var server = "http://freenj.org/keewaydinconnect";
var server = "http://connect.keewaydin.org";

function onConnected() {
}

function fbconnectLogin() {
    window.location = server + "/users/fb_connect";
}

function fbconnectLogout() {
	FB.ensureInit(function() {
    	FB.Connect.logout(function() {
		    window.location = server + "/users/logout";
		});
	});
	
	return false;
}

function onNotConnected() {
}

function kcinit() {
    //FB.init("4701783f27d0d8cdcd01e52a72c90777", "/keewaydinconnect/xd_receiver.htm", {"ifUserConnected":onConnected, "ifUserNotConnected":onNotConnected});
    FB.init("cee7d92721bbeedb749a750ab01838b1", "/xd_receiver.htm", {"ifUserConnected":onConnected, "ifUserNotConnected":onNotConnected});
    //FB.init({
    // appId  : '224974982574',
    // status : true, // check login status
    // cookie : true, // enable cookies to allow the server to access the session
    // xfbml  : true  // parse XFBML
    //});

}

jQuery(document).ready(function() {
	kcinit();
    });
