vendor: 23,187 bytes, lines 1-46
1/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */ 2(function(s,H,f,w){var K=f("html"),q=f(s),p=f(H),b=f.fancybox=function(){b.open.apply(this,arguments)},J=navigator.userAgent.match(/msie/i),C=null,t=H.createTouch!==w,u=function(a){return a&&a.hasOwnProperty&&a instanceof f},r=function(a){return a&&"string"===f.type(a)},F=function(a){return r(a)&&0<a.indexOf("%")},m=function(a,d){var e=parseInt(a,10)||0;d&&F(a)&&(e*=b.getViewport()[d]/100);return Math.ceil(e)},x=function(a,b){return m(a,b)+"px"};f.extend(b,{version:"2.1.5",defaults:{padding:15,margin:20, 3width:800,height:600,minWidth:100,minHeight:100,maxWidth:9999,maxHeight:9999,pixelRatio:1,autoSize:!0,autoHeight:!1,autoWidth:!1,autoResize:!0,autoCenter:!t,fitToView:!0,aspectRatio:!1,topRatio:0.5,leftRatio:0.5,scrolling:"auto",wrapCSS:"",arrows:!0,closeBtn:!0,closeClick:!1,nextClick:!1,mouseWheel:!0,autoPlay:!1,playSpeed:3E3,preload:3,modal:!1,loop:!0,ajax:{dataType:"html",headers:{"X-fancyBox":!0}},iframe:{scrolling:"auto",preload:!0},swf:{wmode:"transparent",allowfullscreen:"true",allowscriptaccess:"always"}, 4keys:{next:{13:"left",34:"up",39:"left",40:"up"},prev:{8:"right",33:"down",37:"right",38:"down"},close:[27],play:[32],toggle:[70]},direction:{next:"left",prev:"right"},scrollOutside:!0,index:0,type:null,href:null,content:null,title:null,tpl:{wrap:'<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',image:'<img class="fancybox-image" src="{href}" alt="" />',iframe:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen'+ 5(J?' allowtransparency="true"':"")+"></iframe>",error:'<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>',closeBtn:'<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>',next:'<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',prev:'<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'},openEffect:"fade",openSpeed:250,openEasing:"swing",openOpacity:!0, 6openMethod:"zoomIn",closeEffect:"fade",closeSpeed:250,closeEasing:"swing",closeOpacity:!0,closeMethod:"zoomOut",nextEffect:"elastic",nextSpeed:250,nextEasing:"swing",nextMethod:"changeIn",prevEffect:"elastic",prevSpeed:250,prevEasing:"swing",prevMethod:"changeOut",helpers:{overlay:!0,title:!0},onCancel:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeChange:f.noop,beforeClose:f.noop,afterClose:f.noop},group:{},opts:{},previous:null,coming:null,current:null,isActive:!1, 7isOpen:!1,isOpened:!1,wrap:null,skin:null,outer:null,inner:null,player:{timer:null,isActive:!1},ajaxLoad:null,imgPreload:null,transitions:{},helpers:{},open:function(a,d){if(a&&(f.isPlainObject(d)||(d={}),!1!==b.close(!0)))return f.isArray(a)||(a=u(a)?f(a).get():[a]),f.each(a,function(e,c){var l={},g,h,k,n,m;"object"===f.type(c)&&(c.nodeType&&(c=f(c)),u(c)?(l={href:c.data("fancybox-href")||c.attr("href"),title:f("<div/>").text(c.data("fancybox-title")||c.attr("title")).html(),isDom:!0,element:c}, 8f.metadata&&f.extend(!0,l,c.metadata())):l=c);g=d.href||l.href||(r(c)?c:null);h=d.title!==w?d.title:l.title||"";n=(k=d.content||l.content)?"html":d.type||l.type;!n&&l.isDom&&(n=c.data("fancybox-type"),n||(n=(n=c.prop("class").match(/fancybox\.(\w+)/))?n[1]:null));r(g)&&(n||(b.isImage(g)?n="image":b.isSWF(g)?n="swf":"#"===g.charAt(0)?n="inline":r(c)&&(n="html",k=c)),"ajax"===n&&(m=g.split(/\s+/,2),g=m.shift(),m=m.shift()));k||("inline"===n?g?k=f(r(g)?g.replace(/.*(?=#[^\s]+$)/,""):g):l.isDom&&(k=c): 9"html"===n?k=g:n||g||!l.isDom||(n="inline",k=c));f.extend(l,{href:g,type:n,content:k,title:h,selector:m});a[e]=l}),b.opts=f.extend(!0,{},b.defaults,d),d.keys!==w&&(b.opts.keys=d.keys?f.extend({},b.defaults.keys,d.keys):!1),b.group=a,b._start(b.opts.index)},cancel:function(){var a=b.coming;a&&!1===b.trigger("onCancel")||(b.hideLoading(),a&&(b.ajaxLoad&&b.ajaxLoad.abort(),b.ajaxLoad=null,b.imgPreload&&(b.imgPreload.onload=b.imgPreload.onerror=null),a.wrap&&a.wrap.stop(!0,!0).trigger("onReset").remove(), 10b.coming=null,b.current||b._afterZoomOut(a)))},close:function(a){b.cancel();!1!==b.trigger("beforeClose")&&(b.unbindEvents(),b.isActive&&(b.isOpen&&!0!==a?(b.isOpen=b.isOpened=!1,b.isClosing=!0,f(".fancybox-item, .fancybox-nav").remove(),b.wrap.stop(!0,!0).removeClass("fancybox-opened"),b.transitions[b.current.closeMethod]()):(f(".fancybox-wrap").stop(!0).trigger("onReset").remove(),b._afterZoomOut())))},play:function(a){var d=function(){clearTimeout(b.player.timer)},e=function(){d();b.current&&b.player.isActive&& 11(b.player.timer=setTimeout(b.next,b.current.playSpeed))},c=function(){d();p.unbind(".player");b.player.isActive=!1;b.trigger("onPlayEnd")};!0===a||!b.player.isActive&&!1!==a?b.current&&(b.current.loop||b.current.index<b.group.length-1)&&(b.player.isActive=!0,p.bind({"onCancel.player beforeClose.player":c,"onUpdate.player":e,"beforeLoad.player":d}),e(),b.trigger("onPlayStart")):c()},next:function(a){var d=b.current;d&&(r(a)||(a=d.direction.next),b.jumpto(d.index+1,a,"next"))},prev:function(a){var d= 12b.current;d&&(r(a)||(a=d.direction.prev),b.jumpto(d.index-1,a,"prev"))},jumpto:function(a,d,e){var c=b.current;c&&(a=m(a),b.direction=d||c.direction[a>=c.index?"next":"prev"],b.router=e||"jumpto",c.loop&&(0>a&&(a=c.group.length+a%c.group.length),a%=c.group.length),c.group[a]!==w&&(b.cancel(),b._start(a)))},reposition:function(a,d){var e=b.current,c=e?e.wrap:null,l;c&&(l=b._getPosition(d),a&&"scroll"===a.type?(delete l.position,c.stop(!0,!0).animate(l,200)):(c.css(l),e.pos=f.extend({},e.dim,l)))}, 13update:function(a){var d=a&&a.originalEvent&&a.originalEvent.type,e=!d||"orientationchange"===d;e&&(clearTimeout(C),C=null);b.isOpen&&!C&&(C=setTimeout(function(){var c=b.current;c&&!b.isClosing&&(b.wrap.removeClass("fancybox-tmp"),(e||"load"===d||"resize"===d&&c.autoResize)&&b._setDimension(),"scroll"===d&&c.canShrink||b.reposition(a),b.trigger("onUpdate"),C=null)},e&&!t?0:300))},toggle:function(a){b.isOpen&&(b.current.fitToView="boolean"===f.type(a)?a:!b.current.fitToView,t&&(b.wrap.removeAttr("style").addClass("fancybox-tmp"), 14b.trigger("onUpdate")),b.update())},hideLoading:function(){p.unbind(".loading");f("#fancybox-loading").remove()},showLoading:function(){var a,d;b.hideLoading();a=f('<div id="fancybox-loading"><div></div></div>').click(b.cancel).appendTo("body");p.bind("keydown.loading",function(a){27===(a.which||a.keyCode)&&(a.preventDefault(),b.cancel())});b.defaults.fixed||(d=b.getViewport(),a.css({position:"absolute",top:0.5*d.h+d.y,left:0.5*d.w+d.x}));b.trigger("onLoading")},getViewport:function(){var a=b.current&& 15b.current.locked||!1,d={x:q.scrollLeft(),y:q.scrollTop()};a&&a.length?(d.w=a[0].clientWidth,d.h=a[0].clientHeight):(d.w=t&&s.innerWidth?s.innerWidth:q.width(),d.h=t&&s.innerHeight?s.innerHeight:q.height());return d},unbindEvents:function(){b.wrap&&u(b.wrap)&&b.wrap.unbind(".fb");p.unbind(".fb");q.unbind(".fb")},bindEvents:function(){var a=b.current,d;a&&(q.bind("orientationchange.fb"+(t?"":" resize.fb")+(a.autoCenter&&!a.locked?" scroll.fb":""),b.update),(d=a.keys)&&p.bind("keydown.fb",function(e){var c= 16e.which||e.keyCode,l=e.target||e.srcElement;if(27===c&&b.coming)return!1;e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||l&&(l.type||f(l).is("[contenteditable]"))||f.each(d,function(d,l){if(1<a.group.length&&l[c]!==w)return b[d](l[c]),e.preventDefault(),!1;if(-1<f.inArray(c,l))return b[d](),e.preventDefault(),!1})}),f.fn.mousewheel&&a.mouseWheel&&b.wrap.bind("mousewheel.fb",function(d,c,l,g){for(var h=f(d.target||null),k=!1;h.length&&!(k||h.is(".fancybox-skin")||h.is(".fancybox-wrap"));)k=h[0]&&!(h[0].style.overflow&& 17"hidden"===h[0].style.overflow)&&(h[0].clientWidth&&h[0].scrollWidth>h[0].clientWidth||h[0].clientHeight&&h[0].scrollHeight>h[0].clientHeight),h=f(h).parent();0!==c&&!k&&1<b.group.length&&!a.canShrink&&(0<g||0<l?b.prev(0<g?"down":"left"):(0>g||0>l)&&b.next(0>g?"up":"right"),d.preventDefault())}))},trigger:function(a,d){var e,c=d||b.coming||b.current;if(c){f.isFunction(c[a])&&(e=c[a].apply(c,Array.prototype.slice.call(arguments,1)));if(!1===e)return!1;c.helpers&&f.each(c.helpers,function(d,e){if(e&& 18b.helpers[d]&&f.isFunction(b.helpers[d][a]))b.helpers[d][a](f.extend(!0,{},b.helpers[d].defaults,e),c)})}p.trigger(a)},isImage:function(a){return r(a)&&a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSWF:function(a){return r(a)&&a.match(/\.(swf)((\?|#).*)?$/i)},_start:function(a){var d={},e,c;a=m(a);e=b.group[a]||null;if(!e)return!1;d=f.extend(!0,{},b.opts,e);e=d.margin;c=d.padding;"number"===f.type(e)&&(d.margin=[e,e,e,e]);"number"===f.type(c)&&(d.padding=[c,c, 19c,c]);d.modal&&f.extend(!0,d,{closeBtn:!1,closeClick:!1,nextClick:!1,arrows:!1,mouseWheel:!1,keys:null,helpers:{overlay:{closeClick:!1}}});d.autoSize&&(d.autoWidth=d.autoHeight=!0);"auto"===d.width&&(d.autoWidth=!0);"auto"===d.height&&(d.autoHeight=!0);d.group=b.group;d.index=a;b.coming=d;if(!1===b.trigger("beforeLoad"))b.coming=null;else{c=d.type;e=d.href;if(!c)return b.coming=null,b.current&&b.router&&"jumpto"!==b.router?(b.current.index=a,b[b.router](b.direction)):!1;b.isActive=!0;if("image"=== 20c||"swf"===c)d.autoHeight=d.autoWidth=!1,d.scrolling="visible";"image"===c&&(d.aspectRatio=!0);"iframe"===c&&t&&(d.scrolling="scroll");d.wrap=f(d.tpl.wrap).addClass("fancybox-"+(t?"mobile":"desktop")+" fancybox-type-"+c+" fancybox-tmp "+d.wrapCSS).appendTo(d.parent||"body");f.extend(d,{skin:f(".fancybox-skin",d.wrap),outer:f(".fancybox-outer",d.wrap),inner:f(".fancybox-inner",d.wrap)});f.each(["Top","Right","Bottom","Left"],function(a,b){d.skin.css("padding"+b,x(d.padding[a]))});b.trigger("onReady"); 21if("inline"===c||"html"===c){if(!d.content||!d.content.length)return b._error("content")}else if(!e)return b._error("href");"image"===c?b._loadImage():"ajax"===c?b._loadAjax():"iframe"===c?b._loadIframe():b._afterLoad()}},_error:function(a){f.extend(b.coming,{type:"html",autoWidth:!0,autoHeight:!0,minWidth:0,minHeight:0,scrolling:"no",hasError:a,content:b.coming.tpl.error});b._afterLoad()},_loadImage:function(){var a=b.imgPreload=new Image;a.onload=function(){this.onload=this.onerror=null;b.coming.width= 22this.width/b.opts.pixelRatio;b.coming.height=this.height/b.opts.pixelRatio;b._afterLoad()};a.onerror=function(){this.onload=this.onerror=null;b._error("image")};a.src=b.coming.href;!0!==a.complete&&b.showLoading()},_loadAjax:function(){var a=b.coming;b.showLoading();b.ajaxLoad=f.ajax(f.extend({},a.ajax,{url:a.href,error:function(a,e){b.coming&&"abort"!==e?b._error("ajax",a):b.hideLoading()},success:function(d,e){"success"===e&&(a.content=d,b._afterLoad())}}))},_loadIframe:function(){var a=b.coming, 23d=f(a.tpl.iframe.replace(/\{rnd\}/g,(new Date).getTime())).attr("scrolling",t?"auto":a.iframe.scrolling).attr("src",a.href);f(a.wrap).bind("onReset",function(){try{f(this).find("iframe").hide().attr("src","//about:blank").end().empty()}catch(a){}});a.iframe.preload&&(b.showLoading(),d.one("load",function(){f(this).data("ready",1);t||f(this).bind("load.fb",b.update);f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show();b._afterLoad()}));a.content=d.appendTo(a.inner);a.iframe.preload|| 24b._afterLoad()},_preloadImages:function(){var a=b.group,d=b.current,e=a.length,c=d.preload?Math.min(d.preload,e-1):0,f,g;for(g=1;g<=c;g+=1)f=a[(d.index+g)%e],"image"===f.type&&f.href&&((new Image).src=f.href)},_afterLoad:function(){var a=b.coming,d=b.current,e,c,l,g,h;b.hideLoading();if(a&&!1!==b.isActive)if(!1===b.trigger("afterLoad",a,d))a.wrap.stop(!0).trigger("onReset").remove(),b.coming=null;else{d&&(b.trigger("beforeChange",d),d.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()); 25b.unbindEvents();e=a.content;c=a.type;l=a.scrolling;f.extend(b,{wrap:a.wrap,skin:a.skin,outer:a.outer,inner:a.inner,current:a,previous:d});g=a.href;switch(c){case "inline":case "ajax":case "html":a.selector?e=f("<div>").html(e).find(a.selector):u(e)&&(e.data("fancybox-placeholder")||e.data("fancybox-placeholder",f('<div class="fancybox-placeholder"></div>').insertAfter(e).hide()),e=e.show().detach(),a.wrap.bind("onReset",function(){f(this).find(e).length&&e.hide().replaceAll(e.data("fancybox-placeholder")).data("fancybox-placeholder", 26!1)}));break;case "image":e=a.tpl.image.replace(/\{href\}/g,g);break;case "swf":e='<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="'+g+'"></param>',h="",f.each(a.swf,function(a,b){e+='<param name="'+a+'" value="'+b+'"></param>';h+=" "+a+'="'+b+'"'}),e+='<embed src="'+g+'" type="application/x-shockwave-flash" width="100%" height="100%"'+h+"></embed></object>"}u(e)&&e.parent().is(a.inner)||a.inner.append(e);b.trigger("beforeShow"); 27a.inner.css("overflow","yes"===l?"scroll":"no"===l?"hidden":l);b._setDimension();b.reposition();b.isOpen=!1;b.coming=null;b.bindEvents();if(!b.isOpened)f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove();else if(d.prevMethod)b.transitions[d.prevMethod]();b.transitions[b.isOpened?a.nextMethod:a.openMethod]();b._preloadImages()}},_setDimension:function(){var a=b.getViewport(),d=0,e=!1,c=!1,e=b.wrap,l=b.skin,g=b.inner,h=b.current,c=h.width,k=h.height,n=h.minWidth,v=h.minHeight,p=h.maxWidth, 28q=h.maxHeight,t=h.scrolling,r=h.scrollOutside?h.scrollbarWidth:0,y=h.margin,z=m(y[1]+y[3]),s=m(y[0]+y[2]),w,A,u,D,B,G,C,E,I;e.add(l).add(g).width("auto").height("auto").removeClass("fancybox-tmp");y=m(l.outerWidth(!0)-l.width());w=m(l.outerHeight(!0)-l.height());A=z+y;u=s+w;D=F(c)?(a.w-A)*m(c)/100:c;B=F(k)?(a.h-u)*m(k)/100:k;if("iframe"===h.type){if(I=h.content,h.autoHeight&&1===I.data("ready"))try{I[0].contentWindow.document.location&&(g.width(D).height(9999),G=I.contents().find("body"),r&&G.css("overflow-x", 29"hidden"),B=G.outerHeight(!0))}catch(H){}}else if(h.autoWidth||h.autoHeight)g.addClass("fancybox-tmp"),h.autoWidth||g.width(D),h.autoHeight||g.height(B),h.autoWidth&&(D=g.width()),h.autoHeight&&(B=g.height()),g.removeClass("fancybox-tmp");c=m(D);k=m(B);E=D/B;n=m(F(n)?m(n,"w")-A:n);p=m(F(p)?m(p,"w")-A:p);v=m(F(v)?m(v,"h")-u:v);q=m(F(q)?m(q,"h")-u:q);G=p;C=q;h.fitToView&&(p=Math.min(a.w-A,p),q=Math.min(a.h-u,q));A=a.w-z;s=a.h-s;h.aspectRatio?(c>p&&(c=p,k=m(c/E)),k>q&&(k=q,c=m(k*E)),c<n&&(c=n,k=m(c/ 30E)),k<v&&(k=v,c=m(k*E))):(c=Math.max(n,Math.min(c,p)),h.autoHeight&&"iframe"!==h.type&&(g.width(c),k=g.height()),k=Math.max(v,Math.min(k,q)));if(h.fitToView)if(g.width(c).height(k),e.width(c+y),a=e.width(),z=e.height(),h.aspectRatio)for(;(a>A||z>s)&&c>n&&k>v&&!(19<d++);)k=Math.max(v,Math.min(q,k-10)),c=m(k*E),c<n&&(c=n,k=m(c/E)),c>p&&(c=p,k=m(c/E)),g.width(c).height(k),e.width(c+y),a=e.width(),z=e.height();else c=Math.max(n,Math.min(c,c-(a-A))),k=Math.max(v,Math.min(k,k-(z-s)));r&&"auto"===t&&k<B&& 31c+y+r<A&&(c+=r);g.width(c).height(k);e.width(c+y);a=e.width();z=e.height();e=(a>A||z>s)&&c>n&&k>v;c=h.aspectRatio?c<G&&k<C&&c<D&&k<B:(c<G||k<C)&&(c<D||k<B);f.extend(h,{dim:{width:x(a),height:x(z)},origWidth:D,origHeight:B,canShrink:e,canExpand:c,wPadding:y,hPadding:w,wrapSpace:z-l.outerHeight(!0),skinSpace:l.height()-k});!I&&h.autoHeight&&k>v&&k<q&&!c&&g.height("auto")},_getPosition:function(a){var d=b.current,e=b.getViewport(),c=d.margin,f=b.wrap.width()+c[1]+c[3],g=b.wrap.height()+c[0]+c[2],c={position:"absolute", 32top:c[0],left:c[3]};d.autoCenter&&d.fixed&&!a&&g<=e.h&&f<=e.w?c.position="fixed":d.locked||(c.top+=e.y,c.left+=e.x);c.top=x(Math.max(c.top,c.top+(e.h-g)*d.topRatio));c.left=x(Math.max(c.left,c.left+(e.w-f)*d.leftRatio));return c},_afterZoomIn:function(){var a=b.current;a&&((b.isOpen=b.isOpened=!0,b.wrap.css("overflow","visible").addClass("fancybox-opened"),b.update(),(a.closeClick||a.nextClick&&1<b.group.length)&&b.inner.css("cursor","pointer").bind("click.fb",function(d){f(d.target).is("a")||f(d.target).parent().is("a")|| 33(d.preventDefault(),b[a.closeClick?"close":"next"]())}),a.closeBtn&&f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb",function(a){a.preventDefault();b.close()}),a.arrows&&1<b.group.length&&((a.loop||0<a.index)&&f(a.tpl.prev).appendTo(b.outer).bind("click.fb",b.prev),(a.loop||a.index<b.group.length-1)&&f(a.tpl.next).appendTo(b.outer).bind("click.fb",b.next)),b.trigger("afterShow"),a.loop||a.index!==a.group.length-1)?b.opts.autoPlay&&!b.player.isActive&&(b.opts.autoPlay=!1,b.play(!0)):b.play(!1))}, 34_afterZoomOut:function(a){a=a||b.current;f(".fancybox-wrap").trigger("onReset").remove();f.extend(b,{group:{},opts:{},router:!1,current:null,isActive:!1,isOpened:!1,isOpen:!1,isClosing:!1,wrap:null,skin:null,outer:null,inner:null});b.trigger("afterClose",a)}});b.transitions={getOrigPosition:function(){var a=b.current,d=a.element,e=a.orig,c={},f=50,g=50,h=a.hPadding,k=a.wPadding,n=b.getViewport();!e&&a.isDom&&d.is(":visible")&&(e=d.find("img:first"),e.length||(e=d));u(e)?(c=e.offset(),e.is("img")&& 35(f=e.outerWidth(),g=e.outerHeight())):(c.top=n.y+(n.h-g)*a.topRatio,c.left=n.x+(n.w-f)*a.leftRatio);if("fixed"===b.wrap.css("position")||a.locked)c.top-=n.y,c.left-=n.x;return c={top:x(c.top-h*a.topRatio),left:x(c.left-k*a.leftRatio),width:x(f+k),height:x(g+h)}},step:function(a,d){var e,c,f=d.prop;c=b.current;var g=c.wrapSpace,h=c.skinSpace;if("width"===f||"height"===f)e=d.end===d.start?1:(a-d.start)/(d.end-d.start),b.isClosing&&(e=1-e),c="width"===f?c.wPadding:c.hPadding,c=a-c,b.skin[f](m("width"=== 36f?c:c-g*e)),b.inner[f](m("width"===f?c:c-g*e-h*e))},zoomIn:function(){var a=b.current,d=a.pos,e=a.openEffect,c="elastic"===e,l=f.extend({opacity:1},d);delete l.position;c?(d=this.getOrigPosition(),a.openOpacity&&(d.opacity=0.1)):"fade"===e&&(d.opacity=0.1);b.wrap.css(d).animate(l,{duration:"none"===e?0:a.openSpeed,easing:a.openEasing,step:c?this.step:null,complete:b._afterZoomIn})},zoomOut:function(){var a=b.current,d=a.closeEffect,e="elastic"===d,c={opacity:0.1};e&&(c=this.getOrigPosition(),a.closeOpacity&& 37(c.opacity=0.1));b.wrap.animate(c,{duration:"none"===d?0:a.closeSpeed,easing:a.closeEasing,step:e?this.step:null,complete:b._afterZoomOut})},changeIn:function(){var a=b.current,d=a.nextEffect,e=a.pos,c={opacity:1},f=b.direction,g;e.opacity=0.1;"elastic"===d&&(g="down"===f||"up"===f?"top":"left","down"===f||"right"===f?(e[g]=x(m(e[g])-200),c[g]="+=200px"):(e[g]=x(m(e[g])+200),c[g]="-=200px"));"none"===d?b._afterZoomIn():b.wrap.css(e).animate(c,{duration:a.nextSpeed,easing:a.nextEasing,complete:b._afterZoomIn})}, 38changeOut:function(){var a=b.previous,d=a.prevEffect,e={opacity:0.1},c=b.direction;"elastic"===d&&(e["down"===c||"up"===c?"top":"left"]=("up"===c||"left"===c?"-":"+")+"=200px");a.wrap.animate(e,{duration:"none"===d?0:a.prevSpeed,easing:a.prevEasing,complete:function(){f(this).trigger("onReset").remove()}})}};b.helpers.overlay={defaults:{closeClick:!0,speedOut:200,showEarly:!0,css:{},locked:!t,fixed:!0},overlay:null,fixed:!1,el:f("html"),create:function(a){var d;a=f.extend({},this.defaults,a);this.overlay&& 39this.close();d=b.coming?b.coming.parent:a.parent;this.overlay=f('<div class="fancybox-overlay"></div>').appendTo(d&&d.lenth?d:"body");this.fixed=!1;a.fixed&&b.defaults.fixed&&(this.overlay.addClass("fancybox-overlay-fixed"),this.fixed=!0)},open:function(a){var d=this;a=f.extend({},this.defaults,a);this.overlay?this.overlay.unbind(".overlay").width("auto").height("auto"):this.create(a);this.fixed||(q.bind("resize.overlay",f.proxy(this.update,this)),this.update());a.closeClick&&this.overlay.bind("click.overlay", 40function(a){if(f(a.target).hasClass("fancybox-overlay"))return b.isActive?b.close():d.close(),!1});this.overlay.css(a.css).show()},close:function(){q.unbind("resize.overlay");this.el.hasClass("fancybox-lock")&&(f(".fancybox-margin").removeClass("fancybox-margin"),this.el.removeClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));f(".fancybox-overlay").remove().hide();f.extend(this,{overlay:null,fixed:!1})},update:function(){var a="100%",b;this.overlay.width(a).height("100%"); 41J?(b=Math.max(H.documentElement.offsetWidth,H.body.offsetWidth),p.width()>b&&(a=p.width())):p.width()>q.width()&&(a=p.width());this.overlay.width(a).height(p.height())},onReady:function(a,b){var e=this.overlay;f(".fancybox-overlay").stop(!0,!0);e||this.create(a);a.locked&&this.fixed&&b.fixed&&(b.locked=this.overlay.append(b.wrap),b.fixed=!1);!0===a.showEarly&&this.beforeShow.apply(this,arguments)},beforeShow:function(a,b){b.locked&&!this.el.hasClass("fancybox-lock")&&(!1!==this.fixPosition&&f("*").filter(function(){return"fixed"=== 42f(this).css("position")&&!f(this).hasClass("fancybox-overlay")&&!f(this).hasClass("fancybox-wrap")}).addClass("fancybox-margin"),this.el.addClass("fancybox-margin"),this.scrollV=q.scrollTop(),this.scrollH=q.scrollLeft(),this.el.addClass("fancybox-lock"),q.scrollTop(this.scrollV).scrollLeft(this.scrollH));this.open(a)},onUpdate:function(){this.fixed||this.update()},afterClose:function(a){this.overlay&&!b.coming&&this.overlay.fadeOut(a.speedOut,f.proxy(this.close,this))}};b.helpers.title={defaults:{type:"float", 43position:"bottom"},beforeShow:function(a){var d=b.current,e=d.title,c=a.type;f.isFunction(e)&&(e=e.call(d.element,d));if(r(e)&&""!==f.trim(e)){d=f('<div class="fancybox-title fancybox-title-'+c+'-wrap">'+e+"</div>");switch(c){case "inside":c=b.skin;break;case "outside":c=b.wrap;break;case "over":c=b.inner;break;default:c=b.skin,d.appendTo("body"),J&&d.width(d.width()),d.wrapInner('<span class="child"></span>'),b.current.margin[2]+=Math.abs(m(d.css("margin-bottom")))}d["top"===a.position?"prependTo": 44"appendTo"](c)}}};f.fn.fancybox=function(a){var d,e=f(this),c=this.selector||"",l=function(g){var h=f(this).blur(),k=d,l,m;g.ctrlKey||g.altKey||g.shiftKey||g.metaKey||h.is(".fancybox-wrap")||(l=a.groupAttr||"data-fancybox-group",m=h.attr(l),m||(l="rel",m=h.get(0)[l]),m&&""!==m&&"nofollow"!==m&&(h=c.length?f(c):e,h=h.filter("["+l+'="'+m+'"]'),k=h.index(this)),a.index=k,!1!==b.open(h,a)&&g.preventDefault())};a=a||{};d=a.index||0;c&&!1!==a.live?p.undelegate(c,"click.fb-start").delegate(c+":not('.fancybox-item, .fancybox-nav')", 45"click.fb-start",l):e.unbind("click.fb-start").bind("click.fb-start",l);this.filter("[data-fancybox-start=1]").trigger("click");return this};p.ready(function(){var a,d;f.scrollbarWidth===w&&(f.scrollbarWidth=function(){var a=f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"),b=a.children(),b=b.innerWidth()-b.height(99).innerWidth();a.remove();return b});f.support.fixedPosition===w&&(f.support.fixedPosition=function(){var a=f('<div style="position:fixed;top:20px;"></div>').appendTo("body"), 46b=20===a[0].offsetTop||15===a[0].offsetTop;a.remove();return b}());f.extend(b.defaults,{scrollbarWidth:f.scrollbarWidth(),fixed:f.support.fixedPosition,parent:f("body")});a=f(s).width();K.addClass("fancybox-lock-test");d=f(s).width();K.removeClass("fancybox-lock-test");f("<style type='text/css'>.fancybox-margin{margin-right:"+(d-a)+"px;}</style>").appendTo("head")})})(window,document,jQuery);
vendor: 11,243 bytes, lines 46-47
46 47!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g--;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;d>c;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.settings.center&&(this.$stage.children(".center").removeClass("center"),this.$stage.children().eq(this.current()).addClass("center"))}}],e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var b,c,e;b=this.$element.find("img"),c=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,e=this.$element.children(c).width(),b.length&&0>=e&&this.preloadAutoWidthImages(b)}this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+' class="'+this.settings.stageClass+'"/>').wrap('<div class="'+this.settings.stageOuterClass+'"/>'),this.$element.append(this.$stage.parent()),this.replace(this.$element.children().not(this.$stage.parent())),this.$element.is(":visible")?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){b>=a&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};c>b;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return this._items.length?this._width===this.$element.width()?!1:this.$element.is(":visible")?(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized"))):!1:!1},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),this.settings.responsive!==!1&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var d=-1,e=30,f=this.width(),g=this.coordinates();return this.settings.freeDrag||a.each(g,a.proxy(function(a,h){return"left"===c&&b>h-e&&h+e>b?d=a:"right"===c&&b>h-f-e&&h-f+e>b?d=a+1:this.op(b,"<",h)&&this.op(b,">
47",g[a+1]||h-f)&&(d="left"===c?a+1:a),-1===d},this)),this.settings.loop||(this.op(b,">",g[this.minimum()])?d=b=this.minimum():this.op(b,"<",g[this.maximum()])&&(d=b=this.maximum())),d},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){a=this.normalize(a),a!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||1>c?a=d:(0>a||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){for(b=this._items.length,c=this._items[--b].width(),d=this.$element.width();b--&&(c+=this._items[b].width()+this.settings.margin,!(c>d)););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2===0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(0>e),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,d=((a-h)%g+g)%g+h,d!==a&&i>=d-e&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.$element.is(":visible")&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){return a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0))?!1:(this.leave("animating"),void this.trigger("translated"))},e.prototype.viewport=function(){var d;if(this.options.responsiveBaseElement!==b)d=a(this.options.responsiveBaseElement).width();else if(b.innerWidth)d=b.innerWidth;else{if(!c.documentElement||!c.documentElement.clientWidth)throw"Can not detect viewport width.";d=c.documentElement.clientWidth}return d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){a=this.normalize(a,!0),a!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()}
vendor: 3,748 bytes, line 47
47,this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),this.settings.responsive!==!1&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:c>a;case">":return d?c>a:a>c;case">=":return d?c>=a:a>=c;case"<=":return d?a>=c:c>=a}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}
vendor: 17,819 bytes, lines 47-48
47),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.$element.is(":visible"),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.$element.is(":visible")!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type))for(var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":"url("+g+")",opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"==a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.$stage.children().toArray().slice(b,c),e=[],f=0;a.each(d,function(b,c){e.push(a(c).height())}),f=Math.max.apply(null,e),this._core.$stage.parent().height(f).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?'style="width:'+c.width+"px;height:"+c.height+'px;"':"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(a){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?'<div class="owl-video-tn '+j+'" '+i+'="'+a+'"></div>':'<div class="owl-video-tn" style="opacity:1;background-image:url('+a+')"></div>',b.after(d),b.after(e)};return b.wrap('<div class="owl-video-wrapper"'+g+"></div>"),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length?(l(h.attr(i)),h.remove(),!1):void("youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}}))},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),"youtube"===f.type?c='<iframe width="'+g+'" height="'+h+'" src="//www.youtube.com/embed/'+f.id+"?autoplay=1&v="+f.id+'" frameborder="0" allowfullscreen></iframe>':"vimeo"===f.type?c='<iframe src="//player.vimeo.com/video/'+f.id+'?autoplay=1" width="'+g+'" height="'+h+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>':"vzaar"===f.type&&(c='<iframe frameborder="0"height="'+h+'"width="'+g+'" allowfullscreen mozallowfullscreen webkitAllowFullScreen src="//view.vzaar.com/'+f.id+'/player?autoplay=true"></iframe>'),a('<div class="owl-video-frame">'+c+"</div>").insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null); 48},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._timeout=null,this._paused=!1,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype.play=function(a,b){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._setAutoPlayInterval())},e.prototype._getNextTimeout=function(d,e){return this._timeout&&b.clearTimeout(this._timeout),b.setTimeout(a.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||c.hidden||this._core.next(e||this._core.settings.autoplaySpeed)},this),d||this._core.settings.autoplayTimeout)},e.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout()},e.prototype.stop=function(){this._core.is("rotating")&&(b.clearTimeout(this._timeout),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a("<div>").addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","div",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;e>a;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):0>b&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;
48b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){return g[b]!==d?(e=c?b:!0,!1):void 0}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document); 49 50$(document).ready(function(){ 51 $('.opensearch').click(function(e){ 52 e.preventDefault(); 53 $(this).toggleClass('open'); 54 $('.searchopen').slideToggle(); 55 $('body , html').animate({scrollTop:0} , 500); 56 }); 57 58 59 /* MOBILE */ 60 /* 61 $('.burger').click(function(){ 62 $(this).toggleClass('open'); 63 $('.mobmenu').fadeToggle(); 64 }); 65 66 $('.mob_m a').click(function(e){ 67 if($(this).next('ul').length > 0){ 68 e.preventDefault(); 69 $(this).toggleClass('active').next().slideToggle(); 70 } 71 }); 72 */ 73 /* MOBILE */ 74 75 76 /* POPUP */ 77 $('.popup_wrap_old form').submit(function(e){ 78 e.preventDefault(); 79 $(this).remove(); 80 }); 81 82 $('.openmodal').click(function(e){ 83 e.preventDefault(); 84 var id = $(this).attr('href'); 85 $('.popup_wrap form').show(); 86 $('.popup_wrap .success').hide(); 87 $('.popup_wrap').hide(); 88 $(id).fadeIn(); 89 }); 90 91 92 $('.closebut , .closef').click(function(){ 93 $('.popup_wrap').fadeOut(); 94 }); 95 96 $('.popup_wrap').click(function(e){ 97 if($(e.target).closest('.wrap').length == 0){ 98 $(this).fadeOut(); 99 } 100 }); 101 102 $('.login_title a').click(function(e){ 103 e.preventDefault(); 104 var ind = $(this).parent().index(); 105 $('.login_title li').removeClass('active').eq(ind).addClass('active'); 106 $('.login_body .l_block').removeClass('active').eq(ind).addClass('active'); 107 }); 108 /* POPUP */ 109 110 111 /* SCROLL */ 112 $(window).scroll(function(){ 113 if($(this).scrollTop() > 600){ 114 $('#gotop').fadeIn(); 115 }else{ 116 $('#gotop').fadeOut(); 117 } 118 if($(this).scrollTop() > 0 && $(window).width() < 768){ 119 $('.mainheader .header').addClass('bg'); 120 }else{ 121 $('.mainheader .header').removeClass('bg'); 122 } 123 }); 124 125 $('.scroll_b').click(function(e){ 126 e.preventDefault();
127 var top = $($(this).attr('href')).offset().top; 128 $('body , html').animate({scrollTop:top} , 1000); 129 }); 130 131 $('#gotop').click(function(){ 132 $('body , html').animate({scrollTop:0} , 1000); 133 }); 134 /* SCROLL */ 135 136 137 /* INPUT */ 138 var phones = [{ "mask": "+7 (###) ###-##-##"}, { "mask": "+7 (###) ###-##-#"}]; 139 $('input[type="tel"], input.input_js').inputmask({ 140 mask: phones, 141 greedy: false, 142 definitions: { '#': { validator: "[0-9]", cardinality: 1}} 143 }); 144 /* INPUT */ 145 146 147 $('.header__mob').click(function(){ 148 $(this).find('div').toggleClass('open'); 149 $('.header').toggleClass('open'); 150 $('.mobmenu').fadeToggle(); 151 if($('.header').css('position') == 'relative'){ 152 $('.header').css('position', 'fixed'); 153 } else { 154 if(!($('.header').hasClass('active_main_page'))){ 155 $('.header').css('position', 'relative'); 156 } 157 } 158 }); 159 160 $('.js-openSearch').click(function(e){ 161 e.preventDefault(); 162 $('.header').toggleClass('searchHeader'); 163 }) 164 165 $('.menuBlock__menu a').hover(function(e){ 166 var ind = $(this).data('val'); 167 $('.menuBlock__right-block').removeClass('active'); 168 $('.menuBlock' + ind).addClass('active'); 169 }); 170 171 $('.header__link a').click(function(e){ 172 e.preventDefault(); 173 var ind = $(this).index(); 174 if($(this).hasClass('active')){ 175 $('.header__link a').removeClass('active'); 176 $('.menuBlock').hide(); 177 $('.header').removeClass('active'); 178 return false; 179 } 180 $('.header').addClass('active'); 181 $('.header__link a').removeClass('active').eq(ind).addClass('active'); 182 $('.menuBlock').hide().eq(ind).show(); 183 }); 184 185 $('.mobmenu__menu a').click(function(e){ 186 if($(this).next('ul').length > 0){ 187 $(this).toggleClass('active').next().slideToggle(); 188 } 189 }) 190 191 $(document).click(function(e){ 192 if($(e.target).closest('.menuBlock , .header__link a').length == 0){ 193 $('.header__link a').removeClass('active'); 194 $('.menuBlock').hide(); 195 } 196 }); 197 198 199 200 $(window).scroll(function(){ 201 if($(this).scrollTop() > 0 && $(window).width() < 992){ 202 $('.header').addClass('active'); 203 }else{ 204 $('.header').removeClass('active'); 205 } 206 }); 207 208 /* SLIDER */ 209 $('.marquee').marquee({ 210 duration: 100000, 211 startVisible: true, 212 duplicated: true 213 }); 214 215 $('.main__line-remove').click(function(){ 216 $('.main__line').remove(); 217 }); 218 219 if($(window).width() > 767){ 220 $('.main__more').mousemove(function(e){ 221 var x = e.offsetX; 222 var y = e.offsetY; 223 224 $(this).prev().css({ 225 'display' : 'flex', 226 'top' : y - 60, 227 'left': x - 60 228 }); 229 }); 230 231 $('.main__more').mouseout(function(e){ 232 $(this).prev().hide(); 233 }); 234 } 235 236 $('.mainSlider').owlCarousel({ 237 items:1, 238 loop: true, 239 nav: false, 240 dots: false, 241 }); 242 243 $('.productsSlider').owlCarousel({ 244 items:5, 245 margin:20, 246 loop: true, 247 autoplay: true, 248 autoplayTimeout: 10000, 249 autoplaySpeed: 10000, 250 slideTransition: 'linear', 251 nav: false, 252 dots: false, 253 touchDrag:false, 254 mouseDrag:false, 255 responsive:{ 256 0:{ 257 items:1, 258 stagePadding:0, 259 autoplayTimeout: 5000, 260 autoplaySpeed: 5000, 261 margin:20 262 }, 263 767:{ 264 items:5, 265 } 266 } 267 }); 268 /* SLIDER */ 269 270 271 $('.fancybox-effects-a').fancybox({ 272 closeBtn : true, 273 padding:5, 274 }); 275 276}); 277 278 279$(document).ready(function(){ 280 281 // ФилÑÑÑ Ð² каÑалоге 282 if ( $(window).width() <= '767' ) { 283 $('.js-sort-mobile').hide(); 284 } 285 $('.js-block-filter-button').on('click', function() { 286 $('.js-sort-mobile').toggle(); 287 }); 288 289 // ÐоказÑÐ²Ð°ÐµÑ Ð¼Ð¾Ð´Ð°Ð»ÐºÑ ÑеÑез 15 Ñек 290 //setTimeout(function() { 291 //$('.promo-modal-hide').fadeIn(); 292 //document.cookie = "promo=1"; 293 //}, 15000); 294 295 296/* бонÑÑнÑе каÑÑÑ */ 297 $('.js-bonuscard-ef-add').on('click', function(event) { 298 event.preventDefault(); 299 event.stopPropagation(); 300 301 // ÐаннÑе Ð´Ð»Ñ Ð¾ÑпÑавки 302 var bonuscardNuber = $('input[name=f_bonuscard_ef_number]').val(); 303 var bonuscardCode = $('input[name=bonuscard_ef_code]').val(); 304 305 $.ajax({
306 url: "?isNaked=1&nc_ctpl=255&bonuscardNuber=" + bonuscardNuber + '&bonuscardCode=' + bonuscardCode, 307 type: "POST", 308 dataType: "json", 309 success: function(data) { 310 nc_netchop_cart_update(); 311 312 console.log(data); 313 314 if ( 'state' in data ) { 315 var cls = 'bonuscard-ef-message'; 316 if (data.state == 'error') { 317 cls += ' bonuscard-ef-message_error'; 318 $('input[name=f_bonuscard_ef_number_v]').val(0); 319 } else if (data.state == 'ok') { 320 cls += ' bonuscard-ef-message_ok'; 321 $('input[name=f_bonuscard_ef_number_v]').val(data.balance); 322 } 323 $('.js-bonuscard_ef_message').html( "<p class='"+ cls +"'>" + data.message + "</p>" ); 324 } else { 325 console.log("ÐÑоизоÑла оÑибка в бонÑÑной каÑÑе."); 326 } 327 } 328 }); 329 }); 330 331 $('.js-giftpromo-add').on('click', function(event) { 332 event.preventDefault(); 333 event.stopPropagation(); 334 335 //console.log(123); 336 337 var promo = $('input[name=f_coupon_add]').val(); 338 //console.log(promo); 339 340 $.ajax({
341 url: "?isNaked=1&nc_ctpl=253&promo=" + promo, 342 type: "POST", 343 dataType: "json", 344 success: function(data) { 345 nc_netchop_cart_update(); 346 347 //console.log(data); 348 349 //jsonData = $.parseJSON(data); 350 351 if ( 'message' in data ) { 352 $('.js-coup-mess').html( "<p>" + data.message + "</p>" ); 353 if ( data.state == 'ok' ) { 354 $('.js-coup-mess').removeClass('coup-mess_error'); 355 $('.js-coup-mess').addClass('coup-mess_ok'); 356 } else { 357 $('.js-coup-mess').removeClass('coup-mess_ok'); 358 $('.js-coup-mess').addClass('coup-mess_error'); 359 } 360 } 361 362 } 363 }); 364 365 //console.log( $('input[name=f_coupon_add]').val() ); 366 }); 367 368 $('.sort__block-title').click(function(){ 369 if($(this).hasClass('active')){ 370 $('.sort__block-title').removeClass('active').next().hide(); 371 $('.catalog__wrap').removeClass('bg'); 372 }else{ 373 $('.sort__block-title').removeClass('active').next().hide(); 374 $('.catalog__wrap').addClass('bg'); 375 $(this).addClass('active').next().show(); 376 } 377 }); 378 379 $(document).click(function(e){ 380 if($(e.target).closest('.sort__block').length == 0){ 381 $('.sort__block-title').removeClass('active').next().hide(); 382 $('.catalog__wrap').removeClass('bg'); 383 } 384 }); 385 386 $('.sort__block .checkbox input').change(function(){ 387 var ind = 0 388 $(this).parents('.sort__block-body').find('input').each(function(){ 389 if($(this).prop('checked')){ 390 ind = ind + 1; 391 } 392 }); 393 $(this).parents('.sort__block').find('.sort__block-title span').text('('+ ind +')') 394 }); 395 396 $('.lk__menu a').click(function(e){ 397 var ind = $(this).parent().index(); 398 var block = $('.lk__body-block'); 399 if(block.eq(ind).length > 0){ 400 e.preventDefault(); 401 $('.lk__menu li').removeClass('active').eq(ind).addClass('active'); 402 block.removeClass('active').eq(ind).addClass('active'); 403 } 404 }); 405 406 $('.lk__order-block-title').click(function(e){ 407 $(this).find('.lk__order-block-title-link').toggleClass('active'); 408 $(this).next().slideToggle(); 409 }); 410 411 $(".slider").owlCarousel({ 412 items:1, 413 loop:true, 414 nav:true, 415 dots:true, 416 autoplay:true, 417 autoplayTimeout:6000, 418 }); 419 420 $('.slider .sitebutton').hover(function(){ 421 $(".slider").trigger('stop.owl.autoplay'); 422 },function(){ 423 $(".slider").trigger('stop.owl.autoplay'); 424 $(".slider").trigger('play.owl.autoplay',[5000]); 425 }); 426 427 /* 428 $(".detail__leftslider-nav .owl-carousel").owlCarousel({ 429 items: 4, 430 loop: false, 431 mouseDrag: true, 432 touchDrag: true, 433 margin: 0, 434 nav: false, 435 dots: false 436 }); 437 */ 438 439 $('.detailslider').owlCarousel({ 440 items : 1, 441 margin: 30, 442 loop:true, 443 dots:true, 444 nav:false, 445 }); 446 447 $('.detail__leftslider-nav > div').click(function(){ 448 var ind = $(this).index(); 449 $('.detailslider .owl-dots div').eq(ind).click(); 450 }); 451 452 $('.detailslider').on('changed.owl.carousel', function(event) { 453 $('.detail__leftslider-nav > div').removeClass('active').eq(event.page.index).addClass('active'); 454 }); 455 456 $(".seeslider").owlCarousel({ 457 items : 1, 458 margin:30, 459 loop:true, 460 dots:false, 461 nav:true, 462 responsive:{ 463 0:{ 464 items:1, 465 }, 466 767:{ 467 items:2, 468 }, 469 991:{ 470 items:3, 471 }, 472 1280:{ 473 items:4, 474 } 475 } 476 }); 477 478 $('.detail__tab-block-title').click(function(e){
479 e.preventDefault(); 480 $(this).toggleClass('open').next().slideToggle(); 481 }); 482 483 $('form.que_form').append('<input type="hidden" name="sf" value="1" />'); 484 $('.sendform').submit(function() { 485 var form=$(this); 486 var errors = validateForm(form); 487 if (!errors) { 488 $.ajax({ 489 url: "/netcat/add.php?isNaked=1", 490 type: "POST", 491 data: $(this).serialize(), 492 success: function(data) { 493 form.hide(); 494 form.siblings('.success').show(); 495 form.trigger('reset'); 496 } 497 }); 498 } else { 499 form.addClass('novalid'); 500 } 501 return false; 502 }); 503 504 $(document).on('change keyup input click', '.que_form input', function(e) { 505 var form = $(this).parents('form'); 506 if (form.hasClass('novalid')) { 507 validateForm(form); 508 } 509 }); 510 511 $(document).on('click', '.js-order-outstock', function(e) { 512 var id = $('.js-item-name').attr('data-id'), 513 name = $('.js-item-name').html(); 514 $('#order textarea[name="f_Text"]').val(name); 515 $('#order input[name="f_Item_ID"]').val(id); 516 }); 517 518 $(document).on('click', '.js-hint_gift', function(e) { 519 var id = $('.js-item-name').attr('data-id'); 520 $('#podarok input[name="f_Item_ID"]').val(id); 521 }); 522 523 524 525 526 527 // Shop 528 529 530 531 /** 532 * ÐбÑабоÑÑик оÑвеÑа на запÑÐ¾Ñ Ð½Ð° добавление ÑоваÑа в коÑÐ·Ð¸Ð½Ñ 533 */ 534 function processCartResponse(response) { 535 // Ðбновим блок «ÐоÑзина» на ÑÑÑаниÑе 536 var totalItems = response.TotalItemCount; 537 var cartHtml = totalItems 538 ? 'РкоÑзине ' + 539 '<span class="tpl-property-amount">' + totalItems + ' ' + pluralForm(totalItems, 'ÑоваÑ', 'ÑоваÑа', 'ÑоваÑов') + '</span>' + 540 '<br>на ÑÑÐ¼Ð¼Ñ <span class="tpl-property-totals">' + response.TotalItemPriceF + '</span>' 541 : 'ÐаÑа коÑзина пÑÑÑа'; 542 543 $('.tpl-cart-summary').html(cartHtml); 544 545 546 $('.detail__amount-wrap').html(''); 547 $('.detail .tpl-link-cart-add').replaceWith('<a class="sitebutton maxbut js-incart" href="/cart/">в коÑзине</a>'); 548 549 // СообÑÐµÐ½Ð¸Ñ Ð¾ невозможноÑÑи добавиÑÑ Ð²ÑбÑанное колиÑеÑÑво ÑоваÑа в коÑÐ·Ð¸Ð½Ñ 550 if (response.QuantityNotifications) { 551 // ÐбÑабоÑка ÑÐ°ÐºÐ¸Ñ ÑообÑений не показана в ÑÑом пÑимеÑе Ð´Ð»Ñ ÐºÑаÑкоÑÑи 552 } 553 554 } 555 556 /** 557 * ÐбÑабоÑÑик оÑибки запÑоÑа на добавление ÑоваÑа в коÑÐ·Ð¸Ð½Ñ 558 */ 559 function processCartError() { 560 alert('Ðе ÑдалоÑÑ Ð´Ð¾Ð±Ð°Ð²Ð¸ÑÑ ÑÐ¾Ð²Ð°Ñ Ð² коÑзинÑ'); 561 } 562 563 /** 564 * Склонение ÑÑÑÑÐºÐ¸Ñ Ñлов 565 * @param {Number} itemQuantity ÐолиÑеÑÑво ÑоваÑов 566 * @param {String} one «ÑоваÑ» 567 * @param {String} two «ÑоваÑа» 568 * @param {String} many «ÑоваÑов» 569 * @returns {String} 570 */ 571 function pluralForm(itemQuantity, one, two, many) { 572 itemQuantity = Math.abs(itemQuantity) % 100; 573 var underHundred = itemQuantity % 10, 574 result = many; 575 576 if (underHundred > 1 && underHundred < 5) { result = two; } 577 if (underHundred == 1) { result = one; } 578 if (itemQuantity > 10 && itemQuantity < 20) { result = many; } 579 580 return result; 581 } 582 583 /** 584 * ÐниÑиализаÑÐ¸Ñ ÐºÐ½Ð¾Ð¿Ð¾Ðº «ÐоложиÑÑ Ð² коÑзинÑ» (пÑедполагаеÑÑÑ, ÑÑо Ñ ÑÐ°ÐºÐ¸Ñ 585 * кнопок еÑÑÑ CSS-клаÑÑ .tpl-link-cart-add). 586 */ 587 $(document).on('click', '.tpl-link-cart-add', function (e) { 588 var form = $(e.target).closest('form'); 589 $.ajax({
590 type: 'post', 591 url: form.attr('action'), 592 data: form.serialize() + "&json=1", 593 dataType: 'json', 594 success: function (response) { 595 processCartResponse(response); 596 }, 597 error: function (response) { 598 processCartError; 599 } 600 }); 601 return false; 602 }); 603 604 605 606 $(document).on('click', '.js-goodPlus', function (e) { 607 e.preventDefault(); 608 var input = $(this).parent().find('.js-goodCount'), 609 count = parseInt(input.val()), 610 max = parseInt(input.attr('data-max')); 611 count=count+1; 612 if (max && count > max) count=max; 613 input.val(count); 614 if ($(this).hasClass('js-goodUpdate')) { 615 nc_netchop_cart_update(); 616 } 617 }); 618 619 $(document).on('click', '.js-goodMinus', function (e) { 620 e.preventDefault(); 621 var input = $(this).parent().find('.js-goodCount'), 622 count = parseInt(input.val()); 623 if (count > 1) { 624 input.val(count - 1); 625 } else { 626 input.val('1'); 627 } 628 if ($(this).hasClass('js-goodUpdate')) { 629 nc_netchop_cart_update(); 630 } 631 }); 632 633 $(document).on('click, change, keyup, input', '.js-goodCount', function (e) { 634 e.preventDefault(); 635 var count = parseInt($(this).val()), 636 max = parseInt($(this).attr('data-max')); 637 count=count+1; 638 if (max && count > max) count=max; 639 $(this).val(count); 640 if ($(this).hasClass('js-goodUpdate')) { 641 nc_netchop_cart_update(); 642 } 643 }); 644 645 $(document).on('change', '.js-fav_toggle input', function (e) { 646 let item = $(this).parent(); 647 let del = 0; 648 if (item.hasClass('delfav')) { 649 del = 1; 650 } 651 652 $.ajax({
653 type: 'POST', 654 cache: false, 655 url: item.attr('data-url'), 656 success: function (data) { 657 if (del) { 658 item.closest('.js-item').remove(); 659 } 660 } 661 }); 662 }); 663 664 $('.cart__del').on('click', function(e){ 665 e.preventDefault(); 666 var form = $('.js-cart-stage'); 667 var self = $(this).closest('.js-cart-item'); 668 var status = self.find('.js-cart-item-status'); 669 var itemId = self.data('item_id'); // ÐолÑÑаем ID ÑоваÑа 670 var itemName = self.find('.cart__info-title').text().trim(); 671 var itemPrice = parseFloat(self.find('.js-cart-item-sum').text()) || 0; 672 var itemBrand = self.find('.cart__info-right').data('brand') || "ÐеизвеÑÑно"; 673 $.post(form.data('action'), $(this).attr('data-name') + "=0&json=1",function(response){ 674 //self.addClass('deleted') 675 //status.val(1); 676 self.remove(); 677 nc_netshop_cart_update_total( response ) 678 nc_event_dispatch('ncNetshopCartUpdate',{ 679 cart:response 680 }); 681 }, 'json'); 682 console.log(11111); 683 window.dataLayer.push({ 684 'ecommerce': { 685 'currencyCode': 'RUB', 686 'remove': { 687 'products': [{ 688 "id": itemId.split(":")[1], 689 "name": itemName, 690 "price": itemPrice, 691 "brand": itemBrand, 692 "quantity": 1 693 }] 694 } 695 } 696 }); 697 }) 698 699 $('.cart__clear a').on('click', function(e){ 700 e.preventDefault(); 701 $.post('/netcat/modules/netshop/actions/cart.php', "cart_clear=1&json=1",function(response){ 702 $('.cart__wrapper').remove(); 703 nc_netshop_cart_update_total( response ) 704 nc_event_dispatch('ncNetshopCartUpdate',{ 705 cart:response 706 }); 707 }, 'json'); 708 location.reload(); 709 710 }); 711 712 $(document).on('click, change, keyup, input', '#js-input-bonus', function (e) { 713 var count = parseInt($(this).val()), 714 max = parseInt($(this).attr('data-max')); 715 if (max && count > max) count=max; 716 if (!count || count < 0 ) count=0; 717 $(this).val(count); 718 itogCost(); 719 }); 720 721 722 var filter = $('#js-filter'); 723 724 filter.on('change', function() { 725 var params = $(this).serialize(), 726 path = $(this).attr('action'); 727 $.ajax({
728 type: 'GET', 729 data: params, 730 url: path+'?isNaked=1', 731 success: function (data) { 732 history.pushState(null, null, window.location.pathname + '?' + params); 733 $('#js-ajax-container').html(data); 734 } 735 }); 736 }); 737 738 $('.js-order').on('click', 'label', function() { 739 let order = $(this).find('input').val(); 740 $('#filter-order').val(order); 741 filter.trigger('change'); 742 }); 743 744 /*if ($('#city').length) { 745 $('#city').autocomplete({ 746 source: function (request, response) { 747 $.ajax({ 748 url: 'https://api.cdek.ru/city/getListByTerm/jsonp.php?callback=?', 749 dataType: 'jsonp', 750 data: { 751 q: function () { 752 return $('#city').val() 753 }, 754 name_startsWith: function () { 755 return $('#city').val() 756 } 757 }, 758 success: function (data) { 759 response($.map(data.geonames, function (item) { 760 return { 761 label: item.name, 762 value: item.name, 763 id: item.id 764 } 765 })); 766 } 767 }); 768 }, 769 minLength: 1, 770 select: function (event, ui) { 771 $(this).val(ui.item.value.split(",")[0].trim()); 772 $('#receiverCityId').val(ui.item.id); 773 $('#receiverCityName').val(ui.item.value); 774 $('input[name="rec_city"]').val(ui.item.id); 775 $('#city').removeClass('error_v'); 776 widjet.city.set(ui.item.id); 777 778 $.ajax({
779 url: '/netcat/modules/default/action/delivery.php?city=' + ui.item.value, 780 success: function (data) { 781 if(data.indexOf('ÐÑи ÑаÑÑеÑе ÑÑоимоÑÑи доÑÑавки пÑоизоÑла оÑибка') !== -1) { 782 $(".sitebutton.maxbut").prop("disabled", true); 783 } else { 784 $(".sitebutton.maxbut").prop("disabled", false); 785 } 786 $('#sdek_var_dost').html(data); 787 var cost = $('input[name=delivery_variant_id]:checked').attr('data-cost'); 788 $('.delmet2').attr('data-cost', cost); 789 itogCost(); 790 } 791 }); 792 } 793 }); 794 itogCost(); 795 }*/ 796 797 $('.js-repeat-order').on('click', function(e){ 798 e.preventDefault(); 799 $(this).siblings('form').trigger('submit'); 800 }); 801 802 803 804 805}); 806 807deliveryIn(); 808$(document).on('click', '.order__delivery label', deliveryIn); 809 810function deliveryIn () { 811 812 var value = parseInt($('input[name=f_DeliveryMethod]:checked').val()); 813 console.log('delivery type ' + value); 814 if (value == 1) { 815 felivery9(false); 816 $('.js-delivery').show(); 817 $('.js-delivery-2').hide(); 818 $('.js-delivery-4').hide(); 819 $('.js-delivery-3').show(); 820 $('.dostmore').hide(); 821 822 $('.js-delivery input').attr("required", false); 823 $('input[name="f_Address"]').attr("required", true); 824 825 } 826 if ( value == 9 || value == 10) { 827 felivery9(true); 828 $('.js-delivery-1').hide(); 829 $('.js-delivery-2').hide(); 830 $('.js-delivery-3').hide(); 831 $('.js-delivery-4').show(); 832 } 833 if (value == 2) { 834 felivery9(false); 835 var cost = $('input[name=delivery_variant_id]:checked').attr('data-cost'); 836 // вÑзÑваем ÑобÑÑие change, ÑÑÐ¾Ð±Ñ Ð¿Ð¾ÐºÐ°Ð·Ð°ÑÑ/ÑкÑÑÑÑ Ð¿Ð¾Ð»Ñ Ð²Ð²Ð¾Ð´Ð° адÑеÑа 837 $('.delmet2').attr('data-cost', cost); 838 839 $('[name="delivery_variant_id"]').attr("required", "required"); 840 841 if($('input[name=delivery_variant_id]:checked').data("tarif") == 137) { 842 $('.js-delivery').show(); 843 $('.js-delivery-2').show(); 844 $('.js-delivery-3').show(); 845 $('.js-delivery-4').hide(); 846 } else { 847 $('.js-delivery').hide(); 848 $('.js-delivery-2').hide(); 849 $('.js-delivery-3').hide(); 850 $('.js-delivery-4').hide(); 851 } 852 853 $('.dostmore').show(); 854 855 $('.js-delivery input').attr("required", false); 856 $('input[name="f_City"]').attr("required", true); 857 $('input[name="f_Address"]').attr("required", true); 858 859 // ÐÑовеÑиÑÑ ÑÑÑо вÑбÑан Ñ Ð¾ÑÑ Ð±Ñ Ð¾Ð´Ñн из Ñпопобов СÐÐÐÐ 860 //$('#sdek_var_dost label').eq(0).trigger('click'); 861 var cost = $('input[name=delivery_variant_id]:checked').attr('data-cost'); 862 $('.delmet2').attr('data-cost', cost); 863 itogCost(); 864 865 } else { 866 $('[name="delivery_variant_id"]').removeAttr("required", "required"); 867 } 868 if (value == 4) { 869 felivery9(false); 870 $('.js-delivery').hide(); 871 $('.dostmore').hide(); 872 $('.js-delivery input').attr("required", false); 873 } 874 itogCost(); 875} 876 877function felivery9 (active) { 878 if (active) { 879 $('.js-delivery input').attr("required", false); 880 881 $('.js-delivery-4 #city2').attr("required", true); 882 $('.js-delivery-4 #street').attr("required", true); 883 $('.js-delivery-4 #house').attr("required", true); 884 $('.js-delivery-4 #flat').attr("required", true); 885 } else { 886 $('.js-delivery-4 #city2').attr("required", false); 887 $('.js-delivery-4 #street').attr("required", false); 888 $('.js-delivery-4 #house').attr("required", false); 889 $('.js-delivery-4 #flat').attr("required", false); 890 } 891} 892 893$(document).on("change", "[name='delivery_variant_id']", function(e) { 894 if($(this).data("tarif") == 137) { 895 $('.js-delivery').show(); 896 $('.js-delivery-2').show(); 897 $('.js-delivery-3').show(); 898 $(".choosepvz.pvz136").text("ÐÑбÑаÑÑ Ð¿ÑÐ½ÐºÑ Ð²ÑдаÑи"); 899 } else { 900 $("#city").val(''); 901 $("input[name='f_Address']").val(''); 902 $('.js-delivery').hide(); 903 $('.js-delivery-2').hide(); 904 $('.js-delivery-3').hide(); 905 } 906}) 907 908$(document).on('click', '#sdek_var_dost label', function() { 909 var cost = $('input[name=delivery_variant_id]:checked').attr('data-cost'); 910 $('.delmet2').attr('data-cost', cost); 911 itogCost(); 912}); 913 914$(document).on('click', '.js-buy-sert', function(e) { 915 e.preventDefault(); 916 $('#sertMsgID').val(parseInt($(this).attr('data-id'))); 917 $('#item_id').val(parseInt($(this).attr('data-id'))); 918 $('#sertif').fadeIn(); 919}); 920 921function nc_netshop_init_variant_selector(g) { 922 var a = $.extend({}, {
923 updated_regions: ".tpl-variable-part", 924 selector: "[data-role='variant-selector']", 925 page_title: "title", 926 request_params: "&isNaked=1", 927 cache: false, 928 replace_location: !0, 929 on_update: $.noop 930 }, g); 931 if ("string" == typeof a.on_update) a.on_update = new Function("updated_regions", a.on_update); 932 var h = function (b) { 933 var b = $("<div/>").append(b), 934 c = $(a.updated_regions), 935 d = b.find(a.updated_regions); 936 c.each(function (a, b) { 937 $(b).replaceWith(d.eq(a)) 938 }); 939 if (a.page_title && (b = b.find(a.page_title).text(), 940 b.length)) document.title = b; 941 e(); 942 a.on_update(d) 943 }, 944 i = function (b) { 945 if (nc_netshop_variant_cache[b]) return $.Deferred().resolveWith(window, [nc_netshop_variant_cache[b]]).promise(); 946 var c = b + (-1 == b.indexOf("?") ? "?" : "&") + "request_type=get_variant"; 947 a.request_params && (c += a.request_params); 948 c = $.get(c); 949 a.cache && c.done(function (a) { 950 nc_netshop_variant_cache[b] = a 951 }); 952 return c 953 }, 954 f = function (b) { 955 var c = $(this); 956 if (c = c.attr("href") || c.find("option:selected").attr("value") || c.val()) a.replace_location && window.history.pushState && 957 window.history.replaceState(null, null, c), i(c).done(h); 958 b.preventDefault() 959 }, 960 e = function () { 961 $("select" + a.selector + ", *" + a.selector + " select, *" + a.selector + " input:radio").off(".netshop_variants").on("change.netshop_variants", f); 962 $("*" + a.selector + " a").off(".netshop_variants").on("click.netshop_variants", f) 963 }; 964 e() 965} 966if (!window.nc_netshop_variant_cache) var nc_netshop_variant_cache = {}; 967 968 969 970 971 972 973 974 975 976 977function nc_netchop_cart_update(){ 978 979 $('.js-cart-item:not(.hidden)').each(function(){ 980 var self = $(this) 981 //var id = self.data('item_id'); 982 var id = self.data('item_id'); 983 var form = self.closest('.js-cart-stage'); 984 var quantity = self.find('.js-cart-item-quanity-input'); 985 var price = self.find('.js-cart-item-price-input') 986 var sumField = self.find('.js-cart-item-sum'); 987 var sumInput = self.find('.js-cart-item-sum-input'); 988 if( !self.hasClass('deleted') ) { 989 $.post(form.data('action'), quantity.attr('name') + '=' + quantity.val() + '&json=1', function (response) { 990 sumField.html(response.Items[id].TotalPrice); 991 nc_netshop_cart_update_total(response) 992 nc_event_dispatch('ncNetshopCartUpdate', { 993 cart: response, 994 modal: (response.QuantityNotifications ? true : false) 995 }); 996 }, 'json'); 997 } 998 }) 999 1000} 1001function nc_netshop_cart_update_total( data ){ 1002 $('.js-cart-item-sumTotal').html( data.TotalItemPriceF ).attr('data-cost', data.TotalItemPrice) 1003 $('.js-items-count').html(data.TotalItemCount); 1004 $('input[name=i_gory_bleyt]').val(data.TotalItemOriginalPrice); 1005 1006 /*if ( data.TotalItemDiscountSum > 0 ) { 1007 $('.js-coupon-result').html( data.TotalItemDiscountSum + " Ð ." ); 1008 // updateInfoCart(data); 1009 $('.dfas-wrapper').removeClass('dfas-h'); 1010 } else { 1011 $('.dfas-wrapper').addClass('dfas-h'); 1012 }*/ 1013 1014 updateInfoCart(data); 1015 itogCost(); 1016} 1017 1018 1019function itogCost() { 1020 1021 deliveryCost(); 1022 1023 //var dost_cost = parseInt($('input[name=f_DeliveryMethod]:checked').attr('data-cost')); 1024 // ÐоÑÑавка не Ð¿Ð¾Ð¿Ð°Ð´Ð°ÐµÑ Ð¿Ð¾Ð´ ÑаÑÑеÑÑ Ñо Ñкидкой 1025 // Ðобавили новÑÑ Ð¿ÐµÑеменнÑÑ ÑÑÐ¾Ð±Ñ Ð½Ðµ ÑломаÑÑ 1026 var dost_cost2beta = 0; 1027 var dost_cost = deliveryCost(); 1028 var tovar_cost = parseInt($('.order__minblock .js-cart-item-sumTotal').attr('data-cost'));
1029 var bonus = parseInt($('#js-input-bonus').val()); 1030 var bonuscard = parseInt( $('input[name=f_bonuscard_ef_number_v]').val() ); 1031 if (!bonus) bonus = 0; 1032 if (!bonuscard) bonuscard = 0; 1033 1034 console.log("bonus, bonuscard: ", bonus, bonuscard); 1035 1036 // ÐÑим вÑе ÑоваÑÑ Ñ sale 1 1037 let saleItems = $('.js-cart-item-sum[data-item-sale=1]'); 1038 let notSaleItems = $('.js-cart-item-sum[data-item-sale=0]'); 1039 let priceSaleItems = 0; 1040 let priceNotSaleItems = 0; 1041 for(let i = 0; i < saleItems.length; i++) { 1042 priceSaleItems += parseFloat( $(saleItems[i]).html() ); 1043 } 1044 for(let i = 0; i < notSaleItems.length; i++) { 1045 priceNotSaleItems += parseFloat( $(notSaleItems[i]).html() ); 1046 } 1047 if (bonus > priceNotSaleItems) { 1048 bonus = priceNotSaleItems; 1049 } 1050 1051 var total_cost = 0; 1052 var resHTML = 0; 1053 1054 if (bonus && bonuscard) { 1055 if ( (bonuscard + bonus) >= (dost_cost2beta + tovar_cost ) ) { 1056 resHTML = (bonuscard + bonus) - (dost_cost2beta + tovar_cost ); 1057 resHTML = resHTML ? (dost_cost2beta + tovar_cost ) - 1 : (bonuscard + bonus); 1058 1059 total_cost = 1; 1060 console.log('bonuscard + bonus 1'); 1061 $('.js-discount-result').html( resHTML + ' Ð .' ); 1062 $('.js-discount-result').closest('.js-dfas-wrapper').addClass( 'show' ); 1063 } else { 1064 resHTML = (bonuscard + bonus) - (dost_cost2beta + tovar_cost ); 1065 resHTML = resHTML ? (bonuscard + bonus) : (dost_cost2beta + tovar_cost ) - 1; 1066 1067 total_cost = dost_cost2beta + tovar_cost - (bonuscard + bonus); 1068 console.log('(bonuscard + bonus) ÑÑиÑаем'); 1069 $('.js-discount-result').html( resHTML + ' Ð .' ); 1070 $('.js-discount-result').closest('.js-dfas-wrapper').addClass( 'show' ); 1071 } 1072 } else if (bonuscard) { 1073 if ( bonuscard >= (dost_cost2beta + tovar_cost) ) { 1074 console.log('bonuscard 1'); 1075 total_cost = 1; 1076 $('.js-discount-result').html( ((dost_cost2beta + tovar_cost) - 1) + ' Ð .'); 1077 $('.js-discount-result').closest('.js-dfas-wrapper').addClass( 'show' ); 1078 } else { 1079 console.log('bonuscard 2'); 1080 total_cost = dost_cost2beta + tovar_cost - bonuscard; 1081 $('.js-discount-result').html( bonuscard + ' Ð .'); 1082 $('.js-discount-result').closest('.js-dfas-wrapper').addClass( 'show' ); 1083 } 1084 } else if (bonus) { 1085 if ( bonus >= (dost_cost2beta + tovar_cost) ) { 1086 total_cost = 1; 1087 $('.js-discount-result').html( ((dost_cost2beta + tovar_cost) - 1) + ' Ð .'); 1088 $('.js-discount-result').closest('.js-dfas-wrapper').addClass( 'show' ); 1089 } else { 1090 total_cost = dost_cost2beta + tovar_cost - bonus; 1091 $('.js-discount-result').html( bonus + ' Ð .'); 1092 $('.js-discount-result').closest('.js-dfas-wrapper').addClass( 'show' ); 1093 } 1094 } else { 1095 console.log('last else'); 1096 total_cost = dost_cost2beta + tovar_cost - bonus; 1097 $('.js-discount-result').closest('.js-dfas-wrapper').removeClass( 'show' ); 1098 } 1099 1100 1101 $('#f-del-cost').val(dost_cost2beta); 1102 1103 1104 // setTimeout(function(){ 1105 1106 var isSdek = $('.order__delivery .radioblock .delmet9').is(':checked'); 1107 // var totalPr = +$('.js-cart-item-sumTotal').data('cost'); 1108 var totalPr = +total_cost; 1109 var sdekSale = +$('.is-del-sdek').data('delsdek'); 1110 1111 if(isSdek && (sdekSale > 0) && (totalPr >= sdekSale) && (+dost_cost > 0)){ // доÑÑавка Ñдек беÑплаÑно Ð¾Ñ ÑÑÐ¼Ð¼Ñ .... 1112 $('.js-delivery-summ').html('<s>'+dost_cost+' Ð .</s> 0'); 1113 updateInfoCart({cart_sum: (total_cost) + ' Ð .'}); 1114 } else { 1115 $('.js-delivery-summ').html(dost_cost + ' Ð .'); 1116 updateInfoCart({cart_sum: (dost_cost + total_cost) + ' Ð .'}); 1117 } 1118 1119 // }, 100) 1120 1121 //$('#js-bonus').html(bonus); 1122 //$('.js-js-bonus').html(bonus); 1123 1124 1125 //$('.js-total-summ').html(total_cost + ' Ð .'); 1126} 1127 1128// Ñоздал Ð´Ð»Ñ ÑдобÑÑва 1129// ÐбновлÑÐµÑ Ð´Ð°Ð½Ð½Ñе в коÑзине 1130// но не вÑе! 1131/*
1132 discount - ÑиналÑÐ½Ð°Ñ Ñкидка(ÑÑиÑÑÐ²Ð°Ñ Ð²Ñе возможнÑе Ñкидки) 1133*/ 1134function updateInfoCart(data) { 1135 1136 console.log( 'updateInfoCart', data); 1137 1138 if (data.cart_discount_sum) { 1139 $('.js-discount-result').closest('.js-dfas-wrapper').addClass( 'show' ); 1140 $('.js-discount-result').html( data.TotalItemDiscountSumF ); 1141 } else { 1142 $('.js-discount-result').closest('.js-dfas-wrapper').removeClass( 'show' ); 1143 $('.js-discount-result').html( '' ); 1144 } 1145 1146 // ÐÑÐ¾Ð³Ð¾Ð²Ð°Ñ ÑÑмма коÑÐ·Ð¸Ð½Ñ 1147 $('.js-total-summ').html( data.cart_sum ); 1148 1149 console.log("ÐаннÑе в коÑзине обновили"); 1150} 1151 1152 1153function deliveryCost() { 1154 var tovar_cost = parseInt($('.order__minblock .js-cart-item-sumTotal').attr('data-cost')); 1155 var cost_input = $('input[name=f_DeliveryMethod]:checked'), 1156 dost_cost = parseInt(cost_input.attr('data-cost')); 1157 if (cost_input.val() == 1 && free_delivery_courier > 0 && tovar_cost >= free_delivery_courier) { 1158 dost_cost = 0; 1159 } 1160 if ( (cost_input.val() == 2) && free_delivery_sdek > 0 && tovar_cost >= free_delivery_sdek) { // || cost_input.val() == 9 1161 dost_cost = 0; 1162 $('.sdek-cost-info').html('0'); 1163 } else if(cost_input.val() == 9) { 1164 if($('.price-dost')[0]) { 1165 dost_cost = +$('.price-dost').val(); 1166 } else { 1167 dost_cost = parseInt(cost_input.attr('data-cost')); 1168 } 1169 } else { 1170 $('.sdek-cost-info').each(function() { 1171 $(this).html($(this).attr('data-cost')); 1172 }); 1173 } 1174 return dost_cost; 1175} 1176 1177 1178function validateForm(form) { 1179 var errors = 0; 1180 var ph = form.find('input[name="Policy"]'); 1181 $('form input').removeClass('error'); 1182 form.find(".validate").each(function() { 1183 var val = $(this).val(); 1184 $(this).removeClass('error'); 1185 if (val) { 1186 if ($(this).hasClass('requir')) { 1187 $(this).removeClass('error'); 1188 } 1189 if ($(this).attr('type') == 'tel') { 1190 digits = val.replace(/\D+/g, ''); 1191 if (digits.length > 10) { 1192 $(this).removeClass('error'); 1193 } else { 1194 $(this).addClass('error'); 1195 errors++; 1196 } 1197 } 1198 } 1199 if (!val && $(this).hasClass('requir')) { 1200 $(this).addClass('error'); 1201 errors++; 1202 } 1203 }); 1204 if (ph.prop('checked')) { 1205 ph.siblings("span").removeClass('error'); 1206 } else { 1207 ph.siblings("span").addClass('error'); 1208 errors++; 1209 } 1210 return errors; 1211} 1212 1213 1214 1215function appendByLink(_this, to) { 1216 // get url 1217 var url = $(_this).attr('data-url'); 1218 var href = $(_this).attr('href'); 1219 if (!url) { 1220 url = href; 1221 } 1222 $('.pagination').remove(); 1223 window.history.pushState(null, document.title, url); 1224 $.ajax({
1225 type: "GET", 1226 url: url, 1227 success: function (data, textStatus, jqXHR) { 1228 $.each(to, function (key, value) { 1229 $(value).append($(value, data).unwrap().html()); 1230 }); 1231 }, 1232 }).done(function (data) { 1233 1234 }); 1235} 1236 1237
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.