function checkImg($id) {
  $('#'+$id)
  .load(function(){
    $(this).removeLoader()
  })
  .error(function(){
    $(this).removeLoader()
  })
  $.fn.removeLoader = function(){
    $(this).closest('div').css({
      'background-image':'none'
    })
  }
}


 // Get blocks from WP blog
 function getBlock($url,$type,$box) {
  var $target_url = $url + '&do_action=' + $type;
  $.getJSON($target_url, function(response){
      if (response.status) {
          $($box).prepend(response.content);
      }
    })
}
