1// fancybox wow adaptivetoggle dialogred zakazonline options/script.js news upononline 2 3// ÐÑайÑ-лиÑÑ 4document.addEventListener('DOMContentLoaded', function () { 5 $(document).on('click', '.mod_uslugi .locshow .head', function () { 6 var parent1 = $(this).parent(); 7 if (!parent1.hasClass('on')) { 8 parent1.addClass('on'); 9 parent1.find('.cont').slideDown(300); 10 } else { 11 parent1.removeClass('on'); 12 parent1.find('.cont').slideUp(100); 13 } 14 }); 15 16 $(document).on('click', '.uslugi_locshow2_head', function () { 17 var parent1 = $(this).parent(); 18 if (!parent1.hasClass('hide')) { 19 parent1.addClass('hide'); 20 parent1.find('.uslugi_locshow2_cont').slideUp(300); 21 } else { 22 parent1.removeClass('hide'); 23 parent1.find('.uslugi_locshow2_cont').slideDown(150); 24 } 25 }); 26 27 $(document).on('click', '.uslugi__direct_pricelist_locshow_head', function () { 28 var parent1 = $(this).parent(); 29 if (!parent1.hasClass('hide')) { 30 parent1.addClass('hide'); 31 parent1.find('.uslugi__direct_pricelist_locshow_cont').slideUp(300); 32 } else { 33 parent1.removeClass('hide'); 34 parent1.find('.uslugi__direct_pricelist_locshow_cont').slideDown(150); 35 } 36 }); 37}); 38 39// fancybox 40! function (t, e, n, o) { 41 "use strict"; 42 43 function i(t, e) { 44 var o, i, a, s = [], 45 r = 0; 46 t && t.isDefaultPrevented() || (t.preventDefault(), e = e || {}, t && t.data && (e = h(t.data.options, e)), o = e.$target || n(t.currentTarget).trigger("blur"), (a = n.fancybox.getInstance()) && a.$trigger && a.$trigger.is(o) || (e.selector ? s = n(e.selector) : (i = o.attr("data-fancybox") || "", i ? (s = t.data ? t.data.items : [], s = s.length ? s.filter('[data-fancybox="' + i + '"]') : n('[data-fancybox="' + i + '"]')) : s = [o]), r = n(s).index(o), r < 0 && (r = 0), a = n.fancybox.open(s, e, r), a.$trigger = o)) 47 } 48 if (t.console = t.console || { 49 info: function (t) {} 50 }, n) { 51 if (n.fn.fancybox) return void console.info("fancyBox already initialized"); 52 var a = { 53 closeExisting: !1, 54 loop: !1, 55 gutter: 50, 56 keyboard: !0, 57 preventCaptionOverlap: !0, 58 arrows: !0, 59 infobar: !0, 60 smallBtn: "auto", 61 toolbar: "auto", 62 buttons: ["zoom", "slideShow", "thumbs", "close"], 63 idleTime: 3, 64 protect: !1, 65 modal: !1, 66 image: { 67 preload: !1 68 }, 69 ajax: { 70 settings: { 71 data: { 72 fancybox: !0 73 } 74 } 75 }, 76 iframe: { 77 tpl: '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>', 78 preload: !0, 79 css: {}, 80 attr: { 81 scrolling: "auto" 82 } 83 }, 84 video: { 85 tpl: '<video class="fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>', 86 format: "", 87 autoStart: !0 88 }, 89 defaultType: "image", 90 animationEffect: "zoom", 91 animationDuration: 366, 92 zoomOpacity: "auto", 93 transitionEffect: "fade", 94 transitionDuration: 366, 95 slideClass: "", 96 baseClass: "", 97 baseTpl: '<div class="fancybox-container" role="dialog" tabindex="-1"><div class="fancybox-bg"></div><div class="fancybox-inner"><div class="fancybox-infobar"><span data-fancybox-index></span> / <span data-fancybox-count></span></div><div class="fancybox-toolbar">{{buttons}}</div><div class="fancybox-navigation">{{arrows}}</div><div class="fancybox-stage"></div><div class="fancybox-caption"><div class="fancybox-caption__body"></div></div></div></div>', 98 spinnerTpl: '<div class="fancybox-loading"></div>', 99 errorTpl: '<div class="fancybox-error"><p>{{ERROR}}</p></div>', 100 btnTpl: { 101 download: '<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
vendor: 86,180 bytes, lines 101-1336
101<path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>', 102 zoom: '<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>', 103 close: '<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>', 104 arrowLeft: '<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>', 105 arrowRight: '<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>', 106 smallBtn: '<button type="button" data-fancybox-close class="fancybox-button fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>' 107 }, 108 parentEl: "body", 109 hideScrollbar: !0, 110 autoFocus: !0, 111 backFocus: !0, 112 trapFocus: !0, 113 fullScreen: { 114 autoStart: !1 115 }, 116 touch: { 117 vertical: !0, 118 momentum: !0 119 }, 120 hash: null, 121 media: {}, 122 slideShow: { 123 autoStart: !1, 124 speed: 3e3 125 }, 126 thumbs: { 127 autoStart: !1, 128 hideOnClose: !0, 129 parentEl: ".fancybox-container", 130 axis: "y" 131 }, 132 wheel: "auto", 133 onInit: n.noop, 134 beforeLoad: n.noop, 135 afterLoad: n.noop, 136 beforeShow: n.noop, 137 afterShow: n.noop, 138 beforeClose: n.noop, 139 afterClose: n.noop, 140 onActivate: n.noop, 141 onDeactivate: n.noop, 142 clickContent: function (t, e) { 143 return "image" === t.type && "zoom" 144 }, 145 clickSlide: "close", 146 clickOutside: "close", 147 dblclickContent: !1, 148 dblclickSlide: !1, 149 dblclickOutside: !1, 150 mobile: { 151 preventCaptionOverlap: !1, 152 idleTime: !1, 153 clickContent: function (t, e) { 154 return "image" === t.type && "toggleControls" 155 }, 156 clickSlide: function (t, e) { 157 return "image" === t.type ? "toggleControls" : "close" 158 }, 159 dblclickContent: function (t, e) { 160 return "image" === t.type && "zoom" 161 }, 162 dblclickSlide: function (t, e) { 163 return "image" === t.type && "zoom" 164 } 165 }, 166 lang: "en", 167 i18n: { 168 en: { 169 CLOSE: "Close", 170 NEXT: "Next", 171 PREV: "Previous", 172 ERROR: "The requested content cannot be loaded. <br/> Please try again later.", 173 PLAY_START: "Start slideshow", 174 PLAY_STOP: "Pause slideshow", 175 FULL_SCREEN: "Full screen", 176 THUMBS: "Thumbnails", 177 DOWNLOAD: "Download", 178 SHARE: "Share", 179 ZOOM: "Zoom" 180 }, 181 de: { 182 CLOSE: "Schließen", 183 NEXT: "Weiter", 184 PREV: "Zurück", 185 ERROR: "Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es später nochmal.", 186 PLAY_START: "Diaschau starten", 187 PLAY_STOP: "Diaschau beenden", 188 FULL_SCREEN: "Vollbild", 189 THUMBS: "Vorschaubilder", 190 DOWNLOAD: "Herunterladen", 191 SHARE: "Teilen", 192 ZOOM: "Vergrößern" 193 } 194 } 195 }, 196 s = n(t), 197 r = n(e), 198 c = 0, 199 l = function (t) { 200 return t && t.hasOwnProperty && t instanceof n 201 }, 202 d = function () { 203 return t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.oRequestAnimationFrame || function (e) { 204 return t.setTimeout(e, 1e3 / 60) 205 } 206 }(), 207 u = function () { 208 return t.cancelAnimationFrame || t.webkitCancelAnimationFrame || t.mozCancelAnimationFrame || t.oCancelAnimationFrame || function (e) { 209 t.clearTimeout(e) 210 } 211 }(), 212 f = function () { 213 var t, n = e.createElement("fakeelement"), 214 o = { 215 transition: "transitionend", 216 OTransition: "oTransitionEnd", 217 MozTransition: "transitionend", 218 WebkitTransition: "webkitTransitionEnd" 219 }; 220 for (t in o) 221 if (void 0 !== n.style[t]) return o[t]; 222 return "transitionend" 223 }(), 224 p = function (t) { 225 return t && t.length && t[0].offsetHeight 226 }, 227 h = function (t, e) { 228 var o = n.extend(!0, {}, t, e); 229 return n.each(e, function (t, e) { 230 n.isArray(e) && (o[t] = e) 231 }), o 232 }, 233 g = function (t) { 234 var o, i; 235 return !(!t || t.ownerDocument !== e) && (n(".fancybox-container").css("pointer-events", "none"), o = { 236 x: t.getBoundingClientRect().left + t.offsetWidth / 2, 237 y: t.getBoundingClientRect().top + t.offsetHeight / 2 238 }, i = e.elementFromPoint(o.x, o.y) === t, n(".fancybox-container").css("pointer-events", ""), i) 239 }, 240 b = function (t, e, o) { 241 var i = this; 242 i.opts = h({ 243 index: o 244 }, n.fancybox.defaults), n.isPlainObject(e) && (i.opts = h(i.opts, e)), n.fancybox.isMobile && (i.opts = h(i.opts, i.opts.mobile)), i.id = i.opts.id || ++c, i.currIndex = parseInt(i.opts.index, 10) || 0, i.prevIndex = null, i.prevPos = null, i.currPos = 0, i.firstRun = !0, i.group = [], i.slides = {}, i.addContent(t), i.group.length && i.init() 245 }; 246 n.extend(b.prototype, { 247 init: function () { 248 var o, i, a = this, 249 s = a.group[a.currIndex], 250 r = s.opts; 251 r.closeExisting && n.fancybox.close(!0), n("body").addClass("fancybox-active"), !n.fancybox.getInstance() && !1 !== r.hideScrollbar && !n.fancybox.isMobile && e.body.scrollHeight > t.innerHeight && (n("head").append('<style id="fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:' + (t.innerWidth - e.documentElement.clientWidth) + "px;}</style>"), n("body").addClass("compensate-for-scrollbar")), i = "", n.each(r.buttons, function (t, e) { 252 i += r.btnTpl[e] || "" 253 }), o = n(a.translate(a, r.baseTpl.replace("{{buttons}}", i).replace("{{arrows}}", r.btnTpl.arrowLeft + r.btnTpl.arrowRight))).attr("id", "fancybox-container-" + a.id).addClass(r.baseClass).data("FancyBox", a).appendTo(r.parentEl), a.$refs = { 254 container: o 255 }, ["bg", "inner", "infobar", "toolbar", "stage", "caption", "navigation"].forEach(function (t) { 256 a.$refs[t] = o.find(".fancybox-" + t) 257 }), a.trigger("onInit"), a.activate(), a.jumpTo(a.currIndex) 258 }, 259 translate: function (t, e) { 260 var n = t.opts.i18n[t.opts.lang] || t.opts.i18n.en; 261 return e.replace(/\{\{(\w+)\}\}/g, function (t, e) { 262 return void 0 === n[e] ? t : n[e] 263 }) 264 }, 265 addContent: function (t) { 266 var e, o = this, 267 i = n.makeArray(t); 268 n.each(i, function (t, e) { 269 var i, a, s, r, c, l = {}, 270 d = {}; 271 n.isPlainObject(e) ? (l = e, d = e.opts || e) : "object" === n.type(e) && n(e).length ? (i = n(e), d = i.data() || {}, d = n.extend(!0, {}, d, d.options), d.$orig = i, l.src = o.opts.src || d.src || i.attr("href"), l.type || l.src || (l.type = "inline", l.src = e)) : l = { 272 type: "html", 273 src: e + "" 274 }, l.opts = n.extend(!0, {}, o.opts, d), n.isArray(d.buttons) && (l.opts.buttons = d.buttons), n.fancybox.isMobile && l.opts.mobile && (l.opts = h(l.opts, l.opts.mobile)), a = l.type || l.opts.type, r = l.src || "", !a && r && ((s = r.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i)) ? (a = "video", l.opts.video.format || (l.opts.video.format = "video/" + ("ogv" === s[1] ? "ogg" : s[1]))) : r.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i) ? a = "image" : r.match(/\.(pdf)((\?|#).*)?$/i) ? (a = "iframe", l = n.extend(!0, l, { 275 contentType: "pdf", 276 opts: { 277 iframe: { 278 preload: !1 279 } 280 } 281 })) : "#" === r.charAt(0) && (a = "inline")), a ? l.type = a : o.trigger("objectNeedsType", l), l.contentType || (l.contentType = n.inArray(l.type, ["html", "inline", "ajax"]) > -1 ? "html" : l.type), l.index = o.group.length, "auto" == l.opts.smallBtn && (l.opts.smallBtn = n.inArray(l.type, ["html", "inline", "ajax"]) > -1), "auto" === l.opts.toolbar && (l.opts.toolbar = !l.opts.smallBtn), l.$thumb = l.opts.$thumb || null, l.opts.$trigger && l.index === o.opts.index && (l.$thumb = l.opts.$trigger.find("img:first"), l.$thumb.length && (l.opts.$orig = l.opts.$trigger)), l.$thumb && l.$thumb.length || !l.opts.$orig || (l.$thumb = l.opts.$orig.find("img:first")), l.$thumb && !l.$thumb.length && (l.$thumb = null), l.thumb = l.opts.thumb || (l.$thumb ? l.$thumb[0].src : null), "function" === n.type(l.opts.caption) && (l.opts.caption = l.opts.caption.apply(e, [o, l])), "function" === n.type(o.opts.caption) && (l.opts.caption = o.opts.caption.apply(e, [o, l])), l.opts.caption instanceof n || (l.opts.caption = void 0 === l.opts.caption ? "" : l.opts.caption + ""), "ajax" === l.type && (c = r.split(/\s+/, 2), c.length > 1 && (l.src = c.shift(), l.opts.filter = c.shift())), l.opts.modal && (l.opts = n.extend(!0, l.opts, { 282 trapFocus: !0, 283 infobar: 0, 284 toolbar: 0, 285 smallBtn: 0, 286 keyboard: 0, 287 slideShow: 0, 288 fullScreen: 0, 289 thumbs: 0, 290 touch: 0, 291 clickContent: !1, 292 clickSlide: !1, 293 clickOutside: !1, 294 dblclickContent: !1, 295 dblclickSlide: !1, 296 dblclickOutside: !1 297 })), o.group.push(l) 298 }), Object.keys(o.slides).length && (o.updateControls(), (e = o.Thumbs) && e.isActive && (e.create(), e.focus())) 299 }, 300 addEvents: function () { 301 var e = this; 302 e.removeEvents(), e.$refs.container.on("click.fb-close", "[data-fancybox-close]", function (t) { 303 t.stopPropagation(), t.preventDefault(), e.close(t) 304 }).on("touchstart.fb-prev click.fb-prev", "[data-fancybox-prev]", function (t) { 305 t.stopPropagation(), t.preventDefault(), e.previous() 306 }).on("touchstart.fb-next click.fb-next", "[data-fancybox-next]", function (t) { 307 t.stopPropagation(), t.preventDefault(), e.next() 308 }).on("click.fb", "[data-fancybox-zoom]", function (t) { 309 e[e.isScaledDown() ? "scaleToActual" : "scaleToFit"]() 310 }), s.on("orientationchange.fb resize.fb", function (t) { 311 t && t.originalEvent && "resize" === t.originalEvent.type ? (e.requestId && u(e.requestId), e.requestId = d(function () { 312 e.update(t) 313 })) : (e.current && "iframe" === e.current.type && e.$refs.stage.hide(), setTimeout(function () { 314 e.$refs.stage.show(), e.update(t) 315 }, n.fancybox.isMobile ? 600 : 250)) 316 }), r.on("keydown.fb", function (t) { 317 var o = n.fancybox ? n.fancybox.getInstance() : null, 318 i = o.current, 319 a = t.keyCode || t.which; 320 if (9 == a) return void(i.opts.trapFocus && e.focus(t)); 321 if (!(!i.opts.keyboard || t.ctrlKey || t.altKey || t.shiftKey || n(t.target).is("input,textarea,video,audio,select"))) return 8 === a || 27 === a ? (t.preventDefault(), void e.close(t)) : 37 === a || 38 === a ? (t.preventDefault(), void e.previous()) : 39 === a || 40 === a ? (t.preventDefault(), void e.next()) : void e.trigger("afterKeydown", t, a) 322 }), e.group[e.currIndex].opts.idleTime && (e.idleSecondsCounter = 0, r.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle", function (t) { 323 e.idleSecondsCounter = 0, e.isIdle && e.showControls(), e.isIdle = !1 324 }), e.idleInterval = t.setInterval(function () { 325 ++e.idleSecondsCounter >= e.group[e.currIndex].opts.idleTime && !e.isDragging && (e.isIdle = !0, e.idleSecondsCounter = 0, e.hideControls()) 326 }, 1e3)) 327 }, 328 removeEvents: function () { 329 var e = this; 330 s.off("orientationchange.fb resize.fb"), r.off("keydown.fb .fb-idle"), this.$refs.container.off(".fb-close .fb-prev .fb-next"), e.idleInterval && (t.clearInterval(e.idleInterval), e.idleInterval = null) 331 }, 332 previous: function (t) { 333 return this.jumpTo(this.currPos - 1, t) 334 }, 335 next: function (t) { 336 return this.jumpTo(this.currPos + 1, t) 337 }, 338 jumpTo: function (t, e) { 339 var o, i, a, s, r, c, l, d, u, f = this, 340 h = f.group.length; 341 if (!(f.isDragging || f.isClosing || f.isAnimating && f.firstRun)) { 342 if (t = parseInt(t, 10), !(a = f.current ? f.current.opts.loop : f.opts.loop) && (t < 0 || t >= h)) return !1; 343 if (o = f.firstRun = !Object.keys(f.slides).length, r = f.current, f.prevIndex = f.currIndex, f.prevPos = f.currPos, s = f.createSlide(t), h > 1 && ((a || s.index < h - 1) && f.createSlide(t + 1), (a || s.index > 0) && f.createSlide(t - 1)), f.current = s, f.currIndex = s.index, f.currPos = s.pos, f.trigger("beforeShow", o), f.updateControls(), s.forcedDuration = void 0, n.isNumeric(e) ? s.forcedDuration = e : e = s.opts[o ? "animationDuration" : "transitionDuration"], e = parseInt(e, 10), i = f.isMoved(s), s.$slide.addClass("fancybox-slide--current"), o) return s.opts.animationEffect && e && f.$refs.container.css("transition-duration", e + "ms"), f.$refs.container.addClass("fancybox-is-open").trigger("focus"), f.loadSlide(s), void f.preload("image"); 344 c = n.fancybox.getTranslate(r.$slide), l = n.fancybox.getTranslate(f.$refs.stage), n.each(f.slides, function (t, e) { 345 n.fancybox.stop(e.$slide, !0) 346 }), r.pos !== s.pos && (r.isComplete = !1), r.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"), i ? (u = c.left - (r.pos * c.width + r.pos * r.opts.gutter), n.each(f.slides, function (t, o) { 347 o.$slide.removeClass("fancybox-animated").removeClass(function (t, e) { 348 return (e.match(/(^|\s)fancybox-fx-\S+/g) || []).join(" ") 349 }); 350 var i = o.pos * c.width + o.pos * o.opts.gutter; 351 n.fancybox.setTranslate(o.$slide, { 352 top: 0, 353 left: i - l.left + u 354 }), o.pos !== s.pos && o.$slide.addClass("fancybox-slide--" + (o.pos > s.pos ? "next" : "previous")), p(o.$slide), n.fancybox.animate(o.$slide, { 355 top: 0, 356 left: (o.pos - s.pos) * c.width + (o.pos - s.pos) * o.opts.gutter 357 }, e, function () { 358 o.$slide.css({ 359 transform: "", 360 opacity: "" 361 }).removeClass("fancybox-slide--next fancybox-slide--previous"), o.pos === f.currPos && f.complete() 362 }) 363 })) : e && s.opts.transitionEffect && (d = "fancybox-animated fancybox-fx-" + s.opts.transitionEffect, r.$slide.addClass("fancybox-slide--" + (r.pos > s.pos ? "next" : "previous")), n.fancybox.animate(r.$slide, d, e, function () { 364 r.$slide.removeClass(d).removeClass("fancybox-slide--next fancybox-slide--previous") 365 }, !1)), s.isLoaded ? f.revealContent(s) : f.loadSlide(s), f.preload("image") 366 } 367 }, 368 createSlide: function (t) { 369 var e, o, i = this; 370 return o = t % i.group.length, o = o < 0 ? i.group.length + o : o, !i.slides[t] && i.group[o] && (e = n('<div class="fancybox-slide"></div>').appendTo(i.$refs.stage), i.slides[t] = n.extend(!0, {}, i.group[o], { 371 pos: t, 372 $slide: e, 373 isLoaded: !1 374 }), i.updateSlide(i.slides[t])), i.slides[t] 375 }, 376 scaleToActual: function (t, e, o) { 377 var i, a, s, r, c, l = this, 378 d = l.current, 379 u = d.$content, 380 f = n.fancybox.getTranslate(d.$slide).width, 381 p = n.fancybox.getTranslate(d.$slide).height, 382 h = d.width, 383 g = d.height; 384 l.isAnimating || l.isMoved() || !u || "image" != d.type || !d.isLoaded || d.hasError || (l.isAnimating = !0, n.fancybox.stop(u), t = void 0 === t ? .5 * f : t, e = void 0 === e ? .5 * p : e, i = n.fancybox.getTranslate(u), i.top -= n.fancybox.getTranslate(d.$slide).top, i.left -= n.fancybox.getTranslate(d.$slide).left, r = h / i.width, c = g / i.height, a = .5 * f - .5 * h, s = .5 * p - .5 * g, h > f && (a = i.left * r - (t * r - t), a > 0 && (a = 0), a < f - h && (a = f - h)), g > p && (s = i.top * c - (e * c - e), s > 0 && (s = 0), s < p - g && (s = p - g)), l.updateCursor(h, g), n.fancybox.animate(u, { 385 top: s, 386 left: a, 387 scaleX: r, 388 scaleY: c 389 }, o || 366, function () { 390 l.isAnimating = !1 391 }), l.SlideShow && l.SlideShow.isActive && l.SlideShow.stop()) 392 }, 393 scaleToFit: function (t) { 394 var e, o = this, 395 i = o.current, 396 a = i.$content; 397 o.isAnimating || o.isMoved() || !a || "image" != i.type || !i.isLoaded || i.hasError || (o.isAnimating = !0, n.fancybox.stop(a), e = o.getFitPos(i), o.updateCursor(e.width, e.height), n.fancybox.animate(a, { 398 top: e.top, 399 left: e.left, 400 scaleX: e.width / a.width(), 401 scaleY: e.height / a.height() 402 }, t || 366, function () { 403 o.isAnimating = !1 404 })) 405 }, 406 getFitPos: function (t) { 407 var e, o, i, a, s = this, 408 r = t.$content, 409 c = t.$slide, 410 l = t.width || t.opts.width, 411 d = t.height || t.opts.height, 412 u = {}; 413 return !!(t.isLoaded && r && r.length) && (e = n.fancybox.getTranslate(s.$refs.stage).width, o = n.fancybox.getTranslate(s.$refs.stage).height, e -= parseFloat(c.css("paddingLeft")) + parseFloat(c.css("paddingRight")) + parseFloat(r.css("marginLeft")) + parseFloat(r.css("marginRight")), o -= parseFloat(c.css("paddingTop")) + parseFloat(c.css("paddingBottom")) + parseFloat(r.css("marginTop")) + parseFloat(r.css("marginBottom")), l && d || (l = e, d = o), i = Math.min(1, e / l, o / d), l *= i, d *= i, l > e - .5 && (l = e), d > o - .5 && (d = o), "image" === t.type ? (u.top = Math.floor(.5 * (o - d)) + parseFloat(c.css("paddingTop")), u.left = Math.floor(.5 * (e - l)) + parseFloat(c.css("paddingLeft"))) : "video" === t.contentType && (a = t.opts.width && t.opts.height ? l / d : t.opts.ratio || 16 / 9, d > l / a ? d = l / a : l > d * a && (l = d * a)), u.width = l, u.height = d, u) 414 }, 415 update: function (t) { 416 var e = this; 417 n.each(e.slides, function (n, o) { 418 e.updateSlide(o, t) 419 }) 420 }, 421 updateSlide: function (t, e) { 422 var o = this, 423 i = t && t.$content, 424 a = t.width || t.opts.width, 425 s = t.height || t.opts.height, 426 r = t.$slide; 427 o.adjustCaption(t), i && (a || s || "video" === t.contentType) && !t.hasError && (n.fancybox.stop(i), n.fancybox.setTranslate(i, o.getFitPos(t)), t.pos === o.currPos && (o.isAnimating = !1, o.updateCursor())), o.adjustLayout(t), r.length && (r.trigger("refresh"), t.pos === o.currPos && o.$refs.toolbar.add(o.$refs.navigation.find(".fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar", r.get(0).scrollHeight > r.get(0).clientHeight)), o.trigger("onUpdate", t, e) 428 }, 429 centerSlide: function (t) { 430 var e = this, 431 o = e.current, 432 i = o.$slide; 433 !e.isClosing && o && (i.siblings().css({ 434 transform: "", 435 opacity: "" 436 }), i.parent().children().removeClass("fancybox-slide--previous fancybox-slide--next"), n.fancybox.animate(i, { 437 top: 0, 438 left: 0, 439 opacity: 1 440 }, void 0 === t ? 0 : t, function () { 441 i.css({ 442 transform: "", 443 opacity: "" 444 }), o.isComplete || e.complete() 445 }, !1)) 446 }, 447 isMoved: function (t) { 448 var e, o, i = t || this.current; 449 return !!i && (o = n.fancybox.getTranslate(this.$refs.stage), e = n.fancybox.getTranslate(i.$slide), !i.$slide.hasClass("fancybox-animated") && (Math.abs(e.top - o.top) > .5 || Math.abs(e.left - o.left) > .5)) 450 }, 451 updateCursor: function (t, e) { 452 var o, i, a = this, 453 s = a.current, 454 r = a.$refs.container; 455 s && !a.isClosing && a.Guestures && (r.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"), o = a.canPan(t, e), i = !!o || a.isZoomable(), r.toggleClass("fancybox-is-zoomable", i), n("[data-fancybox-zoom]").prop("disabled", !i), o ? r.addClass("fancybox-can-pan") : i && ("zoom" === s.opts.clickContent || n.isFunction(s.opts.clickContent) && "zoom" == s.opts.clickContent(s)) ? r.addClass("fancybox-can-zoomIn") : s.opts.touch && (s.opts.touch.vertical || a.group.length > 1) && "video" !== s.contentType && r.addClass("fancybox-can-swipe")) 456 }, 457 isZoomable: function () { 458 var t, e = this, 459 n = e.current; 460 if (n && !e.isClosing && "image" === n.type && !n.hasError) { 461 if (!n.isLoaded) return !0; 462 if ((t = e.getFitPos(n)) && (n.width > t.width || n.height > t.height)) return !0 463 } 464 return !1 465 }, 466 isScaledDown: function (t, e) { 467 var o = this, 468 i = !1, 469 a = o.current, 470 s = a.$content; 471 return void 0 !== t && void 0 !== e ? i = t < a.width && e < a.height : s && (i = n.fancybox.getTranslate(s), i = i.width < a.width && i.height < a.height), i 472 }, 473 canPan: function (t, e) { 474 var o = this, 475 i = o.current, 476 a = null, 477 s = !1; 478 return "image" === i.type && (i.isComplete || t && e) && !i.hasError && (s = o.getFitPos(i), void 0 !== t && void 0 !== e ? a = { 479 width: t, 480 height: e 481 } : i.isComplete && (a = n.fancybox.getTranslate(i.$content)), a && s && (s = Math.abs(a.width - s.width) > 1.5 || Math.abs(a.height - s.height) > 1.5)), s 482 }, 483 loadSlide: function (t) { 484 var e, o, i, a = this; 485 if (!t.isLoading && !t.isLoaded) { 486 if (t.isLoading = !0, !1 === a.trigger("beforeLoad", t)) return t.isLoading = !1, !1; 487 switch (e = t.type, o = t.$slide, o.off("refresh").trigger("onReset").addClass(t.opts.slideClass), e) { 488 case "image": 489 a.setImage(t); 490 break; 491 case "iframe": 492 a.setIframe(t); 493 break; 494 case "html": 495 a.setContent(t, t.src || t.content); 496 break; 497 case "video": 498 a.setContent(t, t.opts.video.tpl.replace(/\{\{src\}\}/gi, t.src).replace("{{format}}", t.opts.videoFormat || t.opts.video.format || "").replace("{{poster}}", t.thumb || "")); 499 break; 500 case "inline": 501 n(t.src).length ? a.setContent(t, n(t.src)) : a.setError(t); 502 break; 503 case "ajax": 504 a.showLoading(t), i = n.ajax(n.extend({}, t.opts.ajax.settings, { 505 url: t.src, 506 success: function (e, n) { 507 "success" === n && a.setContent(t, e) 508 }, 509 error: function (e, n) { 510 e && "abort" !== n && a.setError(t) 511 } 512 })), o.one("onReset", function () { 513 i.abort() 514 }); 515 break; 516 default: 517 a.setError(t) 518 } 519 return !0 520 } 521 }, 522 setImage: function (t) { 523 var o, i = this; 524 setTimeout(function () { 525 var e = t.$image; 526 i.isClosing || !t.isLoading || e && e.length && e[0].complete || t.hasError || i.showLoading(t) 527 }, 50), i.checkSrcset(t), t.$content = n('<div class="fancybox-content"></div>').addClass("fancybox-is-hidden").appendTo(t.$slide.addClass("fancybox-slide--image")), !1 !== t.opts.preload && t.opts.width && t.opts.height && t.thumb && (t.width = t.opts.width, t.height = t.opts.height, o = e.createElement("img"), o.onerror = function () { 528 n(this).remove(), t.$ghost = null 529 }, o.onload = function () { 530 i.afterLoad(t) 531 }, t.$ghost = n(o).addClass("fancybox-image").appendTo(t.$content).attr("src", t.thumb)), i.setBigImage(t) 532 }, 533 checkSrcset: function (e) { 534 var n, o, i, a, s = e.opts.srcset || e.opts.image.srcset; 535 if (s) { 536 i = t.devicePixelRatio || 1, a = t.innerWidth * i, o = s.split(",").map(function (t) { 537 var e = {}; 538 return t.trim().split(/\s+/).forEach(function (t, n) { 539 var o = parseInt(t.substring(0, t.length - 1), 10); 540 if (0 === n) return e.url = t; 541 o && (e.value = o, e.postfix = t[t.length - 1]) 542 }), e 543 }), o.sort(function (t, e) { 544 return t.value - e.value 545 }); 546 for (var r = 0; r < o.length; r++) { 547 var c = o[r]; 548 if ("w" === c.postfix && c.value >= a || "x" === c.postfix && c.value >= i) { 549 n = c; 550 break 551 } 552 }!n && o.length && (n = o[o.length - 1]), n && (e.src = n.url, e.width && e.height && "w" == n.postfix && (e.height = e.width / e.height * n.value, e.width = n.value), e.opts.srcset = s) 553 } 554 }, 555 setBigImage: function (t) { 556 var o = this, 557 i = e.createElement("img"), 558 a = n(i); 559 t.$image = a.one("error", function () { 560 o.setError(t) 561 }).one("load", function () { 562 var e; 563 t.$ghost || (o.resolveImageSlideSize(t, this.naturalWidth, this.naturalHeight), o.afterLoad(t)), o.isClosing || (t.opts.srcset && (e = t.opts.sizes, e && "auto" !== e || (e = (t.width / t.height > 1 && s.width() / s.height() > 1 ? "100" : Math.round(t.width / t.height * 100)) + "vw"), a.attr("sizes", e).attr("srcset", t.opts.srcset)), t.$ghost && setTimeout(function () { 564 t.$ghost && !o.isClosing && t.$ghost.hide() 565 }, Math.min(300, Math.max(1e3, t.height / 1600))), o.hideLoading(t)) 566 }).addClass("fancybox-image").attr("src", t.src).appendTo(t.$content), (i.complete || "complete" == i.readyState) && a.naturalWidth && a.naturalHeight ? a.trigger("load") : i.error && a.trigger("error") 567 }, 568 resolveImageSlideSize: function (t, e, n) { 569 var o = parseInt(t.opts.width, 10), 570 i = parseInt(t.opts.height, 10); 571 t.width = e, t.height = n, o > 0 && (t.width = o, t.height = Math.floor(o * n / e)), i > 0 && (t.width = Math.floor(i * e / n), t.height = i) 572 }, 573 setIframe: function (t) { 574 var e, o = this, 575 i = t.opts.iframe, 576 a = t.$slide; 577 t.$content = n('<div class="fancybox-content' + (i.preload ? " fancybox-is-hidden" : "") + '"></div>').css(i.css).appendTo(a), a.addClass("fancybox-slide--" + t.contentType), t.$iframe = e = n(i.tpl.replace(/\{rnd\}/g, (new Date).getTime())).attr(i.attr).appendTo(t.$content), i.preload ? (o.showLoading(t), e.on("load.fb error.fb", function (e) { 578 this.isReady = 1, t.$slide.trigger("refresh"), o.afterLoad(t) 579 }), a.on("refresh.fb", function () { 580 var n, o, s = t.$content, 581 r = i.css.width, 582 c = i.css.height; 583 if (1 === e[0].isReady) { 584 try { 585 n = e.contents(), o = n.find("body") 586 } catch (t) {} 587 o && o.length && o.children().length && (a.css("overflow", "visible"), s.css({ 588 width: "100%", 589 "max-width": "100%", 590 height: "9999px" 591 }), void 0 === r && (r = Math.ceil(Math.max(o[0].clientWidth, o.outerWidth(!0)))), s.css("width", r || "").css("max-width", ""), void 0 === c && (c = Math.ceil(Math.max(o[0].clientHeight, o.outerHeight(!0)))), s.css("height", c || ""), a.css("overflow", "auto")), s.removeClass("fancybox-is-hidden") 592 } 593 })) : o.afterLoad(t), e.attr("src", t.src), a.one("onReset", function () { 594 try { 595 n(this).find("iframe").hide().unbind().attr("src", "//about:blank") 596 } catch (t) {} 597 n(this).off("refresh.fb").empty(), t.isLoaded = !1, t.isRevealed = !1 598 }) 599 }, 600 setContent: function (t, e) { 601 var o = this; 602 o.isClosing || (o.hideLoading(t), t.$content && n.fancybox.stop(t.$content), t.$slide.empty(), l(e) && e.parent().length ? ((e.hasClass("fancybox-content") || e.parent().hasClass("fancybox-content")) && e.parents(".fancybox-slide").trigger("onReset"), t.$placeholder = n("<div>").hide().insertAfter(e), e.css("display", "inline-block")) : t.hasError || ("string" === n.type(e) && (e = n("<div>").append(n.trim(e)).contents()), t.opts.filter && (e = n("<div>").html(e).find(t.opts.filter))), t.$slide.one("onReset", function () { 603 n(this).find("video,audio").trigger("pause"), t.$placeholder && (t.$placeholder.after(e.removeClass("fancybox-content").hide()).remove(), t.$placeholder = null), t.$smallBtn && (t.$smallBtn.remove(), t.$smallBtn = null), t.hasError || (n(this).empty(), t.isLoaded = !1, t.isRevealed = !1) 604 }), n(e).appendTo(t.$slide), n(e).is("video,audio") && (n(e).addClass("fancybox-video"), n(e).wrap("<div></div>"), t.contentType = "video", t.opts.width = t.opts.width || n(e).attr("width"), t.opts.height = t.opts.height || n(e).attr("height")), t.$content = t.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(), t.$content.siblings().hide(), t.$content.length || (t.$content = t.$slide.wrapInner("<div></div>").children().first()), t.$content.addClass("fancybox-content"), t.$slide.addClass("fancybox-slide--" + t.contentType), o.afterLoad(t)) 605 }, 606 setError: function (t) { 607 t.hasError = !0, t.$slide.trigger("onReset").removeClass("fancybox-slide--" + t.contentType).addClass("fancybox-slide--error"), t.contentType = "html", this.setContent(t, this.translate(t, t.opts.errorTpl)), t.pos === this.currPos && (this.isAnimating = !1) 608 }, 609 showLoading: function (t) { 610 var e = this; 611 (t = t || e.current) && !t.$spinner && (t.$spinner = n(e.translate(e, e.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast")) 612 }, 613 hideLoading: function (t) { 614 var e = this; 615 (t = t || e.current) && t.$spinner && (t.$spinner.stop().remove(), delete t.$spinner) 616 }, 617 afterLoad: function (t) { 618 var e = this; 619 e.isClosing || (t.isLoading = !1, t.isLoaded = !0, e.trigger("afterLoad", t), e.hideLoading(t), !t.opts.smallBtn || t.$smallBtn && t.$smallBtn.length || (t.$smallBtn = n(e.translate(t, t.opts.btnTpl.smallBtn)).appendTo(t.$content)), t.opts.protect && t.$content && !t.hasError && (t.$content.on("contextmenu.fb", function (t) { 620 return 2 == t.button && t.preventDefault(), !0 621 }), "image" === t.type && n('<div class="fancybox-spaceball"></div>').appendTo(t.$content)), e.adjustCaption(t), e.adjustLayout(t), t.pos === e.currPos && e.updateCursor(), e.revealContent(t)) 622 }, 623 adjustCaption: function (t) { 624 var e, n = this, 625 o = t || n.current, 626 i = o.opts.caption, 627 a = o.opts.preventCaptionOverlap, 628 s = n.$refs.caption, 629 r = !1; 630 s.toggleClass("fancybox-caption--separate", a), a && i && i.length && (o.pos !== n.currPos ? (e = s.clone().appendTo(s.parent()), e.children().eq(0).empty().html(i), r = e.outerHeight(!0), e.empty().remove()) : n.$caption && (r = n.$caption.outerHeight(!0)), o.$slide.css("padding-bottom", r || "")) 631 }, 632 adjustLayout: function (t) { 633 var e, n, o, i, a = this, 634 s = t || a.current; 635 s.isLoaded && !0 !== s.opts.disableLayoutFix && (s.$content.css("margin-bottom", ""), s.$content.outerHeight() > s.$slide.height() + .5 && (o = s.$slide[0].style["padding-bottom"], i = s.$slide.css("padding-bottom"), parseFloat(i) > 0 && (e = s.$slide[0].scrollHeight, s.$slide.css("padding-bottom", 0), Math.abs(e - s.$slide[0].scrollHeight) < 1 && (n = i), s.$slide.css("padding-bottom", o))), s.$content.css("margin-bottom", n)) 636 }, 637 revealContent: function (t) { 638 var e, o, i, a, s = this, 639 r = t.$slide, 640 c = !1, 641 l = !1, 642 d = s.isMoved(t), 643 u = t.isRevealed; 644 return t.isRevealed = !0, e = t.opts[s.firstRun ? "animationEffect" : "transitionEffect"], i = t.opts[s.firstRun ? "animationDuration" : "transitionDuration"], i = parseInt(void 0 === t.forcedDuration ? i : t.forcedDuration, 10), !d && t.pos === s.currPos && i || (e = !1), "zoom" === e && (t.pos === s.currPos && i && "image" === t.type && !t.hasError && (l = s.getThumbPos(t)) ? c = s.getFitPos(t) : e = "fade"), "zoom" === e ? (s.isAnimating = !0, c.scaleX = c.width / l.width, c.scaleY = c.height / l.height, a = t.opts.zoomOpacity, "auto" == a && (a = Math.abs(t.width / t.height - l.width / l.height) > .1), a && (l.opacity = .1, c.opacity = 1), n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"), l), p(t.$content), void n.fancybox.animate(t.$content, c, i, function () { 645 s.isAnimating = !1, s.complete() 646 })) : (s.updateSlide(t), e ? (n.fancybox.stop(r), o = "fancybox-slide--" + (t.pos >= s.prevPos ? "next" : "previous") + " fancybox-animated fancybox-fx-" + e, r.addClass(o).removeClass("fancybox-slide--current"), t.$content.removeClass("fancybox-is-hidden"), p(r), "image" !== t.type && t.$content.hide().show(0), void n.fancybox.animate(r, "fancybox-slide--current", i, function () { 647 r.removeClass(o).css({ 648 transform: "", 649 opacity: "" 650 }), t.pos === s.currPos && s.complete() 651 }, !0)) : (t.$content.removeClass("fancybox-is-hidden"), u || !d || "image" !== t.type || t.hasError || t.$content.hide().fadeIn("fast"), void(t.pos === s.currPos && s.complete()))) 652 }, 653 getThumbPos: function (t) { 654 var e, o, i, a, s, r = !1, 655 c = t.$thumb; 656 return !(!c || !g(c[0])) && (e = n.fancybox.getTranslate(c), o = parseFloat(c.css("border-top-width") || 0), i = parseFloat(c.css("border-right-width") || 0), a = parseFloat(c.css("border-bottom-width") || 0), s = parseFloat(c.css("border-left-width") || 0), r = { 657 top: e.top + o, 658 left: e.left + s, 659 width: e.width - i - s, 660 height: e.height - o - a, 661 scaleX: 1, 662 scaleY: 1 663 }, e.width > 0 && e.height > 0 && r) 664 }, 665 complete: function () { 666 var t, e = this, 667 o = e.current, 668 i = {}; 669 !e.isMoved() && o.isLoaded && (o.isComplete || (o.isComplete = !0, o.$slide.siblings().trigger("onReset"), e.preload("inline"), p(o.$slide), o.$slide.addClass("fancybox-slide--complete"), n.each(e.slides, function (t, o) { 670 o.pos >= e.currPos - 1 && o.pos <= e.currPos + 1 ? i[o.pos] = o : o && (n.fancybox.stop(o.$slide), o.$slide.off().remove()) 671 }), e.slides = i), e.isAnimating = !1, e.updateCursor(), e.trigger("afterShow"), o.opts.video.autoStart && o.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended", function () { 672 Document.exitFullscreen ? Document.exitFullscreen() : this.webkitExitFullscreen && this.webkitExitFullscreen(), e.next() 673 }), o.opts.autoFocus && "html" === o.contentType && (t = o.$content.find("input[autofocus]:enabled:visible:first"), t.length ? t.trigger("focus") : e.focus(null, !0)), o.$slide.scrollTop(0).scrollLeft(0)) 674 }, 675 preload: function (t) { 676 var e, n, o = this; 677 o.group.length < 2 || (n = o.slides[o.currPos + 1], e = o.slides[o.currPos - 1], e && e.type === t && o.loadSlide(e), n && n.type === t && o.loadSlide(n)) 678 }, 679 focus: function (t, o) { 680 var i, a, s = this, 681 r = ["a[href]", "area[href]", 'input:not([disabled]):not([type="hidden"]):not([aria-hidden])', "select:not([disabled]):not([aria-hidden])", "textarea:not([disabled]):not([aria-hidden])", "button:not([disabled]):not([aria-hidden])", "iframe", "object", "embed", "video", "audio", "[contenteditable]", '[tabindex]:not([tabindex^="-"])'].join(","); 682 s.isClosing || (i = !t && s.current && s.current.isComplete ? s.current.$slide.find("*:visible" + (o ? ":not(.fancybox-close-small)" : "")) : s.$refs.container.find("*:visible"), i = i.filter(r).filter(function () { 683 return "hidden" !== n(this).css("visibility") && !n(this).hasClass("disabled") 684 }), i.length ? (a = i.index(e.activeElement), t && t.shiftKey ? (a < 0 || 0 == a) && (t.preventDefault(), i.eq(i.length - 1).trigger("focus")) : (a < 0 || a == i.length - 1) && (t && t.preventDefault(), i.eq(0).trigger("focus"))) : s.$refs.container.trigger("focus")) 685 }, 686 activate: function () { 687 var t = this; 688 n(".fancybox-container").each(function () { 689 var e = n(this).data("FancyBox"); 690 e && e.id !== t.id && !e.isClosing && (e.trigger("onDeactivate"), e.removeEvents(), e.isVisible = !1) 691 }), t.isVisible = !0, (t.current || t.isIdle) && (t.update(), t.updateControls()), t.trigger("onActivate"), t.addEvents() 692 }, 693 close: function (t, e) { 694 var o, i, a, s, r, c, l, u = this, 695 f = u.current, 696 h = function () { 697 u.cleanUp(t) 698 }; 699 return !u.isClosing && (u.isClosing = !0, !1 === u.trigger("beforeClose", t) ? (u.isClosing = !1, d(function () { 700 u.update() 701 }), !1) : (u.removeEvents(), a = f.$content, o = f.opts.animationEffect, i = n.isNumeric(e) ? e : o ? f.opts.animationDuration : 0, f.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"), !0 !== t ? n.fancybox.stop(f.$slide) : o = !1, f.$slide.siblings().trigger("onReset").remove(), i && u.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration", i + "ms"), u.hideLoading(f), u.hideControls(!0), u.updateCursor(), "zoom" !== o || a && i && "image" === f.type && !u.isMoved() && !f.hasError && (l = u.getThumbPos(f)) || (o = "fade"), "zoom" === o ? (n.fancybox.stop(a), s = n.fancybox.getTranslate(a), c = { 702 top: s.top, 703 left: s.left, 704 scaleX: s.width / l.width, 705 scaleY: s.height / l.height, 706 width: l.width, 707 height: l.height 708 }, r = f.opts.zoomOpacity, 709 "auto" == r && (r = Math.abs(f.width / f.height - l.width / l.height) > .1), r && (l.opacity = 0), n.fancybox.setTranslate(a, c), p(a), n.fancybox.animate(a, l, i, h), !0) : (o && i ? n.fancybox.animate(f.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"), "fancybox-animated fancybox-fx-" + o, i, h) : !0 === t ? setTimeout(h, i) : h(), !0))) 710 }, 711 cleanUp: function (e) { 712 var o, i, a, s = this, 713 r = s.current.opts.$orig; 714 s.current.$slide.trigger("onReset"), s.$refs.container.empty().remove(), s.trigger("afterClose", e), s.current.opts.backFocus && (r && r.length && r.is(":visible") || (r = s.$trigger), r && r.length && (i = t.scrollX, a = t.scrollY, r.trigger("focus"), n("html, body").scrollTop(a).scrollLeft(i))), s.current = null, o = n.fancybox.getInstance(), o ? o.activate() : (n("body").removeClass("fancybox-active compensate-for-scrollbar"), n("#fancybox-style-noscroll").remove()) 715 }, 716 trigger: function (t, e) { 717 var o, i = Array.prototype.slice.call(arguments, 1), 718 a = this, 719 s = e && e.opts ? e : a.current; 720 if (s ? i.unshift(s) : s = a, i.unshift(a), n.isFunction(s.opts[t]) && (o = s.opts[t].apply(s, i)), !1 === o) return o; 721 "afterClose" !== t && a.$refs ? a.$refs.container.trigger(t + ".fb", i) : r.trigger(t + ".fb", i) 722 }, 723 updateControls: function () { 724 var t = this, 725 o = t.current, 726 i = o.index, 727 a = t.$refs.container, 728 s = t.$refs.caption, 729 r = o.opts.caption; 730 o.$slide.trigger("refresh"), r && r.length ? (t.$caption = s, s.children().eq(0).html(r)) : t.$caption = null, t.hasHiddenControls || t.isIdle || t.showControls(), a.find("[data-fancybox-count]").html(t.group.length), a.find("[data-fancybox-index]").html(i + 1), a.find("[data-fancybox-prev]").prop("disabled", !o.opts.loop && i <= 0), a.find("[data-fancybox-next]").prop("disabled", !o.opts.loop && i >= t.group.length - 1), "image" === o.type ? a.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href", o.opts.image.src || o.src).show() : o.opts.toolbar && a.find("[data-fancybox-download],[data-fancybox-zoom]").hide(), n(e.activeElement).is(":hidden,[disabled]") && t.$refs.container.trigger("focus") 731 }, 732 hideControls: function (t) { 733 var e = this, 734 n = ["infobar", "toolbar", "nav"]; 735 !t && e.current.opts.preventCaptionOverlap || n.push("caption"), this.$refs.container.removeClass(n.map(function (t) { 736 return "fancybox-show-" + t 737 }).join(" ")), this.hasHiddenControls = !0 738 }, 739 showControls: function () { 740 var t = this, 741 e = t.current ? t.current.opts : t.opts, 742 n = t.$refs.container; 743 t.hasHiddenControls = !1, t.idleSecondsCounter = 0, n.toggleClass("fancybox-show-toolbar", !(!e.toolbar || !e.buttons)).toggleClass("fancybox-show-infobar", !!(e.infobar && t.group.length > 1)).toggleClass("fancybox-show-caption", !!t.$caption).toggleClass("fancybox-show-nav", !!(e.arrows && t.group.length > 1)).toggleClass("fancybox-is-modal", !!e.modal) 744 }, 745 toggleControls: function () { 746 this.hasHiddenControls ? this.showControls() : this.hideControls() 747 } 748 }), n.fancybox = { 749 version: "3.5.7", 750 defaults: a, 751 getInstance: function (t) { 752 var e = n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"), 753 o = Array.prototype.slice.call(arguments, 1); 754 return e instanceof b && ("string" === n.type(t) ? e[t].apply(e, o) : "function" === n.type(t) && t.apply(e, o), e) 755 }, 756 open: function (t, e, n) { 757 return new b(t, e, n) 758 }, 759 close: function (t) { 760 var e = this.getInstance(); 761 e && (e.close(), !0 === t && this.close(t)) 762 }, 763 destroy: function () { 764 this.close(!0), r.add("body").off("click.fb-start", "**") 765 }, 766 isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), 767 use3d: function () { 768 var n = e.createElement("div"); 769 return t.getComputedStyle && t.getComputedStyle(n) && t.getComputedStyle(n).getPropertyValue("transform") && !(e.documentMode && e.documentMode < 11) 770 }(), 771 getTranslate: function (t) { 772 var e; 773 return !(!t || !t.length) && (e = t[0].getBoundingClientRect(), { 774 top: e.top || 0, 775 left: e.left || 0, 776 width: e.width, 777 height: e.height, 778 opacity: parseFloat(t.css("opacity")) 779 }) 780 }, 781 setTranslate: function (t, e) { 782 var n = "", 783 o = {}; 784 if (t && e) return void 0 === e.left && void 0 === e.top || (n = (void 0 === e.left ? t.position().left : e.left) + "px, " + (void 0 === e.top ? t.position().top : e.top) + "px", n = this.use3d ? "translate3d(" + n + ", 0px)" : "translate(" + n + ")"), void 0 !== e.scaleX && void 0 !== e.scaleY ? n += " scale(" + e.scaleX + ", " + e.scaleY + ")" : void 0 !== e.scaleX && (n += " scaleX(" + e.scaleX + ")"), n.length && (o.transform = n), void 0 !== e.opacity && (o.opacity = e.opacity), void 0 !== e.width && (o.width = e.width), void 0 !== e.height && (o.height = e.height), t.css(o) 785 }, 786 animate: function (t, e, o, i, a) { 787 var s, r = this; 788 n.isFunction(o) && (i = o, o = null), r.stop(t), s = r.getTranslate(t), t.on(f, function (c) { 789 (!c || !c.originalEvent || t.is(c.originalEvent.target) && "z-index" != c.originalEvent.propertyName) && (r.stop(t), n.isNumeric(o) && t.css("transition-duration", ""), n.isPlainObject(e) ? void 0 !== e.scaleX && void 0 !== e.scaleY && r.setTranslate(t, { 790 top: e.top, 791 left: e.left, 792 width: s.width * e.scaleX, 793 height: s.height * e.scaleY, 794 scaleX: 1, 795 scaleY: 1 796 }) : !0 !== a && t.removeClass(e), n.isFunction(i) && i(c)) 797 }), n.isNumeric(o) && t.css("transition-duration", o + "ms"), n.isPlainObject(e) ? (void 0 !== e.scaleX && void 0 !== e.scaleY && (delete e.width, delete e.height, t.parent().hasClass("fancybox-slide--image") && t.parent().addClass("fancybox-is-scaling")), n.fancybox.setTranslate(t, e)) : t.addClass(e), t.data("timer", setTimeout(function () { 798 t.trigger(f) 799 }, o + 33)) 800 }, 801 stop: function (t, e) { 802 t && t.length && (clearTimeout(t.data("timer")), e && t.trigger(f), t.off(f).css("transition-duration", ""), t.parent().removeClass("fancybox-is-scaling")) 803 } 804 }, n.fn.fancybox = function (t) { 805 var e; 806 return t = t || {}, e = t.selector || !1, e ? n("body").off("click.fb-start", e).on("click.fb-start", e, { 807 options: t 808 }, i) : this.off("click.fb-start").on("click.fb-start", { 809 items: this, 810 options: t 811 }, i), this 812 }, r.on("click.fb-start", "[data-fancybox]", i), r.on("click.fb-start", "[data-fancybox-trigger]", function (t) { 813 n('[data-fancybox="' + n(this).attr("data-fancybox-trigger") + '"]').eq(n(this).attr("data-fancybox-index") || 0).trigger("click.fb-start", { 814 $trigger: n(this) 815 }) 816 }), 817 function () { 818 var t = null; 819 r.on("mousedown mouseup focus blur", ".fancybox-button", function (e) { 820 switch (e.type) { 821 case "mousedown": 822 t = n(this); 823 break; 824 case "mouseup": 825 t = null; 826 break; 827 case "focusin": 828 n(".fancybox-button").removeClass("fancybox-focus"), n(this).is(t) || n(this).is("[disabled]") || n(this).addClass("fancybox-focus"); 829 break; 830 case "focusout": 831 n(".fancybox-button").removeClass("fancybox-focus") 832 } 833 }) 834 }() 835 } 836}(window, document, jQuery), 837function (t) { 838 "use strict"; 839 var e = { 840 youtube: { 841 matcher: /(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i, 842 params: { 843 autoplay: 1, 844 autohide: 1, 845 fs: 1, 846 rel: 0, 847 hd: 1, 848 wmode: "transparent", 849 enablejsapi: 1, 850 html5: 1 851 }, 852 paramPlace: 8, 853 type: "iframe", 854 url: "https://www.youtube-nocookie.com/embed/$4", 855 thumb: "https://img.youtube.com/vi/$4/hqdefault.jpg" 856 }, 857 vimeo: { 858 matcher: /^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/, 859 params: { 860 autoplay: 1, 861 hd: 1, 862 show_title: 1, 863 show_byline: 1, 864 show_portrait: 0, 865 fullscreen: 1 866 }, 867 paramPlace: 3, 868 type: "iframe", 869 url: "//player.vimeo.com/video/$2" 870 }, 871 instagram: { 872 matcher: /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, 873 type: "image", 874 url: "//$1/p/$2/media/?size=l" 875 }, 876 gmap_place: { 877 matcher: /(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i, 878 type: "iframe", 879 url: function (t) { 880 return "//maps.google." + t[2] + "/?ll=" + (t[9] ? t[9] + "&z=" + Math.floor(t[10]) + (t[12] ? t[12].replace(/^\//, "&") : "") : t[12] + "").replace(/\?/, "&") + "&output=" + (t[12] && t[12].indexOf("layer=c") > 0 ? "svembed" : "embed") 881 } 882 }, 883 gmap_search: { 884 matcher: /(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i, 885 type: "iframe", 886 url: function (t) { 887 return "//maps.google." + t[2] + "/maps?q=" + t[5].replace("query=", "q=").replace("api=1", "") + "&output=embed" 888 } 889 } 890 }, 891 n = function (e, n, o) { 892 if (e) return o = o || "", "object" === t.type(o) && (o = t.param(o, !0)), t.each(n, function (t, n) { 893 e = e.replace("$" + t, n || "") 894 }), o.length && (e += (e.indexOf("?") > 0 ? "&" : "?") + o), e 895 }; 896 t(document).on("objectNeedsType.fb", function (o, i, a) { 897 var s, r, c, l, d, u, f, p = a.src || "", 898 h = !1; 899 s = t.extend(!0, {}, e, a.opts.media), t.each(s, function (e, o) { 900 if (c = p.match(o.matcher)) { 901 if (h = o.type, f = e, u = {}, o.paramPlace && c[o.paramPlace]) { 902 d = c[o.paramPlace], "?" == d[0] && (d = d.substring(1)), d = d.split("&"); 903 for (var i = 0; i < d.length; ++i) { 904 var s = d[i].split("=", 2); 905 2 == s.length && (u[s[0]] = decodeURIComponent(s[1].replace(/\+/g, " "))) 906 } 907 } 908 return l = t.extend(!0, {}, o.params, a.opts[e], u), p = "function" === t.type(o.url) ? o.url.call(this, c, l, a) : n(o.url, c, l), r = "function" === t.type(o.thumb) ? o.thumb.call(this, c, l, a) : n(o.thumb, c), "youtube" === e ? p = p.replace(/&t=((\d+)m)?(\d+)s/, function (t, e, n, o) { 909 return "&start=" + ((n ? 60 * parseInt(n, 10) : 0) + parseInt(o, 10)) 910 }) : "vimeo" === e && (p = p.replace("&%23", "#")), !1 911 } 912 }), h ? (a.opts.thumb || a.opts.$thumb && a.opts.$thumb.length || (a.opts.thumb = r), "iframe" === h && (a.opts = t.extend(!0, a.opts, { 913 iframe: { 914 preload: !1, 915 attr: { 916 scrolling: "no" 917 } 918 } 919 })), t.extend(a, { 920 type: h, 921 src: p, 922 origSrc: a.src, 923 contentSource: f, 924 contentType: "image" === h ? "image" : "gmap_place" == f || "gmap_search" == f ? "map" : "video" 925 })) : p && (a.type = a.opts.defaultType) 926 }); 927 var o = { 928 youtube: { 929 src: "https://www.youtube.com/iframe_api", 930 class: "YT", 931 loading: !1, 932 loaded: !1 933 }, 934 vimeo: { 935 src: "https://player.vimeo.com/api/player.js", 936 class: "Vimeo", 937 loading: !1, 938 loaded: !1 939 }, 940 load: function (t) { 941 var e, n = this; 942 if (this[t].loaded) return void setTimeout(function () { 943 n.done(t) 944 }); 945 this[t].loading || (this[t].loading = !0, e = document.createElement("script"), e.type = "text/javascript", e.src = this[t].src, "youtube" === t ? window.onYouTubeIframeAPIReady = function () { 946 n[t].loaded = !0, n.done(t) 947 } : e.onload = function () { 948 n[t].loaded = !0, n.done(t) 949 }, document.body.appendChild(e)) 950 }, 951 done: function (e) { 952 var n, o, i; 953 "youtube" === e && delete window.onYouTubeIframeAPIReady, (n = t.fancybox.getInstance()) && (o = n.current.$content.find("iframe"), "youtube" === e && void 0 !== YT && YT ? i = new YT.Player(o.attr("id"), { 954 events: { 955 onStateChange: function (t) { 956 0 == t.data && n.next() 957 } 958 } 959 }) : "vimeo" === e && void 0 !== Vimeo && Vimeo && (i = new Vimeo.Player(o), i.on("ended", function () { 960 n.next() 961 }))) 962 } 963 }; 964 t(document).on({ 965 "afterShow.fb": function (t, e, n) { 966 e.group.length > 1 && ("youtube" === n.contentSource || "vimeo" === n.contentSource) && o.load(n.contentSource) 967 } 968 }) 969}(jQuery), 970function (t, e, n) { 971 "use strict"; 972 var o = function () { 973 return t.requestAnimationFrame || t.webkitRequestAnimationFrame || t.mozRequestAnimationFrame || t.oRequestAnimationFrame || function (e) { 974 return t.setTimeout(e, 1e3 / 60) 975 } 976 }(), 977 i = function () { 978 return t.cancelAnimationFrame || t.webkitCancelAnimationFrame || t.mozCancelAnimationFrame || t.oCancelAnimationFrame || function (e) { 979 t.clearTimeout(e) 980 } 981 }(), 982 a = function (e) { 983 var n = []; 984 e = e.originalEvent || e || t.e, e = e.touches && e.touches.length ? e.touches : e.changedTouches && e.changedTouches.length ? e.changedTouches : [e]; 985 for (var o in e) e[o].pageX ? n.push({ 986 x: e[o].pageX, 987 y: e[o].pageY 988 }) : e[o].clientX && n.push({ 989 x: e[o].clientX, 990 y: e[o].clientY 991 }); 992 return n 993 }, 994 s = function (t, e, n) { 995 return e && t ? "x" === n ? t.x - e.x : "y" === n ? t.y - e.y : Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2)) : 0 996 }, 997 r = function (t) { 998 if (t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe') || n.isFunction(t.get(0).onclick) || t.data("selectable")) return !0; 999 for (var e = 0, o = t[0].attributes, i = o.length; e < i; e++) 1000 if ("data-fancybox-" === o[e].nodeName.substr(0, 14)) return !0; 1001 return !1 1002 }, 1003 c = function (e) { 1004 var n = t.getComputedStyle(e)["overflow-y"], 1005 o = t.getComputedStyle(e)["overflow-x"], 1006 i = ("scroll" === n || "auto" === n) && e.scrollHeight > e.clientHeight, 1007 a = ("scroll" === o || "auto" === o) && e.scrollWidth > e.clientWidth; 1008 return i || a 1009 }, 1010 l = function (t) { 1011 for (var e = !1;;) { 1012 if (e = c(t.get(0))) break; 1013 if (t = t.parent(), !t.length || t.hasClass("fancybox-stage") || t.is("body")) break 1014 } 1015 return e 1016 }, 1017 d = function (t) { 1018 var e = this; 1019 e.instance = t, e.$bg = t.$refs.bg, e.$stage = t.$refs.stage, e.$container = t.$refs.container, e.destroy(), e.$container.on("touchstart.fb.touch mousedown.fb.touch", n.proxy(e, "ontouchstart")) 1020 }; 1021 d.prototype.destroy = function () { 1022 var t = this; 1023 t.$container.off(".fb.touch"), n(e).off(".fb.touch"), t.requestId && (i(t.requestId), t.requestId = null), t.tapped && (clearTimeout(t.tapped), t.tapped = null) 1024 }, d.prototype.ontouchstart = function (o) { 1025 var i = this, 1026 c = n(o.target), 1027 d = i.instance, 1028 u = d.current, 1029 f = u.$slide, 1030 p = u.$content, 1031 h = "touchstart" == o.type; 1032 if (h && i.$container.off("mousedown.fb.touch"), (!o.originalEvent || 2 != o.originalEvent.button) && f.length && c.length && !r(c) && !r(c.parent()) && (c.is("img") || !(o.originalEvent.clientX > c[0].clientWidth + c.offset().left))) { 1033 if (!u || d.isAnimating || u.$slide.hasClass("fancybox-animated")) return o.stopPropagation(), void o.preventDefault(); 1034 i.realPoints = i.startPoints = a(o), i.startPoints.length && (u.touch && o.stopPropagation(), i.startEvent = o, i.canTap = !0, i.$target = c, i.$content = p, i.opts = u.opts.touch, i.isPanning = !1, i.isSwiping = !1, i.isZooming = !1, i.isScrolling = !1, i.canPan = d.canPan(), i.startTime = (new Date).getTime(), i.distanceX = i.distanceY = i.distance = 0, i.canvasWidth = Math.round(f[0].clientWidth), i.canvasHeight = Math.round(f[0].clientHeight), i.contentLastPos = null, i.contentStartPos = n.fancybox.getTranslate(i.$content) || { 1035 top: 0, 1036 left: 0 1037 }, i.sliderStartPos = n.fancybox.getTranslate(f), i.stagePos = n.fancybox.getTranslate(d.$refs.stage), i.sliderStartPos.top -= i.stagePos.top, i.sliderStartPos.left -= i.stagePos.left, i.contentStartPos.top -= i.stagePos.top, i.contentStartPos.left -= i.stagePos.left, n(e).off(".fb.touch").on(h ? "touchend.fb.touch touchcancel.fb.touch" : "mouseup.fb.touch mouseleave.fb.touch", n.proxy(i, "ontouchend")).on(h ? "touchmove.fb.touch" : "mousemove.fb.touch", n.proxy(i, "ontouchmove")), n.fancybox.isMobile && e.addEventListener("scroll", i.onscroll, !0), ((i.opts || i.canPan) && (c.is(i.$stage) || i.$stage.find(c).length) || (c.is(".fancybox-image") && o.preventDefault(), n.fancybox.isMobile && c.parents(".fancybox-caption").length)) && (i.isScrollable = l(c) || l(c.parent()), n.fancybox.isMobile && i.isScrollable || o.preventDefault(), (1 === i.startPoints.length || u.hasError) && (i.canPan ? (n.fancybox.stop(i.$content), i.isPanning = !0) : i.isSwiping = !0, i.$container.addClass("fancybox-is-grabbing")), 2 === i.startPoints.length && "image" === u.type && (u.isLoaded || u.$ghost) && (i.canTap = !1, i.isSwiping = !1, i.isPanning = !1, i.isZooming = !0, n.fancybox.stop(i.$content), i.centerPointStartX = .5 * (i.startPoints[0].x + i.startPoints[1].x) - n(t).scrollLeft(), i.centerPointStartY = .5 * (i.startPoints[0].y + i.startPoints[1].y) - n(t).scrollTop(), i.percentageOfImageAtPinchPointX = (i.centerPointStartX - i.contentStartPos.left) / i.contentStartPos.width, i.percentageOfImageAtPinchPointY = (i.centerPointStartY - i.contentStartPos.top) / i.contentStartPos.height, i.startDistanceBetweenFingers = s(i.startPoints[0], i.startPoints[1])))) 1038 } 1039 }, d.prototype.onscroll = function (t) { 1040 var n = this; 1041 n.isScrolling = !0, e.removeEventListener("scroll", n.onscroll, !0) 1042 }, d.prototype.ontouchmove = function (t) { 1043 var e = this; 1044 return void 0 !== t.originalEvent.buttons && 0 === t.originalEvent.buttons ? void e.ontouchend(t) : e.isScrolling ? void(e.canTap = !1) : (e.newPoints = a(t), void((e.opts || e.canPan) && e.newPoints.length && e.newPoints.length && (e.isSwiping && !0 === e.isSwiping || t.preventDefault(), e.distanceX = s(e.newPoints[0], e.startPoints[0], "x"), e.distanceY = s(e.newPoints[0], e.startPoints[0], "y"), e.distance = s(e.newPoints[0], e.startPoints[0]), e.distance > 0 && (e.isSwiping ? e.onSwipe(t) : e.isPanning ? e.onPan() : e.isZooming && e.onZoom())))) 1045 }, d.prototype.onSwipe = function (e) { 1046 var a, s = this, 1047 r = s.instance, 1048 c = s.isSwiping, 1049 l = s.sliderStartPos.left || 0; 1050 if (!0 !== c) "x" == c && (s.distanceX > 0 && (s.instance.group.length < 2 || 0 === s.instance.current.index && !s.instance.current.opts.loop) ? l += Math.pow(s.distanceX, .8) : s.distanceX < 0 && (s.instance.group.length < 2 || s.instance.current.index === s.instance.group.length - 1 && !s.instance.current.opts.loop) ? l -= Math.pow(-s.distanceX, .8) : l += s.distanceX), s.sliderLastPos = { 1051 top: "x" == c ? 0 : s.sliderStartPos.top + s.distanceY, 1052 left: l 1053 }, s.requestId && (i(s.requestId), s.requestId = null), s.requestId = o(function () { 1054 s.sliderLastPos && (n.each(s.instance.slides, function (t, e) { 1055 var o = e.pos - s.instance.currPos; 1056 n.fancybox.setTranslate(e.$slide, { 1057 top: s.sliderLastPos.top, 1058 left: s.sliderLastPos.left + o * s.canvasWidth + o * e.opts.gutter 1059 }) 1060 }), s.$container.addClass("fancybox-is-sliding")) 1061 }); 1062 else if (Math.abs(s.distance) > 10) { 1063 if (s.canTap = !1, r.group.length < 2 && s.opts.vertical ? s.isSwiping = "y" : r.isDragging || !1 === s.opts.vertical || "auto" === s.opts.vertical && n(t).width() > 800 ? s.isSwiping = "x" : (a = Math.abs(180 * Math.atan2(s.distanceY, s.distanceX) / Math.PI), s.isSwiping = a > 45 && a < 135 ? "y" : "x"), "y" === s.isSwiping && n.fancybox.isMobile && s.isScrollable) return void(s.isScrolling = !0); 1064 r.isDragging = s.isSwiping, s.startPoints = s.newPoints, n.each(r.slides, function (t, e) { 1065 var o, i; 1066 n.fancybox.stop(e.$slide), o = n.fancybox.getTranslate(e.$slide), i = n.fancybox.getTranslate(r.$refs.stage), e.$slide.css({ 1067 transform: "", 1068 opacity: "", 1069 "transition-duration": "" 1070 }).removeClass("fancybox-animated").removeClass(function (t, e) { 1071 return (e.match(/(^|\s)fancybox-fx-\S+/g) || []).join(" ") 1072 }), e.pos === r.current.pos && (s.sliderStartPos.top = o.top - i.top, s.sliderStartPos.left = o.left - i.left), n.fancybox.setTranslate(e.$slide, { 1073 top: o.top - i.top, 1074 left: o.left - i.left 1075 }) 1076 }), r.SlideShow && r.SlideShow.isActive && r.SlideShow.stop() 1077 } 1078 }, d.prototype.onPan = function () { 1079 var t = this; 1080 if (s(t.newPoints[0], t.realPoints[0]) < (n.fancybox.isMobile ? 10 : 5)) return void(t.startPoints = t.newPoints); 1081 t.canTap = !1, t.contentLastPos = t.limitMovement(), t.requestId && i(t.requestId), t.requestId = o(function () { 1082 n.fancybox.setTranslate(t.$content, t.contentLastPos) 1083 }) 1084 }, d.prototype.limitMovement = function () { 1085 var t, e, n, o, i, a, s = this, 1086 r = s.canvasWidth, 1087 c = s.canvasHeight, 1088 l = s.distanceX, 1089 d = s.distanceY, 1090 u = s.contentStartPos, 1091 f = u.left, 1092 p = u.top, 1093 h = u.width, 1094 g = u.height; 1095 return i = h > r ? f + l : f, a = p + d, t = Math.max(0, .5 * r - .5 * h), e = Math.max(0, .5 * c - .5 * g), n = Math.min(r - h, .5 * r - .5 * h), o = Math.min(c - g, .5 * c - .5 * g), l > 0 && i > t && (i = t - 1 + Math.pow(-t + f + l, .8) || 0), l < 0 && i < n && (i = n + 1 - Math.pow(n - f - l, .8) || 0), d > 0 && a > e && (a = e - 1 + Math.pow(-e + p + d, .8) || 0), d < 0 && a < o && (a = o + 1 - Math.pow(o - p - d, .8) || 0), { 1096 top: a, 1097 left: i 1098 } 1099 }, d.prototype.limitPosition = function (t, e, n, o) { 1100 var i = this, 1101 a = i.canvasWidth, 1102 s = i.canvasHeight; 1103 return n > a ? (t = t > 0 ? 0 : t, t = t < a - n ? a - n : t) : t = Math.max(0, a / 2 - n / 2), o > s ? (e = e > 0 ? 0 : e, e = e < s - o ? s - o : e) : e = Math.max(0, s / 2 - o / 2), { 1104 top: e, 1105 left: t 1106 } 1107 }, d.prototype.onZoom = function () { 1108 var e = this, 1109 a = e.contentStartPos, 1110 r = a.width, 1111 c = a.height, 1112 l = a.left, 1113 d = a.top, 1114 u = s(e.newPoints[0], e.newPoints[1]), 1115 f = u / e.startDistanceBetweenFingers, 1116 p = Math.floor(r * f), 1117 h = Math.floor(c * f), 1118 g = (r - p) * e.percentageOfImageAtPinchPointX, 1119 b = (c - h) * e.percentageOfImageAtPinchPointY, 1120 m = (e.newPoints[0].x + e.newPoints[1].x) / 2 - n(t).scrollLeft(), 1121 v = (e.newPoints[0].y + e.newPoints[1].y) / 2 - n(t).scrollTop(), 1122 y = m - e.centerPointStartX, 1123 x = v - e.centerPointStartY, 1124 w = l + (g + y), 1125 $ = d + (b + x), 1126 S = { 1127 top: $, 1128 left: w, 1129 scaleX: f, 1130 scaleY: f 1131 }; 1132 e.canTap = !1, e.newWidth = p, e.newHeight = h, e.contentLastPos = S, e.requestId && i(e.requestId), e.requestId = o(function () { 1133 n.fancybox.setTranslate(e.$content, e.contentLastPos) 1134 }) 1135 }, d.prototype.ontouchend = function (t) { 1136 var o = this, 1137 s = o.isSwiping, 1138 r = o.isPanning, 1139 c = o.isZooming, 1140 l = o.isScrolling; 1141 if (o.endPoints = a(t), o.dMs = Math.max((new Date).getTime() - o.startTime, 1), o.$container.removeClass("fancybox-is-grabbing"), n(e).off(".fb.touch"), e.removeEventListener("scroll", o.onscroll, !0), o.requestId && (i(o.requestId), o.requestId = null), o.isSwiping = !1, o.isPanning = !1, o.isZooming = !1, o.isScrolling = !1, o.instance.isDragging = !1, o.canTap) return o.onTap(t); 1142 o.speed = 100, o.velocityX = o.distanceX / o.dMs * .5, o.velocityY = o.distanceY / o.dMs * .5, r ? o.endPanning() : c ? o.endZooming() : o.endSwiping(s, l) 1143 }, d.prototype.endSwiping = function (t, e) { 1144 var o = this, 1145 i = !1, 1146 a = o.instance.group.length, 1147 s = Math.abs(o.distanceX), 1148 r = "x" == t && a > 1 && (o.dMs > 130 && s > 10 || s > 50); 1149 o.sliderLastPos = null, "y" == t && !e && Math.abs(o.distanceY) > 50 ? (n.fancybox.animate(o.instance.current.$slide, { 1150 top: o.sliderStartPos.top + o.distanceY + 150 * o.velocityY, 1151 opacity: 0 1152 }, 200), i = o.instance.close(!0, 250)) : r && o.distanceX > 0 ? i = o.instance.previous(300) : r && o.distanceX < 0 && (i = o.instance.next(300)), !1 !== i || "x" != t && "y" != t || o.instance.centerSlide(200), o.$container.removeClass("fancybox-is-sliding") 1153 }, d.prototype.endPanning = function () { 1154 var t, e, o, i = this; 1155 i.contentLastPos && (!1 === i.opts.momentum || i.dMs > 350 ? (t = i.contentLastPos.left, e = i.contentLastPos.top) : (t = i.contentLastPos.left + 500 * i.velocityX, e = i.contentLastPos.top + 500 * i.velocityY), o = i.limitPosition(t, e, i.contentStartPos.width, i.contentStartPos.height), o.width = i.contentStartPos.width, o.height = i.contentStartPos.height, n.fancybox.animate(i.$content, o, 366)) 1156 }, d.prototype.endZooming = function () { 1157 var t, e, o, i, a = this, 1158 s = a.instance.current, 1159 r = a.newWidth, 1160 c = a.newHeight; 1161 a.contentLastPos && (t = a.contentLastPos.left, e = a.contentLastPos.top, i = { 1162 top: e, 1163 left: t, 1164 width: r, 1165 height: c, 1166 scaleX: 1, 1167 scaleY: 1 1168 }, n.fancybox.setTranslate(a.$content, i), r < a.canvasWidth && c < a.canvasHeight ? a.instance.scaleToFit(150) : r > s.width || c > s.height ? a.instance.scaleToActual(a.centerPointStartX, a.centerPointStartY, 150) : (o = a.limitPosition(t, e, r, c), n.fancybox.animate(a.$content, o, 150))) 1169 }, d.prototype.onTap = function (e) { 1170 var o, i = this, 1171 s = n(e.target), 1172 r = i.instance, 1173 c = r.current, 1174 l = e && a(e) || i.startPoints, 1175 d = l[0] ? l[0].x - n(t).scrollLeft() - i.stagePos.left : 0, 1176 u = l[0] ? l[0].y - n(t).scrollTop() - i.stagePos.top : 0, 1177 f = function (t) { 1178 var o = c.opts[t]; 1179 if (n.isFunction(o) && (o = o.apply(r, [c, e])), o) switch (o) { 1180 case "close": 1181 r.close(i.startEvent); 1182 break; 1183 case "toggleControls": 1184 r.toggleControls(); 1185 break; 1186 case "next": 1187 r.next(); 1188 break; 1189 case "nextOrClose": 1190 r.group.length > 1 ? r.next() : r.close(i.startEvent); 1191 break; 1192 case "zoom": 1193 "image" == c.type && (c.isLoaded || c.$ghost) && (r.canPan() ? r.scaleToFit() : r.isScaledDown() ? r.scaleToActual(d, u) : r.group.length < 2 && r.close(i.startEvent)) 1194 } 1195 }; 1196 if ((!e.originalEvent || 2 != e.originalEvent.button) && (s.is("img") || !(d > s[0].clientWidth + s.offset().left))) { 1197 if (s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container")) o = "Outside"; 1198 else if (s.is(".fancybox-slide")) o = "Slide"; 1199 else { 1200 if (!r.current.$content || !r.current.$content.find(s).addBack().filter(s).length) return; 1201 o = "Content" 1202 } 1203 if (i.tapped) { 1204 if (clearTimeout(i.tapped), i.tapped = null, Math.abs(d - i.tapX) > 50 || Math.abs(u - i.tapY) > 50) return this; 1205 f("dblclick" + o) 1206 } else i.tapX = d, i.tapY = u, c.opts["dblclick" + o] && c.opts["dblclick" + o] !== c.opts["click" + o] ? i.tapped = setTimeout(function () { 1207 i.tapped = null, r.isAnimating || f("click" + o) 1208 }, 500) : f("click" + o); 1209 return this 1210 } 1211 }, n(e).on("onActivate.fb", function (t, e) { 1212 e && !e.Guestures && (e.Guestures = new d(e)) 1213 }).on("beforeClose.fb", function (t, e) { 1214 e && e.Guestures && e.Guestures.destroy() 1215 }) 1216}(window, document, jQuery), 1217function (t, e) { 1218 "use strict"; 1219 e.extend(!0, e.fancybox.defaults, { 1220 btnTpl: { 1221 slideShow: '<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>' 1222 }, 1223 slideShow: { 1224 autoStart: !1, 1225 speed: 3e3, 1226 progress: !0 1227 } 1228 }); 1229 var n = function (t) { 1230 this.instance = t, this.init() 1231 }; 1232 e.extend(n.prototype, { 1233 timer: null, 1234 isActive: !1, 1235 $button: null, 1236 init: function () { 1237 var t = this, 1238 n = t.instance, 1239 o = n.group[n.currIndex].opts.slideShow; 1240 t.$button = n.$refs.toolbar.find("[data-fancybox-play]").on("click", function () { 1241 t.toggle() 1242 }), n.group.length < 2 || !o ? t.$button.hide() : o.progress && (t.$progress = e('<div class="fancybox-progress"></div>').appendTo(n.$refs.inner)) 1243 }, 1244 set: function (t) { 1245 var n = this, 1246 o = n.instance, 1247 i = o.current; 1248 i && (!0 === t || i.opts.loop || o.currIndex < o.group.length - 1) ? n.isActive && "video" !== i.contentType && (n.$progress && e.fancybox.animate(n.$progress.show(), { 1249 scaleX: 1 1250 }, i.opts.slideShow.speed), n.timer = setTimeout(function () { 1251 o.current.opts.loop || o.current.index != o.group.length - 1 ? o.next() : o.jumpTo(0) 1252 }, i.opts.slideShow.speed)) : (n.stop(), o.idleSecondsCounter = 0, o.showControls()) 1253 }, 1254 clear: function () { 1255 var t = this; 1256 clearTimeout(t.timer), t.timer = null, t.$progress && t.$progress.removeAttr("style").hide() 1257 }, 1258 start: function () { 1259 var t = this, 1260 e = t.instance.current; 1261 e && (t.$button.attr("title", (e.opts.i18n[e.opts.lang] || e.opts.i18n.en).PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"), t.isActive = !0, e.isComplete && t.set(!0), t.instance.trigger("onSlideShowChange", !0)) 1262 }, 1263 stop: function () { 1264 var t = this, 1265 e = t.instance.current; 1266 t.clear(), t.$button.attr("title", (e.opts.i18n[e.opts.lang] || e.opts.i18n.en).PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"), t.isActive = !1, t.instance.trigger("onSlideShowChange", !1), t.$progress && t.$progress.removeAttr("style").hide() 1267 }, 1268 toggle: function () { 1269 var t = this; 1270 t.isActive ? t.stop() : t.start() 1271 } 1272 }), e(t).on({ 1273 "onInit.fb": function (t, e) { 1274 e && !e.SlideShow && (e.SlideShow = new n(e)) 1275 }, 1276 "beforeShow.fb": function (t, e, n, o) { 1277 var i = e && e.SlideShow; 1278 o ? i && n.opts.slideShow.autoStart && i.start() : i && i.isActive && i.clear() 1279 }, 1280 "afterShow.fb": function (t, e, n) { 1281 var o = e && e.SlideShow; 1282 o && o.isActive && o.set() 1283 }, 1284 "afterKeydown.fb": function (n, o, i, a, s) { 1285 var r = o && o.SlideShow; 1286 !r || !i.opts.slideShow || 80 !== s && 32 !== s || e(t.activeElement).is("button,a,input") || (a.preventDefault(), r.toggle()) 1287 }, 1288 "beforeClose.fb onDeactivate.fb": function (t, e) { 1289 var n = e && e.SlideShow; 1290 n && n.stop() 1291 } 1292 }), e(t).on("visibilitychange", function () { 1293 var n = e.fancybox.getInstance(), 1294 o = n && n.SlideShow; 1295 o && o.isActive && (t.hidden ? o.clear() : o.set()) 1296 }) 1297}(document, jQuery), 1298function (t, e) { 1299 "use strict"; 1300 var n = function () { 1301 for (var e = [ 1302 ["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"], 1303 ["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"], 1304 ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"], 1305 ["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"], 1306 ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"] 1307 ], n = {}, o = 0; o < e.length; o++) { 1308 var i = e[o]; 1309 if (i && i[1] in t) { 1310 for (var a = 0; a < i.length; a++) n[e[0][a]] = i[a]; 1311 return n 1312 } 1313 } 1314 return !1 1315 }(); 1316 if (n) { 1317 var o = { 1318 request: function (e) { 1319 e = e || t.documentElement, e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT) 1320 }, 1321 exit: function () { 1322 t[n.exitFullscreen]() 1323 }, 1324 toggle: function (e) { 1325 e = e || t.documentElement, this.isFullscreen() ? this.exit() : this.request(e) 1326 }, 1327 isFullscreen: function () { 1328 return Boolean(t[n.fullscreenElement]) 1329 }, 1330 enabled: function () { 1331 return Boolean(t[n.fullscreenEnabled]) 1332 } 1333 }; 1334 e.extend(!0, e.fancybox.defaults, { 1335 btnTpl: { 1336 fullScreen: '<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1336<path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>' 1337 }, 1338 fullScreen: { 1339 autoStart: !1 1340 } 1341 }), e(t).on(n.fullscreenchange, function () { 1342 var t = o.isFullscreen(), 1343 n = e.fancybox.getInstance(); 1344 n && (n.current && "image" === n.current.type && n.isAnimating && (n.isAnimating = !1, n.update(!0, !0, 0), n.isComplete || n.complete()), n.trigger("onFullscreenChange", t), n.$refs.container.toggleClass("fancybox-is-fullscreen", t), n.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter", !t).toggleClass("fancybox-button--fsexit", t)) 1345 }) 1346 } 1347 e(t).on({ 1348 "onInit.fb": function (t, e) { 1349 var i; 1350 if (!n) return void e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove(); 1351 e && e.group[e.currIndex].opts.fullScreen ? (i = e.$refs.container, i.on("click.fb-fullscreen", "[data-fancybox-fullscreen]", function (t) { 1352 t.stopPropagation(), t.preventDefault(), o.toggle() 1353 }
vendor: 12,771 bytes, lines 1353-1571
1353), e.opts.fullScreen && !0 === e.opts.fullScreen.autoStart && o.request(), e.FullScreen = o) : e && e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide() 1354 }, 1355 "afterKeydown.fb": function (t, e, n, o, i) { 1356 e && e.FullScreen && 70 === i && (o.preventDefault(), e.FullScreen.toggle()) 1357 }, 1358 "beforeClose.fb": function (t, e) { 1359 e && e.FullScreen && e.$refs.container.hasClass("fancybox-is-fullscreen") && o.exit() 1360 } 1361 }) 1362}(document, jQuery), 1363function (t, e) { 1364 "use strict"; 1365 var n = "fancybox-thumbs"; 1366 e.fancybox.defaults = e.extend(!0, { 1367 btnTpl: { 1368 thumbs: '<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>' 1369 }, 1370 thumbs: { 1371 autoStart: !1, 1372 hideOnClose: !0, 1373 parentEl: ".fancybox-container", 1374 axis: "y" 1375 } 1376 }, e.fancybox.defaults); 1377 var o = function (t) { 1378 this.init(t) 1379 }; 1380 e.extend(o.prototype, { 1381 $button: null, 1382 $grid: null, 1383 $list: null, 1384 isVisible: !1, 1385 isActive: !1, 1386 init: function (t) { 1387 var e = this, 1388 n = t.group, 1389 o = 0; 1390 e.instance = t, e.opts = n[t.currIndex].opts.thumbs, t.Thumbs = e, e.$button = t.$refs.toolbar.find("[data-fancybox-thumbs]"); 1391 for (var i = 0, a = n.length; i < a && (n[i].thumb && o++, !(o > 1)); i++); 1392 o > 1 && e.opts ? (e.$button.removeAttr("style").on("click", function () { 1393 e.toggle() 1394 }), e.isActive = !0) : e.$button.hide() 1395 }, 1396 create: function () { 1397 var t, o = this, 1398 i = o.instance, 1399 a = o.opts.parentEl, 1400 s = []; 1401 o.$grid || (o.$grid = e('<div class="' + n + " " + n + "-" + o.opts.axis + '"></div>').appendTo(i.$refs.container.find(a).addBack().filter(a)), o.$grid.on("click", "a", function () { 1402 i.jumpTo(e(this).attr("data-index")) 1403 })), o.$list || (o.$list = e('<div class="' + n + '__list">').appendTo(o.$grid)), e.each(i.group, function (e, n) { 1404 t = n.thumb, t || "image" !== n.type || (t = n.src), s.push('<a href="javascript:;" tabindex="0" data-index="' + e + '"' + (t && t.length ? ' style="background-image:url(' + t + ')"' : 'class="fancybox-thumbs-missing"') + "></a>") 1405 }), o.$list[0].innerHTML = s.join(""), "x" === o.opts.axis && o.$list.width(parseInt(o.$grid.css("padding-right"), 10) + i.group.length * o.$list.children().eq(0).outerWidth(!0)) 1406 }, 1407 focus: function (t) { 1408 var e, n, o = this, 1409 i = o.$list, 1410 a = o.$grid; 1411 o.instance.current && (e = i.children().removeClass("fancybox-thumbs-active").filter('[data-index="' + o.instance.current.index + '"]').addClass("fancybox-thumbs-active"), n = e.position(), "y" === o.opts.axis && (n.top < 0 || n.top > i.height() - e.outerHeight()) ? i.stop().animate({ 1412 scrollTop: i.scrollTop() + n.top 1413 }, t) : "x" === o.opts.axis && (n.left < a.scrollLeft() || n.left > a.scrollLeft() + (a.width() - e.outerWidth())) && i.parent().stop().animate({ 1414 scrollLeft: n.left 1415 }, t)) 1416 }, 1417 update: function () { 1418 var t = this; 1419 t.instance.$refs.container.toggleClass("fancybox-show-thumbs", this.isVisible), t.isVisible ? (t.$grid || t.create(), t.instance.trigger("onThumbsShow"), t.focus(0)) : t.$grid && t.instance.trigger("onThumbsHide"), t.instance.update() 1420 }, 1421 hide: function () { 1422 this.isVisible = !1, this.update() 1423 }, 1424 show: function () { 1425 this.isVisible = !0, this.update() 1426 }, 1427 toggle: function () { 1428 this.isVisible = !this.isVisible, this.update() 1429 } 1430 }), e(t).on({ 1431 "onInit.fb": function (t, e) { 1432 var n; 1433 e && !e.Thumbs && (n = new o(e), n.isActive && !0 === n.opts.autoStart && n.show()) 1434 }, 1435 "beforeShow.fb": function (t, e, n, o) { 1436 var i = e && e.Thumbs; 1437 i && i.isVisible && i.focus(o ? 0 : 250) 1438 }, 1439 "afterKeydown.fb": function (t, e, n, o, i) { 1440 var a = e && e.Thumbs; 1441 a && a.isActive && 71 === i && (o.preventDefault(), a.toggle()) 1442 }, 1443 "beforeClose.fb": function (t, e) { 1444 var n = e && e.Thumbs; 1445 n && n.isVisible && !1 !== n.opts.hideOnClose && n.$grid.hide() 1446 } 1447 }) 1448}(document, jQuery), 1449function (t, e) { 1450 "use strict"; 1451 1452 function n(t) { 1453 var e = { 1454 "&": "&", 1455 "<": "<", 1456 ">": ">", 1457 '"': """, 1458 "'": "'", 1459 "/": "/", 1460 "`": "`", 1461 "=": "=" 1462 }; 1463 return String(t).replace(/[&<>"'`=\/]/g, function (t) { 1464 return e[t] 1465 }) 1466 } 1467 e.extend(!0, e.fancybox.defaults, { 1468 btnTpl: { 1469 share: '<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>' 1470 }, 1471 share: { 1472 url: function (t, e) { 1473 return !t.currentHash && "inline" !== e.type && "html" !== e.type && (e.origSrc || e.src) || window.location 1474 }, 1475 tpl: '<div class="fancybox-share"><h1>{{SHARE}}</h1><p><a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>' 1476 } 1477 }), e(t).on("click", "[data-fancybox-share]", function () { 1478 var t, o, i = e.fancybox.getInstance(), 1479 a = i.current || null; 1480 a && ("function" === e.type(a.opts.share.url) && (t = a.opts.share.url.apply(a, [i, a])), o = a.opts.share.tpl.replace(/\{\{media\}\}/g, "image" === a.type ? encodeURIComponent(a.src) : "").replace(/\{\{url\}\}/g, encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g, n(t)).replace(/\{\{descr\}\}/g, i.$caption ? encodeURIComponent(i.$caption.text()) : ""), e.fancybox.open({ 1481 src: i.translate(i, o), 1482 type: "html", 1483 opts: { 1484 touch: !1, 1485 animationEffect: !1, 1486 afterLoad: function (t, e) { 1487 i.$refs.container.one("beforeClose.fb", function () { 1488 t.close(null, 0) 1489 }), e.$content.find(".fancybox-share__button").click(function () { 1490 return window.open(this.href, "Share", "width=550, height=450"), !1 1491 }) 1492 }, 1493 mobile: { 1494 autoFocus: !1 1495 } 1496 } 1497 })) 1498 }) 1499}(document, jQuery), 1500function (t, e, n) { 1501 "use strict"; 1502 1503 function o() { 1504 var e = t.location.hash.substr(1), 1505 n = e.split("-"), 1506 o = n.length > 1 && /^\+?\d+$/.test(n[n.length - 1]) ? parseInt(n.pop(-1), 10) || 1 : 1, 1507 i = n.join("-"); 1508 return { 1509 hash: e, 1510 index: o < 1 ? 1 : o, 1511 gallery: i 1512 } 1513 } 1514 1515 function i(t) { 1516 "" !== t.gallery && n("[data-fancybox='" + n.escapeSelector(t.gallery) + "']").eq(t.index - 1).focus().trigger("click.fb-start") 1517 } 1518 1519 function a(t) { 1520 var e, n; 1521 return !!t && (e = t.current ? t.current.opts : t.opts, "" !== (n = e.hash || (e.$orig ? e.$orig.data("fancybox") || e.$orig.data("fancybox-trigger") : "")) && n) 1522 } 1523 n.escapeSelector || (n.escapeSelector = function (t) { 1524 return (t + "").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g, function (t, e) { 1525 return e ? "\0" === t ? "ÃÆÃ¯ÃâÿÃâý" : t.slice(0, -1) + "\\" + t.charCodeAt(t.length - 1).toString(16) + " " : "\\" + t 1526 }) 1527 }), n(function () { 1528 !1 !== n.fancybox.defaults.hash && (n(e).on({ 1529 "onInit.fb": function (t, e) { 1530 var n, i; 1531 !1 !== e.group[e.currIndex].opts.hash && (n = o(), (i = a(e)) && n.gallery && i == n.gallery && (e.currIndex = n.index - 1)) 1532 }, 1533 "beforeShow.fb": function (n, o, i, s) { 1534 var r; 1535 i && !1 !== i.opts.hash && (r = a(o)) && (o.currentHash = r + (o.group.length > 1 ? "-" + (i.index + 1) : ""), t.location.hash !== "#" + o.currentHash && (s && !o.origHash && (o.origHash = t.location.hash), o.hashTimer && clearTimeout(o.hashTimer), o.hashTimer = setTimeout(function () { 1536 "replaceState" in t.history ? (t.history[s ? "pushState" : "replaceState"]({}, e.title, t.location.pathname + t.location.search + "#" + o.currentHash), s && (o.hasCreatedHistory = !0)) : t.location.hash = o.currentHash, o.hashTimer = null 1537 }, 300))) 1538 }, 1539 "beforeClose.fb": function (n, o, i) { 1540 i && !1 !== i.opts.hash && (clearTimeout(o.hashTimer), o.currentHash && o.hasCreatedHistory ? t.history.back() : o.currentHash && ("replaceState" in t.history ? t.history.replaceState({}, e.title, t.location.pathname + t.location.search + (o.origHash || "")) : t.location.hash = o.origHash), o.currentHash = null) 1541 } 1542 }), n(t).on("hashchange.fb", function () { 1543 var t = o(), 1544 e = null; 1545 n.each(n(".fancybox-container").get().reverse(), function (t, o) { 1546 var i = n(o).data("FancyBox"); 1547 if (i && i.currentHash) return e = i, !1 1548 }), e ? e.currentHash === t.gallery + "-" + t.index || 1 === t.index && e.currentHash == t.gallery || (e.currentHash = null, e.close()) : "" !== t.gallery && i(t) 1549 }), setTimeout(function () { 1550 n.fancybox.getInstance() || i(o()) 1551 }, 50)) 1552 }) 1553}(window, document, jQuery), 1554function (t, e) { 1555 "use strict"; 1556 var n = (new Date).getTime(); 1557 e(t).on({ 1558 "onInit.fb": function (t, e, o) { 1559 e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll", function (t) { 1560 var o = e.current, 1561 i = (new Date).getTime(); 1562 e.group.length < 2 || !1 === o.opts.wheel || "auto" === o.opts.wheel && "image" !== o.type || (t.preventDefault(), t.stopPropagation(), o.$slide.hasClass("fancybox-animated") || (t = t.originalEvent || t, i - n < 250 || (n = i, e[(-t.deltaY || -t.deltaX || t.wheelDelta || -t.detail) < 0 ? "next" : "previous"]()))) 1563 }) 1564 } 1565 }) 1566}(document, jQuery); 1567 1568 1569// wow 1570! function (a, b) { 1571 if ("function" == typeof define && define.amd) define(["module", "exports"], b);
vendor: 14,152 bytes, lines 1572-1875
1572 else if ("undefined" != typeof exports) b(module, exports); 1573 else { 1574 var c = { 1575 exports: {} 1576 }; 1577 b(c, c.exports), a.WOW = c.exports 1578 } 1579}(this, function (a, b) { 1580 "use strict"; 1581 1582 function c(a, b) { 1583 if (!(a instanceof b)) throw new TypeError("Cannot call a class as a function") 1584 } 1585 1586 function d(a, b) { 1587 return b.indexOf(a) >= 0 1588 } 1589 1590 function e(a, b) { 1591 for (var c in b) 1592 if (null == a[c]) { 1593 var d = b[c]; 1594 a[c] = d 1595 } return a 1596 } 1597 1598 function f(a) { 1599 return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a) 1600 } 1601 1602 function g(a) { 1603 var b = arguments.length <= 1 || void 0 === arguments[1] ? !1 : arguments[1], 1604 c = arguments.length <= 2 || void 0 === arguments[2] ? !1 : arguments[2], 1605 d = arguments.length <= 3 || void 0 === arguments[3] ? null : arguments[3], 1606 e = void 0; 1607 return null != document.createEvent ? (e = document.createEvent("CustomEvent"), e.initCustomEvent(a, b, c, d)) : null != document.createEventObject ? (e = document.createEventObject(), e.eventType = a) : e.eventName = a, e 1608 } 1609 1610 function h(a, b) { 1611 null != a.dispatchEvent ? a.dispatchEvent(b) : b in (null != a) ? a[b]() : "on" + b in (null != a) && a["on" + b]() 1612 } 1613 1614 function i(a, b, c) { 1615 null != a.addEventListener ? a.addEventListener(b, c, !1) : null != a.attachEvent ? a.attachEvent("on" + b, c) : a[b] = c 1616 } 1617 1618 function j(a, b, c) { 1619 null != a.removeEventListener ? a.removeEventListener(b, c, !1) : null != a.detachEvent ? a.detachEvent("on" + b, c) : delete a[b] 1620 } 1621 1622 function k() { 1623 return "innerHeight" in window ? window.innerHeight : document.documentElement.clientHeight 1624 } 1625 Object.defineProperty(b, "__esModule", { 1626 value: !0 1627 }); 1628 var l, m, n = function () { 1629 function a(a, b) { 1630 for (var c = 0; c < b.length; c++) { 1631 var d = b[c]; 1632 d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(a, d.key, d) 1633 } 1634 } 1635 return function (b, c, d) { 1636 return c && a(b.prototype, c), d && a(b, d), b 1637 } 1638 }(), 1639 o = window.WeakMap || window.MozWeakMap || function () { 1640 function a() { 1641 c(this, a), this.keys = [], this.values = [] 1642 } 1643 return n(a, [{ 1644 key: "get", 1645 value: function (a) { 1646 for (var b = 0; b < this.keys.length; b++) { 1647 var c = this.keys[b]; 1648 if (c === a) return this.values[b] 1649 } 1650 } 1651 }, { 1652 key: "set", 1653 value: function (a, b) { 1654 for (var c = 0; c < this.keys.length; c++) { 1655 var d = this.keys[c]; 1656 if (d === a) return this.values[c] = b, this 1657 } 1658 return this.keys.push(a), this.values.push(b), this 1659 } 1660 }]), a 1661 }(), 1662 p = window.MutationObserver || window.WebkitMutationObserver || window.MozMutationObserver || (m = l = function () { 1663 function a() { 1664 c(this, a), "undefined" != typeof console && null !== console && (console.warn("MutationObserver is not supported by your browser."), console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")) 1665 } 1666 return n(a, [{ 1667 key: "observe", 1668 value: function () {} 1669 }]), a 1670 }(), l.notSupported = !0, m), 1671 q = window.getComputedStyle || function (a) { 1672 var b = /(\-([a-z]){1})/g; 1673 return { 1674 getPropertyValue: function (c) { 1675 "float" === c && (c = "styleFloat"), b.test(c) && c.replace(b, function (a, b) { 1676 return b.toUpperCase() 1677 }); 1678 var d = a.currentStyle; 1679 return (null != d ? d[c] : void 0) || null 1680 } 1681 } 1682 }, 1683 r = function () { 1684 function a() { 1685 var b = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0]; 1686 c(this, a), this.defaults = { 1687 boxClass: "wow", 1688 animateClass: "animated", 1689 offset: 0, 1690 mobile: !0, 1691 live: !0, 1692 callback: null, 1693 scrollContainer: null, 1694 resetAnimation: !0 1695 }, this.animate = function () { 1696 return "requestAnimationFrame" in window ? function (a) { 1697 return window.requestAnimationFrame(a) 1698 } : function (a) { 1699 return a() 1700 } 1701 }(), this.vendors = ["moz", "webkit"], this.start = this.start.bind(this), this.resetAnimation = this.resetAnimation.bind(this), this.scrollHandler = this.scrollHandler.bind(this), this.scrollCallback = this.scrollCallback.bind(this), this.scrolled = !0, this.config = e(b, this.defaults), null != b.scrollContainer && (this.config.scrollContainer = document.querySelector(b.scrollContainer)), this.animationNameCache = new o, this.wowEvent = g(this.config.boxClass) 1702 } 1703 return n(a, [{ 1704 key: "init", 1705 value: function () { 1706 this.element = window.document.documentElement, d(document.readyState, ["interactive", "complete"]) ? this.start() : i(document, "DOMContentLoaded", this.start), this.finished = [] 1707 } 1708 }, { 1709 key: "start", 1710 value: function () { 1711 var a = this; 1712 if (this.stopped = !1, this.boxes = [].slice.call(this.element.querySelectorAll("." + this.config.boxClass)), this.all = this.boxes.slice(0), this.boxes.length) 1713 if (this.disabled()) this.resetStyle(); 1714 else 1715 for (var b = 0; b < this.boxes.length; b++) { 1716 var c = this.boxes[b]; 1717 this.applyStyle(c, !0) 1718 } 1719 if (this.disabled() || (i(this.config.scrollContainer || window, "scroll", this.scrollHandler), i(window, "resize", this.scrollHandler), this.interval = setInterval(this.scrollCallback, 50)), this.config.live) { 1720 var d = new p(function (b) { 1721 for (var c = 0; c < b.length; c++) 1722 for (var d = b[c], e = 0; e < d.addedNodes.length; e++) { 1723 var f = d.addedNodes[e]; 1724 a.doSync(f) 1725 } 1726 }); 1727 d.observe(document.body, { 1728 childList: !0, 1729 subtree: !0 1730 }) 1731 } 1732 } 1733 }, { 1734 key: "stop", 1735 value: function () { 1736 this.stopped = !0, j(this.config.scrollContainer || window, "scroll", this.scrollHandler), j(window, "resize", this.scrollHandler), null != this.interval && clearInterval(this.interval) 1737 } 1738 }, { 1739 key: "sync", 1740 value: function () { 1741 p.notSupported && this.doSync(this.element) 1742 } 1743 }, { 1744 key: "doSync", 1745 value: function (a) { 1746 if ("undefined" != typeof a && null !== a || (a = this.element), 1 === a.nodeType) { 1747 a = a.parentNode || a; 1748 for (var b = a.querySelectorAll("." + this.config.boxClass), c = 0; c < b.length; c++) { 1749 var e = b[c]; 1750 d(e, this.all) || (this.boxes.push(e), this.all.push(e), this.stopped || this.disabled() ? this.resetStyle() : this.applyStyle(e, !0), this.scrolled = !0) 1751 } 1752 } 1753 } 1754 }, { 1755 key: "show", 1756 value: function (a) { 1757 return this.applyStyle(a), a.className = a.className + " " + this.config.animateClass, null != this.config.callback && this.config.callback(a), h(a, this.wowEvent), this.config.resetAnimation && (i(a, "animationend", this.resetAnimation), i(a, "oanimationend", this.resetAnimation), i(a, "webkitAnimationEnd", this.resetAnimation), i(a, "MSAnimationEnd", this.resetAnimation)), a 1758 } 1759 }, { 1760 key: "applyStyle", 1761 value: function (a, b) { 1762 var c = this, 1763 d = a.getAttribute("data-wow-duration"), 1764 e = a.getAttribute("data-wow-delay"), 1765 f = a.getAttribute("data-wow-iteration"); 1766 return this.animate(function () { 1767 return c.customStyle(a, b, d, e, f) 1768 }) 1769 } 1770 }, { 1771 key: "resetStyle", 1772 value: function () { 1773 for (var a = 0; a < this.boxes.length; a++) { 1774 var b = this.boxes[a]; 1775 b.style.visibility = "visible" 1776 } 1777 } 1778 }, { 1779 key: "resetAnimation", 1780 value: function (a) { 1781 if (a.type.toLowerCase().indexOf("animationend") >= 0) { 1782 var b = a.target || a.srcElement; 1783 b.className = b.className.replace(this.config.animateClass, "").trim() 1784 } 1785 } 1786 }, { 1787 key: "customStyle", 1788 value: function (a, b, c, d, e) { 1789 return b && this.cacheAnimationName(a), a.style.visibility = b ? "hidden" : "visible", c && this.vendorSet(a.style, { 1790 animationDuration: c 1791 }), d && this.vendorSet(a.style, { 1792 animationDelay: d 1793 }), e && this.vendorSet(a.style, { 1794 animationIterationCount: e 1795 }), this.vendorSet(a.style, { 1796 animationName: b ? "none" : this.cachedAnimationName(a) 1797 }), a 1798 } 1799 }, { 1800 key: "vendorSet", 1801 value: function (a, b) { 1802 for (var c in b) 1803 if (b.hasOwnProperty(c)) { 1804 var d = b[c]; 1805 a["" + c] = d; 1806 for (var e = 0; e < this.vendors.length; e++) { 1807 var f = this.vendors[e]; 1808 a["" + f + c.charAt(0).toUpperCase() + c.substr(1)] = d 1809 } 1810 } 1811 } 1812 }, { 1813 key: "vendorCSS", 1814 value: function (a, b) { 1815 for (var c = q(a), d = c.getPropertyCSSValue(b), e = 0; e < this.vendors.length; e++) { 1816 var f = this.vendors[e]; 1817 d = d || c.getPropertyCSSValue("-" + f + "-" + b) 1818 } 1819 return d 1820 } 1821 }, { 1822 key: "animationName", 1823 value: function (a) { 1824 var b = void 0; 1825 try { 1826 b = this.vendorCSS(a, "animation-name").cssText 1827 } catch (c) { 1828 b = q(a).getPropertyValue("animation-name") 1829 } 1830 return "none" === b ? "" : b 1831 } 1832 }, { 1833 key: "cacheAnimationName", 1834 value: function (a) { 1835 return this.animationNameCache.set(a, this.animationName(a)) 1836 } 1837 }, { 1838 key: "cachedAnimationName", 1839 value: function (a) { 1840 return this.animationNameCache.get(a) 1841 } 1842 }, { 1843 key: "scrollHandler", 1844 value: function () { 1845 this.scrolled = !0 1846 } 1847 }, { 1848 key: "scrollCallback", 1849 value: function () { 1850 if (this.scrolled) { 1851 this.scrolled = !1; 1852 for (var a = [], b = 0; b < this.boxes.length; b++) { 1853 var c = this.boxes[b]; 1854 if (c) { 1855 if (this.isVisible(c)) { 1856 this.show(c); 1857 continue 1858 } 1859 a.push(c) 1860 } 1861 } 1862 this.boxes = a, this.boxes.length || this.config.live || this.stop() 1863 } 1864 } 1865 }, { 1866 key: "offsetTop", 1867 value: function (a) { 1868 for (; void 0 === a.offsetTop;) a = a.parentNode; 1869 for (var b = a.offsetTop; a.offsetParent;) a = a.offsetParent, b += a.offsetTop; 1870 return b 1871 } 1872 }, { 1873 key: "isVisible", 1874 value: function (a) { 1875 var b = a.getAttribute("data-wow-offset") || this.config.offset,
1876 c = this.config.scrollContainer && this.config.scrollContainer.scrollTop || window.pageYOffset, 1877 d = c + Math.min(this.element.clientHeight, k()) - b, 1878 e = this.offsetTop(a), 1879 f = e + a.clientHeight; 1880 return d >= e && f >= c 1881 } 1882 }, { 1883 key: "disabled", 1884 value: function () { 1885 return !this.config.mobile && f(navigator.userAgent) 1886 } 1887 }]), a 1888 }(); 1889 b["default"] = r, a.exports = b["default"] 1890}); 1891 1892 1893// adaptivetoggle 1894$(document).on('click', '.adaptivetoggle a', function (event) { 1895 event.preventDefault(); 1896 1897 $.ajax({ 1898 url: '/option/js/adaptivetoggle/ajax.php?act=toggle', 1899 type: "POST", 1900 cache: false, 1901 //data:data, 1902 success: function (data) { 1903 //console.log('adp_ajax'); 1904 //location.reload() 1905 1906 //need otherwise it's not 1907 var href = location.href.split('#'); 1908 location.href = href[0]; 1909 } 1910 }); 1911}); 1912 1913$(function () { 1914 var width = screen.width; //width this screen,no document 1915 //console.log(width); 1916 if (width <= 1024) { 1917 $('.adaptivetoggle').show(); 1918 } else { //no need to hide 1919 //$('.adaptivetoggle').hide(); 1920 } 1921}); 1922 1923 1924// dialogred 1925function dialogred_past(data) { 1926 $('.dialogred_data').html(data); 1927} 1928 1929function dialogred_loading_show() { 1930 $('.dialogred_modal').addClass('loading'); 1931} 1932 1933function dialogred_loading_hide() { 1934 $('.dialogred_modal').removeClass('loading'); 1935} 1936 1937function dialogred(data) { 1938 if (data.width == undefined) { 1939 data.width = '600'; 1940 } 1941 if (data.height == undefined) { 1942 data.height = '300'; 1943 } 1944 if (data.data == undefined) { 1945 data.data = 0; 1946 } 1947 if (data.loading_bool == undefined) { 1948 data.loading_bool = 0; 1949 } 1950 1951 if (data.template == undefined) { 1952 data.template = ''; 1953 } 1954 1955 if (data.close_template == undefined) { 1956 data.close_template = '1'; 1957 } 1958 1959 //twice 1960 $('.dialogred_inner2').css({ 1961 'max-width': data.width + 'px', 1962 }); 1963 1964 if (!$(".dialogred_modal").length) { 1965 var dialkarkas = ''; 1966 //dialkarkas+='<div class="dialogred_zanoves"></div>'; 1967 dialkarkas += '<div class="dialogred_modal" data-template="' + data.template + '" data-close_template="' + data.close_template + '">' + 1968 //'<div class="dialogred_wall"></div>' + 1969 '<div class="dialogred_inner">' + 1970 '<div class="dialogred_overlay"></div>' + 1971 '<div class="dialogred_inner2">' + 1972 '<div class="dialogred_close"><span class="dialogred_close_img"></span></div>' + 1973 '<div class="dialogred_data"></div>' + 1974 '</div>' + 1975 //'<div class="dialogred_wall2">' + 1976 //'<div class="dialogred_close"><span class="dialogred_close_img"></span></div>'+ 1977 //'</div>' + 1978 '</div>' + 1979 '<div class="dialogred_loader">' + 1980 '<div class="dialogred_loader1">' + 1981 '<div class="rect1"></div>' + 1982 '<div class="rect2"></div>' + 1983 '<div class="rect3"></div>' + 1984 '<div class="rect4"></div>' + 1985 '<div class="rect5"></div>' + 1986 '</div>' + 1987 '</div>' + 1988 '</div>'; 1989 1990 $("body").append(dialkarkas); 1991 } 1992 1993 //twice 1994 $('.dialogred_inner2').css({ 1995 'max-width': data.width + 'px', 1996 }); 1997 1998 1999 if (data.loading_bool) { 2000 dialogred_loading_show(); 2001 } 2002 2003 dialogred_past(data.data); 2004 2005 //if (!$(".body_dialogred_open").length){ 2006 $('body').animate({ 2007 scrollTop: 0 2008 }, 2000); 2009 //} 2010 2011 if (!$(".body_dialogred_open").length) { 2012 //opening 2013 var scrTop = $(window).scrollTop(); 2014 //console.log('scrTop:'+scrTop); 2015 2016 $('body,html').animate({ 2017 scrollTop: 0 2018 }, 0); 2019 2020 $('body').addClass('body_dialogred_open'); 2021 2022 $('.cmsl_outer').css({ 2023 top: '-' + scrTop + 'px' 2024 }); 2025 $('.cmsl_outer').data('top', scrTop); 2026 $('.cmsl_outer').attr('data-top', scrTop); 2027 } 2028 2029 if (!data.loading_bool) { 2030 dialogred_loading_hide(); 2031 2032 $('body').addClass('body_dialogred_inner_show'); 2033 2034 setTimeout(function () { 2035 $('.dialogred_inner').addClass('dialogred_inner_show'); 2036 }, 100); 2037 } 2038} 2039 2040function dialogred_close() { 2041 if ($('body').hasClass('body_dialogred_inner_show')) { //to not close before open 2042 $('body').removeClass('body_dialogred_open'); 2043 2044 var indent = $('.cmsl_outer').data('top'); 2045 //console.log('indent:'+indent); 2046 $('.cmsl_outer').css({ 2047 top: '0' 2048 }); 2049 $('body,html').animate({ 2050 scrollTop: indent + 'px' 2051 }, 0); 2052 2053 $('body').removeClass('body_dialogred_inner_show'); 2054 $('.dialogred_inner').removeClass('dialogred_inner_show'); 2055 2056 $('.dialogred_modal').remove(); 2057 } 2058} 2059 2060 2061$(document).on("click", ".dialogred_close, .dialogred_close2", function () { 2062 //console.log(dialogred_close_bool); 2063 dialogred_close(); 2064}); 2065 2066/* 2067//$(document).mouseup(function(e){
2068$(document).on('click',function(e){ 2069 //console.log('x1'); 2070 if ($(e.target).closest(".dialogred_inner").length) return; 2071 dialogred_close(); 2072 e.stopPropagation(); 2073}); 2074*/ 2075 2076$(document).on('click', '.dialogred_overlay', function (e) { 2077 dialogred_close(); 2078 e.stopPropagation(); 2079}); 2080 2081 2082 2083// dialogred2 2084function dialogred2_past(data) { 2085 $('.dialogred2_data').html(data); 2086} 2087 2088function dialogred2_loading_show() { 2089 $('.dialogred2_modal').addClass('loading'); 2090} 2091 2092function dialogred2_loading_hide() { 2093 $('.dialogred2_modal').removeClass('loading'); 2094} 2095 2096function dialogred2(data) { 2097 if (data.width == undefined) { 2098 data.width = '600'; 2099 } 2100 if (data.height == undefined) { 2101 data.height = '300'; 2102 } 2103 if (data.data == undefined) { 2104 data.data = 0; 2105 } 2106 if (data.loading_bool == undefined) { 2107 data.loading_bool = 0; 2108 } 2109 2110 if (data.template == undefined) { 2111 data.template = ''; 2112 } 2113 2114 if (data.close_template == undefined) { 2115 data.close_template = '1'; 2116 } 2117 2118 //twice 2119 $('.dialogred2_inner2').css({ 2120 'max-width': data.width + 'px', 2121 }); 2122 2123 if (!$(".dialogred2_modal").length) { 2124 var dialkarkas = ''; 2125 //dialkarkas+='<div class="dialogred2_zanoves"></div>'; 2126 dialkarkas += '<div class="dialogred2_modal" data-template="' + data.template + '" data-close_template="' + data.close_template + '">' + 2127 //'<div class="dialogred2_wall"></div>' + 2128 '<div class="dialogred2_inner">' + 2129 '<div class="dialogred2_overlay"></div>' + 2130 '<div class="dialogred2_inner2">' + 2131 '<div class="dialogred2_close"><span class="dialogred2_close_img"></span></div>' + 2132 '<div class="dialogred2_data"></div>' + 2133 '</div>' + 2134 //'<div class="dialogred2_wall2">' + 2135 //'<div class="dialogred2_close"><span class="dialogred2_close_img"></span></div>'+ 2136 //'</div>' + 2137 '</div>' + 2138 '<div class="dialogred2_loader">' + 2139 '<div class="dialogred2_loader1">' + 2140 '<div class="rect1"></div>' + 2141 '<div class="rect2"></div>' + 2142 '<div class="rect3"></div>' + 2143 '<div class="rect4"></div>' + 2144 '<div class="rect5"></div>' + 2145 '</div>' + 2146 '</div>' + 2147 '</div>'; 2148 2149 $("body").append(dialkarkas); 2150 } 2151 2152 //twice 2153 $('.dialogred2_inner2').css({ 2154 'max-width': data.width + 'px', 2155 }); 2156 2157 2158 if (data.loading_bool) { 2159 dialogred2_loading_show(); 2160 } 2161 2162 dialogred2_past(data.data); 2163 2164 //if (!$(".body_dialogred2_open").length){ 2165 $('body').animate({ 2166 scrollTop: 0 2167 }, 2000); 2168 //} 2169 2170 if (!$(".body_dialogred2_open").length) { 2171 //opening 2172 var scrTop = $(window).scrollTop(); 2173 //console.log('scrTop:'+scrTop); 2174 2175 $('body,html').animate({ 2176 scrollTop: 0 2177 }, 0); 2178 2179 $('body').addClass('body_dialogred2_open'); 2180 2181 $('.cmsl_outer').css({ 2182 top: '-' + scrTop + 'px' 2183 }); 2184 $('.cmsl_outer').data('top', scrTop); 2185 $('.cmsl_outer').attr('data-top', scrTop); 2186 } 2187 2188 if (!data.loading_bool) { 2189 dialogred2_loading_hide(); 2190 2191 $('body').addClass('body_dialogred2_inner_show'); 2192 2193 setTimeout(function () { 2194 $('.dialogred2_inner').addClass('dialogred2_inner_show'); 2195 }, 100); 2196 } 2197} 2198 2199function dialogred2_close() { 2200 if ($('body').hasClass('body_dialogred2_inner_show')) { //to not close before open 2201 $('body').removeClass('body_dialogred2_open'); 2202 2203 var indent = $('.cmsl_outer').data('top'); 2204 //console.log('indent:'+indent); 2205 $('.cmsl_outer').css({ 2206 top: '0' 2207 }); 2208 $('body,html').animate({ 2209 scrollTop: indent + 'px' 2210 }, 0); 2211 2212 $('body').removeClass('body_dialogred2_inner_show'); 2213 $('.dialogred2_inner').removeClass('dialogred2_inner_show'); 2214 2215 $('.dialogred2_modal').remove(); 2216 } 2217} 2218 2219 2220$(document).on("click", ".dialogred2_close, .dialogred2_close2", function () { 2221 //console.log(dialogred2_close_bool); 2222 dialogred2_close(); 2223}); 2224 2225/* 2226//$(document).mouseup(function(e){
2227$(document).on('click',function(e){ 2228 //console.log('x1'); 2229 if ($(e.target).closest(".dialogred2_inner").length) return; 2230 dialogred2_close(); 2231 e.stopPropagation(); 2232}); 2233*/ 2234 2235$(document).on('click', '.dialogred2_overlay', function (e) { 2236 dialogred2_close(); 2237 e.stopPropagation(); 2238}); 2239 2240 2241// zakazonline 2242$(document).on('click', '.zakazonline', function (event) { 2243 event.preventDefault(); 2244 event.stopPropagation(); 2245 2246 var param = $(this).data('zakazonline-param'); 2247 var zagol1 = $(this).data('zakazonline-zagol1'); 2248 var zagol2 = $(this).data('zakazonline-zagol2'); 2249 var template = $(this).data('zakazonline-template'); //1,2 2250 var goal = $(this).data('zakazonline-goal'); 2251 2252 /* 2253 var direct_id=''; 2254 if ($('.sendparamunion__direct_id').length){ 2255 direct_id=$('.sendparamunion__direct_id').html(); 2256 } 2257 */ 2258 2259 if (typeof param === "undefined") { 2260 param = ''; 2261 } 2262 if (typeof zagol1 === "undefined") { 2263 zagol1 = ''; 2264 } 2265 zagol1 = encodeURIComponent(zagol1).replace(/'/g, "%60"); 2266 if (typeof zagol2 === "undefined") { 2267 zagol2 = ''; 2268 } 2269 zagol2 = encodeURIComponent(zagol2).replace(/'/g, "%60"); 2270 //console.log('param:'+param+', zagol1:'+zagol1+', zagol2:'+zagol2); 2271 2272 if (typeof template === "undefined") { 2273 template = '1'; 2274 } 2275 2276 if (typeof goal === "undefined") { 2277 goal = ''; 2278 } 2279 2280 var formdata = {}; //no quadro 2281 if (param) { 2282 $(param).addClass('loading'); 2283 $(param).find('.dialogclass_button').attr('disabled', true); 2284 2285 formdata = $(param + ' form').serializeAll('json'); 2286 } 2287 formdata['urlsend'] = location.href; 2288 //console.log(formdata); 2289 2290 if (!param) { 2291 dialogred({ 2292 data: '', 2293 loading_bool: 1, 2294 width: '450', 2295 close_template: '2', 2296 }); 2297 } 2298 2299 if (param) { 2300 $('.zakazonline__wrap button').prop('disabled', true); 2301 } 2302 2303 //+'&direct_id='+direct_id 2304 $.ajax({
2305 type: 'POST', 2306 url: '/plugin/zakazonline/ajax.php?param=' + param + '&zagol1=' + zagol1 + '&zagol2=' + zagol2 + '&template=' + template + '&goal=' + goal, 2307 cache: false, 2308 data: formdata, 2309 success: function (data) { 2310 dialogred({ 2311 data: data, 2312 width: '450', 2313 }) 2314 2315 $('.dialogclass input').attr('autocomplete', 'off'); 2316 } 2317 }); 2318}); 2319 2320 2321// options/script.js 2322$.preloadImages = function () { 2323 for (var i = 0; i < arguments.length; i++) { 2324 $("<img>").attr("src", arguments[i]); 2325 //console.log(arguments[i]); 2326 } 2327}; 2328 2329$(document).on('click', '.anchorto', function () { 2330 var id = $(this).attr('rel'); 2331 var o = $('#anchorto_' + id).offset(); 2332 //console.log(o); 2333 if (o.top > 0) { 2334 $('body,html').animate({ 2335 scrollTop: o.top 2336 }, 500); 2337 } 2338}); 2339 2340function Get(par1) { 2341 location.href = par1; 2342} 2343 2344function Intval(mixed_var, base) { 2345 var type = typeof (mixed_var); 2346 if (type === 'boolean') { 2347 return +mixed_var; 2348 } else if (type === 'string') { 2349 var tmp = parseInt(mixed_var, base || 10); 2350 return (isNaN(tmp) || !isFinite(tmp)) ? 0 : tmp; 2351 } else if (type === 'number' && isFinite(mixed_var)) { 2352 return mixed_var | 0; 2353 } else { 2354 return 0; 2355 } 2356} 2357 2358function Posmo(par, d_tx_block, d_tx_none, thiss) { 2359 var d = $('#posmo_' + par).css('display'); 2360 if (d != 'none') { 2361 $(thiss).html(d_tx_block); 2362 } else { 2363 $(thiss).html(d_tx_none); 2364 } 2365 if (d == 'none') { 2366 $('#posmo_' + par).slideDown(300); 2367 2368 } else {
2369 $('#posmo_' + par).slideUp(320); 2370 } 2371} 2372 2373(function ($) { 2374 $.fn.serializeAll = function (type) { 2375 if (type == 'uri') { 2376 var toReturn = []; 2377 var els = $(this).find(':input').get(); 2378 $.each(els, function () { 2379 if (this.name && !this.disabled && (this.checked || /select|textarea/i.test(this.nodeName) || /text|hidden|password/i.test(this.type))) { 2380 var val = $(this).val(); 2381 toReturn.push(encodeURIComponent(this.name) + "=" + encodeURIComponent(val)); 2382 } 2383 }); 2384 return toReturn.join("&").replace(/%20/g, "+"); 2385 } 2386 2387 if (type == 'json') { 2388 var els = $(this).find(':input').get(); 2389 var json = {}; 2390 $.map($(els).serializeArray(), function (n, i) { 2391 value = n['value']; 2392 value = encodeURIComponent(value).replace(/'/g, "%60"); 2393 json[n['name']] = value; 2394 }); 2395 return json; 2396 }; 2397 }; 2398})(jQuery); 2399 2400 2401$(function () { 2402 $(".gallerybox").data('fancybox', ''); 2403 $(".gallerybox").attr('data-fancybox', ''); 2404 2405 $(".gallerybox_group1").data('fancybox', 'gallerybox_group1'); 2406 $(".gallerybox_group1").attr('data-fancybox', 'gallerybox_group1'); 2407}); 2408 2409 2410//<a href="#" class="site_dialog" data-id="210">page name</a> 2411$(document).on('click', '.site_dialog', function (event) { 2412 event.preventDefault(); 2413 2414 var id = $(this).data('id'); 2415 //console.log('id:'+id); 2416 2417 if (id) { 2418 dialogred({ 2419 data: '', 2420 loading_bool: 1, 2421 width: '600', 2422 //template:'1', 2423 }); 2424 2425 $.ajax({
2426 type: 'GET', 2427 url: '/option/ajax.php?task=site_dialog&id=' + id, 2428 cache: false, 2429 data: {}, 2430 success: function (data) { 2431 //console.log('data:'+data); 2432 2433 dialogred({ 2434 data: data, 2435 width: '600', 2436 //template:'1', 2437 }) 2438 } 2439 }); 2440 } 2441}); 2442 2443// upononline 2444function upononline_send(gennum) { 2445 var parent1 = $('.upononline[data-gennum="' + gennum + '"]'); 2446 2447 //var formdata={}; 2448 var form = parent1.find('form')[0]; 2449 var fd = new FormData(form); 2450 //fd.append("username", "Groucho"); 2451 //fd.append('tax_file', parent1.find('.upononline_attach_styling_inputfile')[0].files[0]); 2452 2453 fd.append("urlsend", location.href); 2454 2455 //console.log(fd);//no print formData somehow 2456 // Display the key/value pairs 2457 //for (var pair of fd.entries()){ 2458 //console.log(pair[0]+ ', '+ pair[1]); 2459 //} 2460 2461 //return; 2462 2463 //formdata=parent1.find('.upononline_form').serializeJSON({}); 2464 //serializeJSON({}); 2465 //serializeAll('json'); 2466 //formdata['urlsend']=location.href; 2467 //console.log(formdata); 2468 2469 parent1.find('.upononline_button').prop('disabled', true); 2470 2471 $.ajax({
2472 type: 'POST', 2473 url: '/plugin/upononline/ajax.php?task=send', 2474 data: fd, 2475 contentType: false, 2476 processData: false, 2477 cache: false, 2478 success: function (data) { 2479 //console.log(data); 2480 2481 parent1.removeClass('loading'); 2482 parent1.removeClass('error'); 2483 parent1.find('.upononline_button').prop('disabled', false); 2484 2485 parent1.find('.upononline_label').removeClass('err'); 2486 2487 setTimeout(function () { 2488 var split1 = data.split('||'); 2489 //console.log(split1); 2490 if (split1[0] == 'result') { 2491 //parent1.find('.upononline_form_content').css({'visibility':'hidden'}); 2492 //parent1.find('.upononline_result').show(); 2493 parent1.addClass('result'); 2494 } else if (split1[0] == 'error') { 2495 var split2 = split1[1].split('|'); 2496 for (i = 0; i < split2.length; i++) { 2497 var key = split2[i]; 2498 //console.log(key); 2499 //console.log(gennum); 2500 //console.log(parent1); 2501 if (key == "g-recaptcha-response") { 2502 $('div.error').html('ÐаÑиÑа Ð¾Ñ ÑобоÑов не пÑойдена'); 2503 $('div.error').show(); 2504 } else { 2505 $("div.error").html(""); 2506 $("div.error").hide(); 2507 } 2508 parent1.find('.upononline_label[data-label_key="' + key + '"]').addClass('err shadowred'); 2509 //parent1.find('.upononline_label[data-label_key="'+key+'"] textarea').addClass('err shadowred'); 2510 } 2511 2512 var error_text = split1[2]; 2513 parent1.addClass('error'); 2514 parent1.find('.upononline_error').html(error_text); 2515 2516 if (parent1.find('.upononline_label').length) { 2517 parent1.find('.upononline_label').each(function (i, elm) { 2518 if (i == '0') { 2519 //$(elm).find('input').focus(); 2520 //console.log(elm); 2521 } 2522 setTimeout(function () { 2523 $(elm).removeClass('shadowred'); 2524 }, 500); 2525 }); 2526 } 2527 } 2528 }, 200); 2529 } 2530 }); 2531} 2532 2533//$(function(){ 2534//$('.upononline input[name="tel"]').inputmask({
2535//mask:"+7(999) 999 99 99", 2536//placeholder:"+7(___) ___ __ __", 2537////showMaskOnHover:true, 2538////showMaskOnFocus:true, 2539//}); 2540//}); 2541 2542$(document).on('click', '.upononline_button', function () { 2543 var parent1 = $(this).closest('.upononline'); 2544 parent1.addClass('loading'); 2545 var gennum = parent1.data('gennum'); 2546 //console.log(gennum); 2547 2548 upononline_send(gennum); 2549}); 2550 2551function upononline_init(gennum) { 2552 $('.upononline input').attr('autocomplete', 'off'); 2553} 2554 2555$(document).on('click', '.upononline_action', function (event) { 2556 event.preventDefault(); 2557 event.stopPropagation(); 2558 //console.log('upononline'); 2559 2560 /* 2561 dialogred({ 2562 data:'', 2563 loading_bool:1, 2564 width:'650', 2565 //theme:'upononline_ng', 2566 //adjust:'scale', 2567 //curtain_close_bool:0, 2568 close_template:'1', 2569 }); 2570 */ 2571 2572 $.ajax({ 2573 type: 'POST', 2574 url: '/plugin/upononline/ajax.php?task=dialog', 2575 cache: false, 2576 data: {}, 2577 success: function (data) { 2578 dialogred({ 2579 data: data, 2580 width: '650', 2581 close_template: '1', 2582 }) 2583 } 2584 }); 2585}); 2586 2587$(document).on('change', '.upononline_attach_styling_inputfile', function (e) { 2588 //console.log('file_change'); 2589 2590 var parant1 = $(this).closest('.upononline_attach_styling'); 2591 2592 var file_name = ''; 2593 //console.log(this.files); 2594 //console.log(this.files.length); 2595 //if (this.files && this.files.length > 1){ 2596 //file_name=( this.getAttribute('data-multiple-caption') || '' ).replace('{count}', this.files.length); 2597 //}else{ 2598 file_name = e.target.value.split('\\').pop(); 2599 //} 2600 //console.log('file_name:'+file_name); 2601 2602 parant1.find('.upononline_attach_styling_selname_value').html(file_name); 2603 if (file_name) { 2604 parant1.addClass('state_selected'); 2605 } else { 2606 parant1.removeClass('state_selected'); 2607 } 2608}); 2609 2610$(document).on('change', '.upononline_selbox1 select', function () { 2611 var parent0 = $(this).closest('.upononline_selbox1') 2612 2613 var val = $(this).val(); 2614 //console.log('val:'+val); 2615 if (val) { 2616 parent0.removeClass('select_no'); 2617 } else { 2618 parent0.addClass('select_no'); 2619 } 2620}); 2621 2622// upononline2 2623 2624function upononline2_send(gennum) { 2625 var parent1 = $('.upononline2[data-gennum="' + gennum + '"]'); 2626 2627 //var formdata={}; 2628 var form = parent1.find('form')[0]; 2629 var fd = new FormData(form); 2630 //fd.append("username", "Groucho"); 2631 //fd.append('tax_file', parent1.find('.upononline2_attach_styling_inputfile')[0].files[0]); 2632 2633 fd.append("urlsend", location.href); 2634 2635 //console.log(fd);//no print formData somehow 2636 // Display the key/value pairs 2637 //for (var pair of fd.entries()){ 2638 //console.log(pair[0]+ ', '+ pair[1]); 2639 //} 2640 2641 //return; 2642 2643 //formdata=parent1.find('.upononline2_form').serializeJSON({}); 2644 //serializeJSON({}); 2645 //serializeAll('json'); 2646 //formdata['urlsend']=location.href; 2647 //console.log(formdata); 2648 2649 parent1.find('.upononline2_button').prop('disabled', true); 2650 2651 $.ajax({
2652 type: 'POST', 2653 url: '/plugin/upononline2/ajax.php?task=send', 2654 data: fd, 2655 contentType: false, 2656 processData: false, 2657 cache: false, 2658 success: function (data) { 2659 //console.log(data); 2660 2661 parent1.removeClass('loading'); 2662 parent1.removeClass('error'); 2663 parent1.find('.upononline2_button').prop('disabled', false); 2664 2665 parent1.find('.upononline2_label').removeClass('err'); 2666 2667 setTimeout(function () { 2668 var split1 = data.split('||'); 2669 //console.log(split1); 2670 if (split1[0] == 'result') { 2671 //parent1.find('.upononline2_form_content').css({'visibility':'hidden'}); 2672 //parent1.find('.upononline2_result').show(); 2673 parent1.addClass('result'); 2674 } else if (split1[0] == 'error') { 2675 var split2 = split1[1].split('|'); 2676 for (i = 0; i < split2.length; i++) { 2677 var key = split2[i]; 2678 //console.log(key); 2679 //console.log(gennum); 2680 //console.log(parent1); 2681 if (key == "g-recaptcha-response") { 2682 $('div.error').html('ÐаÑиÑа Ð¾Ñ ÑобоÑов не пÑойдена'); 2683 $('div.error').show(); 2684 } else { 2685 $("div.error").html(""); 2686 $("div.error").hide(); 2687 } 2688 parent1.find('.upononline2_label[data-label_key="' + key + '"]').addClass('err shadowred'); 2689 //parent1.find('.upononline2_label[data-label_key="'+key+'"] textarea').addClass('err shadowred'); 2690 } 2691 2692 var error_text = split1[2]; 2693 parent1.addClass('error'); 2694 parent1.find('.upononline2_error').html(error_text); 2695 2696 if (parent1.find('.upononline2_label').length) { 2697 parent1.find('.upononline2_label').each(function (i, elm) { 2698 if (i == '0') { 2699 //$(elm).find('input').focus(); 2700 //console.log(elm); 2701 } 2702 setTimeout(function () { 2703 $(elm).removeClass('shadowred'); 2704 }, 500); 2705 }); 2706 } 2707 } 2708 }, 200); 2709 } 2710 }); 2711} 2712 2713//$(function(){ 2714//$('.upononline2 input[name="tel"]').inputmask({
2715//mask:"+7(999) 999 99 99", 2716//placeholder:"+7(___) ___ __ __", 2717////showMaskOnHover:true, 2718////showMaskOnFocus:true, 2719//}); 2720//}); 2721 2722$(document).on('click', '.upononline2_button', function () { 2723 var parent1 = $(this).closest('.upononline2'); 2724 parent1.addClass('loading'); 2725 var gennum = parent1.data('gennum'); 2726 //console.log(gennum); 2727 2728 upononline2_send(gennum); 2729}); 2730 2731function upononline2_init(gennum) { 2732 $('.upononline2 input').attr('autocomplete', 'off'); 2733} 2734 2735$(document).on('click', '.upononline2_action', function (event) { 2736 event.preventDefault(); 2737 event.stopPropagation(); 2738 //console.log('upononline2'); 2739 2740 /* 2741 dialogred({ 2742 data:'', 2743 loading_bool:1, 2744 width:'650', 2745 //theme:'upononline2_ng', 2746 //adjust:'scale', 2747 //curtain_close_bool:0, 2748 close_template:'1', 2749 }); 2750 */ 2751 2752 $.ajax({ 2753 type: 'POST', 2754 url: '/plugin/upononline2/ajax.php?task=dialog', 2755 cache: false, 2756 data: {}, 2757 success: function (data) { 2758 dialogred({ 2759 data: data, 2760 width: '650', 2761 close_template: '1', 2762 }) 2763 } 2764 }); 2765}); 2766 2767$(document).on('change', '.upononline2_attach_styling_inputfile', function (e) { 2768 //console.log('file_change'); 2769 2770 var parant1 = $(this).closest('.upononline2_attach_styling'); 2771 2772 var file_name = ''; 2773 //console.log(this.files); 2774 //console.log(this.files.length); 2775 //if (this.files && this.files.length > 1){ 2776 //file_name=( this.getAttribute('data-multiple-caption') || '' ).replace('{count}', this.files.length); 2777 //}else{ 2778 file_name = e.target.value.split('\\').pop(); 2779 //} 2780 //console.log('file_name:'+file_name); 2781 2782 parant1.find('.upononline2_attach_styling_selname_value').html(file_name); 2783 if (file_name) { 2784 parant1.addClass('state_selected'); 2785 } else { 2786 parant1.removeClass('state_selected'); 2787 } 2788}); 2789 2790$(document).on('change', '.upononline2_selbox1 select', function () { 2791 var parent0 = $(this).closest('.upononline2_selbox1') 2792 2793 var val = $(this).val(); 2794 //console.log('val:'+val); 2795 if (val) { 2796 parent0.removeClass('select_no'); 2797 } else { 2798 parent0.addClass('select_no'); 2799 } 2800}); 2801 2802function upononline_spcard_send(gennum) { 2803 var parent1 = $('.upononline_spcard[data-gennum="' + gennum + '"]'); 2804 2805 //var formdata={}; 2806 var form = parent1.find('form')[0]; 2807 var fd = new FormData(form); 2808 //fd.append("username", "Groucho"); 2809 //fd.append('tax_file', parent1.find('.upononline_spcard_attach_styling_inputfile')[0].files[0]); 2810 2811 fd.append("urlsend", location.href); 2812 2813 //console.log(fd);//no print formData somehow 2814 // Display the key/value pairs 2815 //for (var pair of fd.entries()){ 2816 //console.log(pair[0]+ ', '+ pair[1]); 2817 //} 2818 2819 //return; 2820 2821 //formdata=parent1.find('.upononline_spcard_form').serializeJSON({}); 2822 //serializeJSON({}); 2823 //serializeAll('json'); 2824 //formdata['urlsend']=location.href; 2825 //console.log(formdata); 2826 2827 parent1.find('.upononline_spcard_button').prop('disabled', true); 2828 2829 $.ajax({
2830 type: 'POST', 2831 url: '/plugin/upononline_spcard/ajax.php?task=send', 2832 data: fd, 2833 contentType: false, 2834 processData: false, 2835 cache: false, 2836 success: function (data) { 2837 //console.log(data); 2838 2839 parent1.removeClass('loading'); 2840 parent1.removeClass('error'); 2841 parent1.find('.upononline_spcard_button').prop('disabled', false); 2842 2843 parent1.find('.upononline_spcard_label').removeClass('err'); 2844 2845 setTimeout(function () { 2846 var split1 = data.split('||'); 2847 //console.log(split1); 2848 if (split1[0] == 'result') { 2849 //parent1.find('.upononline_spcard_form_content').css({'visibility':'hidden'}); 2850 //parent1.find('.upononline_spcard_result').show(); 2851 parent1.addClass('result'); 2852 } else if (split1[0] == 'error') { 2853 var split2 = split1[1].split('|'); 2854 for (i = 0; i < split2.length; i++) { 2855 var key = split2[i]; 2856 //console.log(key); 2857 //console.log(gennum); 2858 //console.log(parent1); 2859 if (key == "g-recaptcha-response") { 2860 $('div.error').html('ÐаÑиÑа Ð¾Ñ ÑобоÑов не пÑойдена'); 2861 $('div.error').show(); 2862 } else { 2863 $("div.error").html(""); 2864 $("div.error").hide(); 2865 } 2866 parent1.find('.upononline_spcard_label[data-label_key="' + key + '"]').addClass('err shadowred'); 2867 //parent1.find('.upononline_spcard_label[data-label_key="'+key+'"] textarea').addClass('err shadowred'); 2868 } 2869 2870 var error_text = split1[2]; 2871 parent1.addClass('error'); 2872 parent1.find('.upononline_spcard_error').html(error_text); 2873 2874 if (parent1.find('.upononline_spcard_label').length) { 2875 parent1.find('.upononline_spcard_label').each(function (i, elm) { 2876 if (i == '0') { 2877 //$(elm).find('input').focus(); 2878 //console.log(elm); 2879 } 2880 setTimeout(function () { 2881 $(elm).removeClass('shadowred'); 2882 }, 500); 2883 }); 2884 } 2885 } 2886 }, 200); 2887 } 2888 }); 2889} 2890 2891//$(function(){ 2892//$('.upononline_spcard input[name="tel"]').inputmask({
2893//mask:"+7(999) 999 99 99", 2894//placeholder:"+7(___) ___ __ __", 2895////showMaskOnHover:true, 2896////showMaskOnFocus:true, 2897//}); 2898//}); 2899 2900$(document).on('click', '.upononline_spcard_button', function () { 2901 var parent1 = $(this).closest('.upononline_spcard'); 2902 parent1.addClass('loading'); 2903 var gennum = parent1.data('gennum'); 2904 //console.log(gennum); 2905 2906 upononline_spcard_send(gennum); 2907}); 2908 2909function upononline_spcard_init(gennum) { 2910 $('.upononline_spcard input').attr('autocomplete', 'off'); 2911} 2912 2913$(document).on('click', '.upononline_spcard_action', function (event) { 2914 event.preventDefault(); 2915 event.stopPropagation(); 2916 //console.log('upononline_spcard'); 2917 2918 /* 2919 dialogred({ 2920 data:'', 2921 loading_bool:1, 2922 width:'650', 2923 //theme:'upononline_spcard_ng', 2924 //adjust:'scale', 2925 //curtain_close_bool:0, 2926 close_template:'1', 2927 }); 2928 */ 2929 2930 $.ajax({ 2931 type: 'POST', 2932 url: '/plugin/upononline_spcard/ajax.php?task=dialog', 2933 cache: false, 2934 data: {}, 2935 success: function (data) { 2936 dialogred({ 2937 data: data, 2938 width: '650', 2939 close_template: '1', 2940 }) 2941 } 2942 }); 2943}); 2944 2945$(document).on('change', '.upononline_spcard_attach_styling_inputfile', function (e) { 2946 //console.log('file_change'); 2947 2948 var parant1 = $(this).closest('.upononline_spcard_attach_styling'); 2949 2950 var file_name = ''; 2951 //console.log(this.files); 2952 //console.log(this.files.length); 2953 //if (this.files && this.files.length > 1){ 2954 //file_name=( this.getAttribute('data-multiple-caption') || '' ).replace('{count}', this.files.length); 2955 //}else{ 2956 file_name = e.target.value.split('\\').pop(); 2957 //} 2958 //console.log('file_name:'+file_name); 2959 2960 parant1.find('.upononline_spcard_attach_styling_selname_value').html(file_name); 2961 if (file_name) { 2962 parant1.addClass('state_selected'); 2963 } else { 2964 parant1.removeClass('state_selected'); 2965 } 2966}); 2967 2968$(document).on('change', '.upononline_spcard_selbox1 select', function () { 2969 var parent0 = $(this).closest('.upononline_spcard_selbox1') 2970 2971 var val = $(this).val(); 2972 //console.log('val:'+val); 2973 if (val) { 2974 parent0.removeClass('select_no'); 2975 } else { 2976 parent0.addClass('select_no'); 2977 } 2978}); 2979 2980 2981function spaceHub() { 2982 $('.spacehub').each(function (index) { 2983 //reset 2984 $(this).css({ 2985 'width': 'auto', 2986 'left': 'auto', 2987 }); 2988 2989 var o = $(this).offset(); 2990 2991 var window_width = $(window).width(); 2992 var spacehub_width = $(this).outerWidth(); 2993 //console.log('window_width:'+window_width+', spacehub_width:'+spacehub_width); 2994 2995 if (window_width > spacehub_width) { 2996 //var indent=(window_width-spacehub_width)/2; 2997 var indent = o.left; 2998 var width = window_width; 2999 //console.log('indent:'+indent+', width:'+width); 3000 3001 $(this).css({ 3002 'width': width + 'px', 3003 'left': '-' + indent + 'px', 3004 }); 3005 } 3006 }); 3007} 3008 3009function spaceHub2() { 3010 $('.spacehub2').each(function (index) { 3011 //reset 3012 $(this).css({ 3013 'margin-left': 'auto', 3014 'margin-right': 'auto', 3015 }); 3016 3017 var o = $(this).offset(); 3018 3019 var window_width = $(window).width(); 3020 var spacehub_width = $(this).outerWidth();
3020 //otherwise shown outwith "padding" 3021 //console.log('window_width:'+window_width+', spacehub_width:'+spacehub_width); 3022 3023 var l_indent = o.left; 3024 3025 var r_indent = window_width - (o.left + spacehub_width); 3026 if (r_indent < 0) { 3027 r_indent = 0; 3028 } 3029 //console.log('l_indent:'+l_indent+', r_indent:'+r_indent); 3030 3031 $(this).css({ 3032 'margin-left': '-' + l_indent + 'px', 3033 'margin-right': '-' + r_indent + 'px', 3034 }); 3035 }); 3036} 3037 3038var k_spacehub = 0; 3039setInterval(function () { 3040 k_spacehub++; 3041 if (k_spacehub <= 3) { 3042 //console.log('k_spacehub-'+k_spacehub); 3043 spaceHub(); 3044 spaceHub2(); 3045 } 3046}, 350); 3047 3048$(function () { 3049 spaceHub(); 3050 spaceHub2(); 3051 3052 //setInterval(function(){ 3053 //spaceHub(); 3054 //spaceHub2(); 3055 //},1000); 3056}); 3057 3058$(window).on('load', function () { 3059 spaceHub(); 3060 spaceHub2(); 3061}); 3062 3063$(window).on('resize', function () { 3064 spaceHub(); 3065 spaceHub2(); 3066}); 3067 3068 3069 3070// spravka 3071 3072function questonlinespravka_send(gennum){ 3073 var parent1=$('.questonlinespravka[data-gennum="'+gennum+'"]'); 3074 3075 //var formdata={}; 3076 var form = parent1.find('form')[0]; 3077 var fd = new FormData(form); 3078 //fd.append("username", "Groucho"); 3079 //fd.append('tax_file', parent1.find('.upononline_attach_styling_inputfile')[0].files[0]); 3080 3081 fd.append("urlsend", location.href); 3082 3083 var specialist_id=''; 3084 if ($('.sendparamunion__specialist_id').length){ 3085 specialist_id=$('.sendparamunion__specialist_id').html(); 3086 } 3087 3088 var direct_id=''; 3089 if (parent1.find('.main-signup-block__write_block_feedback_way_block_item').length){ 3090 if (parent1.find('.main-signup-block__write_block_feedback_way_block_item.active').length){ 3091 direct_id=parent1.find('.main-signup-block__write_block_feedback_way_block_item.active').data('value'); 3092 } 3093 } 3094 //console.log('direct_id:'+direct_id); 3095 3096 parent1.find('.questonlinespravka_button').prop('disabled',true); 3097 3098 $.ajax({ 3099 type:'POST', 3100 url:'/plugin/questonlinespravka/ajax.php?task=send&direct_id='+direct_id+'&specialist_id='+specialist_id, 3101 data: fd, 3102 contentType: false, 3103 processData: false, 3104 cache: false, 3105 success:function(data){ 3106 // console.log(data); 3107 3108 parent1.removeClass('loading'); 3109 parent1.removeClass('error'); 3110 parent1.find('.questonlinespravka_button').prop('disabled',false); 3111 3112 parent1.find('.questonlinespravka_label').removeClass('err'); 3113 3114 var split1=data.split('||'); 3115 //console.log(split1); 3116 if (split1[0]=='result'){ 3117 //parent1.find('.questonlinespravka_form_content').css({'visibility':'hidden'}); 3118 //parent1.find('.questonlinespravka_result').show(); 3119 parent1.addClass('result'); 3120 }else if (split1[0]=='error'){ 3121 var split2=split1[1].split('|'); 3122 for(i=0;i<split2.length;i++){ 3123 var key=split2[i]; 3124 3125 if (key == "g-recaptcha-response") { 3126 $('div.error').html('ÐаÑиÑа Ð¾Ñ ÑобоÑов не пÑойдена'); 3127 $('div.error').show(); 3128 } else { 3129 $("div.error").html(""); 3130 $("div.error").hide(); 3131 } 3132 3133 //console.log(key); 3134 //console.log(gennum); 3135 //console.log(parent1); 3136 parent1.find('.questonlinespravka_label[data-label_key="'+key+'"]').addClass('err shadowred'); 3137 //parent1.find('.questonlinespravka_label[data-label_key="'+key+'"] textarea').addClass('err shadowred'); 3138 } 3139 3140 var error_text=split1[2]; 3141 parent1.addClass('error'); 3142 parent1.find('.questonlinespravka_error').html(error_text); 3143 3144 if (parent1.find('.questonlinespravka_label').length){ 3145 parent1.find('.questonlinespravka_label').each(function(i,elm){ 3146 if (i=='0'){ 3147 //$(elm).find('input').focus(); 3148 //console.log(elm); 3149 } 3150 setTimeout(function(){ 3151 $(elm).removeClass('shadowred'); 3152 },600); 3153 }); 3154 } 3155 } 3156 } 3157 }); 3158} 3159 3160$(document).on('click','.questonlinespravka_button',function(){ 3161 var parent1=$(this).closest('.questonlinespravka'); 3162 parent1.addClass('loading'); 3163 var gennum=parent1.data('gennum'); 3164 //console.log(gennum); 3165 3166 questonlinespravka_send(gennum); 3167}); 3168 3169$(document).on('click','.questonlinespravka_button2',function(){ 3170 var parent1=$(this).closest('.questonlinespravka'); 3171 parent1.addClass('loading'); 3172 var gennum=parent1.data('gennum'); 3173 //console.log(gennum); 3174 3175 questonlinespravka_send(gennum); 3176}); 3177 3178function questonlinespravka_init(gennum){ 3179 $('.questonlinespravka input').attr('autocomplete','off'); 3180 3181 // $('.questonlinespravka[data-gennum="'+gennum+'"] input[name="tel"]').inputmask({ 3182 // mask:"+7(999) 999 99 99", 3183 // placeholder:"+7(___) ___ __ __", 3184 // //showMaskOnHover:true, 3185 // //showMaskOnFocus:true, 3186 // }); 3187
3188 // main signup 3189 var mainSign=document.querySelector('.questonlinespravka[data-gennum="'+gennum+'"] .main-signup-block__write_block_feedback'); 3190 var mainSignUp=document.querySelector('.questonlinespravka[data-gennum="'+gennum+'"] .main-signup-block__write_block_feedback_way'); 3191 var mainSignUpBtn=document.querySelector('.questonlinespravka[data-gennum="'+gennum+'"] .main-signup-block__write_block_feedback_way_btn'); 3192 var mainSignUpBlock=document.querySelector('.questonlinespravka[data-gennum="'+gennum+'"] .main-signup-block__write_block_feedback_way_block'); 3193 3194 if (mainSign!==null){ 3195 mainSignUpBtn.addEventListener('click',function(e){ 3196 e.preventDefault(); 3197 e.stopPropagation(); 3198 mainSignUp.classList.toggle('active'); 3199 if (mainSignUp.classList.contains('active')){ 3200 mainSignUpBlock.addEventListener('click',function(e){ 3201 e.preventDefault(); 3202 e.stopPropagation(); 3203 if (e.target.classList.contains('main-signup-block__write_block_feedback_way_block_item')){ 3204 $('.questonlinespravka[data-gennum="'+gennum+'"] .main-signup-block__write_block_feedback_way_block_item').removeClass('active'); 3205 3206 e.target.classList.add('active'); 3207 mainSignUpBtn.querySelector('.main-signup-block__write_block_feedback_way_btn_tx').textContent=e.target.innerText; 3208 mainSignUp.classList.remove('active'); 3209 } 3210 }); 3211 } 3212 }); 3213 3214 document.addEventListener('click',function(e){ 3215 if(!e.target.closest('.main-signup-block__write_block_feedback_way_block') && mainSignUp.classList.contains('active')){ 3216 mainSignUp.classList.remove('active'); 3217 } 3218 }); 3219 } 3220} 3221 3222$(document).on('click','.questonlinespravka_action',function(event){ 3223 event.preventDefault(); 3224 event.stopPropagation(); 3225 3226 //console.log('questonlinespravka'); 3227 3228 dialogred({ 3229 data:'', 3230 loading_bool:1, 3231 width:'1147', 3232 //theme:'questonlinespravka_ng', 3233 //adjust:'scale', 3234 curtain_close_bool:0, 3235 close_template:'2', 3236 }); 3237 3238 $.ajax({
3239 type:'POST', 3240 url:'/plugin/questonlinespravka/ajax.php?task=dialog', 3241 cache:false, 3242 data:{}, 3243 success:function(data){ 3244 dialogred({ 3245 data:data, 3246 width:'1147', 3247 }) 3248 } 3249 }); 3250}); 3251 3252 3253$.datepicker.regional['ru'] = { 3254 closeText: 'ÐакÑÑÑÑ', 3255 prevText: 'ÐÑедÑдÑÑий', 3256 nextText: 'СледÑÑÑий', 3257 currentText: 'СегоднÑ', 3258 monthNames: ['ЯнваÑÑ', 'ФевÑалÑ', 'ÐаÑÑ', 'ÐпÑелÑ', 'Ðай', 'ÐÑнÑ', 'ÐÑлÑ', 'ÐвгÑÑÑ', 3259 'СенÑÑбÑÑ', 'ÐкÑÑбÑÑ', 'ÐоÑбÑÑ', 'ÐекабÑÑ' 3260 ], 3261 monthNamesShort: ['Янв', 'Фев', 'ÐаÑ', 'ÐпÑ', 'Ðай', 'ÐÑн', 'ÐÑл', 'Ðвг', 'Сен', 'ÐкÑ', 3262 'ÐоÑ', 'Ðек' 3263 ], 3264 dayNames: ['воÑкÑеÑенÑе', 'понеделÑник', 'вÑоÑник', 'ÑÑеда', 'ÑеÑвеÑг', 'пÑÑниÑа', 3265 'ÑÑббоÑа' 3266 ], 3267 dayNamesShort: ['вÑк', 'пнд', 'вÑÑ', 'ÑÑд', 'ÑÑв', 'пÑн', 'ÑбÑ'], 3268 dayNamesMin: ['ÐÑ', 'Ðн', 'ÐÑ', 'СÑ', 'ЧÑ', 'ÐÑ', 'Сб'], 3269 weekHeader: 'Ðе', 3270 dateFormat: 'dd.mm.yy', 3271 firstDay: 1, 3272 isRTL: false, 3273 showMonthAfterYear: false, 3274 yearSuffix: '' 3275}; 3276$.datepicker.setDefaults($.datepicker.regional['ru']); 3277 3278$(function () { 3279 $("#datepicker").datepicker({ 3280 changeMonth: true, 3281 changeYear: true, 3282 yearRange: '-100:+0', 3283 firstDay: 1, 3284 showOtherMonths: true, 3285 dateFormat: 'dd.mm.yy', 3286 }); 3287}); 3288 3289$(function () { 3290 $("#datepicker2").datepicker({ 3291 changeMonth: true, 3292 changeYear: true, 3293 yearRange: '-50:+0', 3294 firstDay: 1, 3295 showOtherMonths: true, 3296 dateFormat: 'dd.mm.yy', 3297 }); 3298}); 3299 3300$(function () { 3301 $("#datepicker3").datepicker({ 3302 changeMonth: true, 3303 changeYear: true, 3304 yearRange: '-50:+0', 3305 firstDay: 1, 3306 showOtherMonths: true, 3307 dateFormat: 'dd.mm.yy', 3308 }); 3309}); 3310 3311if (document.querySelector('.questonlinespravka_formblock1 select')) { 3312 document.querySelector('.questonlinespravka_formblock1 select').addEventListener('change', function (e) { 3313 // console.log(e.target.value); 3314 if (e.target.value !== 'Ðне') { 3315 // console.log(1); 3316 $('.js-relative').show(); 3317 } else { 3318 $('.js-relative').hide(); 3319 } 3320 }) 3321} 3322// spravka
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.