promethee 1.6.60 → 1.6.61

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/promethee.js +1 -1
  3. data/app/assets/stylesheets/promethee.sass +1 -1
  4. data/app/views/promethee/show/_image.srcset.html.erb +1 -1
  5. data/lib/promethee/rails/version.rb +1 -1
  6. data/node_modules/@fancyapps/fancybox/README.md +62 -0
  7. data/node_modules/@fancyapps/fancybox/bower.json +23 -0
  8. data/node_modules/@fancyapps/fancybox/dist/jquery.fancybox.css +770 -0
  9. data/node_modules/@fancyapps/fancybox/dist/jquery.fancybox.js +5138 -0
  10. data/node_modules/@fancyapps/fancybox/dist/jquery.fancybox.min.css +1 -0
  11. data/node_modules/@fancyapps/fancybox/dist/jquery.fancybox.min.js +12 -0
  12. data/node_modules/@fancyapps/fancybox/docs/index.html +1923 -0
  13. data/node_modules/@fancyapps/fancybox/gulpfile.js +67 -0
  14. data/node_modules/@fancyapps/fancybox/package.json +80 -0
  15. data/node_modules/@fancyapps/fancybox/src/css/core.css +634 -0
  16. data/node_modules/@fancyapps/fancybox/src/css/fullscreen.css +11 -0
  17. data/node_modules/@fancyapps/fancybox/src/css/share.css +96 -0
  18. data/node_modules/@fancyapps/fancybox/src/css/slideshow.css +26 -0
  19. data/node_modules/@fancyapps/fancybox/src/css/thumbs.css +120 -0
  20. data/node_modules/@fancyapps/fancybox/src/js/core.js +3064 -0
  21. data/node_modules/@fancyapps/fancybox/src/js/fullscreen.js +169 -0
  22. data/node_modules/@fancyapps/fancybox/src/js/guestures.js +885 -0
  23. data/node_modules/@fancyapps/fancybox/src/js/hash.js +216 -0
  24. data/node_modules/@fancyapps/fancybox/src/js/media.js +201 -0
  25. data/node_modules/@fancyapps/fancybox/src/js/share.js +104 -0
  26. data/node_modules/@fancyapps/fancybox/src/js/slideshow.js +181 -0
  27. data/node_modules/@fancyapps/fancybox/src/js/thumbs.js +259 -0
  28. data/node_modules/@fancyapps/fancybox/src/js/wheel.js +41 -0
  29. metadata +24 -1
