$( document ).ready(function() { //$('#thumbnails li').click(function(){ // var srcLink = $(this).attr('data-src'); // $('.active').removeClass('active'); // $(this).addClass('active'); // $('.slider img').attr('src', srcLink); //}); var checker = document.getElementById('check'); var sendbtn = document.getElementById('send'); jQuery(document).ready(function($){ checker.onchange = function(){ if(this.checked){ } else { } }; }); // Counter var d = [1, 7, 6, 5, 4, 3, 2]; var today = new Date(); var end = new Date(apishopsActionDate('date')); var _second = 1000; var _minute = _second * 60; var _hour = _minute * 60; var _day = _hour * 24; var timer; function showRemaining() { var now = new Date(); var distance = end - now; var days = Math.floor(distance / _day); if (days < 10) days = '0' + days; var hours = Math.floor((distance % _day) / _hour); if (hours < 10) hours = '0' + hours; var minutes = Math.floor((distance % _hour) / _minute); if (minutes < 10) minutes = '0' + minutes; var seconds = Math.floor((distance % _minute) / _second); if (seconds < 10) seconds = '0' + seconds; $(".counter .h").html(hours); $(".counter .m").html(minutes); $(".counter .s").html(seconds); } timer = setInterval(showRemaining, 1000); $('#form1').validate(); $('#form2').validate(); $('#form3').validate(); $('#form4').validate(); $('#form5').validate(); $('#form6').validate(); $('#form7').validate(); $('.navbar-nav a').on('click',function (e) { e.preventDefault(); var target = this.hash, $target = $(target); $('html, body').stop().animate({ 'scrollTop': $target.offset().top - 20 }, 500, 'swing', function () { // window.location.hash = target; }); }); }); function apishopsActionDate(type) { var currentTimestamp=new Date().getTime() if(typeof apishopsActionGetCookie('apishopsActionDate') == 'undefined' || currentTimestamp > parseInt(apishopsActionGetCookie('apishopsActionDate'))){ endTimestamp=currentTimestamp + (1 * 24 * 60 * 60 * 1000); apishopsActionSetCookie('apishopsActionDate', endTimestamp); }else{ endTimestamp=parseInt(apishopsActionGetCookie('apishopsActionDate')) } if(type=='timestamp') return endTimestamp; else if(type=='circularEnd'){ date=new Date(endTimestamp); y=date.getFullYear(); d=date.getDate(); m=date.getMonth()+1; h=date.getHours()+1; mn=date.getMinutes(); return y+","+m+","+d+","+h+","+mn+",0"; //'2016,-6,-4,16,19,10', //year,month,day,hour,minute,second } else if(type=='circularBegin'){ date=new Date(); y=date.getFullYear(); d=date.getDate(); m=date.getMonth()+1; h=date.getHours()+1; mn=date.getMinutes(); return y+","+m+","+d+","+h+","+mn+",0"; //'2016,-6,-4,16,19,10', //year,month,day,hour,minute,second } else return new Date(endTimestamp); } function apishopsActionGetCookie(name) { var matches = document.cookie.match(new RegExp( "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\/\+^])/g, '\$1') + "=([^;]*)" )); return matches ? decodeURIComponent(matches[1]) : undefined; } function apishopsActionSetCookie(name, value, options) { options = options || {}; var expires = options.expires; if (typeof expires == "number" && expires) { var d = new Date(); d.setTime(d.getTime() + expires*1000); expires = options.expires = d; } if (expires && expires.toUTCString) { options.expires = expires.toUTCString(); } value = encodeURIComponent(value); var updatedCookie = name + "=" + value; for(var propName in options) { updatedCookie += "; " + propName; var propValue = options[propName]; if (propValue !== true) { updatedCookie += "=" + propValue; } } document.cookie = updatedCookie; return value; }