Q:

Take a range slider of min='1' and max= '16' and make it output 1 through 4 four times

I am trying to figure out how to modify the value of an incoming input/range slider that has a min value of 1 and a max value of 16 to output 1-2-3-4 ( then when the range slider gets to value 5 the pattern repeats) 1-2-3-4 ( then when the pattern gets to what otherwise would be value 9 the pattern repeats) 1-2-3-4.... etc.  This should also work when moving the range slider backwards. 
The reason I want to do this is to create a list of 4 divs of which if the id of the div matches the number of the range slider value that div highlights.  The reason I am using the number 16 instead of 4 for my range slider is because I will want another list of four divs in which each only highlights on every '1' of the range slider. 
The problem is that if I were to write this program for a div list of 100 writing a switch statement isn't going to cut it.  So I'm curious how this could be solved without one in case I want to scale this. 
Here's a fiddle with the html/css/js
http://jsfiddle.net/ME8hA/1/
var slider = document.getElementById('slider');

    var i;

slider.onchange = function() {
    i = slider.value;

     console.log(typeof i);
    $('.inner-loop').removeClass('inner-loop-selected');

        switch (i) {
            case "5":
                i = "1";
                break;
            case "6":
                i = "2";
                break;
            case "7":
                i = "3";
                break;
            case "8":
                i = "4";
                break;
            case "9":
                i = "1";
                break;
            case "10":
                i = "2";
                break;
            case "11":
                i = "3";
                break;
            case "12":
                i = "4";
                break;
            case "13":
                i = "1";
                break;
            case "14":
                i = "2";
                break;
            case "15":
                i = "3";
                break;
            case "16":
                i = "4";
                break;
          }

    var innerDiv = document.getElementById('inner-' + i);
    console.log(innerDiv.id);
    innerDiv.className +=' inner-loop-selected' ;

};

A:

Sure, just use math! 
    i = (parseInt(slider.value, 10) % 4) || 4;

jsfiddle

