...
|
...
|
@@ -19,28 +19,8 @@ lazyLoad({ |
|
|
});
|
|
|
|
|
|
function downCount(options) {
|
|
|
var settings = new Date(options),
|
|
|
targetDateFunction = function() {
|
|
|
var orderDate = new Date(settings),
|
|
|
utc = orderDate.getTime(),
|
|
|
newDate = new Date(utc);
|
|
|
|
|
|
return newDate;
|
|
|
},
|
|
|
|
|
|
difference = targetDateFunction(),// difference of dates
|
|
|
var difference = options,// difference of dates
|
|
|
interval;
|
|
|
|
|
|
// Throw error if date is not set
|
|
|
if (!settings) {
|
|
|
$.error('Date is not defined.');
|
|
|
}
|
|
|
|
|
|
// Throw error if date is set incorectly
|
|
|
if (!Date.parse(settings)) {
|
|
|
$.error('Incorrect date format, it should look like this, 12/24/2012 12:00:00.');
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Main downCount function that calculates everything
|
|
|
*/
|
...
|
...
|
|