const tvShows = {
    "Battlestar Galactica": {
        "genre": "Science Fiction",
        "seasons": 4,
        "premiere_year": 2004,
        "provider": "Syfy",
        "showrunner": "Ronald D. Moore"
    },
    "The Wire": {
        "genre": "Crime Drama",
        "seasons": 5,
        "premiere_year": 2002,
        "provider": "HBO",
        "showrunner": "David Simon"
    },
    "Breaking Bad": {
        "genre": "Crime Drama",
        "seasons": 5,
        "premiere_year": 2008,
        "provider": "AMC",
        "showrunner": "Vince Gilligan"
    },
    "30 Rock": {
        "genre": "Comedy",
        "seasons": 7,
        "premiere_year": 2006,
        "provider": "NBC",
        "showrunner": "Tina Fey"
    },
    "Parks and Recreation": {
        "genre": "Comedy",
        "seasons": 7,
        "premiere_year": 2009,
        "provider": "NBC",
        "showrunner": "Michael Schur"
    }
};

let tvShowList = "";
for (let show in tvShows) {
    tvShowList += '<div class="tv-card">';
    tvShowList += `<h3>${show}</h3>`;
    tvShowList += `<p>Genre: ${tvShows[show].genre}</p>`;
    tvShowList += `<p>Seasons: ${tvShows[show].seasons}</p>`;
    tvShowList += `<p>Premiere Year: ${tvShows[show].premiere_year}</p>`;
    tvShowList += `<p>Provider: ${tvShows[show].provider}</p>`;
    tvShowList += `<p>Showrunner: ${tvShows[show].showrunner}</p>`;
    tvShowList += '</div>';
}

document.getElementById("tv-shows").innerHTML = tvShowList;

$(document).ready(function() {
    $("#animate-btn").click(function() {
        $("#santa").animate({marginLeft: "40%"}, "slow");})})


$(document).ready(function(){
  $("#load-ajax").click(function(){
    $("#ajax").load("ajax.txt");
  });
});