//Inicializo asincronicamente las librerias de Facebook
  window.fbAsyncInit = function() {
      FB.init({status: true, cookie: true,xfbml: true});
  

// Me suscribo a los eventos de FB para loguearlo en google Analytics
   try {
       if(FB && FB.Event && FB.Event.subscribe) {
           FB.Event.subscribe('edge.create', function(targetUrl) {_gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]);});
           FB.Event.subscribe('edge.remove', function(targetUrl) {_gaq.push(['_trackSocial', 'facebook', 'unlike', targetUrl]);});
           FB.Event.subscribe('comment.create', function(targetUrl) {_gaq.push(['_trackSocial', 'facebook', 'comment', targetUrl]);});
           FB.Event.subscribe('comment.remove', function(targetUrl) {_gaq.push(['_trackSocial', 'facebook', 'uncomment', targetUrl]);});
           FB.Event.subscribe('message.send', function(targetUrl) {_gaq.push(['_trackSocial', 'facebook', 'send', targetUrl]);});
       } 
   } 
   catch (e) {
   }
   };
//Funcion que define el script de FB
  (function() {
		var e = document.createElement('script'); e.async = true;
		e.src = document.location.protocol +  '//connect.facebook.net/es_ES/all.js#xfbml=1';
		document.getElementById('fb-root').appendChild(e);}());


