var timer_count=1; // eventually need to load from storage so not to override current timers
function ui(){
    $('#add').on('click', function(){
        var selected = [];
        $('#checkboxes').find('input:checked').each(function() {
            selected.push($(this).attr('id'));
        });

        console.log(selected.slice(-1)[0]);

        var title = $('#title').val();
        var size = $('#size').val();
        var timezone = $('#timezone').val();

        var view = { 'timezone': timezone, 'city': title, 'clockSize': size, 'guid' : 'timer'+timer_count};
        timer_count++;
        preDraw(view);
    });
}

function preDraw(view){
    var template = $('#template').html();
    Mustache.parse(template);
    var output = Mustache.render(template, view);
    $('#timer_holder').append(output);
    drawClock(parseInt(view['clockSize']), parseInt(view['timezone']), view['guid']);
}
@@ -86,16 +86,35 @@
  timers%0A
+var selected = %5B%5D;%0A
 function
@@ -162,35 +162,8 @@
 ()%7B%0A
-        var selected = %5B%5D;%0A
     
@@ -291,16 +291,18 @@
         
+//
 console.
@@ -802,16 +802,82 @@
 utput);%0A
+    switch(selected.slice(-1)%5B0%5D) %7B%0A        case 'clock':%0A        
     draw
@@ -954,9 +954,255 @@
 uid'%5D);%0A
+            break;%0A        case 'alarm':%0A            alert('alarm');%0A            break;%0A        case 'stopwatch':%0A            alert('stopwatch');%0A            break;%0A        case 'laptimer':%0A            alert('laptimer');%0A            break;%0A    %7D%0A
 %7D

add checking of timers type