/**
 * @author anthonysapp
 */
window.fbAsyncInit = function() {
	FB.init( {
		appId : '649868453d7d60981035038c00b6c1d6',
		status : true,
		cookie : true,
		xfbml : true
	});

};

(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;
	document.getElementById('fb-root').appendChild(e);
}());

function streamPublish() {
	FB
			.ui(
					{
						method : 'stream.publish',
						message : "wants you to Deflate the Elephant and help prevent friends from drinking and driving.",
						attachment : {
							name : 'Deflate the Elephant - A Resource for Responsible Hosting Ideas',
							description : ("Drinking and driving should never be the elephant in the room. Speak up. You could save a life."),
							href : 'http://www.deflatetheelephant.com',
							media : [ {
								'type' : 'image',
								'src' : 'http://dev.dashboard.ca/deflatetheelephant/en/deflate_the_elephant_fb.gif',
								'href' : 'http://www.deflatetheelephant.com'
							} ]
						},
						action_links : [ {
							text : 'action link',
							href : 'http://www.deflatetheelephant.com/'
						} ],
						user_prompt_message : 'Deflate the Elephant – A Resource for Responsible Hosting Ideas'
					}, function(response) {
						if (response == 0) {

						} else {

						}
					});
}