$(function(){ // $(document).on("click", function(){ // $(".js-popup").hide(); // }); $('.fancybox').fancybox({ padding: 0, helpers: { overlay: { locked: false } }, tpl: { closeBtn: '
' }, beforeShow: function(){ $(".fancybox-skin").css("backgroundColor","transparent"); $(".fancybox-skin").css("boxShadow","none"); } }); $(".moreReviews").click(function(){ $("#otherItems").slideToggle("normal"); return false; }); // $("#form4 input.yes").change(function () { // if ($(this).is(":checked")) { // $("#form4 .button").removeAttr('disabled'); // } // else { // $("#form4 .button").attr('disabled', true); // // } // }); var checker = document.getElementById('yes'); var sendbtn = document.getElementById('send'); sendbtn.disabled = true; jQuery(document).ready(function($){ checker.onchange = function(){ if(this.checked){ sendbtn.disabled = false; } else { sendbtn.disabled = true; } }; }); //add css class to cycle slider item, when clicking jQuery(document).ready(function($){ $('.slider .cycle-slide').click(function(){ var index = $('.slider').data('cycle.API').getSlideIndex(this); $('.cycle-slide-active').removeClass('cycle-slide-active'); $(this).addClass('cycle-slide-active'); }); }); //yet another scrolling with hightlight effect (works for me) //each marker link would be with section class //.page is class of page without top menu ) // Navigation $('.js-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 navScroll(){ $('.section').each(function(){ var pos = $(this).offset().top; var id = $(this).attr('id'); var top = ($('.page').offset().top - 80); if( $(window).scrollTop() >= (pos - 79)){ //$('.js-nav li').removeClass('is-active'); $('.js-nav li a').removeClass('is-active'); //$('[href = #'+id+']').parent().addClass('is-active'); $('[href = #'+id+']').addClass('is-active'); } if($(window).scrollTop() < top){ //$('.js-nav li').removeClass('is-active'); $('.js-nav li a').removeClass('is-active'); } }); } $(window).scroll(function() { navScroll(); }); (function ($) { // Counter var _second = 1000; var _minute = _second * 60; var _hour = _minute * 60; var _day = _hour * 24; 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); //console.log($('body').html()); });