@@ -0,0 +1 @@
1
+ body.compensate-for-scrollbar{overflow:hidden}.fancybox-active{height:auto}.fancybox-is-hidden{left:-9999px;margin:0;position:absolute!important;top:-9999px;visibility:hidden}.fancybox-container{-webkit-backface-visibility:hidden;backface-visibility:hidden;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;height:100%;left:0;position:fixed;-webkit-tap-highlight-color:transparent;top:0;-webkit-transform:translateZ(0);transform:translateZ(0);width:100%;z-index:99992}.fancybox-container *{box-sizing:border-box}.fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-stage{bottom:0;left:0;position:absolute;right:0;top:0}.fancybox-outer{-webkit-overflow-scrolling:touch;overflow-y:auto}.fancybox-bg{background:#1e1e1e;opacity:0;transition-duration:inherit;transition-property:opacity;transition-timing-function:cubic-bezier(.47,0,.74,.71)}.fancybox-is-open .fancybox-bg{opacity:.87;transition-timing-function:cubic-bezier(.22,.61,.36,1)}.fancybox-caption,.fancybox-infobar,.fancybox-navigation .fancybox-button,.fancybox-toolbar{direction:ltr;opacity:0;position:absolute;transition:opacity .25s,visibility 0s linear .25s;visibility:hidden;z-index:99997}.fancybox-show-caption .fancybox-caption,.fancybox-show-infobar .fancybox-infobar,.fancybox-show-nav .fancybox-navigation .fancybox-button,.fancybox-show-toolbar .fancybox-toolbar{opacity:1;transition:opacity .25s,visibility 0s;visibility:visible}.fancybox-infobar{color:#ccc;font-size:13px;-webkit-font-smoothing:subpixel-antialiased;height:44px;left:0;line-height:44px;min-width:44px;mix-blend-mode:difference;padding:0 10px;pointer-events:none;text-align:center;top:0;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fancybox-toolbar{right:0;top:0}.fancybox-stage{direction:ltr;overflow:visible;-webkit-transform:translateZ(0);z-index:99994}.fancybox-is-open .fancybox-stage{overflow:hidden}.fancybox-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:none;height:100%;left:0;outline:none;overflow:auto;-webkit-overflow-scrolling:touch;padding:44px;position:absolute;text-align:center;top:0;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform;white-space:normal;width:100%;z-index:99994}.fancybox-slide:before{content:"";display:inline-block;height:100%;margin-right:-.25em;vertical-align:middle;width:0}.fancybox-is-sliding .fancybox-slide,.fancybox-slide--current,.fancybox-slide--next,.fancybox-slide--previous{display:block}.fancybox-slide--next{z-index:99995}.fancybox-slide--image{overflow:visible;padding:44px 0}.fancybox-slide--image:before{display:none}.fancybox-slide--html{padding:6px 6px 0}.fancybox-slide--iframe{padding:44px 44px 0}.fancybox-content{background:#fff;display:inline-block;margin:0 0 6px;max-width:100%;overflow:auto;padding:0;padding:24px;position:relative;text-align:left;vertical-align:middle}.fancybox-slide--image .fancybox-content{-webkit-animation-timing-function:cubic-bezier(.5,0,.14,1);animation-timing-function:cubic-bezier(.5,0,.14,1);-webkit-backface-visibility:hidden;backface-visibility:hidden;background:transparent;background-repeat:no-repeat;background-size:100% 100%;left:0;margin:0;max-width:none;overflow:visible;padding:0;position:absolute;top:0;-webkit-transform-origin:top left;transform-origin:top left;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:99995}.fancybox-can-zoomOut .fancybox-content{cursor:zoom-out}.fancybox-can-zoomIn .fancybox-content{cursor:zoom-in}.fancybox-can-drag .fancybox-content{cursor:-webkit-grab;cursor:grab}.fancybox-is-dragging .fancybox-content{cursor:-webkit-grabbing;cursor:grabbing}.fancybox-container [data-selectable=true]{cursor:text}.fancybox-image,.fancybox-spaceball{background:transparent;border:0;height:100%;left:0;margin:0;max-height:none;max-width:none;padding:0;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.fancybox-spaceball{z-index:1}.fancybox-slide--html .fancybox-content{margin-bottom:6px}.fancybox-slide--iframe .fancybox-content,.fancybox-slide--map .fancybox-content,.fancybox-slide--video .fancybox-content{height:100%;margin:0;overflow:visible;padding:0;width:100%}.fancybox-slide--video .fancybox-content{background:#000}.fancybox-slide--map .fancybox-content{background:#e5e3df}.fancybox-slide--iframe .fancybox-content{background:#fff;height:calc(100% - 44px);margin-bottom:44px}.fancybox-iframe,.fancybox-video{background:transparent;border:0;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.fancybox-iframe{vertical-align:top}.fancybox-error{background:#fff;cursor:default;max-width:400px;padding:40px;width:100%}.fancybox-error p{color:#444;font-size:16px;line-height:20px;margin:0;padding:0}.fancybox-button{background:rgba(30,30,30,.6);border:0;border-radius:0;cursor:pointer;display:inline-block;height:44px;margin:0;outline:none;padding:10px;transition:color .2s;vertical-align:top;width:44px}.fancybox-button,.fancybox-button:link,.fancybox-button:visited{color:#ccc}.fancybox-button:focus,.fancybox-button:hover{color:#fff}.fancybox-button.disabled,.fancybox-button.disabled:hover,.fancybox-button[disabled],.fancybox-button[disabled]:hover{color:#888;cursor:default}.fancybox-button svg{display:block;overflow:visible;position:relative;shape-rendering:geometricPrecision}.fancybox-button svg path{fill:transparent;stroke:currentColor;stroke-linejoin:round;stroke-width:3}.fancybox-button--pause svg path:nth-child(1),.fancybox-button--play svg path:nth-child(2){display:none}.fancybox-button--play svg path,.fancybox-button--share svg path,.fancybox-button--thumbs svg path{fill:currentColor}.fancybox-button--share svg path{stroke-width:1}.fancybox-navigation .fancybox-button{height:38px;opacity:0;padding:6px;position:absolute;top:50%;width:38px}.fancybox-show-nav .fancybox-navigation .fancybox-button{transition:opacity .25s,visibility 0s,color .25s}.fancybox-navigation .fancybox-button:after{content:"";left:-25px;padding:50px;position:absolute;top:-25px}.fancybox-navigation .fancybox-button--arrow_left{left:6px}.fancybox-navigation .fancybox-button--arrow_right{right:6px}.fancybox-close-small{background:transparent;border:0;border-radius:0;color:#555;cursor:pointer;height:44px;margin:0;padding:6px;position:absolute;right:0;top:0;width:44px;z-index:10}.fancybox-close-small svg{fill:transparent;opacity:.8;stroke:currentColor;stroke-width:1.5;transition:stroke .1s}.fancybox-close-small:focus{outline:none}.fancybox-close-small:hover svg{opacity:1}.fancybox-slide--iframe .fancybox-close-small,.fancybox-slide--image .fancybox-close-small,.fancybox-slide--video .fancybox-close-small{color:#ccc;padding:5px;right:-12px;top:-44px}.fancybox-slide--iframe .fancybox-close-small:hover svg,.fancybox-slide--image .fancybox-close-small:hover svg,.fancybox-slide--video .fancybox-close-small:hover svg{background:transparent;color:#fff}.fancybox-is-scaling .fancybox-close-small,.fancybox-is-zoomable.fancybox-can-drag .fancybox-close-small{display:none}.fancybox-caption{bottom:0;color:#fff;font-size:14px;font-weight:400;left:0;line-height:1.5;padding:25px 44px;right:0}.fancybox-caption:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAEtCAQAAABjBcL7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHRJREFUKM+Vk8EOgDAIQ0vj/3+xBw8qIZZueFnIKC90MCAI8DlrkHGeqqGIU6lVigrBtpCWqeRWoHDNqs0F7VNVBVxmHRlvoVqjaYkdnDIaivH2HqZ5+oZj3JUzWB+cOz4G48Bg+tsJ/tqu4dLC/4Xb+0GcF5BwBC0AA53qAAAAAElFTkSuQmCC);background-repeat:repeat-x;background-size:contain;bottom:0;content:"";display:block;left:0;pointer-events:none;position:absolute;right:0;top:-25px;z-index:-1}.fancybox-caption:after{border-bottom:1px solid hsla(0,0%,100%,.3);content:"";display:block;left:44px;position:absolute;right:44px;top:0}.fancybox-caption a,.fancybox-caption a:link,.fancybox-caption a:visited{color:#ccc;text-decoration:none}.fancybox-caption a:hover{color:#fff;text-decoration:underline}.fancybox-loading{-webkit-animation:a .8s infinite linear;animation:a .8s infinite linear;background:transparent;border:6px solid hsla(0,0%,39%,.5);border-radius:100%;border-top-color:#fff;height:60px;left:50%;margin:-30px 0 0 -30px;opacity:.6;padding:0;position:absolute;top:50%;width:60px;z-index:99999}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fancybox-animated{transition-timing-function:cubic-bezier(0,0,.25,1)}.fancybox-fx-slide.fancybox-slide--previous{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.fancybox-fx-slide.fancybox-slide--next{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.fancybox-fx-slide.fancybox-slide--current{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}.fancybox-fx-fade.fancybox-slide--next,.fancybox-fx-fade.fancybox-slide--previous{opacity:0;transition-timing-function:cubic-bezier(.19,1,.22,1)}.fancybox-fx-fade.fancybox-slide--current{opacity:1}.fancybox-fx-zoom-in-out.fancybox-slide--previous{opacity:0;-webkit-transform:scale3d(1.5,1.5,1.5);transform:scale3d(1.5,1.5,1.5)}.fancybox-fx-zoom-in-out.fancybox-slide--next{opacity:0;-webkit-transform:scale3d(.5,.5,.5);transform:scale3d(.5,.5,.5)}.fancybox-fx-zoom-in-out.fancybox-slide--current{opacity:1;-webkit-transform:scaleX(1);transform:scaleX(1)}.fancybox-fx-rotate.fancybox-slide--previous{opacity:0;-webkit-transform:rotate(-1turn);transform:rotate(-1turn)}.fancybox-fx-rotate.fancybox-slide--next{opacity:0;-webkit-transform:rotate(1turn);transform:rotate(1turn)}.fancybox-fx-rotate.fancybox-slide--current{opacity:1;-webkit-transform:rotate(0deg);transform:rotate(0deg)}.fancybox-fx-circular.fancybox-slide--previous{opacity:0;-webkit-transform:scale3d(0,0,0) translate3d(-100%,0,0);transform:scale3d(0,0,0) translate3d(-100%,0,0)}.fancybox-fx-circular.fancybox-slide--next{opacity:0;-webkit-transform:scale3d(0,0,0) translate3d(100%,0,0);transform:scale3d(0,0,0) translate3d(100%,0,0)}.fancybox-fx-circular.fancybox-slide--current{opacity:1;-webkit-transform:scaleX(1) translateZ(0);transform:scaleX(1) translateZ(0)}.fancybox-fx-tube.fancybox-slide--previous{-webkit-transform:translate3d(-100%,0,0) scale(.1) skew(-10deg);transform:translate3d(-100%,0,0) scale(.1) skew(-10deg)}.fancybox-fx-tube.fancybox-slide--next{-webkit-transform:translate3d(100%,0,0) scale(.1) skew(10deg);transform:translate3d(100%,0,0) scale(.1) skew(10deg)}.fancybox-fx-tube.fancybox-slide--current{-webkit-transform:translateZ(0) scale(1);transform:translateZ(0) scale(1)}.fancybox-share{background:#f4f4f4;border-radius:3px;max-width:90%;padding:30px;text-align:center}.fancybox-share h1{color:#222;font-size:35px;font-weight:700;margin:0 0 20px}.fancybox-share p{margin:0;padding:0}.fancybox-share__button{border:0;border-radius:3px;display:inline-block;font-size:14px;font-weight:700;line-height:40px;margin:0 5px 10px;min-width:130px;padding:0 15px;text-decoration:none;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.fancybox-share__button:link,.fancybox-share__button:visited{color:#fff}.fancybox-share__button:hover{text-decoration:none}.fancybox-share__button--fb{background:#3b5998}.fancybox-share__button--fb:hover{background:#344e86}.fancybox-share__button--pt{background:#bd081d}.fancybox-share__button--pt:hover{background:#aa0719}.fancybox-share__button--tw{background:#1da1f2}.fancybox-share__button--tw:hover{background:#0d95e8}.fancybox-share__button svg{height:25px;margin-right:7px;position:relative;top:-1px;vertical-align:middle;width:25px}.fancybox-share__button svg path{fill:#fff}.fancybox-share__input{background:transparent;border:0;border-bottom:1px solid #d7d7d7;border-radius:0;color:#5d5b5b;font-size:14px;margin:10px 0 0;outline:none;padding:10px 15px;width:100%}.fancybox-thumbs{background:#fff;bottom:0;display:none;margin:0;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;padding:2px 2px 4px;position:absolute;right:0;-webkit-tap-highlight-color:transparent;top:0;width:212px;z-index:99995}.fancybox-thumbs-x{overflow-x:auto;overflow-y:hidden}.fancybox-show-thumbs .fancybox-thumbs{display:block}.fancybox-show-thumbs .fancybox-inner{right:212px}.fancybox-thumbs>ul{font-size:0;height:100%;list-style:none;margin:0;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;position:relative;white-space:nowrap;width:100%}.fancybox-thumbs-x>ul{overflow:hidden}.fancybox-thumbs-y>ul::-webkit-scrollbar{width:7px}.fancybox-thumbs-y>ul::-webkit-scrollbar-track{background:#fff;border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3)}.fancybox-thumbs-y>ul::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:10px}.fancybox-thumbs>ul>li{-webkit-backface-visibility:hidden;backface-visibility:hidden;cursor:pointer;float:left;height:75px;margin:2px;max-height:calc(100% - 8px);max-width:calc(50% - 4px);outline:none;overflow:hidden;padding:0;position:relative;-webkit-tap-highlight-color:transparent;width:100px}.fancybox-thumbs-loading{background:rgba(0,0,0,.1)}.fancybox-thumbs>ul>li{background-position:50%;background-repeat:no-repeat;background-size:cover}.fancybox-thumbs>ul>li:before{border:4px solid #4ea7f9;bottom:0;content:"";left:0;opacity:0;position:absolute;right:0;top:0;transition:all .2s cubic-bezier(.25,.46,.45,.94);z-index:99991}.fancybox-thumbs .fancybox-thumbs-active:before{opacity:1}@media (max-width:800px){.fancybox-thumbs{width:110px}.fancybox-show-thumbs .fancybox-inner{right:110px}.fancybox-thumbs>ul>li{max-width:calc(100% - 10px)}}
@@ -0,0 +1,12 @@
1
+ // ==================================================
2
+ // fancyBox v3.3.5
3
+ //
4
+ // Licensed GPLv3 for open source use
5
+ // or fancyBox Commercial License for commercial use
6
+ //
7
+ // http://fancyapps.com/fancybox/
8
+ // Copyright 2018 fancyApps
9
+ //
10
+ // ==================================================
11
+ !function(t,e,n,o){"use strict";function i(t,e){var o,i,a=[],s=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=t&&t.data?t.data.options:e||{},o=e.$target||n(t.currentTarget),i=o.attr("data-fancybox")||"",i?(a=e.selector?n(e.selector):t.data?t.data.items:[],a=a.length?a.filter('[data-fancybox="'+i+'"]'):n('[data-fancybox="'+i+'"]'),s=a.index(o),s<0&&(s=0)):a=[o],n.fancybox.open(a,e,s))}if(t.console=t.console||{info:function(t){}},n){if(n.fn.fancybox)return void console.info("fancyBox already initialized");var a={loop:!1,gutter:50,keyboard:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allowtransparency="true" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",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>&nbsp;/&nbsp;<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></div></div>',spinnerTpl:'<div class="fancybox-loading"></div>',errorTpl:'<div class="fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg viewBox="0 0 40 40"><path d="M13,16 L20,23 L27,16 M20,7 L20,23 M10,24 L10,28 L30,28 L30,24" /></svg></a>',zoom:'<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}"><svg viewBox="0 0 40 40"><path d="M18,17 m-8,0 a8,8 0 1,0 16,0 a8,8 0 1,0 -16,0 M24,22 L31,29" /></svg></button>',close:'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"><svg viewBox="0 0 40 40"><path d="M10,10 L30,30 M30,10 L10,30" /></svg></button>',smallBtn:'<button data-fancybox-close class="fancybox-close-small" title="{{CLOSE}}"><svg viewBox="0 0 32 32"><path d="M10,10 L22,22 M22,10 L10,22"></path></svg></button>',arrowLeft:'<a data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}" href="javascript:;"><svg viewBox="0 0 40 40"><path d="M18,12 L10,20 L18,28 M10,20 L30,20"></path></svg></a>',arrowRight:'<a data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}" href="javascript:;"><svg viewBox="0 0 40 40"><path d="M10,20 L30,20 M22,12 L30,20 L22,28"></path></svg></a>'},parentEl:"body",autoFocus:!1,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:4e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schliessen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Maßstab"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n},d=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),u=function(){var t,n=e.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in i)if(n.style[t]!==o)return i[t];return"transitionend"}(),f=function(t){return t&&t.length&&t[0].offsetHeight},p=function(t,e){var o=n.extend(!0,{},t,e);return n.each(e,function(t,e){n.isArray(e)&&(o[t]=e)}),o},h=function(t,o,i){var a=this;a.opts=p({index:i},n.fancybox.defaults),n.isPlainObject(o)&&(a.opts=p(a.opts,o)),n.fancybox.isMobile&&(a.opts=p(a.opts,a.opts.mobile)),a.id=a.opts.id||++c,a.currIndex=parseInt(a.opts.index,10)||0,a.prevIndex=null,a.prevPos=null,a.currPos=0,a.firstRun=!0,a.group=[],a.slides={},a.addContent(t),a.group.length&&(a.$lastFocus=n(e.activeElement).trigger("blur"),a.init())};n.extend(h.prototype,{init:function(){var i,a,s,r=this,c=r.group[r.currIndex],l=c.opts,d=n.fancybox.scrollbarWidth;n.fancybox.getInstance()||l.hideScrollbar===!1||(n("body").addClass("fancybox-active"),!n.fancybox.isMobile&&e.body.scrollHeight>t.innerHeight&&(d===o&&(i=n('<div style="width:100px;height:100px;overflow:scroll;" />').appendTo("body"),d=n.fancybox.scrollbarWidth=i[0].offsetWidth-i[0].clientWidth,i.remove()),n("head").append('<style id="fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar { margin-right: '+d+"px; }</style>"),n("body").addClass("compensate-for-scrollbar"))),s="",n.each(l.buttons,function(t,e){s+=l.btnTpl[e]||""}),a=n(r.translate(r,l.baseTpl.replace("{{buttons}}",s).replace("{{arrows}}",l.btnTpl.arrowLeft+l.btnTpl.arrowRight))).attr("id","fancybox-container-"+r.id).addClass("fancybox-is-hidden").addClass(l.baseClass).data("FancyBox",r).appendTo(l.parentEl),r.$refs={container:a},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){r.$refs[t]=a.find(".fancybox-"+t)}),r.trigger("onInit"),r.activate(),r.jumpTo(r.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang];return e.replace(/\{\{(\w+)\}\}/g,function(t,e){var i=n[e];return i===o?t:i})},addContent:function(t){var e,i=this,a=n.makeArray(t);n.each(a,function(t,e){var a,s,r,c,l,d={},u={};n.isPlainObject(e)?(d=e,u=e.opts||e):"object"===n.type(e)&&n(e).length?(a=n(e),u=a.data()||{},u=n.extend(!0,{},u,u.options),u.$orig=a,d.src=i.opts.src||u.src||a.attr("href"),d.type||d.src||(d.type="inline",d.src=e)):d={type:"html",src:e+""},d.opts=n.extend(!0,{},i.opts,u),n.isArray(u.buttons)&&(d.opts.buttons=u.buttons),s=d.type||d.opts.type,c=d.src||"",!s&&c&&((r=c.match(/\.(mp4|mov|ogv)((\?|#).*)?$/i))?(s="video",d.opts.videoFormat||(d.opts.videoFormat="video/"+("ogv"===r[1]?"ogg":r[1]))):c.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?s="image":c.match(/\.(pdf)((\?|#).*)?$/i)?s="iframe":"#"===c.charAt(0)&&(s="inline")),s?d.type=s:i.trigger("objectNeedsType",d),d.contentType||(d.contentType=n.inArray(d.type,["html","inline","ajax"])>-1?"html":d.type),d.index=i.group.length,"auto"==d.opts.smallBtn&&(d.opts.smallBtn=n.inArray(d.type,["html","inline","ajax"])>-1),"auto"===d.opts.toolbar&&(d.opts.toolbar=!d.opts.smallBtn),d.opts.$trigger&&d.index===i.opts.index&&(d.opts.$thumb=d.opts.$trigger.find("img:first")),d.opts.$thumb&&d.opts.$thumb.length||!d.opts.$orig||(d.opts.$thumb=d.opts.$orig.find("img:first")),"function"===n.type(d.opts.caption)&&(d.opts.caption=d.opts.caption.apply(e,[i,d])),"function"===n.type(i.opts.caption)&&(d.opts.caption=i.opts.caption.apply(e,[i,d])),d.opts.caption instanceof n||(d.opts.caption=d.opts.caption===o?"":d.opts.caption+""),"ajax"===d.type&&(l=c.split(/\s+/,2),l.length>1&&(d.src=l.shift(),d.opts.filter=l.shift())),d.opts.modal&&(d.opts=n.extend(!0,d.opts,{infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),i.group.push(d)}),Object.keys(i.slides).length&&(i.updateControls(),e=i.Thumbs,e&&e.isActive&&(e.create(),e.focus()))},addEvents:function(){var o=this;o.removeEvents(),o.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),o.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),o.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),o.next()}).on("click.fb","[data-fancybox-zoom]",function(t){o[o.isScaledDown()?"scaleToActual":"scaleToFit"]()}),s.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?d(function(){o.update()}):(o.$refs.stage.hide(),setTimeout(function(){o.$refs.stage.show(),o.update()},n.fancybox.isMobile?600:250))}),r.on("focusin.fb",function(t){var o=n.fancybox?n.fancybox.getInstance():null;o.isClosing||!o.current||!o.current.opts.trapFocus||n(t.target).hasClass("fancybox-container")||n(t.target).is(e)||o&&"fixed"!==n(t.target).css("position")&&!o.$refs.container.has(t.target).length&&(t.stopPropagation(),o.focus())}),r.on("keydown.fb",function(t){var e=o.current,i=t.keyCode||t.which;if(e&&e.opts.keyboard&&!(t.ctrlKey||t.altKey||t.shiftKey||n(t.target).is("input")||n(t.target).is("textarea")))return 8===i||27===i?(t.preventDefault(),void o.close(t)):37===i||38===i?(t.preventDefault(),void o.previous()):39===i||40===i?(t.preventDefault(),void o.next()):void o.trigger("afterKeydown",t,i)}),o.group[o.currIndex].opts.idleTime&&(o.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){o.idleSecondsCounter=0,o.isIdle&&o.showControls(),o.isIdle=!1}),o.idleInterval=t.setInterval(function(){o.idleSecondsCounter++,o.idleSecondsCounter>=o.group[o.currIndex].opts.idleTime&&!o.isDragging&&(o.isIdle=!0,o.idleSecondsCounter=0,o.hideControls())},1e3))},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("focusin.fb keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e){var i,a,s,r,c,l,d,u=this,p=u.group.length;if(!(u.isDragging||u.isClosing||u.isAnimating&&u.firstRun)){if(t=parseInt(t,10),a=u.current?u.current.opts.loop:u.opts.loop,!a&&(t<0||t>=p))return!1;if(i=u.firstRun=!Object.keys(u.slides).length,!(p<2&&!i&&u.isDragging)){if(r=u.current,u.prevIndex=u.currIndex,u.prevPos=u.currPos,s=u.createSlide(t),p>1&&((a||s.index>0)&&u.createSlide(t-1),(a||s.index<p-1)&&u.createSlide(t+1)),u.current=s,u.currIndex=s.index,u.currPos=s.pos,u.trigger("beforeShow",i),u.updateControls(),l=n.fancybox.getTranslate(s.$slide),s.isMoved=(0!==l.left||0!==l.top)&&!s.$slide.hasClass("fancybox-animated"),s.forcedDuration=o,n.isNumeric(e)?s.forcedDuration=e:e=s.opts[i?"animationDuration":"transitionDuration"],e=parseInt(e,10),i)return s.opts.animationEffect&&e&&u.$refs.container.css("transition-duration",e+"ms"),u.$refs.container.removeClass("fancybox-is-hidden"),f(u.$refs.container),u.$refs.container.addClass("fancybox-is-open"),f(u.$refs.container),s.$slide.addClass("fancybox-slide--previous"),u.loadSlide(s),s.$slide.removeClass("fancybox-slide--previous").addClass("fancybox-slide--current"),void u.preload("image");n.each(u.slides,function(t,e){n.fancybox.stop(e.$slide)}),s.$slide.removeClass("fancybox-slide--next fancybox-slide--previous").addClass("fancybox-slide--current"),s.isMoved?(c=Math.round(s.$slide.width()),n.each(u.slides,function(t,o){var i=o.pos-s.pos;n.fancybox.animate(o.$slide,{top:0,left:i*c+i*o.opts.gutter},e,function(){o.$slide.removeAttr("style").removeClass("fancybox-slide--next fancybox-slide--previous"),o.pos===u.currPos&&(s.isMoved=!1,u.complete())})})):u.$refs.stage.children().removeAttr("style"),s.isLoaded?u.revealContent(s):u.loadSlide(s),u.preload("image"),r.pos!==s.pos&&(d="fancybox-slide--"+(r.pos>s.pos?"next":"previous"),r.$slide.removeClass("fancybox-slide--complete fancybox-slide--current fancybox-slide--next fancybox-slide--previous"),r.isComplete=!1,e&&(s.isMoved||s.opts.transitionEffect)&&(s.isMoved?r.$slide.addClass(d):(d="fancybox-animated "+d+" fancybox-fx-"+s.opts.transitionEffect,n.fancybox.animate(r.$slide,d,e,function(){r.$slide.removeClass(d).removeAttr("style")}))))}}},createSlide:function(t){var e,o,i=this;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],{pos:t,$slide:e,isLoaded:!1}),i.updateSlide(i.slides[t])),i.slides[t]},scaleToActual:function(t,e,i){var a,s,r,c,l,d=this,u=d.current,f=u.$content,p=n.fancybox.getTranslate(u.$slide).width,h=n.fancybox.getTranslate(u.$slide).height,g=u.width,b=u.height;!d.isAnimating&&f&&"image"==u.type&&u.isLoaded&&!u.hasError&&(n.fancybox.stop(f),d.isAnimating=!0,t=t===o?.5*p:t,e=e===o?.5*h:e,a=n.fancybox.getTranslate(f),a.top-=n.fancybox.getTranslate(u.$slide).top,a.left-=n.fancybox.getTranslate(u.$slide).left,c=g/a.width,l=b/a.height,s=.5*p-.5*g,r=.5*h-.5*b,g>p&&(s=a.left*c-(t*c-t),s>0&&(s=0),s<p-g&&(s=p-g)),b>h&&(r=a.top*l-(e*l-e),r>0&&(r=0),r<h-b&&(r=h-b)),d.updateCursor(g,b),n.fancybox.animate(f,{top:r,left:s,scaleX:c,scaleY:l},i||330,function(){d.isAnimating=!1}),d.SlideShow&&d.SlideShow.isActive&&d.SlideShow.stop())},scaleToFit:function(t){var e,o=this,i=o.current,a=i.$content;!o.isAnimating&&a&&"image"==i.type&&i.isLoaded&&!i.hasError&&(n.fancybox.stop(a),o.isAnimating=!0,e=o.getFitPos(i),o.updateCursor(e.width,e.height),n.fancybox.animate(a,{top:e.top,left:e.left,scaleX:e.width/a.width(),scaleY:e.height/a.height()},t||330,function(){o.isAnimating=!1}))},getFitPos:function(t){var e,n,o,i,a,s=this,r=t.$content,c=t.width||t.opts.width,l=t.height||t.opts.height,d={};return!!(t.isLoaded&&r&&r.length)&&(i={top:parseInt(t.$slide.css("paddingTop"),10),right:parseInt(t.$slide.css("paddingRight"),10),bottom:parseInt(t.$slide.css("paddingBottom"),10),left:parseInt(t.$slide.css("paddingLeft"),10)},e=parseInt(s.$refs.stage.width(),10)-(i.left+i.right),n=parseInt(s.$refs.stage.height(),10)-(i.top+i.bottom),c&&l||(c=e,l=n),o=Math.min(1,e/c,n/l),c=Math.floor(o*c),l=Math.floor(o*l),"image"===t.type?(d.top=Math.floor(.5*(n-l))+i.top,d.left=Math.floor(.5*(e-c))+i.left):"video"===t.contentType&&(a=t.opts.width&&t.opts.height?c/l:t.opts.ratio||16/9,l>c/a?l=c/a:c>l*a&&(c=l*a)),d.width=c,d.height=l,d)},update:function(){var t=this;n.each(t.slides,function(e,n){t.updateSlide(n)})},updateSlide:function(t,e){var o=this,i=t&&t.$content,a=t.width||t.opts.width,s=t.height||t.opts.height;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())),t.$slide.trigger("refresh"),o.$refs.toolbar.toggleClass("compensate-for-scrollbar",t.$slide.get(0).scrollHeight>t.$slide.get(0).clientHeight),o.trigger("onUpdate",t)},centerSlide:function(t,e){var i,a,s=this;s.current&&(i=Math.round(t.$slide.width()),a=t.pos-s.current.pos,n.fancybox.animate(t.$slide,{top:0,left:a*i+a*t.opts.gutter,opacity:1},e===o?0:e,null,!1))},updateCursor:function(t,e){var o,i=this,a=i.current,s=i.$refs.container.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-drag fancybox-can-zoomOut");a&&!i.isClosing&&(o=i.isZoomable(),s.toggleClass("fancybox-is-zoomable",o),n("[data-fancybox-zoom]").prop("disabled",!o),o&&("zoom"===a.opts.clickContent||n.isFunction(a.opts.clickContent)&&"zoom"===a.opts.clickContent(a))?i.isScaledDown(t,e)?s.addClass("fancybox-can-zoomIn"):a.opts.touch?s.addClass("fancybox-can-drag"):s.addClass("fancybox-can-zoomOut"):a.opts.touch&&"video"!==a.contentType&&s.addClass("fancybox-can-drag"))},isZoomable:function(){var t,e=this,n=e.current;if(n&&!e.isClosing&&"image"===n.type&&!n.hasError){if(!n.isLoaded)return!0;if(t=e.getFitPos(n),n.width>t.width||n.height>t.height)return!0}return!1},isScaledDown:function(t,e){var i=this,a=!1,s=i.current,r=s.$content;return t!==o&&e!==o?a=t<s.width&&e<s.height:r&&(a=n.fancybox.getTranslate(r),a=a.width<s.width&&a.height<s.height),a},canPan:function(){var t,e=this,n=!1,o=e.current;return"image"===o.type&&(t=o.$content)&&!o.hasError&&(n=e.getFitPos(o),n=Math.abs(t.width()-n.width)>1||Math.abs(t.height()-n.height)>1),n},loadSlide:function(t){var e,o,i,a=this;if(!t.isLoading&&!t.isLoaded){switch(t.isLoading=!0,a.trigger("beforeLoad",t),e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass(t.opts.slideClass),e){case"image":a.setImage(t);break;case"iframe":a.setIframe(t);break;case"html":a.setContent(t,t.src||t.content);break;case"video":a.setContent(t,'<video class="fancybox-video" controls controlsList="nodownload"><source src="'+t.src+'" type="'+t.opts.videoFormat+"\">Your browser doesn't support HTML5 video</video");break;case"inline":n(t.src).length?a.setContent(t,n(t.src)):a.setError(t);break;case"ajax":a.showLoading(t),i=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&&a.setContent(t,e)},error:function(e,n){e&&"abort"!==n&&a.setError(t)}})),o.one("onReset",function(){i.abort()});break;default:a.setError(t)}return!0}},setImage:function(e){var o,i,a,s,r,c=this,l=e.opts.srcset||e.opts.image.srcset;if(e.timouts=setTimeout(function(){var t=e.$image;!e.isLoading||t&&t[0].complete||e.hasError||c.showLoading(e)},350),l){s=t.devicePixelRatio||1,r=t.innerWidth*s,a=l.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);return 0===n?e.url=t:void(o&&(e.value=o,e.postfix=t[t.length-1]))}),e}),a.sort(function(t,e){return t.value-e.value});for(var d=0;d<a.length;d++){var u=a[d];if("w"===u.postfix&&u.value>=r||"x"===u.postfix&&u.value>=s){i=u;break}}!i&&a.length&&(i=a[a.length-1]),i&&(e.src=i.url,e.width&&e.height&&"w"==i.postfix&&(e.height=e.width/e.height*i.value,e.width=i.value),e.opts.srcset=l)}e.$content=n('<div class="fancybox-content"></div>').addClass("fancybox-is-hidden").appendTo(e.$slide.addClass("fancybox-slide--image")),o=e.opts.thumb||!(!e.opts.$thumb||!e.opts.$thumb.length)&&e.opts.$thumb.attr("src"),e.opts.preload!==!1&&e.opts.width&&e.opts.height&&o&&(e.width=e.opts.width,e.height=e.opts.height,e.$ghost=n("<img />").one("error",function(){n(this).remove(),e.$ghost=null}).one("load",function(){c.afterLoad(e)}).addClass("fancybox-image").appendTo(e.$content).attr("src",o)),c.setBigImage(e)},setBigImage:function(t){var e=this,o=n("<img />");t.$image=o.one("error",function(){e.setError(t)}).one("load",function(){var n;t.$ghost||(e.resolveImageSlideSize(t,this.naturalWidth,this.naturalHeight),e.afterLoad(t)),t.timouts&&(clearTimeout(t.timouts),t.timouts=null),e.isClosing||(t.opts.srcset&&(n=t.opts.sizes,n&&"auto"!==n||(n=(t.width/t.height>1&&s.width()/s.height()>1?"100":Math.round(t.width/t.height*100))+"vw"),o.attr("sizes",n).attr("srcset",t.opts.srcset)),t.$ghost&&setTimeout(function(){t.$ghost&&!e.isClosing&&t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))),e.hideLoading(t))}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),(o[0].complete||"complete"==o[0].readyState)&&o[0].naturalWidth&&o[0].naturalHeight?o.trigger("load"):o[0].error&&o.trigger("error")},resolveImageSlideSize:function(t,e,n){var o=parseInt(t.opts.width,10),i=parseInt(t.opts.height,10);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)},setIframe:function(t){var e,i=this,a=t.opts.iframe,s=t.$slide;t.$content=n('<div class="fancybox-content'+(a.preload?" fancybox-is-hidden":"")+'"></div>').css(a.css).appendTo(s),s.addClass("fancybox-slide--"+t.contentType),t.$iframe=e=n(a.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(a.attr).appendTo(t.$content),a.preload?(i.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),i.afterLoad(t)}),s.on("refresh.fb",function(){var n,i,s=t.$content,r=a.css.width,c=a.css.height;if(1===e[0].isReady){try{n=e.contents(),i=n.find("body")}catch(t){}i&&i.length&&i.children().length&&(s.css({width:"",height:""}),r===o&&(r=Math.ceil(Math.max(i[0].clientWidth,i.outerWidth(!0)))),r&&s.width(r),c===o&&(c=Math.ceil(Math.max(i[0].clientHeight,i.outerHeight(!0)))),c&&s.height(c)),s.removeClass("fancybox-is-hidden")}})):this.afterLoad(t),e.attr("src",t.src),s.one("onReset",function(){try{n(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}n(this).off("refresh.fb").empty(),t.isLoaded=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$content&&n.fancybox.stop(t.$content),t.$slide.empty(),l(e)&&e.parent().length?(e.parent().parent(".fancybox-slide--inline").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(),3===e[0].nodeType&&(e=n("<div>").html(e))),t.opts.filter&&(e=n("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){n(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1)}),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").first().addClass("fancybox-content"),t.$slide.addClass("fancybox-slide--"+t.contentType),this.afterLoad(t))},setError:function(t){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)},showLoading:function(t){var e=this;t=t||e.current,t&&!t.$spinner&&(t.$spinner=n(e.translate(e,e.opts.spinnerTpl)).appendTo(t.$slide))},hideLoading:function(t){var e=this;t=t||e.current,t&&t.$spinner&&(t.$spinner.remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),t.pos===e.currPos&&e.updateCursor(),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).prependTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&n('<div class="fancybox-spaceball"></div>').appendTo(t.$content)),e.revealContent(t))},revealContent:function(t){var e,i,a,s,r=this,c=t.$slide,l=!1,d=!1;return e=t.opts[r.firstRun?"animationEffect":"transitionEffect"],a=t.opts[r.firstRun?"animationDuration":"transitionDuration"],a=parseInt(t.forcedDuration===o?a:t.forcedDuration,10),t.pos===r.currPos&&(t.isComplete?e=!1:r.isAnimating=!0),!t.isMoved&&t.pos===r.currPos&&a||(e=!1),"zoom"===e&&(t.pos===r.currPos&&a&&"image"===t.type&&!t.hasError&&(d=r.getThumbPos(t))?l=r.getFitPos(t):e="fade"),"zoom"===e?(l.scaleX=l.width/d.width,l.scaleY=l.height/d.height,s=t.opts.zoomOpacity,"auto"==s&&(s=Math.abs(t.width/t.height-d.width/d.height)>.1),s&&(d.opacity=.1,l.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),d),f(t.$content),void n.fancybox.animate(t.$content,l,a,function(){r.isAnimating=!1,r.complete()})):(r.updateSlide(t),e?(n.fancybox.stop(c),i="fancybox-animated fancybox-slide--"+(t.pos>=r.prevPos?"next":"previous")+" fancybox-fx-"+e,c.removeAttr("style").removeClass("fancybox-slide--current fancybox-slide--next fancybox-slide--previous").addClass(i),t.$content.removeClass("fancybox-is-hidden"),f(c),void n.fancybox.animate(c,"fancybox-slide--current",a,function(e){c.removeClass(i).removeAttr("style"),t.pos===r.currPos&&r.complete()},!0)):(f(c),t.$content.removeClass("fancybox-is-hidden"),void(t.pos===r.currPos&&r.complete())))},getThumbPos:function(o){var i,a=this,s=!1,r=o.opts.$thumb,c=r&&r.length&&r[0].ownerDocument===e?r.offset():0,l=function(e){for(var o,i=e[0],a=i.getBoundingClientRect(),s=[];null!==i.parentElement;)"hidden"!==n(i.parentElement).css("overflow")&&"auto"!==n(i.parentElement).css("overflow")||s.push(i.parentElement.getBoundingClientRect()),i=i.parentElement;return o=s.every(function(t){var e=Math.min(a.right,t.right)-Math.max(a.left,t.left),n=Math.min(a.bottom,t.bottom)-Math.max(a.top,t.top);return e>0&&n>0}),o&&a.bottom>0&&a.right>0&&a.left<n(t).width()&&a.top<n(t).height()};return c&&l(r)&&(i=a.$refs.stage.offset(),s={top:c.top-i.top+parseFloat(r.css("border-top-width")||0),left:c.left-i.left+parseFloat(r.css("border-left-width")||0),width:r.width(),height:r.height(),scaleX:1,scaleY:1}),s},complete:function(){var t=this,o=t.current,i={};!o.isMoved&&o.isLoaded&&(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),t.preload("inline"),f(o.$slide),o.$slide.addClass("fancybox-slide--complete"),n.each(t.slides,function(e,o){o.pos>=t.currPos-1&&o.pos<=t.currPos+1?i[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.off().remove())}),t.slides=i),t.isAnimating=!1,t.updateCursor(),t.trigger("afterShow"),o.$slide.find("video,audio").filter(":visible:first").trigger("play"),(n(e.activeElement).is("[disabled]")||o.opts.autoFocus&&"image"!=o.type&&"iframe"!==o.type)&&t.focus())},preload:function(t){var e=this,n=e.slides[e.currPos+1],o=e.slides[e.currPos-1];n&&n.type===t&&e.loadSlide(n),o&&o.type===t&&e.loadSlide(o)},focus:function(){var t,e=this.current;this.isClosing||e&&e.isComplete&&e.$content&&(t=e.$content.find("input[autofocus]:enabled:visible:first"),t.length||(t=e.$content.find("button,:input,[tabindex],a").filter(":enabled:visible:first")),t=t&&t.length?t:e.$content,t.trigger("focus"))},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,i,a,s,r,c,l,p=this,h=p.current,g=function(){p.cleanUp(t)};return!p.isClosing&&(p.isClosing=!0,p.trigger("beforeClose",t)===!1?(p.isClosing=!1,d(function(){p.update()}),!1):(p.removeEvents(),h.timouts&&clearTimeout(h.timouts),a=h.$content,o=h.opts.animationEffect,i=n.isNumeric(e)?e:o?h.opts.animationDuration:0,h.$slide.off(u).removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),h.$slide.siblings().trigger("onReset").remove(),i&&p.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing"),p.hideLoading(h),p.hideControls(),p.updateCursor(),"zoom"!==o||t!==!0&&a&&i&&"image"===h.type&&!h.hasError&&(l=p.getThumbPos(h))||(o="fade"),"zoom"===o?(n.fancybox.stop(a),s=n.fancybox.getTranslate(a),c={top:s.top,left:s.left,scaleX:s.width/l.width,scaleY:s.height/l.height,width:l.width,height:l.height},r=h.opts.zoomOpacity,"auto"==r&&(r=Math.abs(h.width/h.height-l.width/l.height)>.1),r&&(l.opacity=0),n.fancybox.setTranslate(a,c),f(a),n.fancybox.animate(a,l,i,g),!0):(o&&i?t===!0?setTimeout(g,i):n.fancybox.animate(h.$slide.removeClass("fancybox-slide--current"),"fancybox-animated fancybox-slide--previous fancybox-fx-"+o,i,g):g(),!0)))},cleanUp:function(t){var e,o=this,i=n("body");o.current.$slide.trigger("onReset"),o.$refs.container.empty().remove(),o.trigger("afterClose",t),o.$lastFocus&&o.current.opts.backFocus&&o.$lastFocus.trigger("focus"),o.current=null,e=n.fancybox.getInstance(),e?e.activate():(i.removeClass("fancybox-active compensate-for-scrollbar"),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;return s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),o===!1?o:void("afterClose"!==t&&a.$refs?a.$refs.container.trigger(t+".fb",i):r.trigger(t+".fb",i))},updateControls:function(t){var e=this,n=e.current,o=n.index,i=n.opts.caption,a=e.$refs.container,s=e.$refs.caption;n.$slide.trigger("refresh"),e.$caption=i&&i.length?s.html(i):null,e.isHiddenControls||e.isIdle||e.showControls(),a.find("[data-fancybox-count]").html(e.group.length),a.find("[data-fancybox-index]").html(o+1),a.find("[data-fancybox-prev]").toggleClass("disabled",!n.opts.loop&&o<=0),a.find("[data-fancybox-next]").toggleClass("disabled",!n.opts.loop&&o>=e.group.length-1),"image"===n.type?a.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",n.opts.image.src||n.src).show():n.opts.toolbar&&a.find("[data-fancybox-download],[data-fancybox-zoom]").hide()},hideControls:function(){this.isHiddenControls=!0,this.$refs.container.removeClass("fancybox-show-infobar fancybox-show-toolbar fancybox-show-caption fancybox-show-nav")},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.isHiddenControls=!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-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal),t.$caption?n.addClass("fancybox-show-caption "):n.removeClass("fancybox-show-caption")},toggleControls:function(){this.isHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.3.5",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof h&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new h(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),t===!0&&this.close())},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**")},isMobile:e.createTouch!==o&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))})},setTranslate:function(t,e){var n="",i={};if(t&&e)return e.left===o&&e.top===o||(n=(e.left===o?t.position().left:e.left)+"px, "+(e.top===o?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),e.scaleX!==o&&e.scaleY!==o&&(n=(n.length?n+" ":"")+"scale("+e.scaleX+", "+e.scaleY+")"),n.length&&(i.transform=n),e.opacity!==o&&(i.opacity=e.opacity),e.width!==o&&(i.width=e.width),e.height!==o&&(i.height=e.height),t.css(i)},animate:function(t,e,i,a,s){var r=!1;n.isFunction(i)&&(a=i,i=null),n.isPlainObject(e)||t.removeAttr("style"),n.fancybox.stop(t),t.on(u,function(o){(!o||!o.originalEvent||t.is(o.originalEvent.target)&&"z-index"!=o.originalEvent.propertyName)&&(n.fancybox.stop(t),r&&n.fancybox.setTranslate(t,r),
12
+ n.isPlainObject(e)?s===!1&&t.removeAttr("style"):s!==!0&&t.removeClass(e),n.isFunction(a)&&a(o))}),n.isNumeric(i)&&t.css("transition-duration",i+"ms"),n.isPlainObject(e)?(e.scaleX!==o&&e.scaleY!==o&&(r=n.extend({},e,{width:t.width()*e.scaleX,height:t.height()*e.scaleY,scaleX:1,scaleY:1}),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(){t.trigger("transitionend")},i+16))},stop:function(t){t&&t.length&&(clearTimeout(t.data("timer")),t.off("transitionend").css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},i):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},i),this},r.on("click.fb-start","[data-fancybox]",i),r.on("click.fb-start","[data-trigger]",function(t){i(t,{$target:n('[data-fancybox="'+n(t.currentTarget).attr("data-trigger")+'"]').eq(n(t.currentTarget).attr("data-index")||0),$trigger:n(this)})})}}(window,document,window.jQuery||jQuery),function(t){"use strict";var e=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e},n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"//www.youtube.com/embed/$4",thumb:"//img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1,api:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){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")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}};t(document).on("objectNeedsType.fb",function(o,i,a){var s,r,c,l,d,u,f,p=a.src||"",h=!1;s=t.extend(!0,{},n,a.opts.media),t.each(s,function(n,o){if(c=p.match(o.matcher)){if(h=o.type,f=n,u={},o.paramPlace&&c[o.paramPlace]){d=c[o.paramPlace],"?"==d[0]&&(d=d.substring(1)),d=d.split("&");for(var i=0;i<d.length;++i){var s=d[i].split("=",2);2==s.length&&(u[s[0]]=decodeURIComponent(s[1].replace(/\+/g," ")))}}return l=t.extend(!0,{},o.params,a.opts[n],u),p="function"===t.type(o.url)?o.url.call(this,c,l,a):e(o.url,c,l),r="function"===t.type(o.thumb)?o.thumb.call(this,c,l,a):e(o.thumb,c),"youtube"===n?p=p.replace(/&t=((\d+)m)?(\d+)s/,function(t,e,n,o){return"&start="+((n?60*parseInt(n,10):0)+parseInt(o,10))}):"vimeo"===n&&(p=p.replace("&%23","#")),!1}}),h?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=r),"iframe"===h&&(a.opts=t.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),t.extend(a,{type:h,src:p,origSrc:a.src,contentSource:f,contentType:"image"===h?"image":"gmap_place"==f||"gmap_search"==f?"map":"video"})):p&&(a.type=a.opts.defaultType)})}(window.jQuery||jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),i=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),a=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){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},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio')||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,i=o.length;e<i;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return!0;return!1},c=function(e){var n=t.getComputedStyle(e)["overflow-y"],o=t.getComputedStyle(e)["overflow-x"],i=("scroll"===n||"auto"===n)&&e.scrollHeight>e.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},d=function(t){var e=this;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"))};d.prototype.destroy=function(){this.$container.off(".fb.touch")},d.prototype.ontouchstart=function(o){var i=this,c=n(o.target),d=i.instance,u=d.current,f=u.$content,p="touchstart"==o.type;if(p&&i.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||d.isClosing)return o.stopPropagation(),void o.preventDefault();if(i.realPoints=i.startPoints=a(o),i.startPoints.length){if(o.stopPropagation(),i.startEvent=o,i.canTap=!0,i.$target=c,i.$content=f,i.opts=u.opts.touch,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.isScrolling=!1,i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.canvasWidth=Math.round(u.$slide[0].clientWidth),i.canvasHeight=Math.round(u.$slide[0].clientHeight),i.contentLastPos=null,i.contentStartPos=n.fancybox.getTranslate(i.$content)||{top:0,left:0},i.sliderStartPos=i.sliderLastPos||n.fancybox.getTranslate(u.$slide),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(p?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")).on(p?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),n.fancybox.isMobile&&e.addEventListener("scroll",i.onscroll,!0),!i.opts&&!d.canPan()||!c.is(i.$stage)&&!i.$stage.find(c).length)return void(c.is(".fancybox-image")&&o.preventDefault());n.fancybox.isMobile&&(l(c)||l(c.parent()))||o.preventDefault(),(1===i.startPoints.length||u.hasError)&&(i.instance.canPan()?(n.fancybox.stop(i.$content),i.$content.css("transition-duration",""),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("fancybox-controls--isGrabbing")),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.$content.css("transition-duration",""),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]))}}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener("scroll",n.onscroll,!0)},d.prototype.ontouchmove=function(t){var e=this,o=n(t.target);return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling||!o.is(e.$stage)&&!e.$stage.find(o).length?void(e.canTap=!1):(e.newPoints=a(t),void((e.opts||e.instance.canPan())&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&e.isSwiping===!0||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()))))},d.prototype.onSwipe=function(e){var a,s=this,r=s.isSwiping,c=s.sliderStartPos.left||0;if(r!==!0)"x"==r&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?c+=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)?c-=Math.pow(-s.distanceX,.8):c+=s.distanceX),s.sliderLastPos={top:"x"==r?0:s.sliderStartPos.top+s.distanceY,left:c},s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("fancybox-is-sliding"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,s.instance.group.length<2&&s.opts.vertical?s.isSwiping="y":s.instance.isDragging||s.opts.vertical===!1||"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"),s.canTap=!1,"y"===s.isSwiping&&n.fancybox.isMobile&&(l(s.$target)||l(s.$target.parent())))return void(s.isScrolling=!0);s.instance.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(s.instance.slides,function(t,e){n.fancybox.stop(e.$slide),e.$slide.css("transition-duration",""),e.inTransition=!1,e.pos===s.instance.current.pos&&(s.sliderStartPos.left=n.fancybox.getTranslate(e.$slide).left-n.fancybox.getTranslate(s.instance.$refs.stage).left)}),s.instance.SlideShow&&s.instance.SlideShow.isActive&&s.instance.SlideShow.stop()}},d.prototype.onPan=function(){var t=this;return s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5)?void(t.startPoints=t.newPoints):(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&(i(t.requestId),t.requestId=null),void(t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})))},d.prototype.limitMovement=function(){var t,e,n,o,i,a,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;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),{top:a,left:i}},d.prototype.limitPosition=function(t,e,n,o){var i=this,a=i.canvasWidth,s=i.canvasHeight;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),{top:e,left:t}},d.prototype.onZoom=function(){var e=this,a=e.contentStartPos,r=a.width,c=a.height,l=a.left,d=a.top,u=s(e.newPoints[0],e.newPoints[1]),f=u/e.startDistanceBetweenFingers,p=Math.floor(r*f),h=Math.floor(c*f),g=(r-p)*e.percentageOfImageAtPinchPointX,b=(c-h)*e.percentageOfImageAtPinchPointY,m=(e.newPoints[0].x+e.newPoints[1].x)/2-n(t).scrollLeft(),y=(e.newPoints[0].y+e.newPoints[1].y)/2-n(t).scrollTop(),v=m-e.centerPointStartX,x=y-e.centerPointStartY,w=l+(g+v),$=d+(b+x),S={top:$,left:w,scaleX:f,scaleY:f};e.canTap=!1,e.newWidth=p,e.newHeight=h,e.contentLastPos=S,e.requestId&&(i(e.requestId),e.requestId=null),e.requestId=o(function(){n.fancybox.setTranslate(e.$content,e.contentLastPos)})},d.prototype.ontouchend=function(t){var o=this,s=Math.max((new Date).getTime()-o.startTime,1),r=o.isSwiping,c=o.isPanning,l=o.isZooming,d=o.isScrolling;return o.endPoints=a(t),o.$container.removeClass("fancybox-controls--isGrabbing"),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?o.onTap(t):(o.speed=366,o.velocityX=o.distanceX/s*.5,o.velocityY=o.distanceY/s*.5,o.speedX=Math.max(.5*o.speed,Math.min(1.5*o.speed,1/Math.abs(o.velocityX)*o.speed)),void(c?o.endPanning():l?o.endZooming():o.endSwiping(r,d)))},d.prototype.endSwiping=function(t,e){var o=this,i=!1,a=o.instance.group.length;o.sliderLastPos=null,"y"==t&&!e&&Math.abs(o.distanceY)>50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),i=o.instance.close(!0,200)):"x"==t&&o.distanceX>50&&a>1?i=o.instance.previous(o.speedX):"x"==t&&o.distanceX<-50&&a>1&&(i=o.instance.next(o.speedX)),i!==!1||"x"!=t&&"y"!=t||(e||a<2?o.instance.centerSlide(o.instance.current,150):o.instance.jumpTo(o.instance.current.index)),o.$container.removeClass("fancybox-is-sliding")},d.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(i.opts.momentum===!1?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+i.velocityX*i.speed,e=i.contentLastPos.top+i.velocityY*i.speed),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,330))},d.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},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.setTranslate(a.$content,n.fancybox.getTranslate(a.$content)),n.fancybox.animate(a.$content,o,150)))},d.prototype.onTap=function(e){var o,i=this,s=n(e.target),r=i.instance,c=r.current,l=e&&a(e)||i.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-i.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-i.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&&(o=o.apply(r,[c,e])),o)switch(o){case"close":r.close(i.startEvent);break;case"toggleControls":r.toggleControls(!0);break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(i.startEvent);break;case"zoom":"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))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is("img")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))o="Outside";else if(s.is(".fancybox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o="Content"}if(i.tapped){if(clearTimeout(i.tapped),i.tapped=null,Math.abs(d-i.tapX)>50||Math.abs(u-i.tapY)>50)return this;f("dblclick"+o)}else i.tapX=d,i.tapY=u,c.opts["dblclick"+o]&&c.opts["dblclick"+o]!==c.opts["click"+o]?i.tapped=setTimeout(function(){i.tapped=null,f("click"+o)},500):f("click"+o);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new d(e))})}(window,document,window.jQuery||jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"><svg viewBox="0 0 40 40"><path d="M13,12 L27,20 L13,27 Z" /><path d="M15,10 v19 M23,10 v19" /></svg></button>'},slideShow:{autoStart:!1,speed:3e3}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this;t.$button=t.instance.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),(t.instance.group.length<2||!t.instance.group[t.instance.currIndex].opts.slideShow)&&t.$button.hide()},set:function(t){var e=this;e.instance&&e.instance.current&&(t===!0||e.instance.current.opts.loop||e.instance.currIndex<e.instance.group.length-1)?e.timer=setTimeout(function(){e.isActive&&e.instance.jumpTo((e.instance.currIndex+1)%e.instance.group.length)},e.instance.current.opts.slideShow.speed):(e.stop(),e.instance.idleSecondsCounter=0,e.instance.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null},start:function(){var t=this,e=t.instance.current;e&&(t.isActive=!0,t.$button.attr("title",e.opts.i18n[e.opts.lang].PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"),t.set(!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",e.opts.i18n[e.opts.lang].PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"),t.isActive=!1},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),e(t).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new n(e))},"beforeShow.fb":function(t,e,n,o){var i=e&&e.SlideShow;o?i&&n.opts.slideShow.autoStart&&i.start():i&&i.isActive&&i.clear()},"afterShow.fb":function(t,e,n){var o=e&&e.SlideShow;o&&o.isActive&&o.set()},"afterKeydown.fb":function(n,o,i,a,s){var r=o&&o.SlideShow;!r||!i.opts.slideShow||80!==s&&32!==s||e(t.activeElement).is("button,a,input")||(a.preventDefault(),r.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){var n=e&&e.SlideShow;n&&n.stop()}}),e(t).on("visibilitychange",function(){var n=e.fancybox.getInstance(),o=n&&n.SlideShow;o&&o.isActive&&(t.hidden?o.clear():o.set())})}(document,window.jQuery||jQuery),function(t,e){"use strict";var n=function(){for(var e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n={},o=0;o<e.length;o++){var i=e[o];if(i&&i[1]in t){for(var a=0;a<i.length;a++)n[e[0][a]]=i[a];return n}}return!1}();if(!n)return void(e&&e.fancybox&&(e.fancybox.defaults.btnTpl.fullScreen=!1));var o={request:function(e){e=e||t.documentElement,e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[n.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[n.fullscreenElement])},enabled:function(){return Boolean(t[n.fullscreenEnabled])}};e.extend(!0,e.fancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fullscreen" title="{{FULL_SCREEN}}"><svg viewBox="0 0 40 40"><path d="M9,12 v16 h22 v-16 h-22 v8" /></svg></button>'},fullScreen:{autoStart:!1}}),e(t).on({"onInit.fb":function(t,e){var n;e&&e.group[e.currIndex].opts.fullScreen?(n=e.$refs.container,n.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&e.opts.fullScreen.autoStart===!0&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide()},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&o.exit()}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.current.$content.css("transition","none"),n.isAnimating=!1,n.update(!0,!0,0)),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t))})}(document,window.jQuery||jQuery),function(t,e){"use strict";var n="fancybox-thumbs",o=n+"-active",i=n+"-loading";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"><svg viewBox="0 0 120 120"><path d="M30,30 h14 v14 h-14 Z M50,30 h14 v14 h-14 Z M70,30 h14 v14 h-14 Z M30,50 h14 v14 h-14 Z M50,50 h14 v14 h-14 Z M70,50 h14 v14 h-14 Z M30,70 h14 v14 h-14 Z M50,70 h14 v14 h-14 Z M70,70 h14 v14 h-14 Z" /></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var a=function(t){this.init(t)};e.extend(a.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e,n,o=this;o.instance=t,t.Thumbs=o,o.opts=t.group[t.currIndex].opts.thumbs,e=t.group[0],e=e.opts.thumb||!(!e.opts.$thumb||!e.opts.$thumb.length)&&e.opts.$thumb.attr("src"),t.group.length>1&&(n=t.group[1],n=n.opts.thumb||!(!n.opts.$thumb||!n.opts.$thumb.length)&&n.opts.$thumb.attr("src")),o.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]"),o.opts&&e&&n&&e&&n?(o.$button.show().on("click",function(){o.toggle()}),o.isActive=!0):o.$button.hide()},create:function(){var t,o=this,a=o.instance,s=o.opts.parentEl,r=[];o.$grid||(o.$grid=e('<div class="'+n+" "+n+"-"+o.opts.axis+'"></div>').appendTo(a.$refs.container.find(s).addBack().filter(s)),o.$grid.on("click","li",function(){a.jumpTo(e(this).attr("data-index"))})),o.$list||(o.$list=e("<ul>").appendTo(o.$grid)),e.each(a.group,function(e,n){t=n.opts.thumb||(n.opts.$thumb?n.opts.$thumb.attr("src"):null),t||"image"!==n.type||(t=n.src),r.push('<li data-index="'+e+'" tabindex="0" class="'+i+'"'+(t&&t.length?' style="background-image:url('+t+')" />':"")+"></li>")}),o.$list[0].innerHTML=r.join(""),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"),10)+a.group.length*o.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,i=this,a=i.$list,s=i.$grid;i.instance.current&&(e=a.children().removeClass(o).filter('[data-index="'+i.instance.current.index+'"]').addClass(o),n=e.position(),"y"===i.opts.axis&&(n.top<0||n.top>a.height()-e.outerHeight())?a.stop().animate({scrollTop:a.scrollTop()+n.top},t):"x"===i.opts.axis&&(n.left<s.scrollLeft()||n.left>s.scrollLeft()+(s.width()-e.outerWidth()))&&a.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;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()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var n;e&&!e.Thumbs&&(n=new a(e),n.isActive&&n.opts.autoStart===!0&&n.show())},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&n.opts.hideOnClose!==!1&&n.$grid.hide()}})}(document,window.jQuery||jQuery),function(t,e){"use strict";function n(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"><svg viewBox="0 0 40 40"><path d="M6,30 C8,18 19,16 23,16 L23,16 L23,10 L33,20 L23,29 L23,24 C19,24 8,27 6,30 Z"></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location},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}}" /></p></div>'}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,i=e.fancybox.getInstance(),a=i.current||null;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({src:i.translate(i,o),type:"html",opts:{animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__links a").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})}}}))})}(document,window.jQuery||jQuery),function(t,e,n){"use strict";function o(){var t=e.location.hash.substr(1),n=t.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return{hash:t,index:o<1?1:o,gallery:i}}function i(t){var e;""!==t.gallery&&(e=n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).trigger("click.fb-start"))}function a(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,n=e.hash||(e.$orig?e.$orig.data("fancybox"):""),""!==n&&n)}n.escapeSelector||(n.escapeSelector=function(t){var e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,n=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t};return(t+"").replace(e,n)}),n(function(){n.fancybox.defaults.hash!==!1&&(n(t).on({"onInit.fb":function(t,e){var n,i;e.group[e.currIndex].opts.hash!==!1&&(n=o(),i=a(e),i&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i,s){var r;i&&i.opts.hash!==!1&&(r=a(o),r&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),e.location.hash!=="#"+o.currentHash&&(o.origHash||(o.origHash=e.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in e.history?(e.history[s?"pushState":"replaceState"]({},t.title,e.location.pathname+e.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):e.location.hash=o.currentHash,o.hashTimer=null},300))))},"beforeClose.fb":function(n,o,i){var s;i.opts.hash!==!1&&(s=a(o),o.currentHash&&o.hasCreatedHistory?e.history.back():o.currentHash&&("replaceState"in e.history?e.history.replaceState({},t.title,e.location.pathname+e.location.search+(o.origHash||"")):e.location.hash=o.origHash),o.currentHash=null,clearTimeout(o.hashTimer))}}),n(e).on("hashchange.fb",function(){var t,e=o();n.each(n(".fancybox-container").get().reverse(),function(e,o){var i=n(o).data("FancyBox");if(i.currentHash)return t=i,!1}),t?!t.currentHash||t.currentHash===e.gallery+"-"+e.index||1===e.index&&t.currentHash==e.gallery||(t.currentHash=null,t.close()):""!==e.gallery&&i(e)}),setTimeout(function(){n.fancybox.getInstance()||i(o())},50))})}(document,window,window.jQuery||jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<2||o.opts.wheel===!1||"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"]())))})}})}(document,window.jQuery||jQuery);
@@ -0,0 +1,1923 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7
+
8
+ <title>fancybox3 · Documentation</title>
9
+
10
+ <!-- jQuery -->
11
+ <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
12
+ crossorigin="anonymous"></script>
13
+
14
+ <!-- Bootstrap -->
15
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
16
+ crossorigin="anonymous">
17
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
18
+ crossorigin="anonymous"></script>
19
+
20
+ <style>
21
+ a,
22
+ a:hover {
23
+ color: #ff5268;
24
+ }
25
+
26
+ h2 {
27
+ border-bottom: 1px solid rgba(0, 0, 0, .1);
28
+ margin-bottom: 2rem;
29
+ padding-bottom: 1rem;
30
+ padding-top: 2rem;
31
+ }
32
+
33
+ h3 {
34
+ font-size: 1.5rem;
35
+ margin-bottom: 1rem;
36
+ padding-top: 1.5rem;
37
+ }
38
+
39
+ h2+h3 {
40
+ margin-top: -2rem;
41
+ }
42
+
43
+ h3 a,
44
+ h3 a:hover {
45
+ color: currentColor;
46
+ }
47
+
48
+ code {
49
+ background: #f1ecec;
50
+ color: #555;
51
+ padding: 2px 5px;
52
+ }
53
+
54
+ pre {
55
+ background: #f1ecec;
56
+ color: #555;
57
+ max-height: 70vh;
58
+ overflow: auto;
59
+ padding: 1rem 1.5rem;
60
+ -moz-tab-size: 4;
61
+ tab-size: 4;
62
+ }
63
+
64
+ pre code {
65
+ padding: 0;
66
+ }
67
+
68
+ section {
69
+ margin-bottom: 1rem;
70
+ margin-bottom: 5vh;
71
+ }
72
+
73
+ #introduction {
74
+ background: #fbf9f9;
75
+ margin-bottom: 2rem;
76
+ padding-bottom: 1rem;
77
+ padding-top: 1rem;
78
+ }
79
+
80
+ .navbar-brand {
81
+ color: #444;
82
+ font-size: 1.375rem;
83
+ }
84
+
85
+ .navbar-brand svg {
86
+ position: relative;
87
+ top: -1px;
88
+ vertical-align: middle;
89
+ }
90
+
91
+ .navbar-brand svg path {
92
+ fill: #fff;
93
+ stroke: #444;
94
+ stroke-width: 2.5;
95
+ }
96
+
97
+ .nav-link {
98
+ color: grey;
99
+ height: 2.5rem;
100
+ }
101
+
102
+ .navbar-brand:hover,
103
+ .nav-link:hover {
104
+ color: #464646;
105
+ }
106
+
107
+ .nav-link.active {
108
+ background: #ff5268;
109
+ border-radius: .25rem;
110
+ color: #fff;
111
+ }
112
+
113
+ .sticky {
114
+ padding-top: 2rem;
115
+ top: 0;
116
+ }
117
+
118
+ .sticky ul {
119
+ line-height: 2;
120
+ list-style: none;
121
+ }
122
+
123
+ .sticky>ul {
124
+ padding-left: 1rem;
125
+ }
126
+
127
+ .sticky a {
128
+ color: grey;
129
+ text-decoration: none;
130
+ }
131
+
132
+ .sticky a:hover {
133
+ color: #464646;
134
+ }
135
+
136
+ .sticky a.active {
137
+ color: #ff5268;
138
+ }
139
+
140
+ .demo {
141
+ font-size: 90%;
142
+ margin-bottom: 2rem;
143
+ text-align: right;
144
+ }
145
+
146
+ pre~.demo {
147
+ margin-top: -1rem;
148
+ }
149
+
150
+ .badge-warning {
151
+ font-weight: 600;
152
+ }
153
+ </style>
154
+ </head>
155
+
156
+ <body>
157
+ <div id="introduction">
158
+ <div class="container">
159
+ <nav class="navbar navbar-expand">
160
+ <a class="navbar-brand py-0 mr-auto" href="https://fancyapps.com/fancybox/3/">
161
+ fancybox
162
+ </a>
163
+
164
+ <ul class="navbar-nav ml-auto">
165
+ <li class="nav-item px-2 d-none d-sm-block">
166
+ <a class="nav-link active" href="https://fancyapps.com/fancybox/3/docs/">Documentation</a>
167
+ </li>
168
+ <li class="nav-item px-2">
169
+ <a class="nav-link" href="https://fancyapps.com/store/">Store</a>
170
+ </li>
171
+ <li class="nav-item">
172
+ <a class="nav-link" href="https://github.com/fancyapps/fancybox" target="_blank">
173
+ <svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" aria-label="Github" role="img" viewBox="0 0 512 512">
174
+ <rect fill="#444" width="512" height="512" rx="50%"></rect>
175
+ <path fill="#fff" d="M335 499c14 0 12 17 12 17H165s-2-17 12-17c13 0 16-6 16-12l-1-50c-71 16-86-28-86-28-12-30-28-37-28-37-24-16 1-16 1-16 26 2 40 26 40 26 22 39 59 28 74 22 2-17 9-28 16-35-57-6-116-28-116-126 0-28 10-51 26-69-3-6-11-32 3-67 0 0 21-7 70 26 42-12 86-12 128 0 49-33 70-26 70-26 14 35 6 61 3 67 16 18 26 41 26 69 0 98-60 120-117 126 10 8 18 24 18 48l-1 70c0 6 3 12 16 12z"></path>
176
+ </svg>
177
+ </a>
178
+ </li>
179
+ <li class="nav-item">
180
+ <a class="nav-link" href="https://twitter.com/thefancyapps" target="_blank" title="Follow @thefancyapps">
181
+ <svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" aria-label="Twitter" role="img" viewBox="0 0 512 512">
182
+ <rect fill="#444" width="512" height="512" rx="50%"></rect>
183
+ <path fill="#fff" d="M437 152a72 72 0 0 1-40 12 72 72 0 0 0 32-40 72 72 0 0 1-45 17 72 72 0 0 0-122 65 200 200 0 0 1-145-74 72 72 0 0 0 22 94 72 72 0 0 1-32-7 72 72 0 0 0 56 69 72 72 0 0 1-32 1 72 72 0 0 0 67 50 200 200 0 0 1-105 29 200 200 0 0 0 309-179 200 200 0 0 0 35-37"></path>
184
+ </svg>
185
+ </a>
186
+ </li>
187
+ </ul>
188
+ </nav>
189
+ </div>
190
+ </div>
191
+
192
+ <div class="container">
193
+ <div class="row">
194
+ <div class="col-md-2" id="leftCol">
195
+ <div class="sticky">
196
+ <ul>
197
+ <li>
198
+ <a href="#introduction">Introduction</a>
199
+ </li>
200
+ <li>
201
+ <a href="#setup">Setup</a>
202
+ </li>
203
+ <li>
204
+ <a href="#usage">How to Use</a>
205
+ </li>
206
+ <li>
207
+ <a href="#media_types">Media types</a>
208
+
209
+ <ul>
210
+ <li>
211
+ <a href="#images">Images</a>
212
+ </li>
213
+ <li>
214
+ <a href="#video">Video</a>
215
+ </li>
216
+ <li>
217
+ <a href="#inline">Inline</a>
218
+ </li>
219
+ <li>
220
+ <a href="#ajax">Ajax</a>
221
+ </li>
222
+ <li>
223
+ <a href="#iframe">Iframe</a>
224
+ </li>
225
+ </ul>
226
+ </li>
227
+ <li>
228
+ <a href="#options">Options</a>
229
+ </li>
230
+ <li>
231
+ <a href="#api">Api</a>
232
+ </li>
233
+ <li>
234
+ <a href="#modules">Modules</a>
235
+ </li>
236
+ <li>
237
+ <a href="#faq">FAQ</a>
238
+ </li>
239
+ </ul>
240
+ </div>
241
+ </div>
242
+
243
+ <div class="col-md-10 px-2 px-md-5" id="mainCol">
244
+
245
+ <section>
246
+ <h2>Introduction</h2>
247
+
248
+ <p>
249
+ Get started with fancybox, probably the world’s most popular lightbox script.
250
+ </p>
251
+ </section>
252
+ <section>
253
+
254
+ <h3>
255
+ Dependencies
256
+ </h3>
257
+
258
+ <p>
259
+ jQuery 3+ is preferred, but fancybox works with jQuery 1.9.1+ and jQuery 2+
260
+ </p>
261
+
262
+ <h3>Compatibility</h3>
263
+
264
+ <p>
265
+ fancybox includes support for touch gestures and even supports pinch gestures for zooming. It is perfectly suited for both
266
+ mobile and desktop browsers.
267
+ </p>
268
+
269
+ <p>
270
+ fancybox has been tested in following browsers/devices:
271
+ </p>
272
+
273
+ <ul>
274
+ <li>Chrome</li>
275
+ <li>Firefox</li>
276
+ <li>IE10/11</li>
277
+ <li>Edge</li>
278
+ <li>iOS Safari</li>
279
+ <li>Nexus 7 Chrome</li>
280
+ </ul>
281
+
282
+ </section>
283
+
284
+ <section id="setup">
285
+
286
+ <h2>Setup</h2>
287
+
288
+ <p>
289
+ You can install fancybox by linking
290
+ <code>.css</code> and
291
+ <code>.js</code> files to your html file. Make sure you also load the jQuery library. Below is a basic HTML template
292
+ to use as an example:
293
+ </p>
294
+
295
+ <pre>&lt;!DOCTYPE html&gt;
296
+ &lt;html&gt;
297
+ &lt;head&gt;
298
+ &lt;meta charset=&quot;utf-8&quot;&gt;
299
+ &lt;title&gt;My page&lt;/title&gt;
300
+
301
+ &lt;!-- CSS --&gt;
302
+ &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;jquery.fancybox.min.css&quot;&gt;
303
+ &lt;/head&gt;
304
+ &lt;body&gt;
305
+
306
+ &lt;!-- Your HTML content goes here --&gt;
307
+
308
+ &lt;!-- JS --&gt;
309
+ &lt;script src=&quot;//code.jquery.com/jquery-3.2.1.min.js&quot;&gt;&lt;/script&gt;
310
+ &lt;script src=&quot;jquery.fancybox.min.js&quot;&gt;&lt;/script&gt;
311
+ &lt;/body&gt;
312
+ &lt;/html&gt;
313
+ </pre>
314
+ <h3>Download fancybox</h3>
315
+
316
+ <p>
317
+ Download the latest version of fancybox on
318
+ <a href="https://github.com/fancyapps/fancybox" target="_blank">GitHub</a>.
319
+ <br /> Or just link directly to fancybox files on cdnjs -
320
+ <a href="https://cdnjs.com/libraries/fancybox" target="_blank">https://cdnjs.com/libraries/fancybox</a>.
321
+ </p>
322
+
323
+ <h3>Package Managers</h3>
324
+
325
+ <p>
326
+ fancybox is also available on npm and Bower.
327
+ </p>
328
+
329
+ <pre><code># NPM
330
+ npm install @fancyapps/fancybox --save
331
+
332
+ # Bower
333
+ bower install fancybox --save
334
+ </code></pre>
335
+
336
+ <h4 class="mt-5">
337
+ <span class="badge badge-warning">Important</span>
338
+ </h4>
339
+
340
+ <ul>
341
+ <li>Make sure you add the jQuery library before the fancybox JS file</li>
342
+ <li>If you already have jQuery on your page, you shouldn't include it second time</li>
343
+ <li>Do not include both fancybox.js and fancybox.min.js files</li>
344
+ <li>
345
+ Some functionality (ajax, iframes, etc) will not work when you're opening local file directly on your browser, the code must
346
+ be running on a web server
347
+ </li>
348
+ </ul>
349
+
350
+ </section>
351
+
352
+ <section id="usage">
353
+ <h2>How to Use</h2>
354
+
355
+ <h3>Initialize with data attributes</h3>
356
+
357
+ <p>
358
+ The most basic way to use fancybox is by adding the
359
+ <code>data-fancybox</code> attribute to your element. This will automatically bind click event that will start fancybox. Use
360
+ <code>href</code> or
361
+ <code>data-src</code> attribute to specify source of your content. Example:
362
+ </p>
363
+
364
+ <pre>&lt;a href="image.jpg" data-fancybox data-caption="Caption for single image"&gt;
365
+ &lt;img src="thumbnail.jpg" alt="" /&gt;
366
+ &lt;/a&gt;</pre>
367
+
368
+ <p class="demo">
369
+ <a href="https://codepen.io/fancyapps/pen/ZxREZK?editors=1000" target="_blank">View demo on CodePen</a>
370
+ </p>
371
+
372
+ <p>
373
+ If you have a group of items, you can use the same attribute
374
+ <code>data-fancybox</code> value for each of them to create a gallery. Each group should have a unique value. Example:
375
+ </p>
376
+
377
+ <pre>&lt;a href="image_1.jpg" data-fancybox="gallery" data-caption="Caption #1"&gt;
378
+ &lt;img src="thumbnail_1.jpg" alt="" /&gt;
379
+ &lt;/a&gt;
380
+
381
+ &lt;a href="image_2.jpg" data-fancybox="gallery" data-caption="Caption #2"&gt;
382
+ &lt;img src="thumbnail_2.jpg" alt="" /&gt;
383
+ &lt;/a&gt;
384
+ </pre>
385
+ <p class="demo">
386
+ <a href="https://codepen.io/fancyapps/pen/aYKzoY?editors=1000" target="_blank">View demo on CodePen</a>
387
+ </p>
388
+
389
+ <p>
390
+ If you choose this method, default settings will be applied. See
391
+ <a href="#options">options</a> section for examples how to customize by changing defaults or using
392
+ <code>data-options</code> attribute.
393
+ </p>
394
+
395
+ <p>
396
+ Sometimes you have multiple links pointing to the same source and that creates duplicates in the gallery. To avoid that,
397
+ simply use
398
+ <code>data-trigger</code> attribute with the same value used for
399
+ <code>data-fancybox</code> attribute for your other links. Optionally, use
400
+ <code>data-index</code> attribute to specify index of starting element:
401
+ </p>
402
+
403
+ <pre><code>&lt;a data-trigger=&quot;gallery&quot; href=&quot;javascript:;&quot;&gt;
404
+ &lt;img src="thumbnail_1.jpg" alt="" /&gt;
405
+ &lt;/a&gt;
406
+ </code></pre>
407
+ <p class="demo">
408
+ <a href="https://codepen.io/fancyapps/pen/oqPKYp?editors=1000" target="_blank">View demo on CodePen</a>
409
+ </p>
410
+
411
+ <h3>Initialize with JavaScript</h3>
412
+
413
+ <p>
414
+ Select your elements with a jQuery selector (you can use any valid selector) and call the
415
+ <code>fancybox</code> method:
416
+ </p>
417
+
418
+ <pre><code>$('[data-fancybox="gallery"]').fancybox({
419
+ // Options will go here
420
+ });
421
+ </code></pre>
422
+
423
+ <p class="demo">
424
+ <a href="https://codepen.io/fancyapps/pen/dmKPYa?editors=1010" target="_blank">View demo on CodePen</a>
425
+ </p>
426
+
427
+ <p>
428
+ Sometimes you might need to bind fancybox to dynamically added elements. Use
429
+ <code>selector</code> option to attach click event listener for elements that exist now or in the future. Example:
430
+ </p>
431
+
432
+ <pre><code>$().fancybox({
433
+ selector : '[data-fancybox="gallery"]',
434
+ loop : true
435
+ });</code></pre>
436
+
437
+ <p class="demo">
438
+ <a href="https://codepen.io/fancyapps/pen/LdrENX?editors=1010" target="_blank">View demo on CodePen</a>
439
+ </p>
440
+
441
+ <p>
442
+ <span class="badge badge-info">Info</span>
443
+ Keep in mind, that selected items are not automatically grouped in the gallery. You can create one or more groups by using
444
+ the same value for
445
+ <code>data-fancybox</code> attribute, similarly to example from the previous section.
446
+ </p>
447
+
448
+ <h3>Use with Javascript</h3>
449
+
450
+ <p>
451
+ You can also open and close fancybox programmatically. Here are a couple of examples, visit
452
+ <a href="#api">API</a> section for more information and demos.
453
+ </p>
454
+ <p>
455
+ Display simple message:
456
+ </p>
457
+
458
+ <pre><code>$.fancybox.open('&lt;div class=&quot;message&quot;&gt;&lt;h2&gt;Hello!&lt;/h2&gt;&lt;p&gt;You are awesome!&lt;/p&gt;&lt;/div&gt;');</code></pre>
459
+ <p class="demo">
460
+ <a href="https://codepen.io/fancyapps/pen/aYKNrZ?editors=1010" target="_blank">View demo on CodePen</a>
461
+ </p>
462
+
463
+ <p>
464
+ Display iframed page:
465
+ </p>
466
+
467
+ <pre><code>$s.fancybox.open({
468
+ src : 'link-to-your-page.html',
469
+ type : 'iframe',
470
+ opts : {
471
+ afterShow : function( instance, current ) {
472
+ console.info( 'done!' );
473
+ }
474
+ }
475
+ });</code></pre>
476
+ <p class="demo">
477
+ <a href="https://codepen.io/fancyapps/pen/xWzOxR?editors=1010" target="_blank">View demo on CodePen</a>
478
+ </p>
479
+
480
+ <h4 class="mt-4">
481
+ <span class="badge badge-warning">Important</span>
482
+ </h4>
483
+
484
+ <p>
485
+ fancybox attempts to automatically detect the type of content based on the given url. If it cannot be detected, the type
486
+ can also be set manually using
487
+ <code>data-type</code> attribute (or
488
+ <code>type</code> option). Example:
489
+ </p>
490
+
491
+ <pre>&lt;a href="images.php?id=123" data-type="image" data-caption="Caption"&gt;
492
+ Show image
493
+ &lt;/a&gt;</pre>
494
+
495
+ </section>
496
+ <section id="media_types">
497
+
498
+ <h2>Media types</h2>
499
+
500
+ <h3 id="images">Images</h3>
501
+
502
+ <p>
503
+ The standard way of using fancybox is with a number of thumbnail images that link to larger images:
504
+ </p>
505
+
506
+ <pre><code>&lt;a href="image.jpg" data-fancybox="images" data-caption="My caption"&gt;
507
+ &lt;img src="thumbnail.jpg" alt="" /&gt;
508
+ &lt;/a&gt;</code></pre>
509
+
510
+ <p class="demo">
511
+ <a href="https://codepen.io/fancyapps/pen/VyLOJX?editors=1000" target="_blank">View demo on CodePen</a>
512
+ </p>
513
+
514
+ <p>
515
+ By default, fancybox fully preloads an image before displaying it. You can choose to display the image right away. It will
516
+ render and show the full size image while the data is being received. To do so, some attributes are
517
+ necessary:
518
+ </p>
519
+
520
+ <ul>
521
+ <li>
522
+ <code>data-width</code> &nbsp; - the real width of the image</li>
523
+ <li>
524
+ <code>data-height</code> - the real height of the image</li>
525
+ </ul>
526
+
527
+ <pre><code>&lt;a href=&quot;image.jpg&quot; data-fancybox=&quot;images&quot; data-width=&quot;2048&quot; data-height=&quot;1365&quot;&gt;
528
+ &lt;img src=&quot;thumbnail.jpg&quot; /&gt;
529
+ &lt;/a&gt;</code></pre>
530
+ <p class="demo">
531
+ <a href="https://codepen.io/fancyapps/pen/aYKMBm?editors=1000" target="_blank">View demo on CodePen</a>
532
+ </p>
533
+
534
+ <p>
535
+ You can also use these
536
+ <code>width</code> and
537
+ <code>height</code> properties to control size of the image. This can be used to make images look sharper on retina
538
+ displays. Example:
539
+ </p>
540
+
541
+ <pre><code>$('[data-fancybox=&quot;images&quot;]').fancybox({
542
+ afterLoad : function(instance, current) {
543
+ var pixelRatio = window.devicePixelRatio || 1;
544
+
545
+ if ( pixelRatio &gt; 1.5 ) {
546
+ current.width = current.width / pixelRatio;
547
+ current.height = current.height / pixelRatio;
548
+ }
549
+ }
550
+ });</code></pre>
551
+
552
+ <p class="demo">
553
+ <a href="https://codepen.io/fancyapps/pen/pLKYez?editors=1010" target="_blank">View demo on CodePen</a>
554
+ </p>
555
+
556
+ <p>
557
+ fancybox supports "srcset" so it can display different images based on viewport width. You can use this to improve download
558
+ times for mobile users and over time save bandwidth. Example:
559
+ </p>
560
+
561
+ <pre><code>&lt;a href=&quot;medium.jpg&quot; data-fancybox=&quot;images&quot; data-srcset=&quot;large.jpg 1600w, medium.jpg 1200w, small.jpg 640w&quot;&gt;
562
+ &lt;img src=&quot;thumbnail.jpg&quot; /&gt;
563
+ &lt;/a&gt;</code></pre>
564
+ <p class="demo">
565
+ <a href="https://codepen.io/fancyapps/pen/ZxRPyb?editors=1000" target="_blank">View demo on CodePen</a>
566
+ </p>
567
+
568
+ <p>
569
+ It is also possible to protect images from downloading by right-click. While this does not protect from truly determined
570
+ users, it should discourage the vast majority from ripping off your files. Optionally, put the watermark
571
+ over image.
572
+ </p>
573
+
574
+ <pre><code>$('[data-fancybox]').fancybox({
575
+ protect: true
576
+ });</code></pre>
577
+
578
+ <p class="demo">
579
+ <a href="https://codepen.io/fancyapps/pen/wmXOqN" target="_blank">View demo on CodePen</a>
580
+ </p>
581
+
582
+ <h3 id="video">Video</h3>
583
+
584
+ <p>
585
+ YouTube and Vimeo videos can be used with fancyBox by just providing the page URL. Link to MP4 video directly or use trigger
586
+ element to display hidden
587
+ <code>&lt;video&gt;</code> element.
588
+ </p>
589
+
590
+ <p>
591
+ Use
592
+ <code>data-width</code> and
593
+ <code>data-height</code> attributes to customize video dimensions and
594
+ <code>data-ratio</code> for the aspect ratio.
595
+ </p>
596
+
597
+ <pre><code>&lt;a data-fancybox href="https://www.youtube.com/watch?v=_sI_Ps7JSEk"&gt;
598
+ YouTube video
599
+ &lt;/a&gt;
600
+
601
+ &lt;a data-fancybox href="https://vimeo.com/191947042"&gt;
602
+ Vimeo video
603
+ &lt;/a&gt;
604
+
605
+ &lt;a data-fancybox data-width=&quot;640&quot; data-height=&quot;360&quot; href=&quot;video.mp4&quot;&gt;
606
+ Direct link to MP4 video
607
+ &lt;/a&gt;
608
+
609
+ &lt;a data-fancybox href=&quot;#myVideo&quot;&gt;
610
+ HTML5 video element
611
+ &lt;/a&gt;
612
+
613
+ &lt;video width=&quot;640&quot; height=&quot;320&quot; controls id=&quot;myVideo&quot; style=&quot;display:none;&quot;&gt;
614
+ &lt;source src=&quot;https://www.html5rocks.com/en/tutorials/video/basics/Chrome_ImF.mp4&quot; type=&quot;video/mp4&quot;&gt;
615
+ &lt;source src=&quot;https://www.html5rocks.com/en/tutorials/video/basics/Chrome_ImF.webm&quot; type=&quot;video/webm&quot;&gt;
616
+ &lt;source src=&quot;https://www.html5rocks.com/en/tutorials/video/basics/Chrome_ImF.ogv&quot; type=&quot;video/ogg&quot;&gt;
617
+ Your browser doesn't support HTML5 video tag.
618
+ &lt;/video&gt;</code></pre>
619
+ <p class="demo">
620
+ <a href="https://codepen.io/fancyapps/pen/gopGNq?editors=1010" target="_blank">View demo on CodePen</a>
621
+ </p>
622
+
623
+ <p>
624
+ Controlling YouTube &amp; Vimeo video via URL parameters:
625
+ </p>
626
+
627
+ <pre><code>&lt;a data-fancybox href=&quot;https://www.youtube.com/watch?v=_sI_Ps7JSEk&amp;amp;autoplay=1&amp;amp;rel=0&amp;amp;controls=0&amp;amp;showinfo=0&quot;&gt;
628
+ YouTube video - hide controls and info
629
+ &lt;/a&gt;
630
+
631
+ &lt;a data-fancybox href=&quot;https://vimeo.com/191947042?color=f00&quot;&gt;
632
+ Vimeo video - custom color
633
+ &lt;/a&gt;</code></pre>
634
+ <p class="demo">
635
+ <a href="https://codepen.io/fancyapps/pen/Qmxoae?editors=1000" target="_blank">View demo on CodePen</a>
636
+ </p>
637
+
638
+ <p>
639
+ Via JavaScript:
640
+ </p>
641
+
642
+ <pre><code>$('[data-fancybox]').fancybox({
643
+ youtube : {
644
+ controls : 0,
645
+ showinfo : 0
646
+ },
647
+ vimeo : {
648
+ color : 'f00'
649
+ }
650
+ });</code></pre>
651
+ <p class="demo">
652
+ <a href="https://codepen.io/fancyapps/pen/zWabWN?editors=1010" target="_blank">View demo on CodePen</a>
653
+ </p>
654
+
655
+
656
+
657
+ <h3 id="inline">Inline HTML</h3>
658
+
659
+ <p>
660
+ For inline content, create a hidden element with unique id:
661
+ </p>
662
+
663
+ <pre><code>&lt;div style=&quot;display: none;&quot; id=&quot;hidden-content&quot;&gt;
664
+ &lt;h2&gt;Hello&lt;/h2&gt;
665
+ &lt;p&gt;You are awesome.&lt;/p&gt;
666
+ &lt;/div&gt;</code></pre>
667
+
668
+ <p>
669
+ And then simply create a link having
670
+ <code>data-src</code> attribute that matches ID of the element you want to open (preceded by a hash mark (#); in this
671
+ example -
672
+ <code>#hidden-content</code>):
673
+ </p>
674
+
675
+ <pre><code>&lt;a data-fancybox data-src=&quot;#hidden-content&quot; href=&quot;javascript:;&quot;&gt;
676
+ Trigger the fancybox
677
+ &lt;/a&gt;</code></pre>
678
+ <p class="demo">
679
+ <a href="https://codepen.io/fancyapps/pen/yKEryV?editors=1100" target="_blank">View demo on CodePen</a>
680
+ </p>
681
+
682
+ <p>
683
+ The script will append small close button (if you have not disabled by
684
+ <code>smallBtn:false</code>) and will not apply any styles except for centering. Therefore you can easily set custom dimensions
685
+ using CSS.
686
+ </p>
687
+
688
+ <h3 id="ajax">Ajax</h3>
689
+
690
+ <p>
691
+ To load content via AJAX, you need to add a
692
+ <code>data-type="ajax"</code> attribute to your link:
693
+ </p>
694
+
695
+ <pre><code>&lt;a data-fancybox data-type=&quot;ajax&quot; data-src=&quot;my_page.com/path/to/ajax/&quot; href=&quot;javascript:;&quot;&gt;
696
+ AJAX content
697
+ &lt;/a&gt;</code></pre>
698
+ <p class="demo">
699
+ <a href="https://codepen.io/fancyapps/pen/wmXbvJ?editors=1100" target="_blank">View demo on CodePen</a>
700
+ </p>
701
+
702
+ <p>
703
+ Additionally it is possible to define a selector with the
704
+ <code>data-filter</code> attribute to show only a part of the response. The selector can be any string, that is a valid jQuery
705
+ selector:
706
+ </p>
707
+
708
+ <pre><code>&lt;a data-fancybox data-type=&quot;ajax&quot; data-src=&quot;my_page.com/path/to/ajax/&quot; data-filter=&quot;#two&quot; href=&quot;javascript:;&quot;&gt;
709
+ AJAX content
710
+ &lt;/a&gt;
711
+ </code></pre>
712
+ <p class="demo">
713
+ <a href="https://codepen.io/fancyapps/pen/xWzNGe?editors=1100" target="_blank">View demo on CodePen</a>
714
+ </p>
715
+
716
+ <h3 id="iframe">Iframe</h3>
717
+
718
+ <p>
719
+ If the content can be shown on a page, and placement in an iframe is not blocked by script or security configuration of that
720
+ page, it can be presented in a fancybox:
721
+ </p>
722
+
723
+ <pre><code>&lt;a data-fancybox data-type="iframe" data-src=&quot;http://codepen.io/fancyapps/full/jyEGGG/&quot; href=&quot;javascript:;&quot;&gt;
724
+ Webpage
725
+ &lt;/a&gt;
726
+
727
+ &lt;a data-fancybox data-type="iframe" data-src=&quot;https://mozilla.github.io/pdf.js/web/viewer.html&quot; href=&quot;javascript:;&quot;&gt;
728
+ Sample PDF file
729
+ &lt;/a&gt;
730
+ </code></pre>
731
+ <p class="demo">
732
+ <a href="https://codepen.io/fancyapps/pen/qoKGRW?editors=1000" target="_blank">View demo on CodePen</a>
733
+ </p>
734
+
735
+
736
+ <p>
737
+ To access and control fancybox in parent window from inside an iframe:
738
+ </p>
739
+
740
+ <pre><code>// Adjust iframe height according to the contents
741
+ parent.jQuery.fancybox.getInstance().update();
742
+
743
+ // Close current fancybox instance
744
+ parent.jQuery.fancybox.getInstance().close();</code></pre>
745
+
746
+
747
+ <p>
748
+ Iframe dimensions can be controlled by CSS:
749
+ </p>
750
+
751
+ <pre><code>.fancybox-slide--iframe .fancybox-content {
752
+ width : 800px;
753
+ height : 600px;
754
+ max-width : 80%;
755
+ max-height : 80%;
756
+ margin: 0;
757
+ }</code></pre>
758
+
759
+ <p>
760
+ These CSS rules can be overridden by JS, if needed:
761
+ </p>
762
+
763
+ <pre><code>$(&quot;[data-fancybox]&quot;).fancybox({
764
+ iframe : {
765
+ css : {
766
+ width : '600px'
767
+ }
768
+ }
769
+ });</code></pre>
770
+
771
+ <p>
772
+ If you have not disabled iframe preloading (using
773
+ <code>preload</code> option), then the script will atempt to calculate content dimensions and will adjust width/height
774
+ of iframe to fit with content in it. Keep in mind, that due to
775
+ <a href="https://en.wikipedia.org/wiki/Same-origin_policy" target="_blank">same origin policy</a>, there are some limitations.
776
+ </p>
777
+
778
+ <p>
779
+ This example will disable iframe preloading and will display small close button next to iframe instead of the toolbar:
780
+ </p>
781
+
782
+ <pre><code>$('[data-fancybox]').fancybox({
783
+ toolbar : false,
784
+ smallBtn : true,
785
+ iframe : {
786
+ preload : false
787
+ }
788
+ })
789
+ </code></pre>
790
+ <p class="demo">
791
+ <a href="https://codepen.io/fancyapps/pen/rdKgmP" target="_blank">View demo on CodePen</a>
792
+ </p>
793
+
794
+ </section>
795
+
796
+ <section id="options">
797
+ <h2>Options</h2>
798
+
799
+ <p>
800
+ Quick reference for all default options as defined in the source:
801
+ </p>
802
+
803
+ <pre>var defaults = {
804
+ // Enable infinite gallery navigation
805
+ loop: false,
806
+
807
+ // Horizontal space between slides
808
+ gutter: 50,
809
+
810
+ // Enable keyboard navigation
811
+ keyboard: true,
812
+
813
+ // Should display navigation arrows at the screen edges
814
+ arrows: true,
815
+
816
+ // Should display counter at the top left corner
817
+ infobar: true,
818
+
819
+ // Should display close button (using `btnTpl.smallBtn` template) over the content
820
+ // Can be true, false, &quot;auto&quot;
821
+ // If &quot;auto&quot; - will be automatically enabled for &quot;html&quot;, &quot;inline&quot; or &quot;ajax&quot; items
822
+ smallBtn: &quot;auto&quot;,
823
+
824
+ // Should display toolbar (buttons at the top)
825
+ // Can be true, false, &quot;auto&quot;
826
+ // If &quot;auto&quot; - will be automatically hidden if &quot;smallBtn&quot; is enabled
827
+ toolbar: &quot;auto&quot;,
828
+
829
+ // What buttons should appear in the top right corner.
830
+ // Buttons will be created using templates from `btnTpl` option
831
+ // and they will be placed into toolbar (class=&quot;fancybox-toolbar&quot;` element)
832
+ buttons: [
833
+ &quot;zoom&quot;,
834
+ //&quot;share&quot;,
835
+ //&quot;slideShow&quot;,
836
+ //&quot;fullScreen&quot;,
837
+ //&quot;download&quot;,
838
+ &quot;thumbs&quot;,
839
+ &quot;close&quot;
840
+ ],
841
+
842
+ // Detect &quot;idle&quot; time in seconds
843
+ idleTime: 3,
844
+
845
+ // Disable right-click and use simple image protection for images
846
+ protect: false,
847
+
848
+ // Shortcut to make content &quot;modal&quot; - disable keyboard navigtion, hide buttons, etc
849
+ modal: false,
850
+
851
+ image: {
852
+ // Wait for images to load before displaying
853
+ // true - wait for image to load and then display;
854
+ // false - display thumbnail and load the full-sized image over top,
855
+ // requires predefined image dimensions (`data-width` and `data-height` attributes)
856
+ preload: false
857
+ },
858
+
859
+ ajax: {
860
+ // Object containing settings for ajax request
861
+ settings: {
862
+ // This helps to indicate that request comes from the modal
863
+ // Feel free to change naming
864
+ data: {
865
+ fancybox: true
866
+ }
867
+ }
868
+ },
869
+
870
+ iframe: {
871
+ // Iframe template
872
+ tpl:
873
+ '&lt;iframe id=&quot;fancybox-frame{rnd}&quot; name=&quot;fancybox-frame{rnd}&quot; class=&quot;fancybox-iframe&quot; frameborder=&quot;0&quot; vspace=&quot;0&quot; hspace=&quot;0&quot; webkitAllowFullScreen mozallowfullscreen allowFullScreen allowtransparency=&quot;true&quot; src=&quot;&quot;&gt;&lt;/iframe&gt;',
874
+
875
+ // Preload iframe before displaying it
876
+ // This allows to calculate iframe content width and height
877
+ // (note: Due to &quot;Same Origin Policy&quot;, you can't get cross domain data).
878
+ preload: true,
879
+
880
+ // Custom CSS styling for iframe wrapping element
881
+ // You can use this to set custom iframe dimensions
882
+ css: {},
883
+
884
+ // Iframe tag attributes
885
+ attr: {
886
+ scrolling: &quot;auto&quot;
887
+ }
888
+ },
889
+
890
+ // Default content type if cannot be detected automatically
891
+ defaultType: &quot;image&quot;,
892
+
893
+ // Open/close animation type
894
+ // Possible values:
895
+ // false - disable
896
+ // &quot;zoom&quot; - zoom images from/to thumbnail
897
+ // &quot;fade&quot;
898
+ // &quot;zoom-in-out&quot;
899
+ //
900
+ animationEffect: &quot;zoom&quot;,
901
+
902
+ // Duration in ms for open/close animation
903
+ animationDuration: 366,
904
+
905
+ // Should image change opacity while zooming
906
+ // If opacity is &quot;auto&quot;, then opacity will be changed if image and thumbnail have different aspect ratios
907
+ zoomOpacity: &quot;auto&quot;,
908
+
909
+ // Transition effect between slides
910
+ //
911
+ // Possible values:
912
+ // false - disable
913
+ // &quot;fade'
914
+ // &quot;slide'
915
+ // &quot;circular'
916
+ // &quot;tube'
917
+ // &quot;zoom-in-out'
918
+ // &quot;rotate'
919
+ //
920
+ transitionEffect: &quot;fade&quot;,
921
+
922
+ // Duration in ms for transition animation
923
+ transitionDuration: 366,
924
+
925
+ // Custom CSS class for slide element
926
+ slideClass: &quot;&quot;,
927
+
928
+ // Custom CSS class for layout
929
+ baseClass: &quot;&quot;,
930
+
931
+ // Base template for layout
932
+ baseTpl:
933
+ '&lt;div class=&quot;fancybox-container&quot; role=&quot;dialog&quot; tabindex=&quot;-1&quot;&gt;' +
934
+ '&lt;div class=&quot;fancybox-bg&quot;&gt;&lt;/div&gt;' +
935
+ '&lt;div class=&quot;fancybox-inner&quot;&gt;' +
936
+ '&lt;div class=&quot;fancybox-infobar&quot;&gt;' +
937
+ &quot;&lt;span data-fancybox-index&gt;&lt;/span&gt;&amp;nbsp;/&amp;nbsp;&lt;span data-fancybox-count&gt;&lt;/span&gt;&quot; +
938
+ &quot;&lt;/div&gt;&quot; +
939
+ '&lt;div class=&quot;fancybox-toolbar&quot;&gt;{{buttons}}&lt;/div&gt;' +
940
+ '&lt;div class=&quot;fancybox-navigation&quot;&gt;{{arrows}}&lt;/div&gt;' +
941
+ '&lt;div class=&quot;fancybox-stage&quot;&gt;&lt;/div&gt;' +
942
+ '&lt;div class=&quot;fancybox-caption&quot;&gt;&lt;/div&gt;' +
943
+ &quot;&lt;/div&gt;&quot; +
944
+ &quot;&lt;/div&gt;&quot;,
945
+
946
+ // Loading indicator template
947
+ spinnerTpl: '&lt;div class=&quot;fancybox-loading&quot;&gt;&lt;/div&gt;',
948
+
949
+ // Error message template
950
+ errorTpl: '&lt;div class=&quot;fancybox-error&quot;&gt;&lt;p&gt;{{ERROR}}&lt;/p&gt;&lt;/div&gt;',
951
+
952
+ btnTpl: {
953
+ download:
954
+ '&lt;a download data-fancybox-download class=&quot;fancybox-button fancybox-button--download&quot; title=&quot;{{DOWNLOAD}}&quot; href=&quot;javascript:;&quot;&gt;' +
955
+ '&lt;svg viewBox=&quot;0 0 40 40&quot;&gt;' +
956
+ '&lt;path d=&quot;M13,16 L20,23 L27,16 M20,7 L20,23 M10,24 L10,28 L30,28 L30,24&quot; /&gt;' +
957
+ &quot;&lt;/svg&gt;&quot; +
958
+ &quot;&lt;/a&gt;&quot;,
959
+
960
+ zoom:
961
+ '&lt;button data-fancybox-zoom class=&quot;fancybox-button fancybox-button--zoom&quot; title=&quot;{{ZOOM}}&quot;&gt;' +
962
+ '&lt;svg viewBox=&quot;0 0 40 40&quot;&gt;' +
963
+ '&lt;path d=&quot;M18,17 m-8,0 a8,8 0 1,0 16,0 a8,8 0 1,0 -16,0 M24,22 L31,29&quot; /&gt;' +
964
+ &quot;&lt;/svg&gt;&quot; +
965
+ &quot;&lt;/button&gt;&quot;,
966
+
967
+ close:
968
+ '&lt;button data-fancybox-close class=&quot;fancybox-button fancybox-button--close&quot; title=&quot;{{CLOSE}}&quot;&gt;' +
969
+ '&lt;svg viewBox=&quot;0 0 40 40&quot;&gt;' +
970
+ '&lt;path d=&quot;M10,10 L30,30 M30,10 L10,30&quot; /&gt;' +
971
+ &quot;&lt;/svg&gt;&quot; +
972
+ &quot;&lt;/button&gt;&quot;,
973
+
974
+ // This small close button will be appended to your html/inline/ajax content by default,
975
+ // if &quot;smallBtn&quot; option is not set to false
976
+ smallBtn:
977
+ '&lt;button data-fancybox-close class=&quot;fancybox-close-small&quot; title=&quot;{{CLOSE}}&quot;&gt;&lt;svg viewBox=&quot;0 0 32 32&quot;&gt;&lt;path d=&quot;M10,10 L22,22 M22,10 L10,22&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/button&gt;',
978
+
979
+ // Arrows
980
+ arrowLeft:
981
+ '&lt;a data-fancybox-prev class=&quot;fancybox-button fancybox-button--arrow_left&quot; title=&quot;{{PREV}}&quot; href=&quot;javascript:;&quot;&gt;' +
982
+ '&lt;svg viewBox=&quot;0 0 40 40&quot;&gt;' +
983
+ '&lt;path d=&quot;M18,12 L10,20 L18,28 M10,20 L30,20&quot;&gt;&lt;/path&gt;' +
984
+ &quot;&lt;/svg&gt;&quot; +
985
+ &quot;&lt;/a&gt;&quot;,
986
+
987
+ arrowRight:
988
+ '&lt;a data-fancybox-next class=&quot;fancybox-button fancybox-button--arrow_right&quot; title=&quot;{{NEXT}}&quot; href=&quot;javascript:;&quot;&gt;' +
989
+ '&lt;svg viewBox=&quot;0 0 40 40&quot;&gt;' +
990
+ '&lt;path d=&quot;M10,20 L30,20 M22,12 L30,20 L22,28&quot;&gt;&lt;/path&gt;' +
991
+ &quot;&lt;/svg&gt;&quot; +
992
+ &quot;&lt;/a&gt;&quot;
993
+ },
994
+
995
+ // Container is injected into this element
996
+ parentEl: &quot;body&quot;,
997
+
998
+ // Hide browser vertical scrollbars; use at your own risk
999
+ hideScrollbar: true,
1000
+
1001
+ // Focus handling
1002
+ // ==============
1003
+
1004
+ // Try to focus on the first focusable element after opening
1005
+ autoFocus: false,
1006
+
1007
+ // Put focus back to active element after closing
1008
+ backFocus: true,
1009
+
1010
+ // Do not let user to focus on element outside modal content
1011
+ trapFocus: true,
1012
+
1013
+ // Module specific options
1014
+ // =======================
1015
+
1016
+ fullScreen: {
1017
+ autoStart: false
1018
+ },
1019
+
1020
+ // Set `touch: false` to disable dragging/swiping
1021
+ touch: {
1022
+ vertical: true, // Allow to drag content vertically
1023
+ momentum: true // Continue movement after releasing mouse/touch when panning
1024
+ },
1025
+
1026
+ // Hash value when initializing manually,
1027
+ // set `false` to disable hash change
1028
+ hash: null,
1029
+
1030
+ // Customize or add new media types
1031
+ // Example:
1032
+ /*
1033
+ media : {
1034
+ youtube : {
1035
+ params : {
1036
+ autoplay : 0
1037
+ }
1038
+ }
1039
+ }
1040
+ */
1041
+ media: {},
1042
+
1043
+ slideShow: {
1044
+ autoStart: false,
1045
+ speed: 4000
1046
+ },
1047
+
1048
+ thumbs: {
1049
+ autoStart: false, // Display thumbnails on opening
1050
+ hideOnClose: true, // Hide thumbnail grid when closing animation starts
1051
+ parentEl: &quot;.fancybox-container&quot;, // Container is injected into this element
1052
+ axis: &quot;y&quot; // Vertical (y) or horizontal (x) scrolling
1053
+ },
1054
+
1055
+ // Use mousewheel to navigate gallery
1056
+ // If 'auto' - enabled for images only
1057
+ wheel: &quot;auto&quot;,
1058
+
1059
+ // Callbacks
1060
+ //==========
1061
+
1062
+ // See Documentation/API/Events for more information
1063
+ // Example:
1064
+ /*
1065
+ afterShow: function( instance, current ) {
1066
+ console.info( 'Clicked element:' );
1067
+ console.info( current.opts.$orig );
1068
+ }
1069
+ */
1070
+
1071
+ onInit: $.noop, // When instance has been initialized
1072
+
1073
+ beforeLoad: $.noop, // Before the content of a slide is being loaded
1074
+ afterLoad: $.noop, // When the content of a slide is done loading
1075
+
1076
+ beforeShow: $.noop, // Before open animation starts
1077
+ afterShow: $.noop, // When content is done loading and animating
1078
+
1079
+ beforeClose: $.noop, // Before the instance attempts to close. Return false to cancel the close.
1080
+ afterClose: $.noop, // After instance has been closed
1081
+
1082
+ onActivate: $.noop, // When instance is brought to front
1083
+ onDeactivate: $.noop, // When other instance has been activated
1084
+
1085
+ // Interaction
1086
+ // ===========
1087
+
1088
+ // Use options below to customize taken action when user clicks or double clicks on the fancyBox area,
1089
+ // each option can be string or method that returns value.
1090
+ //
1091
+ // Possible values:
1092
+ // &quot;close&quot; - close instance
1093
+ // &quot;next&quot; - move to next gallery item
1094
+ // &quot;nextOrClose&quot; - move to next gallery item or close if gallery has only one item
1095
+ // &quot;toggleControls&quot; - show/hide controls
1096
+ // &quot;zoom&quot; - zoom image (if loaded)
1097
+ // false - do nothing
1098
+
1099
+ // Clicked on the content
1100
+ clickContent: function(current, event) {
1101
+ return current.type === &quot;image&quot; ? &quot;zoom&quot; : false;
1102
+ },
1103
+
1104
+ // Clicked on the slide
1105
+ clickSlide: &quot;close&quot;,
1106
+
1107
+ // Clicked on the background (backdrop) element;
1108
+ // if you have not changed the layout, then most likely you need to use `clickSlide` option
1109
+ clickOutside: &quot;close&quot;,
1110
+
1111
+ // Same as previous two, but for double click
1112
+ dblclickContent: false,
1113
+ dblclickSlide: false,
1114
+ dblclickOutside: false,
1115
+
1116
+ // Custom options when mobile device is detected
1117
+ // =============================================
1118
+
1119
+ mobile: {
1120
+ idleTime: false,
1121
+ clickContent: function(current, event) {
1122
+ return current.type === &quot;image&quot; ? &quot;toggleControls&quot; : false;
1123
+ },
1124
+ clickSlide: function(current, event) {
1125
+ return current.type === &quot;image&quot; ? &quot;toggleControls&quot; : &quot;close&quot;;
1126
+ },
1127
+ dblclickContent: function(current, event) {
1128
+ return current.type === &quot;image&quot; ? &quot;zoom&quot; : false;
1129
+ },
1130
+ dblclickSlide: function(current, event) {
1131
+ return current.type === &quot;image&quot; ? &quot;zoom&quot; : false;
1132
+ }
1133
+ },
1134
+
1135
+ // Internationalization
1136
+ // ====================
1137
+
1138
+ lang: &quot;en&quot;,
1139
+ i18n: {
1140
+ en: {
1141
+ CLOSE: &quot;Close&quot;,
1142
+ NEXT: &quot;Next&quot;,
1143
+ PREV: &quot;Previous&quot;,
1144
+ ERROR: &quot;The requested content cannot be loaded. &lt;br/&gt; Please try again later.&quot;,
1145
+ PLAY_START: &quot;Start slideshow&quot;,
1146
+ PLAY_STOP: &quot;Pause slideshow&quot;,
1147
+ FULL_SCREEN: &quot;Full screen&quot;,
1148
+ THUMBS: &quot;Thumbnails&quot;,
1149
+ DOWNLOAD: &quot;Download&quot;,
1150
+ SHARE: &quot;Share&quot;,
1151
+ ZOOM: &quot;Zoom&quot;
1152
+ },
1153
+ de: {
1154
+ CLOSE: &quot;Schliessen&quot;,
1155
+ NEXT: &quot;Weiter&quot;,
1156
+ PREV: &quot;Zurück&quot;,
1157
+ ERROR: &quot;Die angeforderten Daten konnten nicht geladen werden. &lt;br/&gt; Bitte versuchen Sie es später nochmal.&quot;,
1158
+ PLAY_START: &quot;Diaschau starten&quot;,
1159
+ PLAY_STOP: &quot;Diaschau beenden&quot;,
1160
+ FULL_SCREEN: &quot;Vollbild&quot;,
1161
+ THUMBS: &quot;Vorschaubilder&quot;,
1162
+ DOWNLOAD: &quot;Herunterladen&quot;,
1163
+ SHARE: &quot;Teilen&quot;,
1164
+ ZOOM: &quot;Maßstab&quot;
1165
+ }
1166
+ }
1167
+ };
1168
+ </pre>
1169
+
1170
+
1171
+ <p>
1172
+ Set instance options by passing a valid object to
1173
+ <code>fancybox()</code> method:
1174
+ </p>
1175
+
1176
+ <pre><code>$(&quot;[data-fancybox]&quot;).fancybox({
1177
+ thumbs : {
1178
+ autoStart : true
1179
+ }
1180
+ });</code></pre>
1181
+
1182
+
1183
+ <p>
1184
+ Plugin options / defaults are exposed in
1185
+ <code>$.fancybox.defaults</code> namespace so you can easily adjust them globally:
1186
+
1187
+ </p>
1188
+
1189
+ <pre><code>$.fancybox.defaults.animationEffect = "fade";</code></pre>
1190
+
1191
+ <p>
1192
+ Custom options for each element individually can be set by adding a
1193
+ <code>data-options</code> attribute to the element. This attribute should contain the properly formatted JSON object.
1194
+ </p>
1195
+ <p>
1196
+ It is also possible to quickly set any option using
1197
+ <em>parameterized</em> name of the selected option, for example,
1198
+ <code>animationEffect</code> would be
1199
+ <code>data-animation-effect</code>:
1200
+ </p>
1201
+
1202
+ <pre><code>&lt;a data-fancybox data-options='{&quot;caption&quot; : &quot;My caption&quot;, &quot;src&quot; : &quot;https://codepen.io/about/&quot;, &quot;type&quot; : &quot;iframe&quot;}' href=&quot;javascript:;&quot; class=&quot;btn btn-primary&quot;&gt;
1203
+ Example #1
1204
+ &lt;/a&gt;
1205
+
1206
+ &lt;a data-fancybox data-animation-effect=&quot;false&quot; href=&quot;https://source.unsplash.com/0JYgd2QuMfw/1500x1000&quot; class=&quot;btn btn-primary&quot;&gt;
1207
+ Example #2
1208
+ &lt;/a&gt;
1209
+ </code></pre>
1210
+ <p class="demo">
1211
+ <a href="https://codepen.io/fancyapps/pen/LdBExJ?editors=1000" target="_blank">View demo on CodePen</a>
1212
+ </p>
1213
+
1214
+ </section>
1215
+ <section id="api">
1216
+
1217
+ <h2>API</h2>
1218
+
1219
+ <p>
1220
+ The fancybox API offers a couple of methods to control fancybox. This gives you the ability to extend the plugin and to integrate
1221
+ it with other web application components.
1222
+ </p>
1223
+
1224
+ <h3 id="core_methods">Core methods</h3>
1225
+
1226
+ <p>
1227
+ Core methods are methods which affect/handle instances:
1228
+ </p>
1229
+
1230
+
1231
+ <pre><code>// Start new fancybox instance
1232
+ $.fancybox.open( items, opts, index );
1233
+
1234
+ // Get refrence to currently active fancybox instance
1235
+ $.fancybox.getInstance();
1236
+
1237
+ // Close currently active fancybox instance (pass `true` to close all instances)
1238
+ $.fancybox.close();
1239
+
1240
+ // Close all instances and unbind all events
1241
+ $.fancybox.destroy();
1242
+ </code></pre>
1243
+
1244
+
1245
+ <h3 id="api_usage">Starting facybox</h3>
1246
+
1247
+
1248
+ <p>
1249
+ When creating group objects manually, each item should follow this pattern:
1250
+ </p>
1251
+
1252
+ <pre><code>{
1253
+ src : '' // Source of the content
1254
+ type : '' // Content type: image|inline|ajax|iframe|html (optional)
1255
+ opts : {} // Object containing item options (optional)
1256
+ }
1257
+ </code></pre>
1258
+
1259
+
1260
+ <p>
1261
+ Example of opening image gallery programmatically:
1262
+ </p>
1263
+
1264
+ <pre><code>$.fancybox.open([
1265
+ {
1266
+ src : '1_b.jpg',
1267
+ opts : {
1268
+ caption : 'First caption',
1269
+ thumb : '1_s.jpg'
1270
+ }
1271
+ },
1272
+ {
1273
+ src : '2_b.jpg',
1274
+ opts : {
1275
+ caption : 'Second caption',
1276
+ thumb : '2_s.jpg'
1277
+ }
1278
+ }
1279
+ ], {
1280
+ loop : false
1281
+ });</code></pre>
1282
+ <p class="demo">
1283
+ <a href="https://codepen.io/fancyapps/pen/VXBLra?editors=1010" target="_blank">View demo on CodePen</a>
1284
+ </p>
1285
+
1286
+ <p>
1287
+ It is also possible to pass only one object. Example of opening inline content:
1288
+ </p>
1289
+
1290
+ <pre><code>$.fancybox.open({
1291
+ src : '#hidden-content',
1292
+ type : 'inline',
1293
+ opts : {
1294
+ afterShow : function( instance, current ) {
1295
+ console.info( 'done!' );
1296
+ }
1297
+ }
1298
+ });
1299
+ </code></pre>
1300
+ <p class="demo">
1301
+ <a href="https://codepen.io/fancyapps/pen/PRBqRK?editors=1010" target="_blank">View demo on CodePen</a>
1302
+ </p>
1303
+
1304
+ <p>
1305
+ If you wish to display some html content (for example, a message), then you can use a simpler syntax. It is advised to use
1306
+ a wrapper around your content.
1307
+ </p>
1308
+
1309
+ <pre><code>$.fancybox.open('&lt;div class=&quot;message&quot;&gt;&lt;h2&gt;Hello!&lt;/h2&gt;&lt;p&gt;You are awesome!&lt;/p&gt;&lt;/div&gt;');</code></pre>
1310
+ <p class="demo">
1311
+ <a href="https://codepen.io/fancyapps/pen/wmxaxy" target="_blank">View demo on CodePen</a>
1312
+ </p>
1313
+
1314
+ <p>
1315
+ Group items can be collection of jQuery objects, too. This can be used, for example, to create custom click event:
1316
+ </p>
1317
+
1318
+ <pre><code>var $links = $('.fancybox');
1319
+
1320
+ $links.on('click', function() {
1321
+
1322
+ $.fancybox.open( $links, {
1323
+ // Custom options
1324
+ }, $links.index( this ) );
1325
+
1326
+ return false;
1327
+ });</code></pre>
1328
+
1329
+ <h3 id="instance_methods">Instance methods</h3>
1330
+
1331
+ <p>
1332
+ In order to use these methods, you need an instance of the plugin's object. There are 3 common ways to get the reference.
1333
+ </p>
1334
+
1335
+ <p>
1336
+ 1) Using API method to get currently active instance:
1337
+ </p>
1338
+
1339
+ <pre><code>var instance = $.fancybox.getInstance();</code></pre>
1340
+
1341
+ <p>
1342
+ 2) While starting fancybox programmatically:
1343
+ </p>
1344
+ <pre><code>var instance = $.fancybox.open(
1345
+ // Your content and options
1346
+ );</code></pre>
1347
+
1348
+
1349
+ <p>
1350
+ 3) From within the callback - first argument is always a reference to current instance:
1351
+ </p>
1352
+
1353
+ <pre><code>$("[data-fancybox]").fancybox({
1354
+ afterShow : function( instance, current ) {
1355
+ console.info( instance );
1356
+ }
1357
+ });</code></pre>
1358
+ <p>
1359
+ Once you have a reference to fancybox instance the following methods are available:
1360
+ </p>
1361
+
1362
+
1363
+ <pre><code>// Go to next gallery item
1364
+ instance.next( duration );
1365
+
1366
+ // Go to previous gallery item
1367
+ instance.previous( duration );
1368
+
1369
+ // Switch to selected gallery item
1370
+ instance.jumpTo( index, duration );
1371
+
1372
+ // Check if current image dimensions are smaller than actual
1373
+ instance.isScaledDown();
1374
+
1375
+ // Scale image to the actual size of the image
1376
+ instance.scaleToActual( x, y, duration );
1377
+
1378
+ // Check if image dimensions exceed parent element
1379
+ instance.canPan();
1380
+
1381
+ // Scale image to fit inside parent element
1382
+ instance.scaleToFit( duration );
1383
+
1384
+ // Update position and content of all slides
1385
+ instance.update();
1386
+
1387
+ // Update slide position and scale content to fit
1388
+ instance.updateSlide( slide );
1389
+
1390
+ // Update infobar values, navigation button states and reveal caption
1391
+ instance.updateControls( force );
1392
+
1393
+ // Load custom content into the slide
1394
+ instance.setContent( slide, content );
1395
+
1396
+ // Show loading icon inside the slide
1397
+ instance.showLoading( slide );
1398
+
1399
+ // Remove loading icon from the slide
1400
+ instance.hideLoading( slide );
1401
+
1402
+ // Try to find and focus on the first focusable element
1403
+ instance.focus();
1404
+
1405
+ // Activates current instance, brings it to the front
1406
+ instance.activate();
1407
+
1408
+ // Close instance
1409
+ instance.close();
1410
+ </code></pre>
1411
+
1412
+
1413
+ <p>
1414
+ You can also do something like this:
1415
+ </p>
1416
+
1417
+ <pre><code>$.fancybox.getInstance().jumpTo(1);</code></pre>
1418
+
1419
+ <p>
1420
+ or simply:
1421
+ </p>
1422
+
1423
+ <pre><code>$.fancybox.getInstance('jumpTo', 1);</code></pre>
1424
+
1425
+ <h3 id="events">Events</h3>
1426
+
1427
+ <p>
1428
+ fancybox fires several events:
1429
+ </p>
1430
+
1431
+ <pre><code>beforeLoad : Before the content of a slide is being loaded
1432
+ afterLoad : When the content of a slide is done loading
1433
+
1434
+ beforeShow : Before open animation starts
1435
+ afterShow : When content is done loading and animating
1436
+
1437
+ beforeClose : Before the instance attempts to close. Return false to cancel the close.
1438
+ afterClose : After instance has been closed
1439
+
1440
+ onInit : When instance has been initialized
1441
+ onActivate : When instance is brought to front
1442
+ onDeactivate : When other instance has been activated</code></pre>
1443
+
1444
+ <p>
1445
+ Event callbacks can be set as function properties of the options object passed to fancybox initialization function:
1446
+ </p>
1447
+
1448
+ <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
1449
+ $(&quot;[data-fancybox]&quot;).fancybox({
1450
+ afterShow: function( instance, slide ) {
1451
+
1452
+ // Tip: Each event passes useful information within the event object:
1453
+
1454
+ // Object containing references to interface elements
1455
+ // (background, buttons, caption, etc)
1456
+ // console.info( instance.$refs );
1457
+
1458
+ // Current slide options
1459
+ // console.info( slide.opts );
1460
+
1461
+ // Clicked element
1462
+ // console.info( slide.opts.$orig );
1463
+
1464
+ // Reference to DOM element of the slide
1465
+ // console.info( slide.$slide );
1466
+
1467
+ }
1468
+ });
1469
+ &lt;/script&gt;</code></pre>
1470
+
1471
+ <p>
1472
+ Each callback receives two parameters - current fancybox instance and current gallery object, if exists.
1473
+ </p>
1474
+
1475
+ <p>
1476
+ It is also possible to attach event handler for all instances. To prevent interfering with other scripts, these events have
1477
+ been namespaced to
1478
+ <code>.fb</code>. These handlers receive 3 parameters - event, current fancybox instance and current gallery object.
1479
+ </p>
1480
+ <p>
1481
+ Here is an example of binding to the
1482
+ <code>afterShow</code> event:
1483
+ </p>
1484
+
1485
+ <pre><code>$(document).on('afterShow.fb', function( e, instance, slide ) {
1486
+ // Your code goes here
1487
+ });</code></pre>
1488
+
1489
+
1490
+ <p>
1491
+ If you wish to prevent closing of the modal (for example, after form submit), you can use
1492
+ <code>beforeClose</code> callback. Simply return
1493
+ <code>false</code>:
1494
+ </p>
1495
+
1496
+ <pre><code>beforeClose : function( instance, current, e ) {
1497
+ if ( $('#my-field').val() == '' ) {
1498
+ return false;
1499
+ }
1500
+ }
1501
+ </code></pre>
1502
+
1503
+ </section>
1504
+ <section id="modules">
1505
+ <h2>Modules</h2>
1506
+
1507
+ <p>
1508
+ fancybox code is split into several files (modules) that extend core functionality. You can build your own fancybox version
1509
+ by excluding unnecessary modules, if needed. Each one has their own
1510
+ <code>js</code> and/or
1511
+ <code>css</code> files.
1512
+ </p>
1513
+
1514
+ <p>
1515
+ Some modules can be customized and controlled programmatically. List of all possible options:
1516
+ </p>
1517
+
1518
+ <pre><code>fullScreen : {
1519
+ autoStart : false,
1520
+ },
1521
+
1522
+ touch : {
1523
+ vertical : true, // Allow to drag content vertically
1524
+ momentum : true // Continuous movement when panning
1525
+ },
1526
+
1527
+ // Hash value when initializing manually,
1528
+ // set `false` to disable hash change
1529
+ hash : null,
1530
+
1531
+ // Customize or add new media types
1532
+ // Example:
1533
+ /*
1534
+ media : {
1535
+ youtube : {
1536
+ params : {
1537
+ autoplay : 0
1538
+ }
1539
+ }
1540
+ }
1541
+ */
1542
+ media : {},
1543
+
1544
+ slideShow : {
1545
+ autoStart : false,
1546
+ speed : 4000
1547
+ },
1548
+
1549
+ thumbs : {
1550
+ autoStart : false, // Display thumbnails on opening
1551
+ hideOnClose : true, // Hide thumbnail grid when closing animation starts
1552
+ parentEl : '.fancybox-container', // Container is injected into this element
1553
+ axis : 'y' // Vertical (y) or horizontal (x) scrolling
1554
+ },
1555
+
1556
+ share: {
1557
+ url: function(instance, item) {
1558
+ return (
1559
+ (!instance.currentHash &amp;&amp; !(item.type === "inline" || item.type === "html") ? item.origSrc || item.src : false) || window.location
1560
+ );
1561
+ },
1562
+ tpl:
1563
+ '&lt;div class=&quot;fancybox-share&quot;&gt;' +
1564
+ &quot;&lt;h1&gt;{{SHARE}}&lt;/h1&gt;&quot; +
1565
+ &quot;&lt;p&gt;&quot; +
1566
+ '&lt;a class=&quot;fancybox-share__button fancybox-share__button--fb&quot; href=&quot;https://www.facebook.com/sharer/sharer.php?u={{url}}&quot;&gt;' +
1567
+ '&lt;svg viewBox=&quot;0 0 512 512&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196&quot; /&gt;&lt;/svg&gt;' +
1568
+ &quot;&lt;span&gt;Facebook&lt;/span&gt;&quot; +
1569
+ &quot;&lt;/a&gt;&quot; +
1570
+ '&lt;a class=&quot;fancybox-share__button fancybox-share__button--tw&quot; href=&quot;https://twitter.com/intent/tweet?url={{url}}&amp;text={{descr}}&quot;&gt;' +
1571
+ '&lt;svg viewBox=&quot;0 0 512 512&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;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&quot; /&gt;&lt;/svg&gt;' +
1572
+ &quot;&lt;span&gt;Twitter&lt;/span&gt;&quot; +
1573
+ &quot;&lt;/a&gt;&quot; +
1574
+ '&lt;a class=&quot;fancybox-share__button fancybox-share__button--pt&quot; href=&quot;https://www.pinterest.com/pin/create/button/?url={{url}}&amp;description={{descr}}&amp;media={{media}}&quot;&gt;' +
1575
+ '&lt;svg viewBox=&quot;0 0 512 512&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;path d=&quot;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&quot; fill=&quot;#fff&quot;/&gt;&lt;/svg&gt;' +
1576
+ &quot;&lt;span&gt;Pinterest&lt;/span&gt;&quot; +
1577
+ &quot;&lt;/a&gt;&quot; +
1578
+ &quot;&lt;/p&gt;&quot; +
1579
+ '&lt;p&gt;&lt;input class=&quot;fancybox-share__input&quot; type=&quot;text&quot; value=&quot;{{url_raw}}&quot; /&gt;&lt;/p&gt;' +
1580
+ &quot;&lt;/div&gt;&quot;
1581
+ }
1582
+
1583
+ </code></pre>
1584
+
1585
+ <p>
1586
+ Couple of examples. Show thumbnails on start:
1587
+ </p>
1588
+
1589
+ <pre><code>$('[data-fancybox="images"]').fancybox({
1590
+ thumbs : {
1591
+ autoStart : true
1592
+ }
1593
+ });</code></pre>
1594
+ <p class="demo">
1595
+ <a href="https://codepen.io/fancyapps/pen/bvjdXj?editors=1010" target="_blank">View demo on CodePen</a>
1596
+ </p>
1597
+
1598
+ <p>
1599
+ Customize share url if displaying hidden video element:
1600
+ </p>
1601
+
1602
+ <pre><code>$('[data-fancybox=&quot;test-share-url&quot;]').fancybox({
1603
+ buttons : ['share', 'close'],
1604
+ hash : false,
1605
+ share : {
1606
+ url : function( instance, item ) {
1607
+ if (item.type === 'inline' &amp;&amp; item.contentType === 'video') {
1608
+ return item.$content.find('source:first').attr('src');
1609
+ }
1610
+
1611
+ return item.src;
1612
+ }
1613
+ }
1614
+ });</code></pre>
1615
+ <p class="demo">
1616
+ <a href="https://codepen.io/fancyapps/pen/BrOqmQ?editors=1010" target="_blank">View demo on CodePen</a>
1617
+ </p>
1618
+
1619
+ <p>
1620
+ If you would inspect fancybox instance object, you would find that same keys ar captialized - these are references for each
1621
+ module object. Also, you would notice that fancybox uses common naming convention to prefix jQuery
1622
+ objects with
1623
+ <code>$</code>.
1624
+ </p>
1625
+
1626
+ <p>
1627
+ This is how you, for example, can access thumbnail grid element:
1628
+ </p>
1629
+
1630
+ <pre><code>$.fancybox.getInstance().Thumbs.$grid</code></pre>
1631
+
1632
+ <p>
1633
+ This example shows how to call method that toggles thumbnails:
1634
+ </p>
1635
+
1636
+ <pre><code>$.fancybox.getInstance().Thumbs.toggle();</code></pre>
1637
+
1638
+ <p>
1639
+ List of available methods:
1640
+ </p>
1641
+
1642
+ <pre><code>Thumbs.focus()
1643
+ Thumbs.update();
1644
+ Thumbs.hide();
1645
+ Thumbs.show();
1646
+ Thumbs.toggle();
1647
+
1648
+ FullScreen.request( elem );
1649
+ FullScreen.exit();
1650
+ FullScreen.toggle( elem );
1651
+ FullScreen.isFullscreen();
1652
+ FullScreen.enabled();
1653
+
1654
+ SlideShow.start();
1655
+ SlideShow.stop();
1656
+ SlideShow.toggle();
1657
+ </code></pre>
1658
+
1659
+ <p>
1660
+ If you wish to disable hash module, use this snippet (after including JS file):
1661
+ </p>
1662
+
1663
+ <pre><code>$.fancybox.defaults.hash = false;</code></pre>
1664
+
1665
+ </section>
1666
+
1667
+ <section id="faq">
1668
+
1669
+ <h2>FAQ</h2>
1670
+
1671
+ <h3 id="faq-1">
1672
+ <a href="#faq-1">#1</a> Opening/closing causes fixed element to jump</h3>
1673
+
1674
+ <p>
1675
+ Simply add
1676
+ <code>compensate-for-scrollbar</code> CSS class to your fixed positioned elements. Example of using Bootstrap navbar component:
1677
+ </p>
1678
+
1679
+ <pre><code>&lt;nav class=&quot;navbar navbar-inverse navbar-fixed-top compensate-for-scrollbar&quot;&gt;
1680
+ &lt;div class=&quot;container&quot;&gt;
1681
+ ..
1682
+ &lt;/div&gt;
1683
+ &lt;/nav&gt;</code></pre>
1684
+
1685
+ <p class="demo">
1686
+ <a href="https://codepen.io/fancyapps/pen/YajyPQ?editors=1000" target="_blank">View demo on CodePen</a>
1687
+ </p>
1688
+
1689
+ <p>
1690
+ The script measures width of the scrollbar and creates
1691
+ <code>compensate-for-scrollbar</code> CSS class that uses this value for
1692
+ <code>margin-right</code> property. Therefore, if your element has
1693
+ <code>width:100%</code>, you should positon it using
1694
+ <code>left</code> and
1695
+ <code>right</code> properties instead. Example:
1696
+ </p>
1697
+
1698
+ <pre><code>.navbar {
1699
+ position: fixed;
1700
+ top: 0;
1701
+ left: 0;
1702
+ right: 0;
1703
+ }</code></pre>
1704
+
1705
+ <h3 id="faq-2">
1706
+ <a href="#faq-2">#2</a> How to customize caption</h3>
1707
+
1708
+ <p>
1709
+ You can use
1710
+ <code>caption</code> option that accepts a function and is called for each group element. Example of appending image
1711
+ download link:
1712
+ </p>
1713
+
1714
+ <pre><code>$( '[data-fancybox=&quot;images&quot;]' ).fancybox({
1715
+ caption : function( instance, item ) {
1716
+ var caption = $(this).data('caption') || '';
1717
+
1718
+ if ( item.type === 'image' ) {
1719
+ caption = (caption.length ? caption + '&lt;br /&gt;' : '') + '&lt;a href=&quot;' + item.src + '&quot;&gt;Download image&lt;/a&gt;' ;
1720
+ }
1721
+
1722
+ return caption;
1723
+ }
1724
+ });</code></pre>
1725
+ <p class="demo">
1726
+ <a href="https://codepen.io/fancyapps/pen/rdrOmO?editors=1010" target="_blank">View demo on CodePen</a>
1727
+ </p>
1728
+
1729
+
1730
+ <p>
1731
+ Add current image index and image count (the total number of images in the gallery) right in the caption:
1732
+ </p>
1733
+
1734
+ <pre><code>$( '[data-fancybox=&quot;images&quot;]' ).fancybox({
1735
+ infobar : false,
1736
+ caption : function( instance, item ) {
1737
+ var caption = $(this).data('caption') || '';
1738
+
1739
+ return ( caption.length ? caption + '&lt;br /&gt;' : '' ) + 'Image &lt;span data-fancybox-index&gt;&lt;/span&gt; of &lt;span data-fancybox-count&gt;&lt;/span&gt;';
1740
+ }
1741
+ });</code></pre>
1742
+ <p class="demo">
1743
+ <a href="https://codepen.io/fancyapps/pen/oqMjwe?editors=1010" target="_blank">View demo on CodePen</a>
1744
+ </p>
1745
+
1746
+ <p>
1747
+ Inside
1748
+ <code>caption</code> method,
1749
+ <code>this</code> refers to the clicked element. Example of using different source for caption:
1750
+ </p>
1751
+
1752
+ <pre><code>$( '[data-fancybox]' ).fancybox({
1753
+ caption : function( instance, item ) {
1754
+ return $(this).find('figcaption').html();
1755
+ }
1756
+ });</code></pre>
1757
+ <p class="demo">
1758
+ <a href="https://codepen.io/fancyapps/pen/EbyQzE" target="_blank">View demo on CodePen</a>
1759
+ </p>
1760
+
1761
+ <h3 id="faq-3">
1762
+ <a href="#faq-3">#3</a> How to create custom button in the toolbar</h3>
1763
+
1764
+ <p>
1765
+ Example of creating reusable button:
1766
+ </p>
1767
+
1768
+ <pre><code>// Create template for the button
1769
+ $.fancybox.defaults.btnTpl.fb = '&lt;button data-fancybox-fb class=&quot;fancybox-button fancybox-button--fb&quot; title=&quot;Facebook&quot;&gt;' +
1770
+ '&lt;svg viewBox=&quot;0 0 24 24&quot;&gt;' +
1771
+ '&lt;path d=&quot;M22.676 0H1.324C.594 0 0 .593 0 1.324v21.352C0 23.408.593 24 1.324 24h11.494v-9.294h-3.13v-3.62h3.13V8.41c0-3.1 1.894-4.785 4.66-4.785 1.324 0 2.463.097 2.795.14v3.24h-1.92c-1.5 0-1.793.722-1.793 1.772v2.31h3.584l-.465 3.63h-3.12V24h6.115c.733 0 1.325-.592 1.325-1.324V1.324C24 .594 23.408 0 22.676 0&quot;/&gt;' +
1772
+ '&lt;/svg&gt;' +
1773
+ '&lt;/button&gt;';
1774
+
1775
+ // Make button clickable using event delegation
1776
+ $('body').on('click', '[data-fancybox-fb]', function() {
1777
+ window.open(&quot;https://www.facebook.com/sharer/sharer.php?u=&quot;+encodeURIComponent(window.location.href)+&quot;&amp;t=&quot;+encodeURIComponent(document.title), '','left=0,top=0,width=600,height=300,menubar=no,toolbar=no,resizable=yes,scrollbars=yes');
1778
+ });
1779
+
1780
+ // Customize buttons
1781
+ $( '[data-fancybox=&quot;images&quot;]' ).fancybox({
1782
+ buttons : [
1783
+ 'fb',
1784
+ 'close'
1785
+ ]
1786
+ });</code></pre>
1787
+
1788
+ <p class="demo">
1789
+ <a href="https://codepen.io/fancyapps/pen/NYBGYV" target="_blank">View demo on CodePen</a>
1790
+ </p>
1791
+
1792
+ <h3 id="faq-4">
1793
+ <a href="#faq-4">#4</a> How to reposition thumbnail grid</h3>
1794
+
1795
+ <p>
1796
+ There is currenty no JS option to change thumbnail grid position. But fancybox is designed so that you can use CSS to change
1797
+ position or dimension for each block (e.g., content area, caption or thumbnail grid). This gives
1798
+ you freedom to completely change the look and feel of the modal window, if needed.
1799
+
1800
+ <a href="https://codepen.io/fancyapps/pen/GxBpYY" target="_blank">View demo on CodePen</a>
1801
+ </p>
1802
+
1803
+ <h3 id="faq-5">
1804
+ <a href="#faq-5">#5</a> How to disable touch gestures/swiping</h3>
1805
+
1806
+ <p>
1807
+ When you want to make your content selectable or clickable, you have two options:
1808
+ </p>
1809
+
1810
+ <ul>
1811
+ <li>
1812
+ disable touch gestures completely by setting
1813
+ <code>touch:false</code>
1814
+ </li>
1815
+ <li>
1816
+ add
1817
+ <code>data-selectable="true"</code> attribute to your html element
1818
+ </li>
1819
+ </ul>
1820
+
1821
+ <p>
1822
+ <a href="https://codepen.io/fancyapps/pen/aYjvXw?editors=1000" target="_blank">View demo on CodePen</a>
1823
+ </p>
1824
+
1825
+ </section>
1826
+
1827
+ <section>
1828
+ <p class="text-right mt-5">
1829
+ <a href="#introduction">Back to Top</a>
1830
+ </p>
1831
+ </section>
1832
+
1833
+ </div>
1834
+ </div>
1835
+ </div>
1836
+
1837
+ <script>
1838
+
1839
+ /* Sticky nvigation */
1840
+
1841
+ var sticky = {
1842
+ $sticky: $('.sticky'),
1843
+ offsets: [],
1844
+ targets: [],
1845
+ stickyTop: null,
1846
+
1847
+ set: function () {
1848
+ var self = this;
1849
+
1850
+ self.offsets = [];
1851
+ self.targets = [];
1852
+
1853
+ // Get current top position of sticky element
1854
+ self.stickyTop = self.$sticky.css('position', 'relative').offset().top;
1855
+
1856
+ // Cache all targets and their top positions
1857
+ self.$sticky.find('a').map(function () {
1858
+ var $el = $(this),
1859
+ href = $el.data('target') || $el.attr('href'),
1860
+ $href = /^#./.test(href) && $(href);
1861
+
1862
+ return $href && $href.length && $href.is(':visible') ? [[Math.floor($href.offset().top - parseInt($href.css('margin-top')) - parseInt($href.css('padding-top'))), href]] : null;
1863
+ })
1864
+ .sort(function (a, b) { return a[0] - b[0] })
1865
+ .each(function () {
1866
+ self.offsets.push(this[0]);
1867
+ self.targets.push(this[1]);
1868
+ });
1869
+
1870
+ },
1871
+
1872
+ update: function () {
1873
+ var self = this;
1874
+
1875
+ var windowTop = Math.floor($(window).scrollTop());
1876
+ var $stickyLinks = self.$sticky.find('a').removeClass('active');
1877
+ var stickyPosition = 'fixed';
1878
+ var currentIndex = 0;
1879
+
1880
+ // Toggle fixed position depending on visibility
1881
+ if ($(window).width() < 800 || $(window).height() < 500 || self.stickyTop > windowTop) {
1882
+ stickyPosition = 'relative';
1883
+
1884
+ } else {
1885
+
1886
+ for (var i = self.offsets.length; i--;) {
1887
+ if (windowTop >= self.offsets[i] - 1 && (self.offsets[i + 1] === undefined || windowTop <= self.offsets[i + 1])) {
1888
+ currentIndex = i;
1889
+
1890
+ break;
1891
+ }
1892
+ }
1893
+
1894
+ }
1895
+
1896
+ self.$sticky.css('position', stickyPosition).width($('#leftCol').width());
1897
+
1898
+ $stickyLinks.eq(currentIndex).addClass('active');
1899
+ },
1900
+
1901
+ init: function () {
1902
+ var self = this;
1903
+
1904
+ $(window).on('resize', function () {
1905
+ self.set();
1906
+
1907
+ self.update();
1908
+ });
1909
+
1910
+ $(window).on('scroll', function () {
1911
+ self.update();
1912
+ });
1913
+
1914
+ $(window).trigger('resize');
1915
+ }
1916
+ }
1917
+
1918
+ sticky.init();
1919
+
1920
+ </script>
1921
+ </body>
1922
+
1923
+ </html>