// test
$(document).ready(function(){
  function getRecipeJson() {
          var apiKey = "dvxBm9UtLmVZby8Qvc1IO3i52o9Y1Dsj";
          // var titleKeyword = "latin egg wrap";
          var titleKeyword = $('h1').text().toLowerCase();
          var url = "http://api.bigoven.com/recipes?pg=1&rpp=25&any_kw="
                    + titleKeyword
                    + "&api_key="+apiKey;
          $.ajax({
              type: "GET",
              dataType: 'json',
              cache: false,
              url: url,
              success: function (data) {
                  var recipe_list = [];
                  for(var i = 0; i < 5; i++){
                    recipe_list.push(data.Results[i]["RecipeID"]);
                    $("#dish-dish .thumbnail").append(data.Results[i]["Title"]+"<br>");
                    var source = data.Results[i]["HeroPhotoUrl"];
                    $("#dish-dish .thumbnail").append("<img src="+source+" />");
                  }
                  recipe_list.forEach(function(entry){
                    // fetchRecipeJson(entry);
                  })
              }
          });
      };
      getRecipeJson();

      function fetchRecipeJson(iD) {
      var apiKey = "dvxBm9UtLmVZby8Qvc1IO3i52o9Y1Dsj";
      var recipeID = iD;
      var url = "http://api.bigoven.com/recipe/" + recipeID + "?api_key="+apiKey;
      $.ajax({
               type: "GET",
               dataType: 'json',
               cache: false,
               url: url,
               success: function (data) {
                  // $("#dish-dish").html(data.Instructions);
                  // debugger;
                  // $("#dish-dish").html(data.Ingredients[0]["Name"])
                  }
               });
             }
  });


@@ -756,16 +756,23 @@
 .append(
+%22%3Ch4%3E%22+
 data.Res
@@ -790,16 +790,24 @@
 tle%22%5D+%22%3C
+/h4%3E%22+%22%3C
 br%3E%22);%0A 

hi hi