var SHARE_MY_PEPPER_BUNDLE_ID = 110329813741;
var SHARE_GALLERY_PEPPER_BUNDLE_ID = 110329813741;
var SHARE_STORY_BUNDLE_ID = 110332358741;


var keepHash = false;

function doFbSharePepper(PepperId, bundle_id) {

	_gaq.push(['_trackPageview', '/outbound/fbconnect/logged-in/share-pepper']);
	
	var image_src = "http://" + window.location.host + "/images/peppers/" + PepperId + "_g.jpg";
	
	var attachment = {
						'name': 'Create-A-Pepper to fight childhood cancer',
						'caption' : "{*actor*} created a pepper to help St. Jude fight childhood cancer on createapepper.com.",
						'description' : "Go there to see the pepper and color your own to help the kids at St. Jude Children's Research Hospital(R).", 
						'media': [{'type':'image',
                             'src':image_src,
                             'href':"http://www.createapepper.com/ViewPepper.aspx?p="+PepperId}]
					 };

    var link = window.location.href;	
	link = link.replace("Share.aspx", "ViewPepper.aspx");
	
   FB.ui(
   {
     method: 'feed',
     name: attachment.name,
     link: link,
     picture: image_src,
     caption: attachment.caption,
     description: attachment.description
   },
   function(response) {
     if (response && response.post_id) {
       //alert('Post was published.');
     } else {
       //alert('Post was not published.');
     }
   });	

}

function doFbCreatePepper(PepperId, bundle_id) {
	
	_gaq.push(['_trackPageview', '/outbound/fbconnect/logged-in/share-pepper']);
	
	var image_src = "http://" + window.location.host + "/images/peppers/" + PepperId + "_g.jpg";
	
	var attachment = {
						'name': 'Create-A-Pepper to fight childhood cancer',
						'caption' : "{*actor*} just created a pepper at CreateAPepper.com.",
						'description' : "MAKE A DONATION, MAKE A DIFFERENCE. What good is a work of art if no one sees it? Share your pepper with your Facebook friends, e-mail it to coworkers and inspire people to give to St. Jude Children's Research Hospital(R).", 
						'media': [{'type':'image',
                             'src':image_src,
                             'href':"http://www.createapepper.com/ViewPepper.aspx?p="+PepperId}]
					 };
    var link = window.location.href;	
	link = link.replace("Share.aspx", "ViewPepper.aspx");
	
   FB.ui(
   {
     method: 'feed',
     name: attachment.name,
     link: link,
     picture: image_src,
     caption: attachment.caption,
     description: attachment.description
   },
   function(response) {
     if (response && response.post_id) {
       //alert('Post was published.');
     } else {
       //alert('Post was not published.');
     }
   });	

}



function doFbShareBitly(Bitly) {

	_gaq.push(['_trackPageview', '/outbound/fbconnect/logged-in/share-bitly']);
	
	var image_src = "http://" + window.location.host + "/img/logo.png";
	
	var attachment = {
						'name': "Help out the kids at St. Jude Children's Research Hospital(R)",
						'caption' : "I just donated to the St. Jude Children's Research Hospital(R).",
						'description' : "  Help out the kids at St. Jude Children's Research Hospital(R)! Donate at my link " + Bitly + " to join in the fight against childhood cancer. Donate any amount to help these kids in the most important fight of their lives and help me earn awesome Chili's rewards. ", 
						'media': [{'type':'image',
                             'src':image_src,
                             'href': Bitly}]
					 };		 

	FB.ui(
   {
     method: 'feed',
     name: attachment.name,
     link: Bitly,
     picture: image_src,
     caption: attachment.caption,
     description: attachment.description
   },
   function(response) {
     if (response && response.post_id) {
       //alert('Post was published.');
     } else {
       //alert('Post was not published.');
     }
   });
}

function doFbInviteFriends() {
	
	_gaq.push(['_trackPageview', '/outbound/fbconnect/logged-in/invite-friend']);
    
    FB.ui({
    	method: 'apprequests', 
    	message: 'Help out the kids at St. Jude Children\'s Research Hospital(R)', 
    	title: 'Createapepper.com',
    	data: 'tracking information for the user'
    });
}

function ga_fb_login_click_track() {
	_gaq.push(['_trackPageview', '/outbound/fbconnect/not-logged-in/click-to-fb']);
}

