PageSourceSearch

https://iaqm.co.uk/wp-content/plugins/ts-visual-composer-extend/js/jquery.vcsc.krautlightbox.min.js?ver=5.3.6

js iaqm.co.uk collected 2026-10-02 10:43:51 UTC 84,328 bytes, 1 lines download raw bytes

1!function(t,e){function o(t){if(r(t.target)&&{37:1,38:1,39:1,40:1}[t.keyCode])return t.preventDefault(),$TS_VCSC_Lightbox_Showing&&jQuery("html, body").scrollTop($TS_VCSC_Lightbox_LastScroll),!1}function a(t){if(r(t.target)&&2==t.which)return t.preventDefault(),!1}function i(t){if(r(t.target))return t.preventDefault(),$TS_VCSC_Lightbox_Showing&&jQuery("html, body").scrollTop($TS_VCSC_Lightbox_LastScroll),!1;jQuery(t.target).is(document)}function r(t){var e=jQuery(t).closest(".nch-lb-media-space"),o=jQuery(t).closest(".nch-lb-zoom-container"),a=jQuery(t).closest(".nch-lb-media-html"),i=jQuery(t).closest(".nch-lb-media-iframe"),r=jQuery(t).closest(".nch-lb-thumbs-bar");return e.length>0&&0==a.length&&0==i.length&&0==o.length&&0==r.length||(a.length>0||o.length>0?!a.hasVerticalScrollBar()&&!o.hasVerticalScrollBar():!(r.length>0)||!r.hasClass("nch-lb-thumbs-left")&&!r.hasClass("nch-lb-thumbs-right"))}function n(){window.history.replaceState(null,document.title,location.href),jQuery.fn.nchlightbox("close"),window.removeEventListener("popstate",n,!1)}function s(){jQuery("body").on("click",".nch-lightbox-trigger",function(t){t.preventDefault();var e=jQuery(this).attr("data-group");""!=e&&jQuery("#"+e+"-0").click()}),void 0!==jQuery.fn.nchlightbox&&(jQuery.fn.nchlightbox("addEvent","open",function(t,e){if($TS_VCSC_Lightbox_Showing=!0,jQuery("#wpadminbar").hide(),$TS_VCSC_Lightbox_LastScroll=jQuery(document).scrollTop(),"css"==$TS_VCSC_Lightbox_ScrollBlock?d.addClass("ts-composer-extensions-noscrollcss"):"js"==$TS_VCSC_Lightbox_ScrollBlock&&(d.addClass("ts-composer-extensions-noscrolljs"),u.bind("keydown",o),u.bind("mousedown",a),u.bind("mousewheel DOMMouseScroll wheel",i),h.bind("scroll",i)),$TS_VCSC_Lightbox_HistoryClose&&c&&$TS_VCSC_Lightbox_NoHashes&&(window.history.replaceState(null,document.title,location.href),window.addEventListener("popstate",n,!1)),jQuery(".ts_html5_media_frame_insert").each(function(){if(jQuery(this).contents().find(".projekktor").hasClass("ppstateplaying")){var t=jQuery(this).contents().find(".projekktor");t.find(".pppause").click(),t.find(".ppcontrols").removeClass("active").addClass("inactive")}}),"undefined"!=typeof $plyr_collection&&jQuery.each($plyr_collection,function(t,e){e.player.playing&&e.player.ready&&e.player.pause()}),void 0!==jQuery.fn.tooltipstercustom&&jQuery(".tooltipstered").tooltipstercustom("hide"),jQuery(".ts-element-focus-overlay").remove(),jQuery(".ts-element-focus-container").removeClass("ts-element-focus-active").attr("data-spotlight-active","false"),currentOverlay=null,!e.numbered){var r,s=e.set,l=s.length;if(1!=s.length){for(var p=0;p<l;p++)s[p].opts.title=((r=s[p].opts.title)?r:"")+" ("+(p+1)+" / "+l+")";e.numbered=!0}}}),jQuery.fn.nchlightbox("addEvent","close",function(){"css"==$TS_VCSC_Lightbox_ScrollBlock?(d.removeClass("ts-composer-extensions-noscrollcss"),d.scrollTop($TS_VCSC_Lightbox_LastScroll)):"js"==$TS_VCSC_Lightbox_ScrollBlock&&(d.removeClass("ts-composer-extensions-noscrolljs"),u.unbind("keydown",o),u.unbind("mousedown",a),u.unbind("mousewheel DOMMouseScroll wheel",i),h.unbind("scroll",i),d.scrollTop($TS_VCSC_Lightbox_LastScroll)),jQuery("#wpadminbar").show(),$TS_VCSC_Lightbox_HistoryClose&&c&&$TS_VCSC_Lightbox_NoHashes&&window.removeEventListener("popstate",n,!1),$TS_VCSC_Lightbox_Showing=!1}),jQuery.fn.nchlightbox("addEvent","next",function(t,e,o){!e.playing||"youtube"!=o.opts.type&&"vimeo"!=o.opts.type&&"dailymotion"!=o.opts.type&&"facebook"!=o.opts.type&&"plyr"!=o.opts.type||jQuery.fn.nchlightbox("stop")}),jQuery(".nch-lightbox-media, .ts-custom-lightbox-media").nchlightbox({zoom:$TS_VCSC_Lightbox_Zoom,fullscreen:$TS_VCSC_Lightbox_FullScreen}),jQuery(".nch-lightbox-modal, .ts-custom-lightbox-modal").nchlightbox({thumbs:0,share:0,zoom:0,fxspeed:$TS_VCSC_Lightbox_FXSpeed,keyboard:!1,bgclose:!0,notouch:!1,backlight:$TS_VCSC_Lightbox_Backlight,usecolor:$TS_VCSC_Lightbox_UseColor,fullscreen:$TS_VCSC_Lightbox_FullScreen}),jQuery(".nch-lightbox-html5, .ts-custom-lightbox-html5").nchlightbox({share:0,zoom:0,fxspeed:$TS_VCSC_Lightbox_FXSpeed,keyboard:$TS_VCSC_Lightbox_Keyboard,bgclose:!0,notouch:!1,backlight:$TS_VCSC_Lightbox_Backlight,usecolor:$TS_VCSC_Lightbox_UseColor,fullscreen:!1}),jQuery(".nch-lightbox-plyr, .ts-custom-lightbox-plyr").nchlightbox({share:0,zoom:0,fxspeed:$TS_VCSC_Lightbox_FXSpeed,keyboard:$TS_VCSC_Lightbox_Keyboard,bgclose:!0,notouch:!1,backlight:$TS_VCSC_Lightbox_Backlight,usecolor:$TS_VCSC_Lightbox_UseColor,fullscreen:!1}),jQuery(".ts-image-link-grid").each(function(){var t=jQuery(this),e=t.find("img"),o=t.attr("data-grid").split(","),a=parseInt(t.attr("data-margin")),i=parseInt(t.attr("data-random")),r="true"==t.attr("data-gridpreloader"),n="true"==t.attr("data-gridfilter"),s="true"==t.attr("data-order"),l="true"==t.attr("data-always"),c="true"==t.attr("data-lightbox-init"),h=t.attr("data-gridavailable"),u=t.attr("data-gridselected"),d=t.attr("data-gridnogroups"),p=t.attr("data-gridtoggle"),g=t.attr("data-gridtogglestyle"),f=t.attr("data-gridshowall"),m=t.attr("data-gridshowallstyle");
10==c&&e.nchgrid({margin:a,grid:o,order:s,captions:!0,linkGrid:!0,target:!1,random:i,preloader:r,filter:n,titles:l,selector:"nch-lb-filter-"+i,toggle:"nch-lb-toggle-"+i,showall:"nch-lb-showall-"+i,textAvailable:h,textSelected:u,textNoGroups:d,textToggle:p,textToggleStyle:g,textShowAll:f,textShowAllStyle:m}).promise().done(function(){t.attr("data-lightbox-init","true")})}),jQuery(".ts-lightbox-integration").nchlightbox({zoom:$TS_VCSC_Lightbox_Zoom,fullscreen:$TS_VCSC_Lightbox_FullScreen}),l("ready"),1==$TS_VCSC_Lightbox_AttachAllOther&&jQuery("body").find("a[href]:not([class])").filter(function(){return jQuery(this).attr("href").match(/\.(jpg|JPG|jpeg|JPEG|png|PNG|gif|GIF)/i)}).addClass("nofancybox").attr("data-thumbnail",jQuery(this).attr("href")).attr("rel","nachogroup").off().nchlightbox({share:0,thumbs:"bottom",thumbsize:75,zoom:$TS_VCSC_Lightbox_Zoom,fullscreen:$TS_VCSC_Lightbox_FullScreen}))}function l(t){1==$TS_VCSC_Lightbox_PrettyPhoto&&("ready"==t?(jQuery(".vc_media_grid").find(".vc_gitem-is-link a.prettyphoto").each(function(){jQuery(this).off().addClass("nofancybox ts-replace-lightbox").removeClass("prettyphoto vc-prettyphoto-link").attr("data-thumbnail",jQuery(this).attr("href")).attr("rel",jQuery(this).attr("data-rel"))}),jQuery(".vc_media_grid").find(".vc_gitem-is-link a.ts-replace-lightbox").off().nchlightbox({share:0,thumbs:"bottom",thumbsize:75,zoom:$TS_VCSC_Lightbox_Zoom,fullscreen:$TS_VCSC_Lightbox_FullScreen}),jQuery('.gallery-icon a[href*=".jpg"]').each(function(){jQuery(this).addClass("nofancybox ts-replace-lightbox").removeClass("prettyphoto vc-prettyphoto-link").attr("data-thumbnail",jQuery(this).attr("href")).attr("rel","nachogroup")}),jQuery('.gallery-icon a[href*=".jpg"]').off().nchlightbox({share:0,thumbs:"bottom",thumbsize:75,zoom:$TS_VCSC_Lightbox_Zoom,fullscreen:$TS_VCSC_Lightbox_FullScreen})):"load"==t&&(jQuery(".wpb_single_image a.prettyphoto").each(function(){jQuery(this).off().addClass("nofancybox ts-replace-lightbox").removeClass("prettyphoto vc-prettyphoto-link").attr("data-thumbnail",jQuery(this).attr("href")).attr("rel","nachogroup")}),jQuery(".wpb_single_image a.ts-replace-lightbox").off().nchlightbox({share:0,thumbs:"bottom",thumbsize:75,zoom:$TS_VCSC_Lightbox_Zoom,fullscreen:$TS_VCSC_Lightbox_FullScreen}),jQuery(".wpb_gallery_slides a.prettyphoto").each(function(){jQuery(this).off().addClass("nofancybox ts-replace-lightbox").removeClass("prettyphoto vc-prettyphoto-link").attr("data-thumbnail",jQuery(this).attr("href")).attr("rel",jQuery(this).attr("data-rel"))}),jQuery(".wpb_gallery_slides a.ts-replace-lightbox").off().nchlightbox({share:0,thumbs:"bottom",thumbsize:75,zoom:$TS_VCSC_Lightbox_Zoom,fullscreen:$TS_VCSC_Lightbox_FullScreen}),jQuery(".vc_images_carousel").find(".vc_item a.prettyphoto").each(function(){jQuery(this).off().addClass("nofancybox ts-replace-lightbox").removeClass("prettyphoto vc-prettyphoto-link").attr("data-thumbnail",jQuery(this).attr("href")).attr("rel",jQuery(this).attr("data-rel"))}),jQuery(".vc_images_carousel").find(".vc_item a.ts-replace-lightbox").off().nchlightbox({share:0,thumbs:"bottom",thumbsize:75,zoom:$TS_VCSC_Lightbox_Zoom,fullscreen:$TS_VCSC_Lightbox_FullScreen})))}var c=!1;"history"in window&&"pushState"in history&&(c&&window.history.pushState(null,document.title,location.href),c=!0);var h=jQuery(window),u=jQuery(document),d=jQuery("body, html");jQuery(document).ready(function(){s(),jQuery(window).on("opennacho",function(t,e){void 0!=e&&"undefined"!=e&&("html"!=e.opts.type&&"modal"!=e.opts.type||(setTimeout(function(){window.resizeBy(0,0),h.trigger("debouncedresize"),window.dispatchEvent(new Event("resize"))},$TS_VCSC_Lightbox_FXSpeed),setTimeout(function(){window.resizeBy(0,0),h.trigger("debouncedresize"),window.dispatchEvent(new Event("resize"))},$TS_VCSC_Lightbox_FXSpeed)))}),jQuery(document).ajaxStop(function(){s()}),jQuery(document.body).on("post-load",function(){s()})}),jQuery(window).load(function(){l("load"),jQuery(".nch-lightbox-open").each(function(){if("true"==jQuery(this).attr("data-open")){var t=jQuery(this),e=parseInt(jQuery(this).attr("data-delay"));return setTimeout(function(){jQuery.fn.nchlightbox("close"),t.nchlightbox({share:0,social:"",zoom:0,bgclose:!0}).nchlightbox("open")},e),!1}}),jQuery(".nch-lightbox-inview").each(function(){if("inview"==jQuery(this).attr("data-open")){var t=jQuery(this),e=parseInt(j
1Query(this).attr("data-delay")),o=jQuery(this).attr("data-offset");void 0!==jQuery.fn.waypoint&&jQuery(this).waypoint({handler:function(){var o=jQuery(this);setTimeout(function(){jQuery.fn.nchlightbox("close"),t.nchlightbox({thumbs:0,share:0,social:"",zoom:0,bgclose:!0}).nchlightbox("open");try{o.waypoint("destroy")}catch(t){}try{$this.destroy()}catch(t){}},e)},offset:o,triggerOnce:!0})}})})}(jQuery),function(t,e){"use strict";var o={mode:"continuous",thumbs:$TS_VCSC_Lightbox_Thumbs,thumbsize:$TS_VCSC_Lightbox_Thumbsize,scheme:$TS_VCSC_Lightbox_Scheme,theme:"metro",size:"960,540",play:!0,autoplay:!1,closer:$TS_VCSC_Lightbox_Closer,share:$TS_VCSC_Lightbox_Share,save:$TS_VCSC_Lightbox_Save,social:$TS_VCSC_Lightbox_Social,duration:4e3,keyboard:$TS_VCSC_Lightbox_Keyboard,fullscreen:$TS_VCSC_Lightbox_FullScreen,margin:10,zoom:$TS_VCSC_Lightbox_Zoom,fxspeed:$TS_VCSC_Lightbox_FXSpeed,grid:0,gridspace:4,gridorder:!0,captions:$TS_VCSC_Lightbox_Captions,gridpreloader:!1,gridlightbox:!0,gridfilter:!1,random:"",gridavailable:"Available Groups",gridselected:"Filtered Groups",gridnogroups:"No Groups",gridtoggle:"Toggle Filter",gridtogglestyle:"",gridshowall:"Show All",gridshowallstyle:"",info:!1,backlight:$TS_VCSC_Lightbox_Backlight,usecolor:$TS_VCSC_Lightbox_UseColor,animation:$TS_VCSC_Lightbox_Animation,cors:$TS_VCSC_Lightbox_CORS,hashpath:"composer/",bgclose:$TS_VCSC_Lightbox_BGClose,notouch:$TS_VCSC_Lightbox_NoTouch,nohashes:$TS_VCSC_Lightbox_NoHashes,tapping:$TS_VCSC_Lightbox_Tapping,overlay:$TS_VCSC_Lightbox_Overlay,imageprotect:$TS_VCSC_Lightbox_Protection,background:$TS_VCSC_Lightbox_Background,repeat:$TS_VCSC_Lightbox_Repeat,noise:$TS_VCSC_Lightbox_Noise,perfectscroll:$TS_VCSC_Lightbox_CustomScroll},a={title:!1,type:!1,hover:!1,thumbnail:"",contenttype:"video",listid:"",videofirst:"",videosother:"",userid:"",search:"",groups:!1,videoplay:!1,videomobile:!1,videoloop:!1,related:!1,loop:!1,modest:!1,quality:"auto",infobar:!0,controls:1,autohide:1,start:"",end:"",nohashes:$TS_VCSC_Lightbox_NoHashes,usecors:"global",rel:!1,src:!1,href:!1,width:0,height:0,color:!1,effect:!1},i={},r={light:!1,current:!1,scrollbar:!0,all:{},phase:!0,css3:window.nchcss3,hash:"",isTouchDevice:!1,ns:t({}),event:{trigger:function(){r.ns.trigger.apply(r.ns,arguments)},on:function(){r.ns.on.apply(r.ns,arguments)},off:function(){r.ns.off.apply(r.ns,arguments)}},canFS:!1,onload:!1},n={},s={open:function(t){t.group.main.fadeIn(300)},close:function(t){var e;t.main.fadeOut(300),u.pause(!1);for(var o in t.set)(e=t.set[o].thumb)&&(e.className="")},slideOut:function(t,a){var i=u.getFX(t.opts.effect,t),n=t.group,s=n.css3,l=n.blocks.preview,c=r.phase?-1:1,h=i(0,0,0,1)!==e;i(s,c,!0),l.stop().animate({scrollLeft:function(t){return(h?i(0,0,0,t):t)+r.wsize}(-c*r.wsize)},{duration:o.fxspeed,complete:function(){n.blocks.media.css("visibility","hidden"),i(s,0),a()}}),t.thumb!==e&&(t.thumb.className="")},slideIn:function(t,a){a=a===e?function(){}:a;var i=u.getFX(t.opts.effect,t),n=t.group,s=n.css3,l=n.blocks.preview,c=r.phase?1:-1,h=i(0,0,0,1)!==e,d=function(t){return(h?i(0,0,0,t):t)+r.wsize};i(s,c),n.blocks.media.css("visibility","visible"),s.el.offsetHeight,i(s,0,!0),n.blocks.media.css("visibility","visible"),l.stop().scrollLeft(d(-c*r.wsize)).animate({scrollLeft:d(0)},o.fxspeed,function(){l.scrollLeft(d(0))})}},l={youtube:{is:function(t){var e=t.opts.href.match(/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/);return!!e&&(t.opts.size||(t.opts.size=t.group.opts.size),t.opts.videoid=e[1],!0)},create:function(t){var e="rel=0";"true"==t.opts.related&&(e="rel=1");var o="&loop=0",a="";"true"==t.opts.loop&&(o="&loop=1",a="&playlist="+t.opts.videoid);var i="&autoplay=0";"true"==t.opts.videoplay&&(i="&autoplay=1");var r="&showinfo=0";"true"==t.opts.infobar&&(r="&showinfo=1");var n="&modestbranding=0";"true"==t.opts.modest&&(n="&modestbranding=1");var s="&mute=0";"true"==t.opts.mute&&(s="&mute=1");var l="&controls="+t.opts.controls,c="&autohide="+t.opts.autohide,h="&vq="+t.opts.quality,u="";""!=t.opts.start&&parseInt(t.opts.start)>0&&(u="&start="+t.opts.start);var d="";""!=t.opts.end&&parseInt(t.opts.end)>0&&parseInt(t.opts.end)>parseInt(t.opts.start)&&(d="&end="+t.opts.end);return"https:"==document.location.protocol&&"https:","video"==t.o
1pts.contenttype?'<iframe class="nch-lb-iframe nch-video-youtube" src="https://www.youtube.com/embed/'+t.opts.videoid+"?"+e+o+a+r+n+s+u+d+i+l+c+h+'&wmode=opaque" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen allow="autoplay; fullscreen"></iframe>':"playlist"==t.opts.contenttype?'<iframe class="nch-lb-iframe nch-video-youtube" src="https://www.youtube.com/embed?listType=playlist&list='+t.opts.listid+r+"&"+e+o+n+s+i+l+c+h+'&wmode=opaque" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen allow="autoplay; fullscreen"></iframe>':"searchterm"==t.opts.contenttype?'<iframe class="nch-lb-iframe nch-video-youtube" src="https://www.youtube.com/embed?listType=search&list='+t.opts.search+r+"&"+e+o+n+s+i+l+c+h+'&wmode=opaque" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen allow="autoplay; fullscreen"></iframe>':"combination"==t.opts.contenttype?'<iframe class="nch-lb-iframe nch-video-youtube" src="https://www.youtube.com/embed/'+t.opts.videofirst+"?playlist="+t.opts.videosother+r+"&"+e+o+n+s+i+l+c+h+'&wmode=opaque" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen allow="autoplay; fullscreen"></iframe>':"uploads"==t.opts.contenttype?'<iframe class="nch-lb-iframe nch-video-youtube" src="https://www.youtube.com/embed?listType=user_uploads&list='+t.opts.userid+r+"&"+e+o+n+s+i+l+c+h+'&wmode=opaque" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen allow="autoplay; fullscreen"></iframe>':""},thumb:function(t,e){u.loadThumb.call(t,t.opts.src="https://img.youtube.com/vi/"+t.opts.videoid+"/hqdefault.jpg",e)},video:!0},vimeo:{is:function(t){var e=t.opts.href.match(/(http|https):\/\/(?:www.)?(?:(vimeo).com)\/(.*)/);return!!e&&(t.opts.videoid=e[3],t.opts.size||(t.opts.size=t.group.opts.size),!0)},create:function(t){var e="autoplay=0";"true"==t.opts.videoplay&&(e="autoplay=1");var o="&loop=0";"true"==t.opts.loop&&(o="&loop=1");var a="&muted=0";return"true"==t.opts.mute&&(a="&muted=1"),'<iframe class="nch-lb-iframe nch-video-vimeo" src="https://player.vimeo.com/video/'+t.opts.videoid+"?"+e+o+a+'&autopause=0&wmode=opaque" width="500" height="500" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allow="autoplay; fullscreen"></iframe>'},thumb:function(e,o){t.getJSON("https://vimeo.com/api/v2/video/"+e.opts.videoid+".json?callback=?",{format:"json"},function(t){u.loadThumb.call(e,e.opts.src=t[0].thumbnail_large,o)})},video:!0},dailymotion:{is:function(t){var o=t.opts.href.match(/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/);return null!==o&&(o[4]!==e?t.opts.videoid=o[4]:t.opts.videoid=o[2],t.opts.size||(t.opts.size=t.group.opts.size),!0)},create:function(t){var e="autoplay=0";"true"==t.opts.videoplay&&(e="autoplay=1");var o="&related=0";return"true"==t.opts.related&&(o="&related=1"),'<iframe class="nch-lb-iframe nch-video-dailymotion" src="https://www.dailymotion.com/embed/video/'+t.opts.videoid+"?"+e+o+'&forcedQuality=hq&wmode=opaque" width="500" height="500" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allow="autoplay; fullscreen"></iframe>'},thumb:function(t,e){u.loadThumb.call(t,t.opts.src="https://www.dailymotion.com/thumbnail/video/"+t.opts.videoid,e)},video:!0},facebook:{is:function(t){t.opts.href=t.opts.href.replace(/\/$/,"");var e=t.opts.href.match(/(http|https):\/\/(?:www.)?(?:(facebook).com)\/(.*)/);return null!==e&&(t.opts.videoid=e[3].split("/").pop(),t.opts.size||(t.opts.size=t.group.opts.size),!0)},create:function(t){var e="&autoplay=false";"true"==t.opts.videoplay&&(e="&autoplay=true");var o="&show_text=false";"true"==t.opts.showtext&&(o="&show_text=true");var a="&show_captions=false";"true"==t.opts.showcaptions&&(a="&show_captions=true");var i="&allowfullscreen=false";"true"==t.opts.allowfullscreen&&(i="&allowfullscreen=true");var r="&appId";return""!=t.opts.appid&&(r="&appId="+t.opts.appid),'<iframe class="nch-lb-iframe nch-video-facebook" src="https://www.facebook.com/plugins/video.php?href='+t.opts.href+e+o+a+i+r+'&wmode=opaque" width="500" height="500" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allow="autoplay; fullscreen"></iframe>'},thumb:function(t,e){u.loadThumb.call(t,t.opts.src="https://graph.facebook.com/"+t.opts.videoid+"/picture",e)},video:!0},html:{is:function(t){return t.opts.href=t.opts.href.replace(window.location,""),"#"==t.opts.href.charAt(0)||"."==t.opts.href.charAt(0)},create:function(e){return t(e.opts.href).removeClass("ts-modal-outside-screen"),t(e.opts.href).attr("data-style")&&t(e.opts.href).attr("style",t(e.opts.href).attr("data-style")).removeAttr("data-style"),t(e.opts.href).show().get(0)}},video:{is:function(){return!0},create:function(t){var e='data-videoid="'+t.opts.videoid+'" data-videotheme="'+t.opts.videotheme+'" data-videoholder="'+t.opts.videoholder+'"';return e+='data-videoautoplay="'+t.opts.videoautoplay+'" data-videoautostop="'+t.opts.videoautostop+'" data-videomobile="'+t.opts.videomobile+'" data-videorepeat="'+t.opts.videorepeat+'"',e+='data-videofullscreen="'+t.opts.videofullscreen+'" data-videoposter="'+t.opts.videoposter+'" data-videoposterfit="'+t.opts.videoposterfit+'"',e+='data-videotitle="'+t.opts.videotitle+'" data-videoobjectfit="'+t.opts.videoobjectfit+'"',e+='data-logoshow="'+t.opts.logoshow+'" data-logoimage="'+t.opts.logoimage+'" data-logoheight="'+t.opts.logoheight+'" data-logoopacity="'+t.opts.logoopacity+'" data-logoposition="'+t.opts.logoposition+'" data-logourl="'+t.opts.logourl+'" data-logotitle="'+t.opts.logotitle+'" data-logotarget="'+t.opts.logotarget+'"',e+='data-videomp4="'+t.opts.videomp4+'" data-videowebm="'+t.opts.videowebm+'" data-videoogg="'+t.opts.videoogg+'"',e+='data-videovolume="'+t.opts.videovolume
1+'" data-videolightbox="'+t.opts.videolightbox+'" data-videoshare="'+t.opts.videoshare+'" data-videofallback="'+t.opts.videofallback+'" data-videoscreensize="'+t.opts.videoscreensize+'"',e+='width="100%" height="auto" scrolling="no" frameborder="0" type="text/html" mozallowfullscreen="mozallowfullscreen webkitallowfullscreen="webkitallowfullscreen" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen"','<iframe id="'+t.opts.videoholder+'" class="nch-lb-iframe nch-video-html5" src="'+t.opts.href+'?wmode=opaque" '+e+"></iframe>"},thumb:function(t,e){u.loadThumb.call(t,t.opts.src=t.opts.videoposter,e)},video:!0},audio:{is:function(){return!0},create:function(t){var e='data-audioid="'+t.opts.audioid+'" data-audiotheme="'+t.opts.audiotheme+'" data-audiobaronly="'+t.opts.audiobaronly+'" data-audiobarwidth="'+t.opts.audiobarwidth+'" data-audioholder="'+t.opts.audioholder+'"';return e+='data-audioautoplay="'+t.opts.audioautoplay+'" data-audioautostop="'+t.opts.audioautostop+'" data-audiorepeat="'+t.opts.audiorepeat+'"',"true"==t.opts.audiobaronly?e+='data-audiofullscreen="'+t.opts.audiofullscreen+'" data-audioposter="" data-audioposterfit="'+t.opts.audioposterfit+'"':e+='data-audiofullscreen="'+t.opts.audiofullscreen+'" data-audioposter="'+t.opts.audioposter+'" data-audioposterfit="'+t.opts.audioposterfit+'"',e+='data-audiotitle="'+t.opts.audiotitle+'" data-audioobjectfit="'+t.opts.audioobjectfit+'"',e+='data-logoshow="'+t.opts.logoshow+'" data-logoimage="'+t.opts.logoimage+'" data-logoheight="'+t.opts.logoheight+'" data-logoopacity="'+t.opts.logoopacity+'" data-logoposition="'+t.opts.logoposition+'" data-logourl="'+t.opts.logourl+'" data-logotitle="'+t.opts.logotitle+'" data-logotarget="'+t.opts.logotarget+'"',e+='data-audiomp4="'+t.opts.audiomp4+'" data-audiowebm="'+t.opts.audiowebm+'" data-audioogg="'+t.opts.audioogg+'"',e+='data-audiovolume="'+t.opts.audiovolume+'" data-audiolightbox="'+t.opts.audiolightbox+'" data-audioshare="'+t.opts.audioshare+'" data-audiofallback="'+t.opts.audiofallback+'" data-audioscreensize="'+t.opts.audioscreensize+'"',"true"==t.opts.audiobaronly?e+='width="100%" height="38px" style="width: 100%; max-height: 38px; max-width: '+t.opts.audiobarwidth+'px; padding-bottom: 0; padding-top: 0;" scrolling="no" frameborder="0" type="text/html" mozallowfullscreen="mozallowfullscreen webkitallowfullscreen="webkitallowfullscreen" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen"':e+='width="100%" height="auto" style="width: 100%; height: auto;" scrolling="no" frameborder="0" type="text/html" mozallowfullscreen="mozallowfullscreen webkitallowfullscreen="webkitallowfullscreen" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen"','<iframe id="'+t.opts.videoholder+'" class="nch-lb-iframe nch-audio-html5" src="'+t.opts.href+'" '+e+"></iframe>"},thumb:function(t,e){u.loadThumb.call(t,t.opts.src=t.opts.audioposter,e)},audio:!0},plyr:{is:function(t){return t.opts.href=t.opts.href.replace(window.location,""),"#"==t.opts.href.charAt(0)||"."==t.opts.href.charAt(0)},create:function(e){var o=t(e.opts.href).show().get(0),a="";return a+='<div id="'+e.opts.baseid+'-container" class="ts-plyr-player-container ts-plyr-player-lightbox">',a+='<div id="'+e.opts.baseid+'-wrapper" class="ts-plyr-player-wrapper">',a+='<video poster="'+e.opts.videoposter+'" crossorigin playsinline controls '+("true"==e.opts.muted?"muted":"")+">",""!=e.opts.videomp4&&(a+='<source src="'+e.opts.videomp4+'" type="video/mp4">'),""!=e.opts.videowebm&&(a+='<source src="'+e.opts.videowebm+'" type="video/webm">'),""!=e.opts.videoogv&&(a+='<source src="'+e.opts.videoogv+'" type="video/ogv">'),a+="</video>",a+="</div>",a+="</div> ",jQuery(a).appendTo(o)},thumb:function(t,e){u.loadThumb.call(t,t.opts.src=t.opts.thumbnail,e)},video:!0},ajax:{is:function(t){return t.opts.href.search(/^https?:\/\//i)<0},create:function(e,o){t.ajax({url:e.opts.href,success:o})}},iframe:{is:function(){return!0},create:function(t){return'<iframe class="nch-lb-iframe" src="'+t.opts.href+'" frameBorder="0" scrolling="yes"></iframe>'}}},c={init:function(i){var n=arguments,s=t(this);if(0==s.length){if(i===e)return s;i.length===e&&1==n.length?t.extend(o,i):(s=u.setFrom.apply(this,[i.charAt!==e?[i]:i,n[1]||{}]),(n[1]||{}).open===e&&c.open.call(s))}else i=i||{},s.each(function(o,n){var s,l=t(n),c=l.is("img")?l:t("img",l);if("true"==l.attr("data-lightbox-init"))return!0;
1if(s=t.extend({},a,u.getDataProperties(l,{rel:"rel",title:"title",href:"href"})),c.length>0?(s.src=c.attr("src"),void 0!==l.attr("data-thumbnail")&&""!=l.attr("data-thumbnail")?s.thumbnail=l.attr("data-thumbnail"):s.thumbnail=""):void 0!==l.attr("data-thumbnail")&&""!=l.attr("data-thumbnail")&&(s.src=l.attr("data-thumbnail"),s.thumbnail=l.attr("data-thumbnail")),l.attr("data-lightbox-init","true"),(l.is("a")||0==c.length)&&(c=l),s.rel)r.all[s.rel]===e&&(r.all[s.rel]=new u.mediaGroup(i,s.rel)),r.all[s.rel].add(c,s);else{var h=new u.mediaGroup(i);h.add(c,s),r.all[h.name]=h}});for(var l in r.all)void 0!=typeof r.all[l]&&void 0!==r.all[l]&&u.renderGrid(r.all[l]);return s},open:function(a){var i,n=t(this);if(a!==e&&r.all[a]!==e&&(i=r.all[a].set[0]),n.data("nch-lb-media")!==e)i=n.data("nch-lb-media");else if(this.jquery)return c.init.apply(this,arguments),c.open.call(this);i&&(r.event.trigger("open",[i.group,i]),r.hash="#"+o.hashpath+i.opts.hash,"false"==i.opts.nohashes||0==i.opts.nohashes?window.location.hash=r.hash:"true"==i.opts.nohashes||1==i.opts.nohashes?o.nohashes=!0:o.nohashes||(window.location.hash=r.hash)),r.scrollpos=r.w.scrollTop(),r.doc.addClass("kraut-lb-noscroll"),r.doc.addClass("kraut-lb-opened").removeClass("kraut-lb-closed"),void 0!=i&&"undefined"!=i&&jQuery(window).trigger("opennacho",i)},next:function(t){if(r.current){var a=r.current,i=a.set.length,n=a.current,s=a.set[n+1==i?0:n+1];1!=i&&(r.hash="#"+o.hashpath+s.opts.hash,"false"==s.opts.nohashes||0==s.opts.nohashes?window.location.hash=r.hash:"true"==s.opts.nohashes||1==s.opts.nohashes?o.nohashes=!0:o.nohashes||(window.location.hash=r.hash),u.closeShare(),u.pause(t===e),r.phase=!0,r.event.trigger("next",[r.current,s]))}},previous:function(){if(r.current){var t=r.current,e=t.set.length,a=t.current,i=t.set[0==a?e-1:a-1];1!=e&&(r.hash="#"+o.hashpath+i.opts.hash,"false"==i.opts.nohashes||0==i.opts.nohashes?window.location.hash=r.hash:"true"==i.opts.nohashes||1==i.opts.nohashes?o.nohashes=!0:o.nohashes||(window.location.hash=r.hash),u.pause(!1),r.phase=!1,r.event.trigger("previous",[r.current,i]))}},close:function(){if(r.current){var t=r.current,e=t.about,o=t.main,a="nch-lb-zooming",i=t.set[t.current],n=t.opts;o.hasClass(a)?(r.zooming=!1,u.updateMediaLayout(i),t.blocks.zoom.find(".nch-lb-zoom-container").remove(),o.toggleClass(a)):e?u.toggleInfo(!e):(r.hash="",window.location.hash="",history&&history.pushState&&history.pushState("",document.title,window.location.pathname+window.location.search),t.playing&&c.stop(),"bottom"==n.thumbs||"top"==n.thumbs?t.blocks.thumbs.css({left:0}):"left"!=n.thumbs&&"right"!=n.thumbs||t.blocks.thumbs.css({top:0}),o.removeClass("nch-lb-paused").removeClass("nch-lb-playing"),u.fs.on&&u.fs.toggle(),u.closeShare(),u.detachMedia(t.set[t.current]),t.paused=!1,r.event.trigger("close",t),s.close(t),r.current=t.current=!1,r.doc.removeClass("kraut-lb-noscroll"),r.doc.removeClass("kraut-lb-opened").addClass("kraut-lb-closed"),"none"!=$TS_VCSC_Lightbox_ScrollBlock&&window.setTimeout(function(){r.w.scrollTop(r.scrollpos)},10))}},fx:function(o,a){a===e?t.extend(n,o):n[o]=a},access:function(t,o){return t!==e&&(u[t]=o),u},play:function(t){var o=r.current,a=o.opts,i=o.main,n=o.blocks.loading,s=o.playing,l=a.duration;return!!a.play&&(t===e&&s?s:(i.toggleClass("nch-lb-playing"),s?n.stop():n.animate({width:i.width()},{easing:"linear",duration:(1-n.width()/i.width())*l,complete:function(){o.paused=!0,c.next()}}),!1!==t&&r.event.trigger(s?"stop":"play",o),o.playing=!s))},stop:function(){return r.current.playing&&c.play(!0),!0},info:function(){if(r.current)return u.toggleInfo.apply({},arguments)},addEvent:function(t,e){r.event.on(t,e)},removeEvent:function(t,e){r.event.off(t,e)},getGroupName:function(){var o,a=t(this);return a.length>0&&((o=t(a.get(0)).data("nch-lb-media"))!==e&&o.group.name)},getMediaId:function(){var o,a=t(this);return a.length>0&&((o=t(a.get(0)).data("nch-lb-media"))!==e&&o.opts.hash)}},h="",u={toggleInfo:function(t){var o=r.current,a=o.blocks,i=a.info.children(".nch-lb-info-panel");return t!==e&&o.about==t?t:(a.info["fade"+(o.about?"Out":"In")](400),i.append(o.info.show()),r.event.trigger((o.about?"close":"open")+"_info",[o]),o.about=!o.about)},selectThumb:function(o){var a,i=o.thumb,n=o.group,s=n.blocks,l=s.bthumbs,c=s.thumbs,h=0,d=t(i),p=d.parent(),g=p.prev().find("img").get(0),f=p.next().find("img").get(0);if(i===e||!n.opts.thumbs)return!1;void 0!=g&&"undefined"!=g||void 0!=f&&"undefined"!=f||c.hasClass("nch-lb-thumbs-loaded")||window.setTimeout(function(){return u.selectThumb(o),!1},250);for(var m in n.set)n.set[m].thumb&&(n.set[m].thumb.className="");i.className="nch-lb-thumb-s";var b,v,w,y=n.opts,_={top:1,bottom:1,left:0,right:0}
1[y.thumbs],x=l[_?"width":"height"](),S=_?"left":"top",C="offset"+(_?"Width":"Height"),k={};c.stop(),w=d.position()[S],"bottom"==y.thumbs||"top"==y.thumbs?(h=r.current?r.current.blocks.thumbs.position().left:c.position().left,v="left"):"left"!=y.thumbs&&"right"!=y.thumbs||(h=r.current?r.current.blocks.thumbs.position().top:c.position().top,v="top");var T=w-4,j=w+(b=i[C])+4;g!==e&&(T-=g[C]+4),f!==e&&(j+=f[C]+4),("bottom"==y.thumbs||"top"==y.thumbs)&&w<d.width()?a=0:("left"==y.thumbs||"right"==y.thumbs)&&w<d.height()?a=0:j-T>x?a=-(w+i[C]/2-x/2):T<h?a=-T:j-x>h&&(a=-(j-x)),("bottom"==y.thumbs||"top"==y.thumbs)&&a>0?a=0:("left"==y.thumbs||"right"==y.thumbs)&&a>0&&(a=0),void 0!=a&&"undefined"!=a&&(k[v]=a),y.perfectscroll&&t.isFunction(t.fn.perfectScrollbar)?void 0!=a&&"undefined"!=a&&("left"==v?l.scrollLeft(Math.abs(a)):"top"==v&&l.scrollTop(Math.abs(a)),l.perfectScrollbar("update")):c.stop().animate(k,250),t(window).off("resize.krautlightbox-selectthumb").on("resize.krautlightbox-selectthumb",function(){r.doc.hasClass("kraut-lb-opened")&&u.selectThumb(o)})},wheelThumbs:function(t,e){if(!r.current)return!1;var o,a,i,n,s,l,c,h,u,d,p,g,f,m,b,v,w=r.current,y=w.opts,_=y.thumbs;w&&_&&"none"!=_&&(o=w.blocks.thumbs).on("wheel mousewheel DOMMouseScroll",function(t){if(t.preventDefault(),0==Math.abs(t.originalEvent.deltaX)){if(o.stop(),t.originalEvent.deltaY<0?(a="up",e=-1):(a="down",e=1),i=t.originalEvent.deltaY,u=w.blocks.bthumbs[0].clientWidth,h=w.blocks.thumbs[0].clientWidth,d=h-u,p=w.blocks.thumbs.position().left,s=w.blocks.bthumbs[0].clientHeight,n=w.blocks.thumbs[0].clientHeight,l=n-s,c=w.blocks.thumbs.position().top,g=w.blocks.thumbs[0].childElementCount,"bottom"==y.thumbs||"top"==y.thumbs){if(f=h/g,m=s,b=u/f,(v=Math.round(.66*u))<2*f&&(v=2*f),"up"==a){if(p==-d||p<-d)return!1;v=Math.abs(p)+Math.abs(v)>d?e*d:e*(Math.abs(p)+v)}else if("down"==a){if(0==p||p>0)return!1;v=p+v>0?0:e*(p+v)}}else if("left"==y.thumbs||"right"==y.thumbs)if(f=u,m=n/g,b=s/m,(v=Math.round(.66*s))<2*m&&(v=2*m),"up"==a){if(c==-l||c<-l)return!1;v=Math.abs(c)+Math.abs(v)>l?e*l:e*(Math.abs(c)+v)}else if("down"==a){if(0==c||c>0)return!1;v=c+v>0?0:e*(c+v)}"bottom"==y.thumbs||"top"==y.thumbs?o.stop().animate({left:v},250):"left"!=y.thumbs&&"right"!=y.thumbs||o.stop().animate({top:v},250)}})},swipeThumbs:function(t){if(!r.current)return!1;var e,o,a,i,n,s,l,c,h,u,d,p,g,f,m,b=r.current,v=b.opts,w=v.thumbs;if(!b||!w||"none"==w)return!1;if(a=t.direction,!("bottom"!=v.thumbs&&"top"!=v.thumbs||"swipeup"!=t.type&&"swipedown"!=t.type))return!1;if(!("left"!=v.thumbs&&"right"!=v.thumbs||"swipeleft"!=t.type&&"swiperight"!=t.type))return!1;if(""==t.type||null==t.type||void 0==t.type||"undefined"==t.type)return!1;if("left"==a||"up"==a?o=-1:"right"!=a&&"down"!=a||(o=1),t.distance,(e=b.blocks.thumbs).stop(),h=b.blocks.bthumbs[0].clientWidth,c=b.blocks.thumbs[0].clientWidth,u=c-h,d=b.blocks.thumbs.position().left,n=b.blocks.bthumbs[0].clientHeight,i=b.blocks.thumbs[0].clientHeight,s=i-n,l=b.blocks.thumbs.position().top,p=b.blocks.thumbs[0].childElementCount,"bottom"==v.thumbs||"top"==v.thumbs){if(g=c/p,f=n,h/g,(m=Math.round(.66*h))<2*g&&(m=2*g),"left"==a){if(d==-u||d<-u)return!1;m=Math.abs(d)+Math.abs(m)>u?o*u:o*(Math.abs(d)+m)}else if("right"==a){if(0==d||d>0)return!1;m=d+m>0?0:o*(d+m)}}else if("left"==v.thumbs||"right"==v.thumbs)if(g=h,f=i/p,n/f,(m=Math.round(.66*n))<2*f&&(m=2*f),"up"==a){if(l==-s||l<-s)return!1;m=Math.abs(l)+Math.abs(m)>s?o*s:o*(Math.abs(l)+m)}else if("down"==a){if(0==l||l>0)return!1;m=l+m>0?0:o*(l+m)}"bottom"==v.thumbs||"top"==v.thumbs?e.stop().animate({left:m},250):"left"!=v.thumbs&&"right"!=v.thumbs||e.stop().animate({top:m},250)},scrollThumbs:function(t,e){var o=r.current,a=o.opts.thumbs;o&&a&&"none"!=a&&o.blocks.bthumbs.perfectScrollbar({wheelSpeed:1,useBothWheelAxes:!0,wheelPropagation:!1,swipePropagation:!1,suppressScrollX:"left"==a||"right"==a,suppressScrollY:"bottom"==a||"top"==a,scrollXMarginOffset:10,scrollYMarginOffset:10})},toggleThumbs:function(t){var e=r.current,o=e.main,a=e.opts.thumbs,i=0,n={};o.hasClass("nch-lb-thumbs-hide")?i=0:"top"==a||"bottom"==a?i=e.blocks.bthumbs.outerHeight(!0):"left"!=a&&"right"!=a||(i=e.blocks.bthumbs.outerWidth(!0)),n[a]=-i+"px",e.blocks.bthumbs.animate(n,250,function(){o.toggleClass("nch-lb-thumbs-hide"),u.updateLayout()})},swipeGesture:function(a){function i(t){if(!(l=t.gesture))return!1;h=l.deltaX,((d=Math.abs(h))>25||g)&&(g=!0,p.stop().scrollLeft(y(-h)),v(b,h/r.wsize))}function n(t){var e=r.current.set.length,a=r.current.current;d>f&&e>1&&("linear"==r.current.opts.mode?!(0==a&&h/d>0||a==e-1&&h/d<0):1)?(s=h>0?0:2*r.wsize,p.animate({scrollLeft:y(s-r.wsize)},o.fxspeed,function(){c[h/d<0?"next":"previous"](!0)}),v(b,h/d,!0)):(p.stop().animate({scrollLeft:y(0)},o.fxspeed),v(b,0,!0)),1==$TS_VCSC_Hammer_ReleaseNew?p.off("pan",i).off("panend release",n):p.off("drag",i).off("dragend",n)}if(a.gesture===e)return!1;if(r.isTouchDevice||(r.isTouchDevice=!(a.gesture.srcEvent.changedTouches===e)),r.zooming||!r.current||a.gesture===e)return!0;var s,l,h,d,p=t(this),g=(t(a.target),a.timeStamp,!1),f=r.wsize/3,m=r.current,b=m.css3,v=u.getFX(m.set[m.current].opts.effect,m.set[m.current]),w=v(0,0,0,1)!==e,y=function(t){return(w?v(0,0,0,t):t)+r.wsize};return a.gesture,1==$TS_VCSC_Hammer_ReleaseNew?p.on("pan",i).on("panend release",n):p.on("drag",i).on("dragend",n),!1},useTouch:function(t){1==$TS_VCSC_Hammer_ReleaseNew?t.hammer({prevent_default:!0}).on("swipeleft swiperight",u.swipeGesture):t.hammer({prevent_default:!0}).on("dragstart",u.swipeGesture)},disableTouch:function(t){1==$TS_VCSC_Hammer_ReleaseNew?t.hammer({prevent_default:!1}).off("swipeleft swiperight",u.swipeGesture):t.hammer({prevent_default:!1}).off("dragstart",u.swipeGesture)},pause:function(t){r.current.playing&&!r.current.paused&&(!0!==t&&"mouseover"!=t.type||(r.current.paused=!0,r.current.main.addClass("nch-lb-paused"),c.play(!1)))},resume:function(t){!r.current.playing&&r.current.paused&&(c.play(!1),r.current.paused=!1,r.current.main.removeClass("nch-lb-paused"))},openShare:function(e){if(r.current){var o,a=r.current,i=a.current,n=a.set[i];"nch-lb-icon-share"==e.target.className?n.share&&"block"==n.share.css("display")?(n.share.hide(),a.main.removeClass("nch-lb-sh
1aring")):(a.main.addClass("nch-lb-sharing"),n.share||(n.share=o=t('<div class="nch-lb-share-btns"></div>').appendTo(t("li.nch-lb-share",a.blocks.menu)),u.shareButtons(o,a.opts.social,u.getMediaProperties(n))),n.share.show()):n.share&&(n.share.hide(),a.main.removeClass("nch-lb-sharing"))}},closeShare:function(t){if(r.current){var e=r.current,o=e.current,a=e.set[o];a.share&&(a.share.hide(),e.main.removeClass("nch-lb-sharing"))}},renderGrid:function(o){var a,i,r,n,s=o.opts,l=o.set,h=!1,d=[];if(s.grid&&!o.hasGrid&&""!==s.grid){o.hasGrid=!0;var p=[],g=0,f=s.random;a=s.grid.toString().indexOf(",")>-1?s.grid.split(","):t.makeArray(s.grid);for(var m in a)a[m]=parseInt(a[m]);u.need(o.set,u.getPreview,function(){for(var o in l)if(l[o].preview!==e&&(i=l[o].main.hide(),h||(h=i),"true"==l[o].opts.include)){if(r=t(l[o].preview).clone(!0).data("nch-lb-media",l[o]).click(c.open).get(0),r.title=l[o].opts.title?l[o].opts.title:"",r.alt=l[o].opts.alt?l[o].opts.alt:"",r.groups=l[o].opts.groups?l[o].opts.groups:"",r.thumbnail=l[o].opts.thumbnail?l[o].opts.thumbnail:"",r.preview=l[o].opts.preview?l[o].opts.preview:"",r.hover=l[o].opts.hover?l[o].opts.hover:"",""!=r.groups){r.groups.split(",").forEach(function(e){t.inArray(e,p)<0&&p.push(e)})}else g++;d.push(r)}if(p.length>0&&"true"==s.gridfilter){p.sort();t('<div id="nch-lb-toggle-'+f+'" class="nch-lb-toggle '+s.gridtogglestyle+'" data-grid="nch-lb-grid-'+f+'" data-filter="nch-lb-filter-'+f+'" data-showall="nch-lb-showall-'+f+'" data-random="'+f+'">'+s.gridtoggle+"</div>").insertBefore(h),t('<div id="nch-lb-showall-'+f+'" class="nch-lb-showall '+s.gridshowallstyle+'" data-grid="nch-lb-grid-'+f+'" data-filter="nch-lb-filter-'+f+'" data-random="'+f+'">'+s.gridshowall+"</div>").insertBefore(h);var u=t('<select id="nch-lb-filter-'+f+'" class="nch-lb-filter" data-grid="nch-lb-grid-'+f+'" data-toggle="nch-lb-toggle-'+f+'" data-showall="nch-lb-showall-'+f+'" data-random="'+f+'" multiple="multiple"></select>').insertBefore(h);p.forEach(function(e){t('<option value="'+e+'">'+e+"</option>").appendTo(u)}),g>0&&t('<option value="NoGroups">'+s.gridnogroups+"</option>").appendTo(u)}t('<div id="nch-lb-grid-'+f+'" class="nch-lb-grid" data-filter="nch-lb-filter-'+f+'" data-toggle="nch-lb-toggle-'+f+'" data-random="'+f+'"></div>').insertAfter(h).append(n=t(d)),n.nchgrid({grid:a,margin:parseInt(s.gridspace),order:"true"==s.gridorder,captions:"true"==s.captions,linkGrid:!1,preloader:"true"==s.gridpreloader,filter:"true"==s.gridfilter,random:s.random,selector:"nch-lb-filter-"+f,toggle:"nch-lb-toggle-"+f,showall:"nch-lb-showall-"+f,textAvailable:s.gridavailable,textSelected:s.gridselected,textNoGroups:s.gridnogroups,textToggle:s.gridtoggle,textToggleStyle:s.gridtogglestyle,textShowAll:s.gridshowall,textShowAllStyle:s.gridshowallstyle})})}},parseColor:function(t){for(var e,o=(t+"").split(/bg|\_|\-|\.|\&|\#/),a=0;a<o.length;a++)if((6==(e=o[a].length)||3==e)&&new RegExp("[a-f0-9]{"+e+"}").test(o[a]))return"#"+o[a];return!1},toggleZoom:function(){var e=r.current,o=e.main,a="nch-lb-zooming",i=e.set[e.current];i.nsize;if(o.hasClass(a))r.zooming=!1,u.updateMediaLayout(i),t.isFunction(t.fn.perfectScrollbar)?e.blocks.zoom.find(".nch-lb-zoom-container").perfectScrollbar("destroy").remove():e.blocks.zoom.find(".nch-lb-zoom-container").remove();else{r.zooming=!0;var n,s=new Image;s.onload=function(){n=u.pinch.call(t(s),"100%","100%").css({position:"absolute"}).addClass("nch-lb-zoom-container"),e.blocks.zoom.append(n),t.isFunction(t.fn.perfectScrollbar)&&n.perfectScrollbar({wheelSpeed:1,useBothWheelAxes:!1,wheelPropagation:!1,swipePropagation:!1,scrollXMarginOffset:10,scrollYMarginOffset:10})},s.src=i.target.src}o.toggleClass(a)},saveImage:function(){var e=r.current,o=e.main,a=e.set[e.current],i=o.find(".nch-lb-media-save"),n=a.target.src.split(/[\\\/]/).pop();0===i.length&&(i=t('<a class="nch-lb-media-save nch-lb-icon-save" href="javascript:void(0)" target="_blank"></a>').appendTo(o)),u.checkImageURL(a.target.src)&&(i.attr("href",a.target.src),i.attr("download",n)),setTimeout(function(){""!=i.attr("href")&&"#"!=i.attr("href")&&i[0].click(),i.attr("href","javascript:void(0)"),i.removeAttr("download")},50)},getMediaProperties:function(t){var e=t.opts,o=e.type,a={title:e.title||document.title,media:"html"!=o&&"ajax"!=o&&"video"!=o&&"audio"!=o&&"facebook"!=o&&"plyr"!=o?"image"==o||"iframe"==o?t.target.src:e.href:""};return a.url=l[o]&&(l[o].video||l[o].audio)||"iframe"==o?a.media:window.location.href,a},detachMedia:function(e){if(void 0!=e&&"undefined"!=e&&null!=e){if(e.hasOwnProperty("group")){var o=e.group.main;t(".nch-lb-title",o).each(function(){t(this).html("")})}e.hasOwnProperty("target")&&!1!==e.target&&!0!==e.target&&null!=e.target&&t(e.target).detach()}},getInnerHeight:function(t,e){t.css({width:e,height:"auto"});var o=t[0].scrollHeight;return t.css({height:"auto"}),o},getInnerWidth:function(t,e){t.css({height:e,width:1});var o=t[0].scrollWidth;return t.css({width:"auto"}),o},renderMedia:function(e){function o(o){e.html=o,e.target=t(o)[0],a()}function a(){p.attr("class","nch-lb-media").addClass("nch-lb-media-"+g.type).append(e.target),"audio"==g.type&&"true"==g.audiobaronly&&p.addClass("nch-lb-media-audiobaronly"),s.paused&&(c.play(!1),c.play(!1),s.paused=!1),u.updateMediaLayout(e)}var i,n,s=r.current,h=s.main,d=s.blocks,p=d.media,g=e.opts,f=g.type;t(".nch-lb-title",h).each(function(){t(this).html(g.title)}),d.loading.width(0),e.target?a():(l[f]&&"plyr"!=f&&(l[f].video||l[f].audio)?(e.target=i=t(l[f].create(e)).get(0),n=function(){a(),this.onload&&(this.onload=function(){})},i.attachEvent?i.attachEvent("onload",n):i.onload=n,r.root.append(i)):"iframe"==f?(e.target=i=t(l[f].create(e)).get(0),a()):"html"!=f&&"ajax"!=f&&"plyr"!=f||("html"==f||"plyr"==f?o(l[f].create(e)):l[f].create(e,o)),"plyr"==f&&new Plyr(jQuery("#"+e.opts.basei
1d+"-wrapper").find("video"),{autoplay:"true"==e.opts.videoplay,autopause:!0,loop:{active:"true"==e.opts.loop},storage:{enabled:"true"==e.opts.storage,key:"ts-plyr-token"},muted:"true"==e.opts.muted,volume:parseInt(e.opts.volume),hideControls:"true"==e.opts.hidecontrols,showPosterOnEnd:"true"==e.opts.showposterend,disableContextMenu:"true"==e.opts.hidecontext,tooltips:{controls:"true"==e.opts.tooltips},i18n:{restart:e.opts.langrestart,rewind:e.opts.langrewind,play:e.opts.langplay,pause:e.opts.langpause,forward:e.opts.langforward,played:e.opts.langplayed,buffered:e.opts.langbuffered,currentTime:e.opts.langcurrenttime,duration:e.opts.langduration,volume:e.opts.langvolume,toggleMute:e.opts.langtogglemute,toggleCaptions:e.opts.langtogglecaptions,toggleFullscreen:e.opts.langtogglefullscreen,frameTitle:e.opts.langframetitle}}))},fitInto:function(t,e,o,a){var i,r,n=t/e;return o/a<n?r=(i=t<o?t:o)/n:i=(r=e<a?e:a)*n,[i,r]},updateMediaLayout:function(e){var o,a,i,n,s=!1,c=r.current,h=c.blocks,d=(h.preview,h.media),p=c.mspace.width,g=c.mspace.height,f=e.opts,m=f.type,b={top:0,left:0,width:0,height:0},v=e.nsize;if(r.zooming)return!0;if("image"!=m&&(v=e.nsize=e.group.opts.size.split(",")),i=u.fitInto(v[0],v[1],p,g),n=isNaN(f.width)||isNaN(f.height),"image"==m||l[m]&&(l[m].video||l[m].audio&&"false"==f.audiobaronly)){var w=v[0]/v[1];0==f.width&&0==f.height?(b.width=i[0],b.height=i[1]):0==f.height?(b.width=p<f.width?p:f.width,b.height=b.width/w>g?(b.width=g*w)/w:b.width/w):0==f.width?(b.height=g<f.height?g:f.height,b.width=b.height*w>p?(b.height=p/w)*w:b.height*w):n||(i=u.fitInto(f.width/1,f.height/1,p,g),b.width=i[0],b.height=i[1])}else"iframe"==m||l[m]&&l[m].audio&&"true"==f.audiobaronly?(0==f.width?b.width=p:n||(b.width=f.width>p?p:f.width),l[m]&&l[m].audio&&"true"==f.audiobaronly&&b.width>parseInt(f.audiobarwidth)&&(b.width=parseInt(f.audiobarwidth)),0==f.height?b.height=g:n||(b.height=f.height>g?g:f.height)):"html"!=m&&"ajax"!=m&&"plyr"!=m||e.target&&(s=!0,b.width||(f.width>0?b.width=f.width>p?p:f.width:f.height?b.width=parseInt(i[0])>p?p:parseInt(i[0]):b.width=Math.min(p,g)),b.height||f.height>0&&(b.height=f.height>g?g:f.height));if(n&&(f.width/1?b.width=f.width/1:f.height/1&&(b.height=f.height/1),o=isNaN(f.width)?parseFloat(f.width)/100*p:0,(a=isNaN(f.height)?parseFloat(f.height)/100*g:0)&&o?(a||(a=o/v[0]*v[1]),o||(o=a*v[0]/v[1]),i=u.fitInto(o,a,p,g),b.width=i[0],b.height=i[1]):a?o=b.width?b.width:a*v[0]/v[1]:o&&(a=b.height?b.height:o/v[0]*v[1]),i=u.fitInto(o,a,p,g),b.width=i[0],b.height=i[1]),s&&(t(e.target).addClass("nch-lb-fixed").width(b.width+"px"),b.width||(b.width=Math.min(u.getInnerWidth(t(e.target),b.height),p)),b.height||(b.height=Math.min(u.getInnerHeight(t(e.target),b.width),g)),t(e.target).removeClass("nch-lb-fixed").css("width","auto"),b.height>t(e.target).height()&&t(e.target).css("height","100%")),b.top=r.mposy=(g-b.height)/2,b.left=r.wsize+c.mspace.left+(p-b.width)/2,e.group.main[("image"==m&&(v[0]>b.width||v[1]>b.height)&&c.opts.zoom?"add":"remove")+"Class"]("nch-lb-can-zoom"),e.group.main[("image"==m&&c.opts.save?"add":"remove")+"Class"]("nch-lb-can-save"),d.css(b),"iframe"==m||l[m]&&(l[m].video||l[m].audio)){var y=t("iframe.nch-lb-iframe",d);isNaN(b.height)?y.height("100%"):y.height(b.height),isNaN(b.width)?y.width("100%"):y.width(b.width),l[m]&&l[m].audio&&"true"==f.audiobaronly&&y.css("max-width",f.audiobarwidth)}c.opts.notouch||("html"==m||"ajax"==m||"plyr"==m?c.hasGestures&&(u.disableTouch(h.preview),c.hasGestures=!1):c.hasGestures||(u.useTouch(h.preview),c.hasGestures=!0))},getMediaColor:function(t,e){var a=t.opts;return o.usecolor?e(o.backlight):a.color?e(a.color):void("image"==a.type&&r.hasCanvas?u.getMainColor(t.target,a,function(t){e("rgb("+t.join(",")+")")}):e(o.backlight))},enoughThumbs:function(t){for(var e=0,o=0;o<t.set.length;o++)t.set[o].opts.src&&e++;return e>1||(t.opts.thumbs=!1,!1)},toMedia:function(e){function o(){e.group.main&&e.group.blocks.media.css({width:0,height:0}),0==e.group.main&&(u.renderLayout(e.group),window.setTimeout(function(){u.selectThumb(e)},$TS_VCSC_Lightbox_FXSpeed)),r.current!==e.group?(r.current&&s.close(r.current.group),r.current=e.group,r.current.current=e.index,s.open(e)):n=e.group.current,u.updateLayout(),!1===i?i=!0:!0!==i&&i()}var a,i=!1,n=!1;if(r.current.current==e.index)return!1;c.open.call(e),r.onload&&(r.onload.onload=function(){},r.onload=!1),u.enoughThumbs(e.group),r.current&&r.current==e.group&&!1!==(n=r.current.current)&&(r.phase=n&&e.index||n+e.index!=e.group.set.length-1?n<e.index:n>e.index),e.group.main&&window.setTimeout(function(){u.selectThumb(e)},$TS_VCSC_Lightbox_FXSpeed),r.zooming&&u.toggleZoom(),r.current?s.slideOut(a=r.current.set[r.current.current],function(){u.detachMedia(a),o()}):o(),u.getMediaType(e,function(o){var a=function(){0!=r.current&&u.detachMedia(r.current.set[r.current.current]),function(o){e.opts.type=o,r.onload=!1,u.renderMedia(e),u.updateMediaLayout(e),"image"==e.opts.type?(void 0!=e.opts.share&&"undefined"!=e.opts.share||(e.opts.share=$TS_VCSC_Lightbox_Share),0==e.opts.share||0==e.opts.share||"false"==e.opts.share?t("li.nch-lb-sh
1are > .nch-lb-icon-share").hide():1!=e.opts.share&&1!=e.opts.share&&"true"!=e.opts.share||t("li.nch-lb-share > .nch-lb-icon-share").show()):void 0!=e.opts.share&&"undefined"!=e.opts.share?0==e.opts.share||0==e.opts.share||"false"==e.opts.share?t("li.nch-lb-share > .nch-lb-icon-share").hide():1!=e.opts.share&&1!=e.opts.share&&"true"!=e.opts.share||t("li.nch-lb-share > .nch-lb-icon-share").show():t("li.nch-lb-share > .nch-lb-icon-share").hide(),s.slideIn(e,function(){}),u.getMediaColor(e,function(t){function o(){u.light(e.opts.color)}e.opts.color=t,!1===r.light?r.event.on("maskload",o):o()}),r.current.current=e.index}(o)};!0===i?a():i=a})},renderLayout:function(e){var a,i=e.main=t('<div class="nch-lb-main"></div>').appendTo(r.b),n=e.opts,s="",l={};e.main.addClass("nch-lb-scheme-"+n.scheme),""==o.backlight&&e.main.addClass("nch-lb-no-backlight"),""!=n.overlay&&0!=n.overlay&&""!=n.repeat&&0!=n.repeat?""!=n.overlay&&0!=n.overlay?e.main.css("background",n.overlay+' url("'+n.background+'") '+n.repeat+" center center"):e.main.css("background",'#000000 url("'+n.background+'") '+n.repeat+" center center"):""!=n.overlay&&0!=n.overlay&&e.main.css("background",n.overlay),""!=n.noise&&0!=n.noise&&(e.noise=t('<div class="nch-lb-noise"></div>').appendTo(e.main),e.noise.css("background-image","url("+n.noise+")")),i.find(".nch-lb-media-save").remove(),n.save&&t('<a class="nch-lb-media-save nch-lb-icon-save" href="javascript:void(0) " target="_blank"></a>').appendTo(i);l.loadicon=t('<div class="nch-lb-media-loading"></div>').appendTo(i);n.info&&t("#"+n.info).length>0&&0==t("#"+n.info).text().length&&(t("#"+n.info).remove(),n.info=!1),r.canFS&&n.fullscreen&&(s+="nch-lb-can-fs "),n.share&&(s+="nch-lb-can-share "),n.save&&(s+="nch-lb-can-save "),n.play&&e.set.length>1&&(s+="nch-lb-can-play "),n.zoom&&(s+="nch-lb-can-zoom "),n.info&&(s+="nch-lb-has-info "),r.scrollbar||(s+="nch-lb-no-scrollbar "),n.thumbs&&(s+="nch-lb-position-"+e.opts.thumbs+" "),i.addClass(s);var h={left:"v",right:"v",top:"h",bottom:"h"},d={v:"width",h:"height"};if(r.asb){var p=l.asb=t('<div class="nch-lb-pngfix"></div>').appendTo(i);u.css3(p).transition("background-color 500ms linear")}n.info&&(e.info=(a=t("#"+n.info)).length?a:t("<div></div>"));var g,f=l.tbar=t('<div class="nch-lb-tbar"></div>').appendTo(i),m=t('<ul class="nch-lb-tbar-controls"></ul>'),b=l.bbar=t('<div class="nch-lb-bar"></div>
1').appendTo(i),v=l.controls=t('<ul class="nch-lb-controls"></ul>').appendTo(b),w={prev:"left",play:"play",next:"right",title:!1,exit:"exit",fs:"fs",info:"info",minis:"minis"},y={prev:"",play:"",next:"",title:"",exit:"",fs:"",info:"",minis:""};1==e.set.length&&i.addClass("nch-lb-no-more");for(var _ in w)v.append(g='<li class="nch-lb-'+_+'">'+(w[_]?'<div class="nch-lb-icon-'+w[_]+'">'+y[_]+"</div>":"")+"</li>"),"exit"!=_&&"title"!=_&&"info"!=_&&"fs"!=_&&"thumbs"!=_||m.append(g);if(n.thumbs){var x=l.thumbs=t('<ul class="nch-lb-thumbs"></ul>'),S=l.bthumbs=t('<div class="nch-lb-thumbs-bar"></div>').append(x);if(S.addClass("nch-lb-thumbs-"+n.thumbs).css(n.thumbs,0),x.addClass("nch-lb-thumbs-"+{v:"vertical",h:"horizontal"}[h[n.thumbs]]).css(d[h[n.thumbs]],n.thumbsize),"bottom"==n.thumbs||"top"==n.thumbs?x.css("left",0):"left"!=n.thumbs&&"right"!=n.thumbs||x.css("top",0),"bottom"==n.thumbs?b.append(S):"top"==n.thumbs?f.append(S):i.append(S),"v"==h[n.thumbs]){var C={left:"auto",right:"auto"};C["left"==n.thumbs?"right":"left"]=S[d[h[n.thumbs]]](),f.css(C),b.css(C)}}m.appendTo(f);var k,T=l.preview=t('<div class="nch-lb-media-space"></div>').appendTo(i);if(n.closer)l.scroller=t('<div class="nch-lb-media-scroller"></div>').appendTo(T).append(k=l.media=t('<div class="nch-lb-media"><div class="nch-lb-exit-inner"><div class="nch-lb-icon-exit"></div></div></div>'));else l.scroller=t('<div class="nch-lb-media-scroller"></div>').appendTo(T).append(k=l.media=t('<div class="nch-lb-media"></div>'));e.css3=u.css3(k);for(var j=l.menu=t('<ul class="nch-lb-photo-menu"></ul>').appendTo(k),L=["zoom","share","save"],z=["","",""],_=0;_<L.length;_++)j.append('<li class="nch-lb-'+L[_]+'"><div class="nch-lb-icon-'+L[_]+'">'+z[_]+"</li>");l.info=t('<div class="nch-lb-project"><div class="nch-lb-info-panel"><div class="nch-lb-icon-info">x</div></div></div>').appendTo(i),l.loading=t('<div class="nch-lb-loadbar"></div>').appendTo(i);k.on("mouseover",u.pause).on("mouseout",u.resume),e.blocks=l,n.thumbs&&u.need(e.set,u.getThumbnail,function(){u.renderThumbnails(e)});l.zoom=t('<div class="nch-lb-zoom-space"><div class="nch-lb-icon-zoom"></div></div>').appendTo(i);n.autoplay&&(e.playing=!0,e.paused=!0,i.addClass("nch-lb-playing")),t("li.nch-lb-prev",v).click(c.previous),t("li.nch-lb-next",v).click(c.next),t("li.nch-lb-play",v).click(c.play),t("div.nch-lb-icon-fs",i).each(function(){t(this).click(u.fs.toggle)}),t("li.nch-lb-exit",i).each(function(){t(this).on("click",function(){c.close()})}),n.closer&&t(".nch-lb-exit-inner",i).on("click touchstart",function(){c.close()}),t(document).on("click touchstart",".nch-lb-exit-custom",function(){c.close()}),t("div.nch-lb-icon-info",i).each(function(){t(this).on("click",u.toggleInfo)}),t("div.nch-lb-icon-minis",i).each(function(){t(this).on("click",u.toggleThumbs)}),t("div.nch-lb-icon-zoom",i).on("click",u.toggleZoom),t("div.nch-lb-icon-save",i).on("click",u.saveImage),t("div.nch-lb-icon-share",i).on("click",u.openShare),n.bgclose&&u.backgroundClose(l),o.tapping&&l.media.on("click",function(e){if(!r.current)return!1;var o=t(e.target);o.is("img")&&o.parent().hasClass("nch-lb-media")&&c.next()})},backgroundClose:function(t){t.preview.on("click",function(t){var e=jQuery(t.target).attr("class");u.wordInString(e,"nch-lb-media-space")&&c.close()})},wordInString:function(t,e){return new RegExp("\\b"+e+"\\b","i").test(t)},fs:{on:!1,request:function(t){return u.fs.on=!0,"js"==$TS_VCSC_Lightbox_ScrollBlock&&jQuery("body, html").addClass("ts-composer-extensions-noscroll"),screenfull.request(t)},has:function(){return 0!=u.fs.request(document.documentElement)},exit:function(){var t=document;"js"==$TS_VCSC_Lightbox_ScrollBlock&&jQuery("body, html").removeClass("ts-composer-extensions-noscroll"),screenfull.exit(t),u.fs.on=!1},toggle:function(){var t="nch-lb-onfs",e=r.current.main;e.find(".nch-lb-icon-fs");u.fs.on?(e.removeClass(t),u.fs.exit()):(e.addClass(t),u.fs.request(document.documentElement))}},loadThumb:function(t,e){var o;this.thumb=o=new Image,o.onload=e,o.src=t},updateLayout:function(o){function a(){r.asb||g.append(r.light[0].$el.height(p[2]+100),r.light[1].$el.height(p[2]+100))}var i=r.current,n=r.wsize=r.w.width(),s=r.hsize=r.w.height();if(i){var l,c=i.blocks,h=c.preview,d=i.opts,p=[d.margin,d.margin,d.margin,d.margin],g=i.main,f=c.bthumbs,m={top:0,right:1,bottom:2,left:3},b="height",v="width",w=[b,v,b,v];f===e||"bottom"==d.thumbs||"top"==d.thumbs||g.hasClass("nch-lb-thumbs-hide")||(p[m[d.thumbs]]+=f[w[m[d.thumbs]]]()),p[0]+=c.tbar.height(),p[2]+=c.bbar.height(),l={top:p[0],left:p[3],width:n-p[1]-p[3],height:s-p[0]-p[2]},c.bbar.width(l.width+2*d.margin),c.tbar.width(l.width+2*d.margin),h.css(t.extend({},l,{left:0,width:n,height:l.height+40})),c.loadicon.css({left:l.left+l.width/2,top:l.top+l.height/2}
1),i.mspace=l,r.hasCanvas&&(r.light?a():r.event.on("maskload",a)),0!=i.set[i.current].opts.type&&i.set[i.current].target&&u.updateMediaLayout(i.set[i.current]),o!==e&&h.scrollLeft(r.wsize),t.isFunction(t.fn.perfectScrollbar)&&(0!=d.thumbs&&"none"!=d.thumbs&&d.perfectscroll&&i.blocks.bthumbs.perfectScrollbar("update"),r.zooming&&i.blocks.zoom.find(".nch-lb-zoom-container").perfectScrollbar("update"))}},light:function(t,e){if(r.hasCanvas&&""!=r.current.opts.backlight)if(r.asb&&r.current){r.current.blocks.asb.get(0).style.backgroundColor=t}else{var o=arguments,a={opacity:1,display:"block"},i={opacity:0},n=r.light[0],s=r.light[1];2==o.length?t.main.append(n.$el,s.canvas):e=t;t=[0,0,s.width,s.height];"remove"===e?(n.$el.hide(),s.$el.hide()):(s.$el.stop().animate(i,500,function(){u.toColor(s,e),s.$el.css(a),n.$el.hide()}),u.toColor(n,e),n.$el.stop().show().css(i).animate(a,500))}},toColor:function(t,e){var o=t.width,a=t.height,i=t.context;i.clearRect(0,0,o,a),i.fillStyle=e,i.fillRect(0,0,o,a),t.mask()},masks:function(){t("div.nch-lb-mask");var e=t('<canvas class="nch-lb-effcurrent"></canvas>'),o=t('<canvas class="nch-lb-effchange"></canvas>');r.color="#000000",r.light=r.asb?[]:[new u.canvasMask(e,this),new u.canvasMask(o,this)],r.event.trigger("maskload")},getImageURL:function(t){var e=/^url\((['"]?)(.*)\1\)$/.exec(t.css("background-image"));return e?e[2]:""},checkImageURL:function(t){return null!=t.toLowerCase().match(/\.(jpeg|jpg|gif|png|bmp|tif|raw)$/)},hashChange:function(){var t="";window.setInterval(function(){o.nohashes&&r.hash!=t&&0==(t=r.hash).search("#"+o.hashpath)&&u.route(t.replace("#","")),t!=window.location.hash&&0==(t=r.hash=window.location.hash).search("#"+o.hashpath)&&u.route(t.replace("#",""))},150)},route:function(t,o){if(i[t]!==e){var a=i[t];u.toMedia(a.call!=e?a():a)}},addRoute:function(t,e){i["nch_"+t]=e},isImage:function(t,a,i){var n=new Image,s=function(){a("image")};n.onerror=i||function(){u.getMediaType(t,a,!0)},n.onload=function(){t.target=this,t.nsize=[this.width,this.height],"remove"==t.opts.color||0!=t.opts.color&&"auto"!=t.opts.color?a("image"):i===e&&!u.allowedOrigin(this,t.opts)&&(o.cors&&""!=o.backlight&&"global"==t.opts.usecors||"true"==t.opts.usecors&&"remove"!=t.opts.color)?u.isImage(t,a,s):a("image")},i!==e&&0==t.opts.color&&(n.crossOrigin="Anonymous"),n.src=t.opts.href,r.onload=n},getMediaType:function(t,o,a){var i=t.opts;if(0!=i.type)return t.target||l[i.type]&&l[i.type].video&&i.videoid===e&&l[i.type].is(t),o(i.type);if(a){for(var a in l)if(l[a].is(t))return o(a)}else u.isImage.apply(this,arguments)},need:function(t,e,o){for(var a=t.length-1,i=0,r=function(){i++==a&&o()},n=0;n<=a;n++)e(t[n],r)},getPreview:function(t,o){var a=new Image,i=t.opts,r=i.type,n=function(){o(t)};if(t.preview!==e)return o(t);i.preview?(a.onload=n,a.src=i.preview,t.preview=a):i.src?(a.onload=n,a.src=i.src,t.preview=a):l[r]&&(l[r].video||l[r].audio)?(t.opts.videoid===e&&l[r].is(t),l[r].preview(t,n)):o(t)},getThumbnail:function(t,o){var a=new Image,i=t.opts,r=i.type,n=function(){o(t)};if(t.thumb!==e)return o(t);i.thumbnail?(a.onload=n,a.src=i.thumbnail,t.thumb=a):i.src?(a.onload=n,a.src=i.src,t.thumb=a):i.href&&u.checkLinkIsImage(i.href)?(a.onload=n,a.src=i.href,t.thumb=a):l[r]&&(l[r].video||l[r].audio)?(t.opts.videoid===e&&l[r].is(t),l[r].thumb(t,n)):o(t)},renderThumbnails:function(o){var a,i,n,s=o.main,l=o.opts,h=o.blocks.thumbs.empty(),d=0,p={bottom:1,top:1,left:0,right:0};h[p[o.opts.thumbs]?"height":"width"](o.opts.thumbsize),window.setTimeout(function(){for(var g in o.set)(i=o.set[g].thumb)!==e&&(n=(i.naturalWidth||i.width)/(i.naturalHeight||i.height),d+=l.thumbsize*(p[o.opts.thumbs]?n:1/n)+8,h.append(t("<li></li>").append(t(o.set[g].thumb).removeAttr("width","height").data("nch-lb-media",o.set[g]).off("click").on("click",c.open))));h[p[o.opts.thumbs]?"width":"height"](d-6),h.find("li").length>1&&s.addClass("nch-lb-has-thumbs"),l.perfectscroll&&t.isFunction(t.fn.perfectScrollbar)?u.scrollThumbs():(r.isTouchDevice&&(a=new Hammer(h.get(0),{prevent_default:!1}),"left"==l.thumbs||"right"==l.thumbs?(1==$TS_VCSC_Hammer_ReleaseNew&&a.get("swipe").set({direction:Hammer.DIRECTION_ALL}),a.on("swipeup swipedown",function(t){return t.direction=t.type.replace("swipe",""),0==$TS_VCSC_Hammer_ReleaseNew&&(t.distance=t.gesture.distance),u.swipeThumbs(t),!0})):a.on("swipeleft swiperight",function(t){return t.direction=t.type.replace("swipe",""),0==$TS_VCSC_Hammer_ReleaseNew&&(t.distance=t.gesture.distance),u.swipeThumbs(t),!0})),u.wheelThumbs()),h.addClass("nch-lb-thumbs-loaded")},50)},getFX:function(t,e){if(!1===t&&(e.opts.effect=t=e.group.opts.animation),"random"==t){var o=[];for(var a in n)o.push(a);e.opts.effect=e.opts.animation=t=o[Math.round(Math.random()*(o.length-1))]}return n[t]||function(){}},mediaGroup:function(e,a){var r,n,s,l=this;a||(a=u.randomName()),this.main=!1,this.name=r=a,this.opts=n=t.extend({},o,e),this.current=!1,this.set=[],this.playing=!1,this.paused=!1,this.about=!1,this.hasGestures=!1,this.add=function(t,e){var a=new u.mediaItem(t,u.inheritProps(n,e));a.group=l,a.opts.rel=r,a.index=l.set.length,a.opts.href||(a.opts.href=a.opts.src),$TS_VCSC_Lightbox_URLColor&&(s=u.parseColor(a.opts.href+a.opts.src))&&
1(a.opts.color=s),i[o.hashpath+a.opts.hash]=a,l.set.push(a)}},allowedOrigin:function(e,o){if(!r.hasCanvas)return!0;var a=r.tcanvas,i=a.getContext("2d"),n=a.width,s=a.height;if(i.clearRect(0,0,n,s),i.drawImage(e,0,0),""==r.current.opts.backlight||"remove"==o.color)return t(r.tcanvas).remove(),t(r.tcanvas=document.createElement("canvas")).addClass("nch-lb-testcanvas").appendTo(r.b),!1;try{i.getImageData(0,0,1,1)}catch(e){return t(r.tcanvas).remove(),t(r.tcanvas=document.createElement("canvas")).addClass("nch-lb-testcanvas").appendTo(r.b),!1}return!0},inheritProps:function(t,o){for(var a in t)o[a]!==e&&(t[a]=o[a]);return o},mediaItem:function(e,o){this.main=e,this.opts=t.extend({hash:u.getHash(o)},a,o),this.target=!1,this.share=!1,e.data("nch-lb-media",this),e.on("click",function(t){return t.preventDefault(),c.open.call(this),!1})},keyboard:function(t){var e=t.which,o=r.current;o&&o.opts.keyboard&&(32==e&&o.opts.play&&c.play(),37==e&&c.previous(!0),39==e&&c.next(!0),27==e&&c.close())},setFrom:function(o,a){var i,n=t(),s=new u.mediaGroup(a);for(var l in o)o[l].charAt!==e&&(o[l]={href:o[l]}),i=t('<a href="'+o[l].href+'"></a>'),o[l].src&&i.append('<img src="'+o[l].src+'">'),s.add(i,o[l]),n=n.add(i);return r.all[s.name]=s,n},randomName:function(){return"nch_group_"+Math.round(Math.random()*(new Date).getTime())},randomString:function(){var t=(new Date).getTime();return"yxxxxxxy-yxxy-yxxy-yxxy-yxxxxxxxxxxy".replace(/[xy]/g,function(e){var o=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?o:7&o|8).toString(16)})},getHash:function(t){var a,r=t.href?t.href:t.href=t.src,n=0;t.hash;if(r===e||0==(r+"").length)return n;for(a=0;a<r.length;a++)n=(n<<5)-n+r.charCodeAt(a),n&=n;if(n=Math.abs(n),i[o.hashpath+n]!==e)for(;i[o.hashpath+n]!==e;)n++;return n},getDataProperties:function(e){e.jquery&&(e=e.get(0));for(var o,a=arguments,i=a[1]?a[1]:[],r={},n=0;n<e.attributes.length;n++){var s=e.attributes[n].name;(i[s]||t.inArray(s,i)>=0||0==s.search("data-"))&&(r[i[s]?i[s]:s.replace("data-","")]=(o=e.getAttribute(s))==parseInt(o)?parseInt(o):o)}return void 0===r.hover&&(r.hover=r.title),r},canvasMask:function(t,e){if(r.hasCanvas){var o,a,i;this.$el=t,this.canvas=t=t.get(0),this.context=o=t.getContext("2d"),this.mask=e,this.width=a=t.width=e.width,this.height=i=t.height=e.height,o.drawImage(e,0,0),this.maskdata=function(t){for(var e=[],o=0,r=0;r<i;r++)for(var n=0;n<a;n++,o+=4)e.push(t.data[o]);return e}(o.getImageData(0,0,a,i)),o.clearRect(0,0,a,i),this.mask=function(){for(var t=this.maskdata,e=4*t.length,r=0,n=o.getImageData(0,0,a,i);r<e;)n.data[r+3]*=t[r/4]/255,r+=4;o.putImageData(n,0,0)}}},hexToRGB:function(t){var e=t.replace("#",""),o=e.match(/.{1,1}/g);e.length/3<2&&(e=o[0]+o[0]+o[1]+o[1]+o[2]+o[2]),e=e.match(/.{1,2}/g);for(var a=0;a<3;a++)e[a]=parseInt(e[a],16);return e},drawImageOnto:function(t,e,o,a,i,r,n){var s=this,l=arguments;try{t.drawImage(e,o,a,i,r)}catch(t){return void window.setTimeout(function(){u.drawImageOnto.apply(s,l)},0)}n()},getMainColor:function(t,e,o){var a,i,n,s=document.createElement("canvas"),l=s.getContext("2d"),c=0,h=0,d=s.width=200,p=s.height=200,g=[0,0,0],f=u.hexToRGB(r.current.opts.backlight);if(!s.getContext||!l||"remove"==e.color)return o(f);u.drawImageOnto(l,t,0,0,200,200,function(){if(""==r.current.opts.backlight)return o(f);try{a=l.getImageData(0,0,d,p)}catch(t){return o(f)}for(var t=0;t<p;t++)for(var e=0;e<d;e++)i=(a.data[c]+a.data[c+1]+a.data[c+2])/3,(n=Math.abs(i-a.data[c])+Math.abs(i-a.data[c+1])+Math.abs(i-a.data[c+1]))>h&&(h=n,g=[a.data[c],a.data[c+1],a.data[c+2]]),c+=4;o(g)})},checkLinkIsImage:function(t){var e=(t=(t=t.toLowerCase()).split("?")[0]).split("."),o=e[e.length-1];return-1!==["jpg","jpeg","tiff","png","gif","bmp"].indexOf(o)},checkNumberRange:function(t,e,o){return(t-e)*(t-o)<=0},checkTouchDevice:function(){try{return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}catch(o){var e=t('<div id="nchlb_touch_device"></div>');return r.b.append(e),e.position().top<0&&(e.remove(),!0)}}};t.fn.nchlightbox=function(t){return c[t]?c[t].apply(this,Array.prototype.slice.call(arguments,1
1)):c.init.apply(this,arguments)},t.fn.nchlightbox.defaults=o,t(document).ready(function(){t(".nch-hide-if-javascript").hide(),r.b=t("body"),r.w=t(window).resize(u.updateLayout),r.doc=t(document.documentElement),r.doc.removeClass("kraut-lb-opened").addClass("kraut-lb-closed"),u.hashChange(),r.isTouchDevice=u.checkTouchDevice(),r.isTouchDevice&&r.b.addClass("nch-lb-photo-menu-visible");var a;r.asb=(a=navigator.userAgent.toLowerCase()).search("android")>0&&a.search("mobile safari")>0&&a.search("linux")>0&&a.search("chrome")<0;var i=document.createElement("canvas"),n=r.root=t('<div class="nch-lb-mask"></div>').appendTo(r.b);(r.hasCanvas=!(!i.getContext||!i.getContext("2d")))&&""!=o.backlight?((h=new Image).onload=u.masks,h.src=u.getImageURL(n),t(r.tcanvas=document.createElement("canvas")).addClass("nch-lb-testcanvas").appendTo(r.b)):(r.hasCanvas=!1,u.masks()),r.canFS=screenfull.enabled,u.fs.on=!1,r.w.keyup(u.keyboard);var s=t('<div class="nch-lb-scrollbars"></div>').appendTo(r.b),l=s.get(0).clientWidth,c=s.get(0).offsetWidth;l!==e&&c!==e&&c==l&&(r.scrollbar=!1),s.remove(),"lightbox"==$TS_VCSC_Lightbox_Protection?jQuery("body").on("contextmenu dragstart",".nch-lb-main img",function(t){return t.preventDefault(),!1}):"global"==$TS_VCSC_Lightbox_Protection&&jQuery("body").on("contextmenu dragstart","img",function(t){return t.preventDefault(),!1}),t(".nch-lightbox").nchlightbox()})}(jQuery),function(t,e,o,a){function i(t,e){var i,r=t,n=e||["ms","O","Moz","Webkit","Khtml"],l=(t=function(t){for(var e=t.split("-"),o=1;o<e.length;o++)e[o]=e[o].substr(0,1).toUpperCase()+e[o].substr(1);return e.join("")}(r)).substr(0,1).toUpperCase()+t.substr(1),c=o.documentElement;if(c.style[t]!==a)return s[r]=r,t;i=(n.join(l+"/")+l).split("/");for(var h in i)if(c.style[i[h]]!==a)return s[r]="-"+n[h].toLowerCase()+"-"+r,i[h];return!1}var r={},n={},s={},l={rotate:"deg",rotateX:"deg",rotateY:"deg",skewX:"deg",skewY:"deg",perspective:"px",scale:"",translateX:"px",translateY:"px",translateZ:"px"};!function(){for(var t=arguments,e=0;e<t.length;e++)n[t[e]]=i(t[e])}("transform","perspective","transition","transform-origin"),r.transform=function(t,e){var o=e===a?t:function(o){return o[t]=e,o}({}),i=[];if(!1!==n.transform){for(var r in o)l[r]!==a&&(o[r]+"").search(l[r])<0&&(o[r]+=l[r]),i.push(r+"("+o[r]+")");this.style[n.transform]=i.join(" ")}},r.transition=function(t){this.style.setProperty===a?this.style[n.transition]=t:this.style.setProperty(s.transition,t)},r.transformOrigin=function(t){this.style.setProperty===a?this.style[n["transform-origin"]]=t:this.style.setProperty(s["transform-origin"],t)},r.perspective=function(t){!1!==n.perspective&&((t+"").search(l.perspective)<0&&(t+=l.perspective),this.style.setProperty===a?this.style[n.perspective]=t:this.style.setProperty(s.perspective,t))},r.animate=function(t,o,i){var n=this,o=o||400,l=[s.transform].join(",")+" "+o/1e3+"s ease-in";r.transition.call(this,l),r.transform.call(this,t),e.setTimeout(function(){r.transition.call(n,"none"),i!==a&&i()},o)},t.fn.nchlightbox("access","css3",function(t){return new function(t){var e=this;this.el=t.jquery===a?t:(this.$el=t).get(0);for(var o in r)this[o]=function(t){return function(){r[t].apply(e.el,arguments)}}(o)}(t)})}(jQuery,window,document),function(t,e){function o(o,a,i){return function(r,n,s,l){if(l!==e)return 1==i?e:i*l;var c=a(n,Math.abs(n)),u=[c[0]];r.transformOrigin(c[2]||h),s&&u.push(o.fxspeed),c[0]!==e&&r[s?"animate":"transform"].apply({},u),c[1]!==e&&(u[0]=c[1],t.fn[s?"animate":"css"].apply(r.$el.stop(),u))}}var a="perspective",i="rotate",r="rotateX",n="rotateY",s="translateY",l="translateZ",c="opacity",h="50% 50%",u=t.fn.nchlightbox.defaults,d="scale";t.fn.nchlightbox("fx",{swipe:function(){},fade:o(u,function(t,o){var a={};return a[c]=1-o,[e,a]},1),scale:o(u,function(t,e){var o={};return o[d]=1-.6*e,[o]},1),slideUp:o(u,function(t,e){var o={};return o[s]=900*t,[o]},0),slideDown:o(u,function(t,e){var o={};return o[s]=-900*t,[o]},0),flip:o(u,function(t,e){var o={};return o[a]=1e3,o[n]=90*t,[o]},0),skew:o(u,function(t,e){var o={};return o[a]=1e3,o.skewX=30*t,[o]},1),bounceDown:o(u,function(t,e){var o={};return o[a]=100,o[s]=1e3*e,[o]},1),bounceUp:o(u,function(t,e){var o={};return o[a]=100,o[s]=-1e3*e,[o]},1),hangLeft:o(u,function(t){var o={};return o[i]=-179*t,[o,e,"0% 0%"]},0),hangRight:o(u,function(t){var o={};return o[i]=-179*t,[o,e,"100% 0%"]},0),zoomIn:o(u,function(t,e){var o={},r={};return o[a]=800,o[l]=800*e,o[i]=45*t,r[c]=1-e,[o,r]},0),simpleFade:o(u,function(t,o){var a={};return a[c]=1-o,[e,a]},0),simpleSwitch:o(u,function(t,o){var a={};return a[c]=1,[e,a]},0),breakIn:o(u,function(t){var e={};return e[i]=45*t,[e]},1),rotateIn:o(u,function(t,e){var o={};return o[a]=1e3,o[n]=90*t,o[d]=1-.3*e,[o]},1),rotateOut:o(u,function(t,e){var o={};return o[a]=1e3,o[n]=-90*t,o[d]=1-.3*e,[o]},1),cicleDown:o(u,function(t,e){var o={},i={};return o[a]=1200,o[r]=-90*t,o[s]=200*e,i[c]=1-e,[o,i,"50% 100%"]},0),cicleUp:o(u,function(t,e){var o={},i={};return o[a]=1200,o[r]=-90*t,o[s]=-200*e,i[c]=1-e,[o,i,"50% 1%"]},0),throwIn:o(u,function(t,e){var o={},r={};return o[a]=800,o[d]=1-.6*e,o[i]=180*t,r[c]=1-e,[o,r]},.3),fall:o(u,function(t,e){var o={},n={};return o[a]=1800,o[r]=-90*e,o[i]=90*t,o[l]=-400*t,n[c]=Math.pow(1-e,.25),[o,n,h]},0),jump:o(u,function(t,e){var o={};return o[a]=1500,o[d]=1-.999*e,o[s]=300*e,o[r]=100*e,o[l]=1e3*e,[o]},0)})}(jQuery),function(t){function e(t,e){for(var o="",a=!1,i="",r=0;r<t.length;r++)a?"}"==t.charAt(r)?(e[i]&&(o+=e[i]),a=!1,i=""):i+=t.charAt(r):"{"==t.charAt(r)?a=!0:o+=t.charAt(r);return o}function o(t){return void 0===t.has.charAt?t.has():void 0!==window[t.has]}function a(t){var e=document.createElement("script");
1e.async=!0,e.defer=!0,e.id=t.id,e.src=t.src,r.append(e)}function i(t,a,i){for(var r,a=a.split(","),s="",l=[],c=0;c<a.length;c++)(l[c]=o(r=n[a[c]]))&&(s+=e(r.create,i));t.append(s);for(var c in a)l[c]&&n[a[c]].parse(n[a[c]].api(),t.get(0))}var r,n={fb:{has:"FB",code:"fb",api:function(){return FB},parse:function(t,e){t.XFBML.parse(e)},id:"ts-kraut-facebook-api",src:"https://connect.facebook.net/en_US/all.js",create:'<div class="nchlb_like_container" data-share-nacho="true"><iframe class="fb-like" src="//www.facebook.com/plugins/like.php?layout=standard&amp;action=like&amp;show_faces=false&amp;share=false&amp;height=20&amp;href={url}" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:20px;" allowTransparency="true"></iframe></div>'},tw:{has:"twttr",code:"tw",api:function(){return twttr},parse:function(t,e){t.widgets.load(e)},id:"ts-kraut-twitter-api",src:"https://platform.twitter.com/widgets.js",create:'<div class="nchlb_twitter_container" data-share-nacho="true"><a href="https://twitter.com/share" class="twitter-share-button" data-url="{url}" data-text="{title}" data-count="none" target="_blank">Tweet</a></div>'},gp:{has:function(){return"undefined"!=typeof gapi&&void 0!==gapi.plusone},code:"gp",api:function(){return gapi.plusone},parse:function(t,e){t.go(e)},id:"ts-kraut-googleplus-api",src:"https://apis.google.com/js/plusone.js",create:'<div class="nchlb_google_container" data-share-nacho="true"><div class="g-plusone" data-share-nacho="true" data-size="medium" data-annotation="none" data-href="{url}"></div></div>'},pin:{has:function(){for(var t in window)if(0==t.search("PIN_"))return!0;return!1},code:"pin",api:function(){for(var t in window)if(0==t.search("PIN_")&&window[t].f)return window[t]},parse:function(e,o){for(var a,i=t(o).is("a")?[o]:o.getElementsByTagName("a"),r=e.f.render,n=0;n<i.length;n++)void 0!==(a=t(i[n]).attr("data-pin-do"))&&0!=t(i[n]).parent(".nchlb_pinterest_container").length&&"undefined"!=r&&void 0!=r&&r[a](i[n])},id:"ts-kraut-pinterest-api",src:"https://assets.pinterest.com/js/pinit.js",create:'<div class="nchlb_pinterest_container" data-share-nacho="true"><a href="https://pinterest.com/pin/create/button/?url={url}&media={media}&description={title}" data-pin-do="buttonPin" data-pin-save="false" data-pin-custom="true" target="_blank"><img src="https://assets.pinterest.com/images/pidgets/pin_it_button.png"/></a></div>'}};t(window).load(function(){if($TS_VCSC_Lightbox_LoadAPIs){var e,s=$TS_VCSC_Lightbox_Social.split(",");r=t("body");for(var l in n)e=n[l],t.inArray(e.code,s)>=0&&(o(e)||a(e))}t.fn.nchlightbox("access","shareButtons",i)})}(jQuery),function(t,e,o){var a={grid:function(e,o){this.name="",this.set=e,this.opts=t.extend({},t.fn.nchgrid.defaults,o),this.images=[],this.items=[],this.cols=[],this.width=0,this.columns=0,this.filters=[],o.target||(this.opts.target=t(e.parent()))},column:function(){this.images=[],this.height=0,this.width=0,this.aspect=0,this.less=!1,this.addImage=function(t){this.images.push(t),this.aspect+=t.aspect}},getColumns:function(t,e){for(var o=0;e[o]<t;)o++;return o==e.length?o:o+1},resolveDeltaHeight:function(t,e,o,a){return(t+e*a)/(o+a)},spreadImages:function(t,e){var o=t.images,a=o.length;if(t.opts.order)for(c=0;c<a;c++)e[c%t.columns].addImage(o[c]);else{for(var i,r=o.length,n=0,s=t.columns,l=[],c=0;c<s;c++)l.push({index:l.length,aspect:0});for(;n<r;){i=[];for(c=0;c<s;c++)void 0!=o[n+c]&&i.push({aspect:1/o[n+c].aspect,index:n+c});i.sort(function(t,e){return t.aspect>e.aspect}),l.sort(function(t,e){return t.aspect<e.aspect});for(c=0;c<i.length;c++)e[l[c].index].addImage(o[i[c].index]),l[c].aspect+=i[c].aspect;n+=s}}},renderGrid:function(e){var o=function(){a.updateGrid(e)};t(window).resize(o),jQuery(window).on("debouncedresize",function(t){window.setTimeout(function(){o()},750)}),o(),window.setTimeout(function(){jQuery(window).trigger("debouncedresize")},750)},filterGrid:function(e,o){var i=e.opts,r=(e.set,e.images,e.cols),n=i.target.width();e.columns=a.getColumns(e.width=n,i.grid);var s=o.split(",");if(e.columns!=r.length){r=[];for(l=0;l<e.columns;l++)r[l]=new a.column;a.spreadImages(e,r)}for(var l=0;l<r.length;l++){c=r[l],all=c.images;for(var h=0;h<all.length;h++)image=t(e.items[all[h].index]),groups=t.trim(image.attr("data-groups")),valid=!1,s.forEac
1h(function(t){a.searchGrid(groups,t)&&(valid=!0)}),valid?(image.removeClass("nchgrid-tile-filtered"),image.attr("data-showing","true")):(image.addClass("nchgrid-tile-filtered"),image.attr("data-showing","false"))}},searchGrid:function(t,e){return new RegExp("\\b"+e+"\\b","i").test(t)},updateGrid:function(e){var o=e.opts,i=(e.set,e.images),r=o.target,n=e.cols,s=o.target.width();if(e.width!=s){if(e.columns=a.getColumns(e.width=s,o.grid),e.columns!=n.length){n=[];for(d=0;d<e.columns;d++)n[d]=new a.column;a.spreadImages(e,n)}for(var l=e.width-(n.length-1)*o.margin,c=Math.floor(i.length/e.columns),h=0,u=0,d=0;d<e.columns;d++)(n[d].less=n[d].images.length==c)?h+=1/n[d].aspect:u+=1/n[d].aspect;for(var p,g,f=a.resolveDeltaHeight(l,o.margin,h,u),m=0,b=0,d=0;d<n.length;d++){g=n[d],all=g.images,p=1/g.aspect*(f-(g.less?0:o.margin)),b=0;for(var v=0;v<all.length;v++)t(e.items[all[v].index]).css({position:"absolute",left:m,top:b,width:p,height:p*all[v].aspect,display:"block"}).addClass("nchgrid-tile"),b+=p*all[v].aspect+o.margin;m+=p+o.margin}r.height(b-o.margin),"static"==r.css("position")&&r.css("position","relative")}},triggerClick:function(e){if(e.preventDefault(),!t(e.target).is("img"))if(""!=t(this).find("img").attr("data-link")&&void 0!==t(this).find("img").attr("data-link")){var o=t(this).find("img").attr("data-link"),a=t(this).find("img").attr("data-target");t.trim(a).length>0?window.open(o,a):window.location.href=o}else if(""!=t(this).find("img").attr("data-image")&&void 0!==t(this).find("img").attr("data-image")){var i=t(this).find("img").attr("data-image"),r=t(this).find("img").attr("title");t.fn.nchlightbox([{href:i,title:r}],"")}else t(this).find("img").click()},loadTiles:function(e){var o=this,i=0,r=[],n=0,s=o.opts.random;if(this.set.each(function(e,s){var l=new Image;if(o.opts.linkGrid)if(""!=t(o.set[e]).attr("data-groups")){t(o.set[e]).attr("data-groups").split(",").forEach(function(e){t.inArray(e,r)<0&&r.push(e)})}else n++;l.onload=function(){!function(e,r,n){var s,l,c,h,u,d,p;o.images[e]={width:r,height:n,aspect:n/r,src:o.set[e].src,index:e,caption:o.set[e].title,alt:o.set[e].alt,title:o.set[e].title,hover:p=o.set[e].hover,thumbnail:d=o.set[e].thumbnail,groups:l=o.opts.linkGrid?t(o.set[e]).attr("data-groups"):o.set[e].groups,links:c=o.opts.linkGrid?t(o.set[e]).attr("data-link"):"",image:h=o.opts.linkGrid?t(o.set[e]).attr("data-image"):""},"undefined"!==p&&void 0!==p||(p=o.set[e].title),u=""!=c?"nchgrid-external":""!=h||""!=d?"nchgrid-lightbox":"nchgrid-nolink",o.items[e]=""!=l?(s=t('<div class="nchgrid-item '+u+'" data-thumbnail="'+d+'" data-groups="All,'+l+'" data-showing="true"></div>').insertAfter(o.set[e]).append(o.set[e])).get(0):(s=t('<div class="nchgrid-item '+u+'" data-thumbnail="'+d+'" data-groups="All,NoGroups" data-showing="true"></div>').insertAfter(o.set[e]).append(o.set[e])).get(0),o.opts.captions&&(p+"").length?s.append('<div class="nchgrid-caption"></div><div class="nchgrid-caption-text '+(o.opts.titles?"nchgrid-caption-text-always":"")+'">'+p+"</div>").on("click",a.triggerClick):s.append('<div class="nchgrid-caption"></div>').on("click",a.triggerClick),i++==o.set.length-1&&(o.opts.preloader&&jQuery("#ts-krautlightbox-grid-preloader-"+o.opts.random).css({position:"absolute"}).fadeOut(750),a.renderGrid(o))}(e,this.width,this.height),s.style.display="block"},l.src=this.src,s.style.display="none"}),o.opts.linkGrid&&r.length>0&&o.opts.filter){r.sort();var l=t('<div id="nch-lb-toggle-'+s+'" class="nch-lb-toggle '+o.opts.textToggleStyle+'" data-grid="nch-lb-grid-'+s+'" data-filter="nch-lb-filter-'+s+'" data-showall="nch-lb-showall-'+s+'" data-random="'+s+'">'+o.opts.textToggle+"</div>").insertBefore(o.opts.target),c=t('<div id="nch-lb-showall-'+s+'" class="nch-lb-showall '+o.opts.textShowAllStyle+'" data-grid="nch-lb-grid-'+s+'" data-filter="nch-lb-filter-'+s+'" data-random="'+s+'">'+o.opts.textShowAll+"</div>").insertBefore(o.opts.target),h=t('<select id="nch-lb-filter-'+s+'" class="nch-lb-filter" data-grid="nch-lb-grid-'+s+'" data-toggle="nch-lb-toggle-'+s+'" data-showall="nch-lb-showall-'+s+'" data-random="'+s+'" multiple="multiple"></select>').insertBefore(o.opts.target);r.forEach(function(e){t('<option value="'+e+'">'+e+"</option>").appendTo(h)}),n>0&&t('<option value="NoGroups">'+o.opts.textNoGroups+"</option>").appendTo(h)}if(o.opts.filter&&""!=o.opts.selector){var u=t("#"+o.opts.selector);void 0!==jQuery.fn.multiSelect&&u.multiSelect({selectableHeader:"<div class='ms-header-selectable'>"+o.opts.textAvailable+"</div>",selectionHeader:"<div class='ms-header-selection'>"+o.opts.textSelected+"</div>",afterSelect:function(t){},afterDeselect:function(t){}}
1),u.on("change",function(e){a.filterGrid(o,t.trim(u.val())),""!=u.val()&&null!=u.val()?c.show():c.hide()});var l=t("#"+o.opts.toggle),c=t("#"+o.opts.showall);(h=t("#ms-"+o.opts.selector)).slideToggle(),c.hide(),l.on("click",function(t){h.slideToggle()}),c.on("click",function(t){u.multiSelect("deselect_all")})}}},i={init:function(e){var o=this;if(!this.length){var i,r=arguments,n=e,s=[];e=t.extend({},t.fn.nchgrid.defaults,2==r.length?r[1]:{});for(var l=0;l<n.length;l++)(i=new Image).src=n[l],s.push(i);o=this.add(s).appendTo(e.target)}return a.loadTiles.call(new a.grid(o,t.extend({},t.fn.nchgrid.defaults,e||{}))),o}};t.fn.nchgrid=function(t){return i[t]?i[t].apply(this,Array.prototype.slice.call(arguments,1)):i.init.apply(this,arguments)},t.fn.nchgrid.defaults={margin:4,grid:[240,480,720,960,1240],captions:!1,order:!1,target:!1,linkGrid:!1,random:"",preloader:!1,filter:!1,titles:!1,selector:"",toggle:"",showall:"",textAvailable:"Available Groups",textSelected:"Filtered Groups",textNoGroups:"No Groups",textToggle:"Toggle Filter",textToggleStyle:"",textShowAll:"Show All",textShowAllStyle:""}}(jQuery,window),function(t,e,o,a){var i=t.fn.nchlightbox("access").css3,r=function(){try{return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}catch(o){var e=t('<div id="nchlb_touch_device"></div>');return _.b.append(e),e.position().top<0&&(e.remove(),!0)}}();t.fn.nchlightbox("access","pinch",function(e,o){var n;return t(this).each(function(s,l){var c;(l=t(l)).data("nch-pinchzoom",c=new function(e,o,n){function s(){v.cwidth=v.container.width(),v.cheight=v.container.height()}function l(t){return t=t===a?1:t,{e:[t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1]}}function c(t){return t.e.join(", ")}function h(t){var e=v.width*t-v.cwidth,o=v.height*t-v.cheight;z=-Math.abs(e<0?0:e),$=-Math.abs(o<0?0:o)}var u,d,p,g=1,f=0,m=0,b=!1,v=this,w="nch-lb-zoom-container-"+function(t,e){e=e||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var o="",a=0;a<t;a++){var i=Math.floor(Math.random()*e.length);o+=e.substring(i,i+1)}return o}(10);this._el=i(e),this.$el=e.css({display:"block"}),this.container=p=t('<div id="'+w+'"></div>').insertAfter(e).append(e),this.width=e.get(0).width||e.width(),this.height=e.get(0).height||e.height(),this.scale=1,this.centerX=.5,this.centerY=.5,this.translateX=0,this.translateY=0,this.transform=v.transform=l(),this._el.transformOrigin("0 0"),this.container.css({width:o||this.width,height:n||this.height,overflow:r?"hidden":"auto"});var y,_,x,S,C,k,T,j,f=0,m=0,L=0,z=0,$=0,Q=0,V=0,I=0,M=!1,F=!1;s(),this.transformStart=function(t){F&&(F=!1,v.dragEnd(t)),s(),M=!0,1==$TS_VCSC_Hammer_ReleaseNew?(y=t.center.x,_=t.center.y):(y=t.gesture.center.pageX,_=t.gesture.center.pageY),x=p.scrollLeft(),S=p.scrollTop(),C=p.offset(),k=C.left,T=C.top,v.centerX=u=(y-k-f-V)/v.width/v.scale,u=u<0?0:u>1?1:u,v.centerY=d=(_-T-m-I)/v.height/v.scale,d=d<0?0:d>1?1:d},this.transformStart2=function(t){F&&(F=!1,v.dragEnd(t)),s(),M=!0,y=t.center.x,_=t.center.y,x=p.scrollLeft(),S=p.scrollTop(),C=p.offset(),k=C.left,T=C.top,v.centerX=u=(y-k-f-V)/v.width/v.scale,u=u<0?0:u>1?1:u,v.centerY=d=(_-T-m-I)/v.height/v.scale,d=d<0?0:d>1?1:d},this.drag=function(t){if(!M){1==$TS_VCSC_Hammer_ReleaseNew?(V=t.deltaX+f+L,I=t.deltaY+m+Q):(b=t.gesture,V=b.deltaX+f+L,I=b.deltaY+m+Q),h(g);var e=l(g);e.e[12]=V=V<0?V>z?V:z:0,e.e[13]=I=I<0?I>$?I:$:0,v._el.transform("matrix3d",c(j=e))}},this.drag2=function(t){if(!M){V=t.deltaX+f+L,I=t.deltaY+m+Q,h(g);var e=l(g);e.e[12]=V=V<0?V>z?V:z:0,e.e[13]=I=I<0?I>$?I:$:0,v._el.transform("matrix3d",c(j=e))}},this.pinch=function(t){M=!0,b=1==$TS_VCSC_Hammer_ReleaseNew?t:t.gesture,(g=v.scale*b.scale)<1&&(g=1),g>5&&(g=5),h(g),L=(v.scale-g)*v.width*v.centerX+f+V,Q=(v.scale-g)*v.height*v.centerY+m+V;var e=l(g);e.e[12]=L=L<0?L>z?L:z:0,e.e[13]=Q=Q<0?Q>$?Q:$:0,v._el.transform("matrix3d",c(j=e))},this.pinch2=function(t){M=!0,(g=v.scale*t.scale)<1&&(g=1),g>5&&(g=5),h(g),L=(v.scale-g)*v.width*v.centerX+f+V,Q=(v.scale-g)*v.height*v.centerY+m+V;var e=l(g);e.e[12]=L=L<0?L>z?L:z:0,e.e[13]=Q=Q<0?Q>$?Q:$:0,v._el.transform("matrix3d",c(j=e))},this.transformEnd=function(t){v.scale=g,v.transform=j,M=!0,f=L,m=Q,V=I=L=Q=0},this.transformEnd2=function(t){v.scale=g,v.transform=j,M=!0,f=L,m=Q,V=I=L=Q=0},this.dragEnd=function(t){F=!1,M?M=!1:(v.transform=j,f=V,m=I,L=Q=V=I=0)},this.dragEnd2=function(t){F=!1,M?M=!1:(v.transform=j,f=V,m=I,L=Q=V=I=0)},this.dragStart=function(t){s(),M||(M=!1,F=!0)},this.dragStart2=function(t){s(),M||(M=!1,F=!0)},this.getCenter=function(t){var e=t.length;if(1===e)return{x:Math.round(t[0].end.x-t[0].start.x),y:Math.round(t[0].end.y-t[0].start.y)};for(var o=0,a=0,i=0;i<e;)o+=t[0].end.x-t[0].start.x,a+=t[0].end.y-t[0].start.y,i++;return{x:Math.round(o/e),y:Math.round(a/e)}},r&&(1==$TS_VCSC_Hammer_ReleaseNew?(this._container=new Hammer.Manager(p.get(0),{recognizers:[[Hammer.Press,{enable:!1}],[Hammer.Rotate,{enable:!1}],[Hammer.Tap,{enable:!1}],[Hammer.Swipe,{enable:!1}],[Hammer.Pan,{enable:!0}],[Hammer.Pinch,{enable:!0}]]}),this._container.on("pinchstart",this.transformStart).on("pinch",this.pinch).on("pinchend",this.transformEnd).on("panstart",this.dragStart).on("pan",this.drag).on("panend",this.dragEnd)):(this._container=p.hammer({prevent_default:!0}),this._container.on("transformstart",this.transformStart).on("transform",this.pinch).on("transformend",this.transformEnd).on("dragstart",this.dragStart).on("drag",this.drag).on("dragend",this.dragEnd)))}(l,e,o)),n===a?n=t(c.container):n.add(c.container)}),n})}(jQuery,window,document),function(){"use strict";var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},e="undefined"!=typeof module&&module.exports,o="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,a=function(){for(var e,o=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["
1webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],a=0,i=o.length,r={};a<i;a++)if((e=o[a])&&e[1]in t){for(a=0;a<e.length;a++)r[o[0][a]]=e[a];return r}return!1}(),i={request:function(e){var i=a.requestFullscreen;e=e||t.documentElement,/5\.1[.\d]* Safari/.test(navigator.userAgent)?e[i]():e[i](o&&Element.ALLOW_KEYBOARD_INPUT)},exit:function(){t[a.exitFullscreen]()},toggle:function(t){this.isFullscreen?this.exit():this.request(t)},onchange:function(e){t.addEventListener(a.fullscreenchange,e,!1)},onerror:function(e){t.addEventListener(a.fullscreenerror,e,!1)},raw:a};a?(Object.defineProperties(i,{isFullscreen:{get:function(){return Boolean(t[a.fullscreenElement])}},element:{enumerable:!0,get:function(){return t[a.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return Boolean(t[a.fullscreenEnabled])}}}),e?module.exports=i:window.screenfull=i):e?module.exports=!1:window.screenfull=!1}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.