$(document).ready(function() { // $('#order_form').submit(function() { // var th = $(this) // var phone = th.find("#tel").val() // var name = th.find('input[name="name"]').val() // var prod = th.find('select[name="product"]').val() // var data = { // 'name': name, // 'phone': phone, // 'product': prod // } // $.ajax({ // type: 'POST', // url: '/mail.php', // data: data, // success: function() { // // document.location.href = '/invoice/' // }, // error: function() { // alert('Что-то пошло не так, попробуйте еще раз.') // } // }) // event.preventDefault() // }) $('.btn_toogle-xs').on('click', function() { var th = $(this) var parent = th.parents('.cat_item') parent.toggleClass('coll') }) $('.cat_item--slider').owlCarousel({ items: 1, loop: true, dots: false, autoHeight: true, nav: true, }) /* scroll */ $("a[href^='#']").click(function(){ var _href = $(this).attr("href"); $("html, body").animate({scrollTop: $(_href).offset().top+"px"}); return false; }); /* timer */ function update() { var Now = new Date(), Finish = new Date(); Finish.setHours( 23); Finish.setMinutes( 59); Finish.setSeconds( 59); if( Now.getHours() === 23 && Now.getMinutes() === 59 && Now.getSeconds === 59) { Finish.setDate( Finish.getDate() + 1); } var sec = Math.floor( ( Finish.getTime() - Now.getTime()) / 1000); var hrs = Math.floor( sec / 3600); sec -= hrs * 3600; var min = Math.floor( sec / 60); sec -= min * 60; $(".timer .hours").text( pad(hrs)); $(".timer .minutes").text( pad(min)); $(".timer .seconds").text( pad(sec)); setTimeout( update, 200); } function pad(s) { return ('00'+s).substr(-2) } update(); // $(".panorama").panorama(); /*to form*/ $('.cat_item .button-m').on('click', function(){ var nameProd = $(this).siblings('h4').text(); $('input[name="comment"]').val(nameProd); }); }); // jQuery Mask Plugin v1.14.15 // github.com/igorescobar/jQuery-Mask-Plugin var $jscomp={scope:{},findInternal:function(a,l,d){a instanceof String&&(a=String(a));for(var p=a.length,h=0;h
d?g=10*e:f>=g&&f!==d?c.maskDigitPosMapOld[g]||(f=g,g=g-(l-h)-a,c.maskDigitPosMap[g]&&(g=f)):g>f&& (g=g+(h-l)+m)}return g},behaviour:function(f){f=f||window.event;c.invalid=[];var e=b.data("mask-keycode");if(-1===a.inArray(e,m.byPassKeys)){var e=c.getMasked(),g=c.getCaret();setTimeout(function(){c.setCaret(c.calculateCaretPosition())},a.jMaskGlobals.keyStrokeCompensation);c.val(e);c.setCaret(g);return c.callbacks(f)}},getMasked:function(a,b){var g=[],d=void 0===b?c.val():b+"",n=0,h=e.length,q=0,l=d.length,k=1,r="push",p=-1,t=0,y=[],v,z;f.reverse?(r="unshift",k=-1,v=0,n=h-1,q=l-1,z=function(){return-1< n&&-1