File "jquery.down-count.min.js"

Full Path: /home/jlklyejr/public_html/wp-content/test/wp-content/themes/goya/assets/js/vendor/jquery.down-count.min.js
File size: 1.09 KB
MIME-type: text/plain
Charset: utf-8

/**
 * downCount: Simple Countdown clock with offset
 * Author: Sonny T. <hi@sonnyt.com>, sonnyt.com
 */
!function(t){t.fn.downCount=function(e,d){var s=t.extend({date:null,offset:null},e);s.date||t.error("Date is not defined."),Date.parse(s.date)||t.error("Incorrect date format, it should look like this, 12/24/2012 12:00:00.");var u=this,l=function(){var e=new Date,e=e.getTime()+6e4*e.getTimezoneOffset();return new Date(e+36e5*s.offset)};var h=setInterval(function(){if((a=new Date(s.date)-l())<0)return clearInterval(h),void(d&&"function"==typeof d&&d());var e=36e5,t=Math.floor(a/864e5),n=Math.floor(a%864e5/e),r=Math.floor(a%e/6e4),o=Math.floor(a%6e4/1e3),f=1===(t=2<=String(t).length?t:"0"+t)?"day":"days",i=1===(n=2<=String(n).length?n:"0"+n)?"hour":"hours",e=1===(r=2<=String(r).length?r:"0"+r)?"minute":"minutes",a=1===(o=2<=String(o).length?o:"0"+o)?"second":"seconds";u.find(".days").text(t),u.find(".hours").text(n),u.find(".minutes").text(r),u.find(".seconds").text(o),u.find(".days_ref").text(f),u.find(".hours_ref").text(i),u.find(".minutes_ref").text(e),u.find(".seconds_ref").text(a)},1e3)}}(jQuery);