var CoverYourFaces = (function() {
    window.fbAsyncInit = function() {
        $(function() {
            $("._cover_your_face").live('click',
            function(e) {
                        FB.api('/photos', 'post', {
                            message: $(this).attr("data-title"),
                            url: $(this).attr("data-url")
                        },
                        function(response) {
                            if (!response || response.error) {
                                // Place a function call here that brings up the modal dialog with the Facebook login button
										
                                console.log(response);
                                
                                
                            } else {
                                // Put the function call here to bring up a modal dialog to confirm that it was applied successuflly! Yay!

										console.log(response);
                                
                                
                            }
                        });
                return false;
            });
        });
        FB.init({
            appId: '354374410072',
            status: true,
            cookie: true,
            xfbml: true
        });
    };
})();


