(function($) {
    
    function resetBackground() {
        var bodyW = $('body').width();
        var bgPosLeft = Math.ceil(bodyW / 2 -185);
        $('#bg').css('background-position', bgPosLeft + 'px 0%').show();
    }
    
    $(window).resize(resetBackground);

    $(document).ready(function(){
        resetBackground();
        $('input[type=checkbox],input[type=radio]').prettyCheckboxes();

/*FB.Event.subscribe('edge.create',
  function(response) {
    //alert('like');
  }
);*/
    
$.each(Facebook.LikeButton.urls, function(index, value) { 
  console.log(document.getElementById(value.hash)); //$('#' + value.hash)
       $.getJSON(value.url, function(data) {
		console.log(data);
		//$('#' + value.hash).html(data[0].total_count);
	});

  
});
  
  /*$.getJSON(apiUrl, function(data) {
    console.log(data);
    $(that).html(data[0].total_count);
  });*/


    });
    
})(jQuery);
