//var xdr_path 		= "";
//var fb_uid 			= 0;
var fb_friends		= 0;

jQuery(function(){
try{
/*			var fbuid = get_cookie_fbuid();
			var tmp1 = jQuery("#fb_data").html();
			tmp1 = tmp1.replace(/__fbuid__/ig, fbuid);
			jQuery("#fb_data").html(tmp1);*/
			FB.init(
				{
					appId:	api_key,
					status: true,
					cookie: true,
					xfbml: true,
					reloadIfSessionStateChanged : true,
					doNotUseCachedConnectState:true
				}
			);
			FB.XFBML.parse(document.getElementById(jQuery("#fb_data")));
			FB.Event.subscribe('auth.sessionChange', function(response) {
				if (response.session) {
				} else {
				// The user has logged out, and the cookie has been cleared
					jQuery.cookie("irlogged", null);
					jQuery.cookie("fbuid", null);
					window.location.href = logout_url;
				}
			});
} catch(e){}
});