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