vendor: 38,777 bytes, lines 1-862
1/*! fancyBox v2.1.7 fancyapps.com | fancyapps.com/fancybox/#license */ 2(function(t, J, f, x) { 3 var L = f("html"), 4 q = f(t), 5 p = f(J), 6 b = f.fancybox = function() { 7 b.open.apply(this, arguments) 8 }, 9 K = navigator.userAgent.match(/msie/i), 10 D = null, 11 u = J.createTouch !== x, 12 v = function(a) { 13 return a && a.hasOwnProperty && a instanceof f 14 }, 15 r = function(a) { 16 return a && "string" === f.type(a) 17 }, 18 G = function(a) { 19 return r(a) && 0 < a.indexOf("%") 20 }, 21 m = function(a, c) { 22 var d = parseInt(a, 10) || 0; 23 c && G(a) && (d *= b.getViewport()[c] / 100); 24 return Math.ceil(d) 25 }, 26 y = function(a, b) { 27 return m(a, b) + "px" 28 }; 29 f.extend(b, { 30 version: "2.1.7", 31 defaults: { 32 padding: 15, 33 margin: 20, 34 width: 800, 35 height: 600, 36 minWidth: 100, 37 minHeight: 100, 38 maxWidth: 9999, 39 maxHeight: 9999, 40 pixelRatio: 1, 41 autoSize: !0, 42 autoHeight: !1, 43 autoWidth: !1, 44 autoResize: !0, 45 autoCenter: !u, 46 fitToView: !0, 47 aspectRatio: !1, 48 topRatio: .5, 49 leftRatio: .5, 50 scrolling: "auto", 51 wrapCSS: "", 52 arrows: !0, 53 closeBtn: !0, 54 closeClick: !1, 55 nextClick: !1, 56 mouseWheel: !0, 57 autoPlay: !1, 58 playSpeed: 3E3, 59 preload: 3, 60 modal: !1, 61 loop: !0, 62 ajax: { 63 dataType: "html", 64 headers: { 65 "X-fancyBox": !0 66 } 67 }, 68 iframe: { 69 scrolling: "auto", 70 preload: !0 71 }, 72 swf: { 73 wmode: "transparent", 74 allowfullscreen: "true", 75 allowscriptaccess: "always" 76 }, 77 keys: { 78 next: { 79 13: "left", 80 34: "up", 81 39: "left", 82 40: "up" 83 }, 84 prev: { 85 8: "right", 86 33: "down", 87 37: "right", 88 38: "down" 89 }, 90 close: [27], 91 play: [32], 92 toggle: [70] 93 }, 94 direction: { 95 next: "left", 96 prev: "right" 97 }, 98 scrollOutside: !0, 99 index: 0, 100 type: null, 101 href: null, 102 content: null, 103 title: null, 104 tpl: { 105 wrap: '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>', 106 image: '<img class="fancybox-image" src="{href}" alt="" />', 107 iframe: '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + 108 (K ? ' allowtransparency="true"' : "") + "></iframe>", 109 error: '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>', 110 closeBtn: '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>', 111 next: '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>', 112 prev: '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>', 113 loading: '<div id="fancybox-loading"><div></div></div>' 114 }, 115 openEffect: "fade", 116 openSpeed: 250, 117 openEasing: "swing", 118 openOpacity: !0, 119 openMethod: "zoomIn", 120 closeEffect: "fade", 121 closeSpeed: 250, 122 closeEasing: "swing", 123 closeOpacity: !0, 124 closeMethod: "zoomOut", 125 nextEffect: "elastic", 126 nextSpeed: 250, 127 nextEasing: "swing", 128 nextMethod: "changeIn", 129 prevEffect: "elastic", 130 prevSpeed: 250, 131 prevEasing: "swing", 132 prevMethod: "changeOut", 133 helpers: { 134 overlay: !0, 135 title: !0 136 }, 137 onCancel: f.noop, 138 beforeLoad: f.noop, 139 afterLoad: f.noop, 140 beforeShow: f.noop, 141 afterShow: f.noop, 142 beforeChange: f.noop, 143 beforeClose: f.noop, 144 afterClose: f.noop 145 }, 146 group: {}, 147 opts: {}, 148 previous: null, 149 coming: null, 150 current: null, 151 isActive: !1, 152 isOpen: !1, 153 isOpened: !1, 154 wrap: null, 155 skin: null, 156 outer: null, 157 inner: null, 158 player: { 159 timer: null, 160 isActive: !1 161 }, 162 ajaxLoad: null, 163 imgPreload: null, 164 transitions: {}, 165 helpers: {}, 166 open: function(a, c) { 167 if (a && (f.isPlainObject(c) || (c = {}), !1 !== b.close(!0))) return f.isArray(a) || (a = v(a) ? f(a).get() : [a]), f.each(a, function(d, e) { 168 var k = {}, 169 g, l, h, n, m; 170 "object" === f.type(e) && (e.nodeType && (e = f(e)), v(e) ? (k = { 171 href: e.data("fancybox-href") || e.attr("href"), 172 title: f("<div/>").text(e.data("fancybox-title") || 173 e.attr("title") || "").html(), 174 isDom: !0, 175 element: e 176 }, f.metadata && f.extend(!0, k, e.metadata())) : k = e); 177 g = c.href || k.href || (r(e) ? e : null); 178 l = c.title !== x ? c.title : k.title || ""; 179 n = (h = c.content || k.content) ? "html" : c.type || k.type; 180 !n && k.isDom && (n = e.data("fancybox-type"), n || (n = (n = e.prop("class").match(/fancybox\.(\w+)/)) ? n[1] : null)); 181 r(g) && (n || (b.isImage(g) ? n = "image" : b.isSWF(g) ? n = "swf" : "#" === g.charAt(0) ? n = "inline" : r(e) && (n = "html", h = e)), "ajax" === n && (m = g.split(/\s+/, 2), g = m.shift(), m = m.shift())); 182 h || ("inline" === n ? g ? h = f(r(g) ? 183 g.replace(/.*(?=#[^\s]+$)/, "") : g) : k.isDom && (h = e) : "html" === n ? h = g : n || g || !k.isDom || (n = "inline", h = e)); 184 f.extend(k, { 185 href: g, 186 type: n, 187 content: h, 188 title: l, 189 selector: m 190 }); 191 a[d] = k 192 }), b.opts = f.extend(!0, {}, b.defaults, c), c.keys !== x && (b.opts.keys = c.keys ? f.extend({}, b.defaults.keys, c.keys) : !1), b.group = a, b._start(b.opts.index) 193 }, 194 cancel: function() { 195 var a = b.coming; 196 a && !1 === b.trigger("onCancel") || (b.hideLoading(), a && (b.ajaxLoad && b.ajaxLoad.abort(), b.ajaxLoad = null, b.imgPreload && (b.imgPreload.onload = b.imgPreload.onerror = null), a.wrap && 197 a.wrap.stop(!0, !0).trigger("onReset").remove(), b.coming = null, b.current || b._afterZoomOut(a))) 198 }, 199 close: function(a) { 200 b.cancel(); 201 !1 !== b.trigger("beforeClose") && (b.unbindEvents(), b.isActive && (b.isOpen && !0 !== a ? (b.isOpen = b.isOpened = !1, b.isClosing = !0, f(".fancybox-item, .fancybox-nav").remove(), b.wrap.stop(!0, !0).removeClass("fancybox-opened"), b.transitions[b.current.closeMethod]()) : (f(".fancybox-wrap").stop(!0).trigger("onReset").remove(), b._afterZoomOut()))) 202 }, 203 play: function(a) { 204 var c = function() { 205 clearTimeout(b.player.timer) 206 }, 207 d = function() { 208 c(); 209 b.current && b.player.isActive && (b.player.timer = setTimeout(b.next, b.current.playSpeed)) 210 }, 211 e = function() { 212 c(); 213 p.unbind(".player"); 214 b.player.isActive = !1; 215 b.trigger("onPlayEnd") 216 }; 217 !0 === a || !b.player.isActive && !1 !== a ? b.current && (b.current.loop || b.current.index < b.group.length - 1) && (b.player.isActive = !0, p.bind({ 218 "onCancel.player beforeClose.player": e, 219 "onUpdate.player": d, 220 "beforeLoad.player": c 221 }), d(), b.trigger("onPlayStart")) : e() 222 }, 223 next: function(a) { 224 var c = b.current; 225 c && (r(a) || (a = c.direction.next), b.jumpto(c.index + 226 1, a, "next")) 227 }, 228 prev: function(a) { 229 var c = b.current; 230 c && (r(a) || (a = c.direction.prev), b.jumpto(c.index - 1, a, "prev")) 231 }, 232 jumpto: function(a, c, d) { 233 var e = b.current; 234 e && (a = m(a), b.direction = c || e.direction[a >= e.index ? "next" : "prev"], b.router = d || "jumpto", e.loop && (0 > a && (a = e.group.length + a % e.group.length), a %= e.group.length), e.group[a] !== x && (b.cancel(), b._start(a))) 235 }, 236 reposition: function(a, c) { 237 var d = b.current, 238 e = d ? d.wrap : null, 239 k; 240 e && (k = b._getPosition(c), a && "scroll" === a.type ? (delete k.position, e.stop(!0, !0).animate(k, 200)) : (e.css(k), 241 d.pos = f.extend({}, d.dim, k))) 242 }, 243 update: function(a) { 244 var c = a && a.originalEvent && a.originalEvent.type, 245 d = !c || "orientationchange" === c; 246 d && (clearTimeout(D), D = null); 247 b.isOpen && !D && (D = setTimeout(function() { 248 var e = b.current; 249 e && !b.isClosing && (b.wrap.removeClass("fancybox-tmp"), (d || "load" === c || "resize" === c && e.autoResize) && b._setDimension(), "scroll" === c && e.canShrink || b.reposition(a), b.trigger("onUpdate"), D = null) 250 }, d && !u ? 0 : 300)) 251 }, 252 toggle: function(a) { 253 b.isOpen && (b.current.fitToView = "boolean" === f.type(a) ? a : !b.current.fitToView, 254 u && (b.wrap.removeAttr("style").addClass("fancybox-tmp"), b.trigger("onUpdate")), b.update()) 255 }, 256 hideLoading: function() { 257 p.unbind(".loading"); 258 f("#fancybox-loading").remove() 259 }, 260 showLoading: function() { 261 var a, c; 262 b.hideLoading(); 263 a = f(b.opts.tpl.loading).click(b.cancel).appendTo("body"); 264 p.bind("keydown.loading", function(a) { 265 27 === (a.which || a.keyCode) && (a.preventDefault(), b.cancel()) 266 }); 267 b.defaults.fixed || (c = b.getViewport(), a.css({ 268 position: "absolute", 269 top: .5 * c.h + c.y, 270 left: .5 * c.w + c.x 271 })); 272 b.trigger("onLoading") 273 }, 274 getViewport: function() { 275 var a = 276 b.current && b.current.locked || !1, 277 c = { 278 x: q.scrollLeft(), 279 y: q.scrollTop() 280 }; 281 a && a.length ? (c.w = a[0].clientWidth, c.h = a[0].clientHeight) : (c.w = u && t.innerWidth ? t.innerWidth : q.width(), c.h = u && t.innerHeight ? t.innerHeight : q.height()); 282 return c 283 }, 284 unbindEvents: function() { 285 b.wrap && v(b.wrap) && b.wrap.unbind(".fb"); 286 p.unbind(".fb"); 287 q.unbind(".fb") 288 }, 289 bindEvents: function() { 290 var a = b.current, 291 c; 292 a && (q.bind("orientationchange.fb" + (u ? "" : " resize.fb") + (a.autoCenter && !a.locked ? " scroll.fb" : ""), b.update), (c = a.keys) && p.bind("keydown.fb", 293 function(d) { 294 var e = d.which || d.keyCode, 295 k = d.target || d.srcElement; 296 if (27 === e && b.coming) return !1; 297 d.ctrlKey || d.altKey || d.shiftKey || d.metaKey || k && (k.type || f(k).is("[contenteditable]")) || f.each(c, function(c, k) { 298 if (1 < a.group.length && k[e] !== x) return b[c](k[e]), d.preventDefault(), !1; 299 if (-1 < f.inArray(e, k)) return b[c](), d.preventDefault(), !1 300 }) 301 }), f.fn.mousewheel && a.mouseWheel && b.wrap.bind("mousewheel.fb", function(c, e, k, g) { 302 for (var d = f(c.target || null), h = !1; d.length && !(h || d.is(".fancybox-skin") || d.is(".fancybox-wrap"));) h = 303 (h = d[0]) && !(h.style.overflow && "hidden" === h.style.overflow) && (h.clientWidth && h.scrollWidth > h.clientWidth || h.clientHeight && h.scrollHeight > h.clientHeight), d = f(d).parent(); 304 0 !== e && !h && 1 < b.group.length && !a.canShrink && (0 < g || 0 < k ? b.prev(0 < g ? "down" : "left") : (0 > g || 0 > k) && b.next(0 > g ? "up" : "right"), c.preventDefault()) 305 })) 306 }, 307 trigger: function(a, c) { 308 var d, e = c || b.coming || b.current; 309 if (e) { 310 f.isFunction(e[a]) && (d = e[a].apply(e, Array.prototype.slice.call(arguments, 1))); 311 if (!1 === d) return !1; 312 e.helpers && f.each(e.helpers, function(c, 313 d) { 314 if (d && b.helpers[c] && f.isFunction(b.helpers[c][a])) b.helpers[c][a](f.extend(!0, {}, b.helpers[c].defaults, d), e) 315 }) 316 } 317 p.trigger(a) 318 }, 319 isImage: function(a) { 320 return r(a) && a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i) 321 }, 322 isSWF: function(a) { 323 return r(a) && a.match(/\.(swf)((\?|#).*)?$/i) 324 }, 325 _start: function(a) { 326 var c = {}, 327 d, e; 328 a = m(a); 329 d = b.group[a] || null; 330 if (!d) return !1; 331 c = f.extend(!0, {}, b.opts, d); 332 d = c.margin; 333 e = c.padding; 334 "number" === f.type(d) && (c.margin = [d, d, d, d]); 335 "number" === f.type(e) && (c.padding = [e, e, e, e]); 336 c.modal && f.extend(!0, c, { 337 closeBtn: !1, 338 closeClick: !1, 339 nextClick: !1, 340 arrows: !1, 341 mouseWheel: !1, 342 keys: null, 343 helpers: { 344 overlay: { 345 closeClick: !1 346 } 347 } 348 }); 349 c.autoSize && (c.autoWidth = c.autoHeight = !0); 350 "auto" === c.width && (c.autoWidth = !0); 351 "auto" === c.height && (c.autoHeight = !0); 352 c.group = b.group; 353 c.index = a; 354 b.coming = c; 355 if (!1 === b.trigger("beforeLoad")) b.coming = null; 356 else { 357 e = c.type; 358 d = c.href; 359 if (!e) return b.coming = null, b.current && b.router && "jumpto" !== b.router ? (b.current.index = a, b[b.router](b.direction)) : !1; 360 b.isActive = !0; 361 if ("image" === 362 e || "swf" === e) c.autoHeight = c.autoWidth = !1, c.scrolling = "visible"; 363 "image" === e && (c.aspectRatio = !0); 364 "iframe" === e && u && (c.scrolling = "scroll"); 365 c.wrap = f(c.tpl.wrap).addClass("fancybox-" + (u ? "mobile" : "desktop") + " fancybox-type-" + e + " fancybox-tmp " + c.wrapCSS).appendTo(c.parent || "body"); 366 f.extend(c, { 367 skin: f(".fancybox-skin", c.wrap), 368 outer: f(".fancybox-outer", c.wrap), 369 inner: f(".fancybox-inner", c.wrap) 370 }); 371 f.each(["Top", "Right", "Bottom", "Left"], function(a, b) { 372 c.skin.css("padding" + b, y(c.padding[a])) 373 }); 374 b.trigger("onReady"); 375 if ("inline" === e || "html" === e) { 376 if (!c.content || !c.content.length) return b._error("content") 377 } else if (!d) return b._error("href"); 378 "image" === e ? b._loadImage() : "ajax" === e ? b._loadAjax() : "iframe" === e ? b._loadIframe() : b._afterLoad() 379 } 380 }, 381 _error: function(a) { 382 f.extend(b.coming, { 383 type: "html", 384 autoWidth: !0, 385 autoHeight: !0, 386 minWidth: 0, 387 minHeight: 0, 388 scrolling: "no", 389 hasError: a, 390 content: b.coming.tpl.error 391 }); 392 b._afterLoad() 393 }, 394 _loadImage: function() { 395 var a = b.imgPreload = new Image; 396 a.onload = function() { 397 this.onload = this.onerror = null; 398 b.coming.width = 399 this.width / b.opts.pixelRatio; 400 b.coming.height = this.height / b.opts.pixelRatio; 401 b._afterLoad() 402 }; 403 a.onerror = function() { 404 this.onload = this.onerror = null; 405 b._error("image") 406 }; 407 a.src = b.coming.href; 408 !0 !== a.complete && b.showLoading() 409 }, 410 _loadAjax: function() { 411 var a = b.coming; 412 b.showLoading(); 413 b.ajaxLoad = f.ajax(f.extend({}, a.ajax, { 414 url: a.href, 415 error: function(a, d) { 416 b.coming && "abort" !== d ? b._error("ajax", a) : b.hideLoading() 417 }, 418 success: function(c, d) { 419 "success" === d && (a.content = c, b._afterLoad()) 420 } 421 })) 422 }, 423 _loadIframe: function() { 424 var a = b.coming, 425 c = f(a.tpl.iframe.replace(/\{rnd\}/g, (new Date).getTime())).attr("scrolling", u ? "auto" : a.iframe.scrolling).attr("src", a.href); 426 f(a.wrap).bind("onReset", function() { 427 try { 428 f(this).find("iframe").hide().attr("src", "//about:blank").end().empty() 429 } catch (d) {} 430 }); 431 a.iframe.preload && (b.showLoading(), c.one("load", function() { 432 f(this).data("ready", 1); 433 u || f(this).bind("load.fb", b.update); 434 f(this).parents(".fancybox-wrap").width("100%").removeClass("fancybox-tmp").show(); 435 b._afterLoad() 436 })); 437 a.content = c.appendTo(a.inner); 438 a.iframe.preload || 439 b._afterLoad() 440 }, 441 _preloadImages: function() { 442 var a = b.group, 443 c = b.current, 444 d = a.length, 445 e = c.preload ? Math.min(c.preload, d - 1) : 0, 446 f, g; 447 for (g = 1; g <= e; g += 1) f = a[(c.index + g) % d], "image" === f.type && f.href && ((new Image).src = f.href) 448 }, 449 _afterLoad: function() { 450 var a = b.coming, 451 c = b.current, 452 d, e, k, g, l; 453 b.hideLoading(); 454 if (a && !1 !== b.isActive) 455 if (!1 === b.trigger("afterLoad", a, c)) a.wrap.stop(!0).trigger("onReset").remove(), b.coming = null; 456 else { 457 c && (b.trigger("beforeChange", c), c.wrap.stop(!0).removeClass("fancybox-opened").find(".fancybox-item, .fancybox-nav").remove()); 458 b.unbindEvents(); 459 d = a.content; 460 e = a.type; 461 k = a.scrolling; 462 f.extend(b, { 463 wrap: a.wrap, 464 skin: a.skin, 465 outer: a.outer, 466 inner: a.inner, 467 current: a, 468 previous: c 469 }); 470 g = a.href; 471 switch (e) { 472 case "inline": 473 case "ajax": 474 case "html": 475 a.selector ? d = f("<div>").html(d).find(a.selector) : v(d) && (d.data("fancybox-placeholder") || d.data("fancybox-placeholder", f('<div class="fancybox-placeholder"></div>').insertAfter(d).hide()), d = d.show().detach(), a.wrap.bind("onReset", function() { 476 f(this).find(d).length && d.hide().replaceAll(d.data("fancybox-placeholder")).data("fancybox-placeholder", !1) 477 })); 478 break; 479 case "image": 480 d = a.tpl.image.replace(/\{href\}/g, g); 481 break; 482 case "swf": 483 d = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + g + '"></param>', l = "", f.each(a.swf, function(a, b) { 484 d += '<param name="' + a + '" value="' + b + '"></param>'; 485 l += " " + a + '="' + b + '"' 486 }), d += '<embed src="' + g + '" type="application/x-shockwave-flash" width="100%" height="100%"' + l + "></embed></object>" 487 } 488 v(d) && d.parent().is(a.inner) || a.inner.append(d); 489 b.trigger("beforeShow"); 490 a.inner.css("overflow", "yes" === k ? "scroll" : "no" === k ? "hidden" : k); 491 b._setDimension(); 492 b.reposition(); 493 b.isOpen = !1; 494 b.coming = null; 495 b.bindEvents(); 496 if (!b.isOpened) f(".fancybox-wrap").not(a.wrap).stop(!0).trigger("onReset").remove(); 497 else if (c.prevMethod) b.transitions[c.prevMethod](); 498 b.transitions[b.isOpened ? a.nextMethod : a.openMethod](); 499 b._preloadImages() 500 } 501 }, 502 _setDimension: function() { 503 var a = b.getViewport(), 504 c = 0, 505 d, e = b.wrap, 506 k = b.skin, 507 g = b.inner, 508 l = b.current; 509 d = l.width; 510 var h = l.height, 511 n = l.minWidth, 512 w = l.minHeight, 513 p = l.maxWidth, 514 q = l.maxHeight, 515 u = l.scrolling, 516 r = l.scrollOutside ? l.scrollbarWidth : 0, 517 z = l.margin, 518 A = m(z[1] + z[3]), 519 t = m(z[0] + z[2]), 520 x, B, v, E, C, H, D, F, I; 521 e.add(k).add(g).width("auto").height("auto").removeClass("fancybox-tmp"); 522 z = m(k.outerWidth(!0) - k.width()); 523 x = m(k.outerHeight(!0) - k.height()); 524 B = A + z; 525 v = t + x; 526 E = G(d) ? (a.w - B) * m(d) / 100 : d; 527 C = G(h) ? (a.h - v) * m(h) / 100 : h; 528 if ("iframe" === l.type) { 529 if (I = l.content, l.autoHeight && I && 1 === I.data("ready")) try { 530 I[0].contentWindow.document.location && (g.width(E).height(9999), H = I.contents().find("body"), r && H.css("overflow-x", 531 "hidden"), C = H.outerHeight(!0)) 532 } catch (M) {} 533 } else if (l.autoWidth || l.autoHeight) g.addClass("fancybox-tmp"), l.autoWidth || g.width(E), l.autoHeight || g.height(C), l.autoWidth && (E = g.width()), l.autoHeight && (C = g.height()), g.removeClass("fancybox-tmp"); 534 d = m(E); 535 h = m(C); 536 F = E / C; 537 n = m(G(n) ? m(n, "w") - B : n); 538 p = m(G(p) ? m(p, "w") - B : p); 539 w = m(G(w) ? m(w, "h") - v : w); 540 q = m(G(q) ? m(q, "h") - v : q); 541 H = p; 542 D = q; 543 l.fitToView && (p = Math.min(a.w - B, p), q = Math.min(a.h - v, q)); 544 B = a.w - A; 545 t = a.h - t; 546 l.aspectRatio ? (d > p && (d = p, h = m(d / F)), h > q && (h = q, d = m(h * F)), d < n && (d = n, h = m(d / 547 F)), h < w && (h = w, d = m(h * F))) : (d = Math.max(n, Math.min(d, p)), l.autoHeight && "iframe" !== l.type && (g.width(d), h = g.height()), h = Math.max(w, Math.min(h, q))); 548 if (l.fitToView) 549 if (g.width(d).height(h), e.width(d + z), a = e.width(), A = e.height(), l.aspectRatio) 550 for (; 551 (a > B || A > t) && d > n && h > w && !(19 < c++);) h = Math.max(w, Math.min(q, h - 10)), d = m(h * F), d < n && (d = n, h = m(d / F)), d > p && (d = p, h = m(d / F)), g.width(d).height(h), e.width(d + z), a = e.width(), A = e.height(); 552 else d = Math.max(n, Math.min(d, d - (a - B))), h = Math.max(w, Math.min(h, h - (A - t))); 553 r && "auto" === u && h < C && 554 d + z + r < B && (d += r); 555 g.width(d).height(h); 556 e.width(d + z); 557 a = e.width(); 558 A = e.height(); 559 c = (a > B || A > t) && d > n && h > w; 560 d = l.aspectRatio ? d < H && h < D && d < E && h < C : (d < H || h < D) && (d < E || h < C); 561 f.extend(l, { 562 dim: { 563 width: y(a), 564 height: y(A) 565 }, 566 origWidth: E, 567 origHeight: C, 568 canShrink: c, 569 canExpand: d, 570 wPadding: z, 571 hPadding: x, 572 wrapSpace: A - k.outerHeight(!0), 573 skinSpace: k.height() - h 574 }); 575 !I && l.autoHeight && h > w && h < q && !d && g.height("auto") 576 }, 577 _getPosition: function(a) { 578 var c = b.current, 579 d = b.getViewport(), 580 e = c.margin, 581 f = b.wrap.width() + e[1] + e[3], 582 g = b.wrap.height() + e[0] + e[2], 583 e = { 584 position: "absolute", 585 top: e[0], 586 left: e[3] 587 }; 588 c.autoCenter && c.fixed && !a && g <= d.h && f <= d.w ? e.position = "fixed" : c.locked || (e.top += d.y, e.left += d.x); 589 e.top = y(Math.max(e.top, e.top + (d.h - g) * c.topRatio)); 590 e.left = y(Math.max(e.left, e.left + (d.w - f) * c.leftRatio)); 591 return e 592 }, 593 _afterZoomIn: function() { 594 var a = b.current; 595 a && ((b.isOpen = b.isOpened = !0, b.wrap.css("overflow", "visible").addClass("fancybox-opened").hide().show(0), b.update(), (a.closeClick || a.nextClick && 1 < b.group.length) && b.inner.css("cursor", "pointer").bind("click.fb", function(c) { 596 f(c.target).is("a") || 597 f(c.target).parent().is("a") || (c.preventDefault(), b[a.closeClick ? "close" : "next"]()) 598 }), a.closeBtn && f(a.tpl.closeBtn).appendTo(b.skin).bind("click.fb", function(a) { 599 a.preventDefault(); 600 b.close() 601 }), a.arrows && 1 < b.group.length && ((a.loop || 0 < a.index) && f(a.tpl.prev).appendTo(b.outer).bind("click.fb", b.prev), (a.loop || a.index < b.group.length - 1) && f(a.tpl.next).appendTo(b.outer).bind("click.fb", b.next)), b.trigger("afterShow"), a.loop || a.index !== a.group.length - 1) ? b.opts.autoPlay && !b.player.isActive && (b.opts.autoPlay = !1, b.play(!0)) : b.play(!1)) 602 }, 603 _afterZoomOut: function(a) { 604 a = a || b.current; 605 f(".fancybox-wrap").trigger("onReset").remove(); 606 f.extend(b, { 607 group: {}, 608 opts: {}, 609 router: !1, 610 current: null, 611 isActive: !1, 612 isOpened: !1, 613 isOpen: !1, 614 isClosing: !1, 615 wrap: null, 616 skin: null, 617 outer: null, 618 inner: null 619 }); 620 b.trigger("afterClose", a) 621 } 622 }); 623 b.transitions = { 624 getOrigPosition: function() { 625 var a = b.current, 626 c = a.element, 627 d = a.orig, 628 e = {}, 629 f = 50, 630 g = 50, 631 l = a.hPadding, 632 h = a.wPadding, 633 n = b.getViewport(); 634 !d && a.isDom && c.is(":visible") && (d = c.find("img:first"), d.length || (d = c)); 635 v(d) ? 636 (e = d.offset(), d.is("img") && (f = d.outerWidth(), g = d.outerHeight())) : (e.top = n.y + (n.h - g) * a.topRatio, e.left = n.x + (n.w - f) * a.leftRatio); 637 if ("fixed" === b.wrap.css("position") || a.locked) e.top -= n.y, e.left -= n.x; 638 return e = { 639 top: y(e.top - l * a.topRatio), 640 left: y(e.left - h * a.leftRatio), 641 width: y(f + h), 642 height: y(g + l) 643 } 644 }, 645 step: function(a, c) { 646 var d, e, f = c.prop; 647 e = b.current; 648 var g = e.wrapSpace, 649 l = e.skinSpace; 650 if ("width" === f || "height" === f) d = c.end === c.start ? 1 : (a - c.start) / (c.end - c.start), b.isClosing && (d = 1 - d), e = "width" === f ? e.wPadding : e.hPadding, 651 e = a - e, b.skin[f](m("width" === f ? e : e - g * d)), b.inner[f](m("width" === f ? e : e - g * d - l * d)) 652 }, 653 zoomIn: function() { 654 var a = b.current, 655 c = a.pos, 656 d = a.openEffect, 657 e = "elastic" === d, 658 k = f.extend({ 659 opacity: 1 660 }, c); 661 delete k.position; 662 e ? (c = this.getOrigPosition(), a.openOpacity && (c.opacity = .1)) : "fade" === d && (c.opacity = .1); 663 b.wrap.css(c).animate(k, { 664 duration: "none" === d ? 0 : a.openSpeed, 665 easing: a.openEasing, 666 step: e ? this.step : null, 667 complete: b._afterZoomIn 668 }) 669 }, 670 zoomOut: function() { 671 var a = b.current, 672 c = a.closeEffect, 673 d = "elastic" === c, 674 e = { 675 opacity: .1 676 }; 677 d && (e = this.getOrigPosition(), 678 a.closeOpacity && (e.opacity = .1)); 679 b.wrap.animate(e, { 680 duration: "none" === c ? 0 : a.closeSpeed, 681 easing: a.closeEasing, 682 step: d ? this.step : null, 683 complete: b._afterZoomOut 684 }) 685 }, 686 changeIn: function() { 687 var a = b.current, 688 c = a.nextEffect, 689 d = a.pos, 690 e = { 691 opacity: 1 692 }, 693 f = b.direction, 694 g; 695 d.opacity = .1; 696 "elastic" === c && (g = "down" === f || "up" === f ? "top" : "left", "down" === f || "right" === f ? (d[g] = y(m(d[g]) - 200), e[g] = "+=200px") : (d[g] = y(m(d[g]) + 200), e[g] = "-=200px")); 697 "none" === c ? b._afterZoomIn() : b.wrap.css(d).animate(e, { 698 duration: a.nextSpeed, 699 easing: a.nextEasing, 700 complete: b._afterZoomIn 701 }) 702 }, 703 changeOut: function() { 704 var a = b.previous, 705 c = a.prevEffect, 706 d = { 707 opacity: .1 708 }, 709 e = b.direction; 710 "elastic" === c && (d["down" === e || "up" === e ? "top" : "left"] = ("up" === e || "left" === e ? "-" : "+") + "=200px"); 711 a.wrap.animate(d, { 712 duration: "none" === c ? 0 : a.prevSpeed, 713 easing: a.prevEasing, 714 complete: function() { 715 f(this).trigger("onReset").remove() 716 } 717 }) 718 } 719 }; 720 b.helpers.overlay = { 721 defaults: { 722 closeClick: !0, 723 speedOut: 200, 724 showEarly: !0, 725 css: {}, 726 locked: !u, 727 fixed: !0 728 }, 729 overlay: null, 730 fixed: !1, 731 el: f("html"), 732 create: function(a) { 733 var c; 734 a = f.extend({}, 735 this.defaults, a); 736 this.overlay && this.close(); 737 c = b.coming ? b.coming.parent : a.parent; 738 this.overlay = f('<div class="fancybox-overlay"></div>').appendTo(c && c.length ? c : "body"); 739 this.fixed = !1; 740 a.fixed && b.defaults.fixed && (this.overlay.addClass("fancybox-overlay-fixed"), this.fixed = !0) 741 }, 742 open: function(a) { 743 var c = this; 744 a = f.extend({}, this.defaults, a); 745 this.overlay ? this.overlay.unbind(".overlay").width("auto").height("auto") : this.create(a); 746 this.fixed || (q.bind("resize.overlay", f.proxy(this.update, this)), this.update()); 747 a.closeClick && 748 this.overlay.bind("click.overlay", function(a) { 749 if (f(a.target).hasClass("fancybox-overlay")) return b.isActive ? b.close() : c.close(), !1 750 }); 751 this.overlay.css(a.css).show() 752 }, 753 close: function() { 754 q.unbind("resize.overlay"); 755 this.el.hasClass("fancybox-lock") && (f(".fancybox-margin").removeClass("fancybox-margin"), this.el.removeClass("fancybox-lock"), q.scrollTop(this.scrollV).scrollLeft(this.scrollH)); 756 f(".fancybox-overlay").remove().hide(); 757 f.extend(this, { 758 overlay: null, 759 fixed: !1 760 }) 761 }, 762 update: function() { 763 var a = "100%", 764 b; 765 this.overlay.width(a).height("100%"); 766 K ? (b = Math.max(J.documentElement.offsetWidth, J.body.offsetWidth), p.width() > b && (a = p.width())) : p.width() > q.width() && (a = p.width()); 767 this.overlay.width(a).height(p.height()) 768 }, 769 onReady: function(a, b) { 770 var d = this.overlay; 771 f(".fancybox-overlay").stop(!0, !0); 772 d || this.create(a); 773 a.locked && this.fixed && b.fixed && (b.locked = this.overlay.append(b.wrap), b.fixed = !1); 774 !0 === a.showEarly && this.beforeShow.apply(this, arguments) 775 }, 776 beforeShow: function(a, b) { 777 b.locked && !this.el.hasClass("fancybox-lock") && (!1 !== this.fixPosition && f("*:not(object)").filter(function() { 778 return "fixed" === 779 f(this).css("position") && !f(this).hasClass("fancybox-overlay") && !f(this).hasClass("fancybox-wrap") 780 }).addClass("fancybox-margin"), this.el.addClass("fancybox-margin"), this.scrollV = q.scrollTop(), this.scrollH = q.scrollLeft(), this.el.addClass("fancybox-lock"), q.scrollTop(this.scrollV).scrollLeft(this.scrollH)); 781 this.open(a) 782 }, 783 onUpdate: function() { 784 this.fixed || this.update() 785 }, 786 afterClose: function(a) { 787 this.overlay && !b.coming && this.overlay.fadeOut(a.speedOut, f.proxy(this.close, this)) 788 } 789 }; 790 b.helpers.title = { 791 defaults: { 792 type: "float", 793 position: "bottom" 794 }, 795 beforeShow: function(a) { 796 var c = b.current, 797 d = c.title, 798 e = a.type; 799 f.isFunction(d) && (d = d.call(c.element, c)); 800 if (r(d) && "" !== f.trim(d)) { 801 c = f('<div class="fancybox-title fancybox-title-' + e + '-wrap">' + d + "</div>"); 802 switch (e) { 803 case "inside": 804 e = b.skin; 805 break; 806 case "outside": 807 e = b.wrap; 808 break; 809 case "over": 810 e = b.inner; 811 break; 812 default: 813 e = b.skin, c.appendTo("body"), K && c.width(c.width()), c.wrapInner('<span class="child"></span>'), b.current.margin[2] += Math.abs(m(c.css("margin-bottom"))) 814 } 815 c["top" === a.position ? "prependTo" : 816 "appendTo"](e) 817 } 818 } 819 }; 820 f.fn.fancybox = function(a) { 821 var c, d = f(this), 822 e = this.selector || "", 823 k = function(g) { 824 var l = f(this).blur(), 825 h = c, 826 k, m; 827 g.ctrlKey || g.altKey || g.shiftKey || g.metaKey || l.is(".fancybox-wrap") || (k = a.groupAttr || "data-fancybox-group", m = l.attr(k), m || (k = "rel", m = l.get(0)[k]), m && "" !== m && "nofollow" !== m && (l = e.length ? f(e) : d, l = l.filter("[" + k + '="' + m + '"]'), h = l.index(this)), a.index = h, !1 !== b.open(l, a) && g.preventDefault()) 828 }; 829 a = a || {}; 830 c = a.index || 0; 831 e && !1 !== a.live ? p.undelegate(e, "click.fb-start").delegate(e + ":not('.fancybox-item, .fancybox-nav')", 832 "click.fb-start", k) : d.unbind("click.fb-start").bind("click.fb-start", k); 833 this.filter("[data-fancybox-start=1]").trigger("click"); 834 return this 835 }; 836 p.ready(function() { 837 var a, c; 838 f.scrollbarWidth === x && (f.scrollbarWidth = function() { 839 var a = f('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo("body"), 840 b = a.children(), 841 b = b.innerWidth() - b.height(99).innerWidth(); 842 a.remove(); 843 return b 844 }); 845 f.support.fixedPosition === x && (f.support.fixedPosition = function() { 846 var a = f('<div style="position:fixed;top:20px;"></div>').appendTo("body"), 847 b = 20 === a[0].offsetTop || 15 === a[0].offsetTop; 848 a.remove(); 849 return b 850 }()); 851 f.extend(b.defaults, { 852 scrollbarWidth: f.scrollbarWidth(), 853 fixed: f.support.fixedPosition, 854 parent: f("body") 855 }); 856 a = f(t).width(); 857 L.addClass("fancybox-lock-test"); 858 c = f(t).width(); 859 L.removeClass("fancybox-lock-test"); 860 f("<style type='text/css'>.fancybox-margin{margin-right:" + (c - a) + "px;}</style>").appendTo("head") 861 }) 862})(window, document, jQuery);
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.