$(document).ready(function() {

  function secondHand() {
      setInterval( function() {
      var d = new Date();
      var seconds = d.getSeconds();
      var sdegree = seconds * 6;
      var srotate = "rotate(" + sdegree + "deg)";
      
      $("#sec, #secshad").css("-webkit-transform", srotate );
          
      }, 1000 );
   };
   
   function hourHand() {
      setInterval( function() {
      var d = new Date();
      var hours = d.getHours();
      var mins = d.getMinutes();
      var hdegree = hours * 30 + Math.round(mins / 2);
      var hrotate = "rotate(" + hdegree + "deg)";
      
      $("#hour, #hourshad").css("-webkit-transform", hrotate );
          
      }, 1000 );
   };
   
   function minHand() {
      setInterval( function() {
      var d = new Date();
      var mins = d.getMinutes();
      var mdegree = mins * 6;
      var mrotate = "rotate(" + mdegree + "deg)";
      
      $("#min, #minshad").css("-webkit-transform", mrotate );
          
      }, 1000 );
   };



   secondHand(); 
   hourHand();
   minHand();  
}); 
