(function($){
  $.fn.facebook = function() {
    return this.each(function() {
      var e = $(this), s = e.closest(".share_this")

      var url   = s.attr("data-url")
      var title = s.attr("data-title")
      
      e.click(function(){
        $.jsonp("post", "/share/facebook.json", { title: title, url: url })
        window.open("http://www.facebook.com/share.php?u=" + encodeURIComponent(url))
      })
    })
  }
})(jQuery);
