(function ($) { $(document).ready(function () { $('.slider').cycle({ fx: 'fade', timeout: 0, height: 'auto', pause: '', next: '.comments' }); $('#form1 form').validate(); $('#form2 form').validate(); $('#form3 form').validate(); $('.feedback form').validate(); $(".fancybox").fancybox(); //$(".iframe").fancybox(); // Grab the current date var currentDate = new Date(); // Set some date in the future var futureDate=new Date(new Date().getTime() + (2 * 24 * 60 * 60 * 1000)); // Calculate the difference in seconds between the future and current date var diff = futureDate.getTime() / 1000 - currentDate.getTime() / 1000; if (diff < 0) diff = 0; // //Instantiate a coutdown FlipClock // var clock = $('.clock').FlipClock(diff, { // clockFace: 'DailyCounter', // language: 'ru', // countdown: true // }); }); })(jQuery); (function ($) { $(document).ready(function(){ $('a[href*=youtube]').each(function () { // convert youtube swf href to embed for iframe var thisHref = this.href.replace(new RegExp("watch\\?v=", "i"), 'embed/').replace(new RegExp("&", "i"), '?'); // bind fancybox to each anchor $(this).fancybox({ "padding": 0, "type": 'iframe', // add trailing parameters to href (wmode) "href" : thisHref+"&wmode=opaque" }); // fancybox }); // each }); // ready })(jQuery); (function ($) { // Counter var now = new Date(); var timer; var finisDate = new Date(new Date().getTime() + (2 * 24 * 60 * 60 * 1000)); function showRemaining() { var finisTime = new Date(finisDate); var nowTime = new Date(); var diffTime = new Date(finisTime-nowTime); var finishSeconds = Math.floor(diffTime.valueOf()/1000); var days=parseInt(finishSeconds/86400); var hours = parseInt(finishSeconds/3600)%24; var minutes = parseInt(finishSeconds/60)%60; var seconds = finishSeconds%60; // $(".count_line .d").html(days); $(".count_line .h").html(hours); $(".count_line .m").html(minutes); $(".count_line .s").html(seconds); } showRemaining(); timer = setInterval(showRemaining, 1000); })(jQuery);