/*  beatsClock - Swatch Internet Time clock jQuery plugin
    v1.0.1, 2009-09-12
    Copyright: Paul Philippov, paul@ppds.ws
    Homepage: http://themactep.com/jquery/beats/jquery_beats_clock_plugin/
    License: BSD
    Note: This plugin requires ppds.date.js library!
*/

(function($){
  $.fn.extend({
    beatsClock: function(accuracy){
      if (! Date.prototype.toInternetTime){
        alert(".beats jQuery plugin requires ppds.date.js library");
        return false;
      }
      var el = $(this).selector;
      var ac = parseInt(accuracy);
      if (isNaN(ac)) ac = 0;
      setInterval('$("'+el+'").html(new Date().toInternetTime('+ac+'))', 864);
      return true;
    }
  });
})(jQuery);
