$(document).ready(function() {
  var client = new ZeroClipboard( $(".route-pre") );

  client.on( "ready", function( readyEvent ) {
    client.on("copy", function(event) {
      console.log(client);
      var preData = event.target.innerText;
      client.setText(preData);
    })
    client.on( "aftercopy", function( event ) {
      console.log(event.target)
      console.log($(event.target))
      console.log($(event.target).siblings(".copy-prompt").text("Copied!"))

    });
  });
});
          


$(document).ready(function() {

  $(".submission-box").on("keyup", function() {
    $(".golden-text").text($(this).val().toLowerCase());    
    $(".g-text-singular").text(pluralize(capitalize($(this).val()), 1));
    $(".g-text-s-dc").text((pluralize($(this).val(), 1)));
  });

   $('tr.route').mouseover(function(){
      $(this).addClass('hover');
   });
        
   $('tr.route').mouseout(function(){
      $(this).removeClass('hover');
   });


  $(".route").on("click", function() {
    $(this).next().toggle();
    $(this).toggleClass('in-use');
    $(this).toggleClass('hover');
  });

  var rand100 = Math.floor(Math.random() * 100)
  if (rand100 === 69) {
    $('.sub-box-under').text("Rest-a-licious!")
  } else if (rand100 >= 80) {
    $('.sub-box-under').text("Type something in!")
  } else if (rand100 >= 60) {
      $('.sub-box-under').text("Try your own!")
  } else if (rand100 >= 40) {
      $('.sub-box-under').text("Chi Bobolinks 2015!")
  } else if (rand100 >= 20) {
      $('.sub-box-under').text("Rapid Restful Results! (TM)")
  } else {
      $('.sub-box-under').text("Kitchen it? Kitchen it.")
  }


});


function capitalize(string) {
  var lowerCaseString = string.toLowerCase();
    return lowerCaseString.charAt(0).toUpperCase() + lowerCaseString.slice(1);
}


@@ -328,27 +328,17 @@
 %7B%0A      
-console.log
+$
 (event.t
@@ -347,62 +347,88 @@
 get)
-%0A      console.log($(event.target))%0A      console.log(
+.siblings(%22.copy-prompt%22).text(%22Copied!%22);%0A      setTimeout(function()%7B%0A        
 $(ev
@@ -474,19 +474,45 @@
 xt(%22
-Copied!%22))%0A
+%5Eclick to copy%5E%22);%0A        %7D, 10000);
 %0A   

add timeout