{"size": 3049, "ext": "js", "max_stars_repo_path": "HMWRK/Week12/script.js", "max_stars_repo_name": "DesignsofPurpose/MirandaWhite-WebDes2-SMC", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "HMWRK/Week12/script.js", "max_issues_repo_name": "DesignsofPurpose/MirandaWhite-WebDes2-SMC", "max_issues_repo_issues_event_min_datetime": "2021-05-01T18:42:41.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-01T18:42:41.000Z", "max_forks_repo_path": "HMWRK/Week12/script.js", "max_forks_repo_name": "DesignsofPurpose/MirandaWhite-WebDes2-SMC", "max_forks_repo_forks_event_min_datetime": "2021-05-15T20:12:33.000Z", "max_forks_repo_forks_event_max_datetime": "2021-05-15T20:12:33.000Z"}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": 1, "avg_line_length": 25.4083333333, "max_line_length": 124, "alphanum_fraction": 0.4624467038}
var groupSelect = document.getElementById("groupSelect");
        var catSelect = document.getElementById("catSelect");
        var galleryImg = document.getElementById("galleryImg");

        var merchMpwr = ["MPWR T-shirts", "MPWR Lunch Boxes"];
        var deskMpwr = ["File Folders", "Calendars", "Journals"];
        var wallArt = ["DOP Prints", "Typeface Prints"];

        var imageCounter = 1;

        groupSelect.addEventListener("change", function () {
            console.log(groupSelect.value);

            if (groupSelect.value == 'merchMpwr') {
                fillCategory(merchMpwr);
            }
            else if (groupSelect.value == 'deskMpwr') {
                fillCategory(deskMpwr);
            }
            else if (groupSelect.value == 'wallArt') {
                fillCategory(wallArt);
            }
            else {
                //for all other cases
                catSelect.innerHTML = "";
            }
        })

        var fillCategory = function (catArray) {
            catSelect.innerHTML = "";
            catArray.forEach(function (member) {
                var opt = document.createElement('option');
                opt.value = member.toLowerCase();
                opt.textContent = member;
                catSelect.appendChild(opt);
            })
        }

        var timerFunction = function () {
            if (imageCounter == 1) {
                galleryImg.src = "PhenomWoman.png";
                imageCounter = 2;
            }
            else if (imageCounter == 2) {
                galleryImg.src = "WomenUp.jpg";
                imageCounter = 3;
            }
            else if (imageCounter == 3) {
                galleryImg.src = "GirlPower.jpg";
                imageCounter = 1;
            }

        }

        let subscribeRequest = function () {
            prompt("Subscribe to Newsletter Now to recieve Updates on Exclusive Merch and Discounts", "What's your email?");
        }

        window.addEventListener("load", function () {
            setTimeout(subscribeRequest, 4000);
            setInterval(imgChange, 3000);
        })

        window.setInterval(timerFunction, 4000);

    























        // $("#hideImg1").click(function(){
        //     $("#img1 img").fadeToggle();
        //  });
    
        //  $("#hideImg2").click(function(){
        //     $("#img2 img").fadeToggle();
        //  });
    
        //  $("#hideImg3").click(function(){
        //     $("#img3 img").fadeToggle();
        //  });
    
        //  $("#hideImg4").click(function(){
        //     $("#img4 img").fadeToggle();
        //  });
    
    
    
        //  $("#addMore").click(function(){
        //    $( "#gridContainer" ).append( $( '<img id="img5" src="deskMock.jpg" />' ) );
    
        //     //$("#paragraphs").append( $("#myP").clone());
        // });
    
        // $("#addLess").click(function(){
        //     $( "#img5" ).remove();
        //     //$("#paragraphs").append( $("#myP").clone());
        // });
    
         
    