/*
 * jQuery jclock - Clock plugin - v 1.2.0
 * http://plugins.jquery.com/project/jclock
 *
 * Copyright (c) 2007-2008 Doug Sparling <http://www.dougsparling.com>
 * Licensed under the MIT License:
 *   http://www.opensource.org/licenses/mit-license.php
 */
(function(A){A.fn.jclock=function(C){var B="1.2.0";var D=A.extend({},A.fn.jclock.defaults,C);return this.each(function(){$this=A(this);$this.timerID=null;$this.running=false;var E=A.meta?A.extend({},D,$this.data()):D;$this.timeNotation=E.timeNotation;$this.am_pm=E.am_pm;$this.utc=E.utc;$this.utc_offset=E.utc_offset;$this.css({fontFamily:E.fontFamily,fontSize:E.fontSize,backgroundColor:E.background,color:E.foreground});A.fn.jclock.startClock($this)})};A.fn.jclock.startClock=function(B){A.fn.jclock.stopClock(B);A.fn.jclock.displayTime(B)};A.fn.jclock.stopClock=function(B){if(B.running){clearTimeout(B.timerID)}B.running=false};A.fn.jclock.displayTime=function(B){var C=A.fn.jclock.getTime(B);B.html(C);B.timerID=setTimeout(function(){A.fn.jclock.displayTime(B)},1000)};A.fn.jclock.getTime=function(C){var B=new Date();var H,D,I;if(C.utc==true){var E=B.getTime();var K=B.getTimezoneOffset()*60000;var G=E+K;var L=G+(3600000*C.utc_offset);B=new Date(L)}H=B.getHours();D=B.getMinutes();I=B.getSeconds();var J="";(H>=12)?J=" PM":J=" AM";if(C.timeNotation=="12h"){H=((H>12)?H-12:H)}else{if(C.timeNotation=="12hh"){H=((H>12)?H-12:H);H=((H<10)?"0":"")+H}else{H=((H<10)?"0":"")+H}}D=((D<10)?"0":"")+D;I=((I<10)?"0":"")+I;var F=H+":"+D;if((C.timeNotation=="12h"||C.timeNotation=="12hh")&&(C.am_pm==true)){F+=J}return F};A.fn.jclock.defaults={timeNotation:"24h",am_pm:false,utc:false,fontFamily:"",fontSize:"",foreground:"",background:"",utc_offset:0}})(jQuery);

