var TS_VCSC_Lightbox_PassiveScroll=!1;try{var options={get passive(){TS_VCSC_Lightbox_PassiveScroll=!0}};window.addEventListener("test",options,options),window.removeEventListener("test",options,options)}catch(t){TS_VCSC_Lightbox_PassiveScroll=!1}!function(t){t.fn.hasHorizontalScrollBar=function(){return!!this.get(0)&&this.get(0).scrollWidth>this.innerWidth()},t.fn.hasVerticalScrollBar=function(){return!!this.get(0)&&this.get(0).scrollHeight>this.innerHeight()}}(jQuery),function(t,e){function r(t){if(i(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(i(t.target)&&2==t.which)return t.preventDefault(),!1}function o(t){if(i(t.target))return t.preventDefault(),$TS_VCSC_Lightbox_Showing&&jQuery("html, body").scrollTop($TS_VCSC_Lightbox_LastScroll),!1;jQuery(t.target).is(document)}function i(t){var e=jQuery(t).closest(".kraut-lb-media-space"),r=jQuery(t).closest(".kraut-lb-zoom-container"),a=jQuery(t).closest(".kraut-lb-media-html"),o=jQuery(t).closest(".kraut-lb-media-iframe"),i=jQuery(t).closest(".kraut-lb-thumbs-bar");return e.length>0&&0==a.length&&0==o.length&&0==r.length&&0==i.length||(a.length>0||r.length>0?!a.hasVerticalScrollBar()&&!r.hasVerticalScrollBar():!(i.length>0)||!i.hasClass("kraut-lb-thumbs-left")&&!i.hasClass("kraut-lb-thumbs-right"))}function s(){window.history.replaceState(null,document.title,location.href),jQuery.fn.krautlightbox("close"),window.removeEventListener("popstate",s,!1)}function n(t){if(t.hasOwnProperty("opts")&&"html"===t.opts.type)try{jQuery(t.html).length>0&&jQuery(t.html).get(0).dispatchEvent(new Event("scroll"))}catch(t){}}function l(){jQuery("body").on("click",".kraut-lightbox-trigger",function(t){t.preventDefault();var e=jQuery(this).attr("data-group");""!=e&&jQuery("#"+e+"-0").click()}),void 0!==jQuery.fn.krautlightbox&&(jQuery.fn.krautlightbox("addEvent","open",function(t,e,i){if($TS_VCSC_Lightbox_Showing=!0,jQuery("#wpadminbar").hide(),$TS_VCSC_Lightbox_LastScroll=jQuery(document).scrollTop(),"css"==$TS_VCSC_Lightbox_ScrollBlock?jQuery("body, html").addClass("ts-composer-extensions-noscrollcss"):"js"==$TS_VCSC_Lightbox_ScrollBlock&&(jQuery("body, html").addClass("ts-composer-extensions-noscrolljs"),document.addEventListener("keydown",r),document.addEventListener("mousedown",a),document.addEventListener("mousewheel DOMMouseScroll wheel",o,{passive:!1}),window.addEventListener("scroll",o,{passive:!1})),$TS_VCSC_Lightbox_HistoryClose&&d&&$TS_VCSC_Lightbox_NoHashes&&(window.history.replaceState(null,document.title,location.href),window.addEventListener("popstate",s,!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,n(i),!e.numbered){var l,u=e.set,c=u.length;if(1!=u.length){for(var h=0;h<c;h++)u[h].opts.title=((l=u[h].opts.title)?l:"")+" ("+(h+1)+" / "+c+")";e.numbered=!0}}}),jQuery.fn.krautlightbox("addEvent","rendermedia",function(t,e,r){n(r)}),jQuery.fn.krautlightbox("addEvent","updatemedia",function(t,e,r){n(r)}),jQuery.fn.krautlightbox("addEvent","close",function(t,e,i){"css"==$TS_VCSC_Lightbox_ScrollBlock?(jQuery("body, html").removeClass("ts-composer-extensions-noscrollcss"),jQuery("body, html").scrollTop($TS_VCSC_Lightbox_LastScroll)):"js"==$TS_VCSC_Lightbox_ScrollBlock&&(jQuery("body, html").removeClass("ts-composer-extensions-noscrolljs"),document.removeEventListener("keydown",r),document.removeEventListener("mousedown",a),document.removeEventListener("mousewheel DOMMouseScroll wheel",o,{passive:!1}),window.removeEventListener("scroll",o,{passive:!1}),jQuery("body, html").scrollTop($TS_VCSC_Lightbox_LastScroll)),jQuery("#wpadminbar").show(),$TS_VCSC_Lightbox_HistoryClose&&d&&$TS_VCSC_Lightbox_NoHashes&&window.removeEventListener("popstate",s,!1),$TS_VCSC_Lightbox_Showing=!1}),jQuery.fn.krautlightbox("addEvent","next",function(t,e,r){!e.playing||"youtube"!=r.opts.type&&"vimeo"!=r.opts.type&&"dailymotion"!=r.opts.type&&"facebook"!=r.opts.type&&"plyr"!=r.opts.type||jQuery.fn.krautlightbox("stop")}),jQuery(".nch-lightbox-media, .kraut-lightbox-media, .ts-custom-lightbox-media").krautlightbox({zoom:$TS_VCSC_Lightbox_Zoom,fullscreen:$TS_VCSC_Lightbox_FullScreen}),jQuery(".nch-lightbox-modal, .kraut-lightbox-modal, .ts-custom-lightbox-modal").krautlightbox({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, .kraut-lightbox-html5, .ts-custom-lightbox-html5").krautlightbox({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, .kraut-lightbox-plyr, .ts-custom-lightbox-plyr").krautlightbox({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"),r=t.attr("data-grid").split(","),a=parseInt(t.attr("data-margin")),o=parseInt(t.attr("data-random")),i="true"==t.attr("data-gridpreloader"),s="true"==t.attr("data-gridfilter"),n="true"==t.attr("data-order"),l="true"==t.attr("data-always"),u="true"==t.attr("data-lightbox-init"),d=t.attr("data-gridavailable"),c=t.attr("data-gridselected"),h=t.attr("data-gridnogroups"),p=t.attr("data-gridtoggle"),m=t.attr("data-gridtogglestyle"),f=t.attr("data-gridshowall"),g=t.attr("data-gridshowallstyle");0==u&&e.krautgrid({margin:a,grid:r,order:n,captions:!0,linkGrid:!0,target:!1,random:o,preloader:i,filter:s,titles:l,selector:"kraut-lb-filter-"+o,toggle:"kraut-lb-toggle-"+o,showall:"kraut-lb-showall-"+o,textAvailable:d,textSelected:c,textNoGroups:h,textToggle:p,textToggleStyle:m,textShowAll:f,textShowAllStyle:g}).promise().done(function(){t.attr("data-lightbox-init","true")})}),jQuery(".ts-lightbox-integration").krautlightbox({zoom:$TS_VCSC_Lightbox_Zoom,fullscreen:$TS_VCSC_Lightbox_FullScreen}),u("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","krautgroup").off().krautlightbox({share:0,thumbs:"bottom",thumbsize:75,zoom:$TS_VCSC_Lightbox_Zoom,fullscreen:$TS_VCSC_Lightbox_FullScreen}))}function u(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().krautlightbox({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","krautgroup")}),jQuery('.gallery-icon a[href*=".jpg"]').off().krautlightbox({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","krautgroup")}),jQuery(".wpb_single_image a.ts-replace-lightbox").off().krautlightbox({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().krautlightbox({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().krautlightbox({share:0,thumbs:"bottom",thumbsize:75,zoom:$TS_VCSC_Lightbox_Zoom,fullscreen:$TS_VCSC_Lightbox_FullScreen})))}var d=!1;"history"in window&&"pushState"in history&&(d&&window.history.pushState(null,document.title,location.href),d=!0),jQuery(document).ready(function(){l(),jQuery(window).on("openkrautlb",function(t,e){void 0!=e&&"undefined"!=e&&("html"!=e.opts.type&&"modal"!=e.opts.type||(setTimeout(function(){window.resizeBy(0,0),jQuery(window).trigger("debouncedresize"),window.dispatchEvent(new Event("resize"))},$TS_VCSC_Lightbox_FXSpeed),setTimeout(function(){window.resizeBy(0,0),jQuery(window).trigger("debouncedresize"),window.dispatchEvent(new Event("resize"))},$TS_VCSC_Lightbox_FXSpeed)))}),jQuery(document).ajaxStop(function(){l()}),jQuery(document.body).on("post-load",function(){l()})}),jQuery(window).on("load",function(){u("load"),jQuery(".kraut-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.krautlightbox("close"),t.krautlightbox({share:0,social:"",zoom:0,bgclose:!0}).krautlightbox("open")},e),!1}}),jQuery(".kraut-lightbox-inview").each(function(){if("inview"==jQuery(this).attr("data-open")){var t=jQuery(this),e=parseInt(jQuery(this).attr("data-delay")),r=jQuery(this).attr("data-offset");void 0!==jQuery.fn.waypoint&&t.waypoint({handler:function(){setTimeout(function(){jQuery.fn.krautlightbox("close"),t.krautlightbox({thumbs:0,share:0,social:"",zoom:0,bgclose:!0}).krautlightbox("open");try{t.waypoint("destroy")}catch(t){}try{$this.destroy()}catch(t){}},e)},offset:r,triggerOnce:!0})}})})}(jQuery),function(t,e){"use strict";var r={mode:"continuous",thumbs:$TS_VCSC_Lightbox_Thumbs,thumbsize:$TS_VCSC_Lightbox_Thumbsize,scheme:$TS_VCSC_Lightbox_Scheme,controls:$TS_VCSC_Lightbox_Controls,theme:"metro",classid:"",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,info:!1,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:"",backlight:$TS_VCSC_Lightbox_Backlight,usecolor:$TS_VCSC_Lightbox_UseColor,animation:$TS_VCSC_Lightbox_Animation,cors:$TS_VCSC_Lightbox_CORS,hashpath:"composium/",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,centerposition:"centercenter",centerwidth:1280,centerheight:720,centeroverlay:!0,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},o={},i={light:!1,current:!1,scrollbar:!0,all:{},phase:!0,css3:window.krautcss3,hash:"",isTouchDevice:!1,ns:t({}),event:{trigger:function(){i.ns.trigger.apply(i.ns,arguments)},on:function(){i.ns.on.apply(i.ns,arguments)},off:function(){i.ns.off.apply(i.ns,arguments)}},canFS:!1,onload:!1},s={},n={open:function(t){t.group.main.fadeIn(300)},close:function(t){t.main.fadeOut(300),c.pause(!1);for(var e in t.set)t.set[e].thumb&&(t.set[e].thumb.className="")},slideOut:function(t,a){var o=c.getFX(t.opts.effect,t),s=t.group,n=s.css3,l=s.blocks.preview,u=i.phase?-1:1,d=o(0,0,0,1)!==e;o(n,u,!0),l.stop().animate({scrollLeft:function(t){return(d?o(0,0,0,t):t)+i.wsize}(-u*i.wsize)},{duration:r.fxspeed,complete:function(){s.blocks.media.css("visibility","hidden"),o(n,0),a()}}),t.thumb!==e&&(t.thumb.className="")},slideIn:function(t,a){a=a===e?function(){}:a;var o=c.getFX(t.opts.effect,t),s=t.group,n=s.css3,l=s.blocks.preview,u=i.phase?1:-1,d=o(0,0,0,1)!==e,h=function(t){return(d?o(0,0,0,t):t)+i.wsize};o(n,u),s.blocks.media.css("visibility","visible"),n.el.offsetHeight,o(n,0,!0),s.blocks.media.css("visibility","visible"),l.stop().scrollLeft(h(-u*i.wsize)).animate({scrollLeft:h(0)},r.fxspeed,function(){l.scrollLeft(h(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 r="&loop=0",a="";"true"==t.opts.loop&&(r="&loop=1",a="&playlist="+t.opts.videoid);var o="&autoplay=0";"true"==t.opts.videoplay&&(o="&autoplay=1");var i="&showinfo=0";"true"==t.opts.infobar&&(i="&showinfo=1");var s="&modestbranding=0";"true"==t.opts.modest&&(s="&modestbranding=1");var n="&mute=0";"true"==t.opts.mute&&(n="&mute=1");var l="&controls="+t.opts.controls,u="&autohide="+t.opts.autohide,d="&vq="+t.opts.quality,c="";""!=t.opts.start&&parseInt(t.opts.start)>0&&(c="&start="+t.opts.start);var h="";""!=t.opts.end&&parseInt(t.opts.end)>0&&parseInt(t.opts.end)>parseInt(t.opts.start)&&(h="&end="+t.opts.end);return"https:"==document.location.protocol&&"https:","video"==t.opts.contenttype?'<iframe class="kraut-lb-iframe nch-video-youtube" src="https://www.youtube-nocookie.com/embed/'+t.opts.videoid+"?"+e+r+a+i+s+n+c+h+o+l+u+d+'&wmode=opaque" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen allow="autoplay; fullscreen"></iframe>':"playlist"==t.opts.contenttype?'<iframe class="kraut-lb-iframe nch-video-youtube" src="https://www.youtube-nocookie.com/embed?listType=playlist&list='+t.opts.listid+i+"&"+e+r+s+n+o+l+u+d+'&wmode=opaque" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen allow="autoplay; fullscreen"></iframe>':"searchterm"==t.opts.contenttype?'<iframe class="kraut-lb-iframe nch-video-youtube" src="https://www.youtube-nocookie.com/embed?listType=search&list='+t.opts.search+i+"&"+e+r+s+n+o+l+u+d+'&wmode=opaque" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen allow="autoplay; fullscreen"></iframe>':"combination"==t.opts.contenttype?'<iframe class="kraut-lb-iframe nch-video-youtube" src="https://www.youtube-nocookie.com/embed/'+t.opts.videofirst+"?playlist="+t.opts.videosother+i+"&"+e+r+s+n+o+l+u+d+'&wmode=opaque" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen allow="autoplay; fullscreen"></iframe>':"uploads"==t.opts.contenttype?'<iframe class="kraut-lb-iframe nch-video-youtube" src="https://www.youtube-nocookie.com/embed?listType=user_uploads&list='+t.opts.userid+i+"&"+e+r+s+n+o+l+u+d+'&wmode=opaque" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowfullscreen allow="autoplay; fullscreen"></iframe>':""},thumb:function(t,e){c.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 r="&loop=0";"true"==t.opts.loop&&(r="&loop=1");var a="&muted=0";return"true"==t.opts.mute&&(a="&muted=1"),'<iframe class="kraut-lb-iframe nch-video-vimeo" src="https://player.vimeo.com/video/'+t.opts.videoid+"?"+e+r+a+'&autopause=0&wmode=opaque" width="500" height="500" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allow="autoplay; fullscreen"></iframe>'},thumb:function(e,r){t.getJSON("https://vimeo.com/api/v2/video/"+e.opts.videoid+".json?callback=?",{format:"json"},function(t){c.loadThumb.call(e,e.opts.src=t[0].thumbnail_large,r)})},video:!0},dailymotion:{is:function(t){var r=t.opts.href.match(/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/);return null!==r&&(r[4]!==e?t.opts.videoid=r[4]:t.opts.videoid=r[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 r="&related=0";return"true"==t.opts.related&&(r="&related=1"),'<iframe class="kraut-lb-iframe nch-video-dailymotion" src="https://www.dailymotion.com/embed/video/'+t.opts.videoid+"?"+e+r+'&forcedQuality=hq&wmode=opaque" width="500" height="500" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allow="autoplay; fullscreen"></iframe>'},thumb:function(t,e){c.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 r="&show_text=false";"true"==t.opts.showtext&&(r="&show_text=true");var a="&show_captions=false";"true"==t.opts.showcaptions&&(a="&show_captions=true");var o="&allowfullscreen=false";"true"==t.opts.allowfullscreen&&(o="&allowfullscreen=true");var i="&appId";return""!=t.opts.appid&&(i="&appId="+t.opts.appid),'<iframe class="kraut-lb-iframe nch-video-facebook" src="https://www.facebook.com/plugins/video.php?href='+t.opts.href+e+r+a+o+i+'&wmode=opaque" width="500" height="500" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allow="autoplay; fullscreen"></iframe>'},thumb:function(t,e){c.loadThumb.call(t,t.opts.src="https://graph.facebook.com/"+t.opts.videoid+"/picture",e)},video:!0},wistia:{is:function(t){t.opts.href=t.opts.href.replace(/\/$/,"");var e=t.opts.href.match(/(?:(?:medias|iframe)\/|wvideo=)([\w-]+)/);return!!e&&(t.opts.size||(t.opts.size=t.group.opts.size),t.opts.videoid=e[1],!0)},create:function(t){var e="autoPlay=0";return"true"==t.opts.videoplay&&(e="autoPlay=1"),'<iframe class="kraut-lb-iframe nch-video-wistia" src="https://fast.wistia.net/embed/iframe/'+t.opts.videoid+"?"+e+'&forcedQuality=hq&wmode=opaque" width="500" height="500" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen allow="autoplay; fullscreen"></iframe><script src="https://fast.wistia.net/assets/external/E-v1.js" async><\/script>'},thumb:function(e,r){t.getJSON("https://fast.wistia.com/oembed/?url="+encodeURIComponent("http://home.wistia.com/medias/")+e.opts.videoid+"&format=json&callback=?",function(t){c.loadThumb.call(e,e.opts.src=t.thumbnail_url.split("?")[0],r)})},video:!0},html:{is:function(){return!0},create:function(e){var r=null;return r=e.opts.hasOwnProperty("modalid")?e.opts.modalid:e.opts.href,t(r).removeClass("ts-modal-outside-screen"),t(r).attr("data-style")&&t(r).attr("style",t(r).attr("data-style")).removeAttr("data-style"),t(r).hide().fadeTo(0,0),t(r).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+'" 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="kraut-lb-iframe nch-video-html5" src="'+t.opts.href+'?wmode=opaque" '+e+"></iframe>"},thumb:function(t,e){c.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="kraut-lb-iframe nch-audio-html5" src="'+t.opts.href+'" '+e+"></iframe>"},thumb:function(t,e){c.loadThumb.call(t,t.opts.src=t.opts.audioposter,e)},audio:!0},plyr:{is:function(){return!0},create:function(e){var r=null;r=e.opts.hasOwnProperty("modalid")?e.opts.modalid:e.opts.href;var a=t(r).hide().fadeTo(0,0).get(0),o="";return o+='<div id="'+e.opts.baseid+'-container" class="ts-plyr-player-container ts-plyr-player-lightbox">',o+='<div id="'+e.opts.baseid+'-wrapper" class="ts-plyr-player-wrapper">',o+='<video poster="'+e.opts.videoposter+'" crossorigin playsinline controls '+("true"==e.opts.muted?"muted":"")+">",""!=e.opts.videomp4&&(o+='<source src="'+e.opts.videomp4+'" type="video/mp4">'),""!=e.opts.videowebm&&(o+='<source src="'+e.opts.videowebm+'" type="video/webm">'),""!=e.opts.videoogv&&(o+='<source src="'+e.opts.videoogv+'" type="video/ogv">'),o+="</video>",o+="</div>",o+="</div> ",jQuery(o).appendTo(a)},thumb:function(t,e){c.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,r){t.ajax({url:e.opts.href,success:r})}},iframe:{is:function(){return!0},create:function(t){return'<iframe class="kraut-lb-iframe" src="'+t.opts.href+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen allow="autoplay; fullscreen" scrolling="yes"></iframe>'}}},u={init:function(o){var s=arguments,n=t(this);if(0==n.length){if(o===e)return n;o.length===e&&1==s.length?t.extend(r,o):(n=c.setFrom.apply(this,[o.charAt!==e?[o]:o,s[1]||{}]),(s[1]||{}).open===e&&u.open.call(n))}else o=o||{},n.each(function(r,s){var n,l=t(s),u=l.is("img")?l:t("img",l);if("true"==l.attr("data-lightbox-init"))return!0;if(n=t.extend({},a,c.getDataProperties(l,{rel:"rel",title:"title",href:"href"})),u.length>0?(n.src=u.attr("src"),void 0!==l.attr("data-thumbnail")&&""!=l.attr("data-thumbnail")?n.thumbnail=l.attr("data-thumbnail"):n.thumbnail=""):void 0!==l.attr("data-thumbnail")&&""!=l.attr("data-thumbnail")&&(n.src=l.attr("data-thumbnail"),n.thumbnail=l.attr("data-thumbnail")),l.attr("data-lightbox-init","true"),(l.is("a")||0==u.length)&&(u=l),n.rel)i.all[n.rel]===e&&(i.all[n.rel]=new c.mediaGroup(o,n.rel)),i.all[n.rel].add(u,n);else{var d=new c.mediaGroup(o);d.add(u,n),i.all[d.name]=d}});for(var l in i.all)void 0!=typeof i.all[l]&&void 0!==i.all[l]&&c.renderGrid(i.all[l]);return n},open:function(a){var o,s=t(this);if(a!==e&&i.all[a]!==e&&(o=i.all[a].set[0]),s.data("kraut-lb-media")!==e)o=s.data("kraut-lb-media");else if(this.jquery)return u.init.apply(this,arguments),u.open.call(this);o&&(i.event.trigger("open",[o.group,o]),i.hash="#"+r.hashpath+o.opts.hash,"false"==o.opts.nohashes||0==o.opts.nohashes?window.location.hash=i.hash:"true"==o.opts.nohashes||1==o.opts.nohashes?r.nohashes=!0:r.nohashes||(window.location.hash=i.hash)),i.scrollpos=i.w.scrollTop(),i.doc.addClass("kraut-lb-noscroll"),i.doc.addClass("kraut-lb-opened").removeClass("kraut-lb-closed"),void 0!=o&&"undefined"!=o&&jQuery(window).trigger("openkrautlb",o)},next:function(t){if(i.current){var a=i.current,o=a.set.length,s=a.current,n=a.set[s+1==o?0:s+1];1!=o&&(i.hash="#"+r.hashpath+n.opts.hash,"false"==n.opts.nohashes||0==n.opts.nohashes?window.location.hash=i.hash:"true"==n.opts.nohashes||1==n.opts.nohashes?r.nohashes=!0:r.nohashes||(window.location.hash=i.hash),c.closeShare(),c.pause(t===e),i.phase=!0,i.event.trigger("next",[i.current,n]))}},previous:function(){if(i.current){var t=i.current,e=t.set.length,a=t.current,o=t.set[0==a?e-1:a-1];1!=e&&(i.hash="#"+r.hashpath+o.opts.hash,"false"==o.opts.nohashes||0==o.opts.nohashes?window.location.hash=i.hash:"true"==o.opts.nohashes||1==o.opts.nohashes?r.nohashes=!0:r.nohashes||(window.location.hash=i.hash),c.pause(!1),i.phase=!1,i.event.trigger("previous",[i.current,o]))}},close:function(){if(i.current){var t=i.current,e=t.about,r=t.main,a="kraut-lb-zooming",o=t.set[t.current],s=t.opts;r.hasClass(a)?(i.zooming=!1,c.updateMediaLayout(o),t.blocks.zoom.find(".kraut-lb-zoom-container").remove(),r.toggleClass(a)):e?c.toggleInfo(!e):(i.hash="",window.location.hash="",history&&history.pushState&&history.pushState("",document.title,window.location.pathname+window.location.search),t.playing&&u.stop(),"bottom"==s.thumbs||"top"==s.thumbs?t.blocks.thumbs.css({left:0}):"left"!=s.thumbs&&"right"!=s.thumbs||t.blocks.thumbs.css({top:0}),r.removeClass("kraut-lb-paused").removeClass("kraut-lb-playing"),c.fs.on&&c.fs.toggle(),c.closeShare(),c.detachMedia(t.set[t.current]),t.paused=!1,i.event.trigger("close",t),n.close(t),i.current=t.current=!1,i.doc.removeClass("kraut-lb-noscroll"),i.doc.removeClass("kraut-lb-opened").addClass("kraut-lb-closed"),"none"!=$TS_VCSC_Lightbox_ScrollBlock&&window.setTimeout(function(){i.w.scrollTop(i.scrollpos)},10))}},fx:function(r,a){a===e?t.extend(s,r):s[r]=a},access:function(t,r){return t!==e&&(c[t]=r),c},play:function(t){var r=i.current,a=r.opts,o=r.main,s=r.blocks.loading,n=r.playing,l=a.duration;return!!a.play&&(t===e&&n?n:(o.toggleClass("kraut-lb-playing"),n?s.stop():s.animate({width:o.width()},{easing:"linear",duration:(1-s.width()/o.width())*l,complete:function(){r.paused=!0,u.next()}}),!1!==t&&i.event.trigger(n?"stop":"play",r),r.playing=!n))},stop:function(){return i.current.playing&&u.play(!0),!0},info:function(){if(i.current)return c.toggleInfo.apply({},arguments)},addEvent:function(t,e){i.event.on(t,e)},removeEvent:function(t,e){i.event.off(t,e)},getGroupName:function(){var r,a=t(this);return a.length>0&&((r=t(a.get(0)).data("kraut-lb-media"))!==e&&r.group.name)},getMediaId:function(){var r,a=t(this);return a.length>0&&((r=t(a.get(0)).data("kraut-lb-media"))!==e&&r.opts.hash)}},d="",c={toggleInfo:function(t){var r=i.current,a=r.blocks,o=a.info.children(".kraut-lb-info-panel");return t!==e&&r.about==t?t:(a.info["fade"+(r.about?"Out":"In")](400),o.append(r.info.show()),i.event.trigger((r.about?"close":"open")+"_info",[r]),r.about=!r.about)},selectThumb:function(r){var a,o=r.thumb,s=r.group,n=s.blocks,l=n.bthumbs,u=n.thumbs,d=0,h=t(o),p=h.parent(),m=p.prev().find("img").get(0),f=p.next().find("img").get(0);if(o===e||!s.opts.thumbs)return!1;void 0!=m&&"undefined"!=m||void 0!=f&&"undefined"!=f||u.hasClass("kraut-lb-thumbs-loaded")||window.setTimeout(function(){return c.selectThumb(r),!1},250);for(var g in s.set)s.set[g].thumb&&(s.set[g].thumb.className="");o.className="kraut-lb-thumb-s";var b,v,y,w=s.opts,k={top:1,bottom:1,left:0,right:0}[w.thumbs],T=l[k?"width":"height"](),S=k?"left":"top",C="offset"+(k?"Width":"Height"),_={};u.stop(),y=h.position()[S],"bottom"==w.thumbs||"top"==w.thumbs?(d=i.current?i.current.blocks.thumbs.position().left:u.position().left,v="left"):"left"!=w.thumbs&&"right"!=w.thumbs||(d=i.current?i.current.blocks.thumbs.position().top:u.position().top,v="top");var x=y-4,L=y+(b=o[C])+4;m!==e&&(x-=m[C]+4),f!==e&&(L+=f[C]+4),("bottom"==w.thumbs||"top"==w.thumbs)&&y<h.width()?a=0:("left"==w.thumbs||"right"==w.thumbs)&&y<h.height()?a=0:L-x>T?a=-(y+o[C]/2-T/2):x<d?a=-x:L-T>d&&(a=-(L-T)),("bottom"==w.thumbs||"top"==w.thumbs)&&a>0?a=0:("left"==w.thumbs||"right"==w.thumbs)&&a>0&&(a=0),void 0!=a&&"undefined"!=a&&(_[v]=a),w.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")):u.stop().animate(_,250),t(window).off("resize.krautlightbox-selectthumb").on("resize.krautlightbox-selectthumb",function(){i.doc.hasClass("kraut-lb-opened")&&c.selectThumb(r)})},wheelThumbs:function(t,e){if(!i.current)return!1;var r,a,o,s,n,l,u,d,c,h,p,m,f,g,b,v,y=i.current,w=y.opts,k=w.thumbs;y&&k&&"none"!=k&&(r=y.blocks.thumbs).on("wheel mousewheel DOMMouseScroll",function(t){if(TS_VCSC_Lightbox_PassiveScroll||t.preventDefault(),0==Math.abs(t.originalEvent.deltaX)){if(r.stop(),t.originalEvent.deltaY<0?(a="up",e=-1):(a="down",e=1),o=t.originalEvent.deltaY,c=y.blocks.bthumbs[0].clientWidth,d=y.blocks.thumbs[0].clientWidth,h=d-c,p=y.blocks.thumbs.position().left,n=y.blocks.bthumbs[0].clientHeight,s=y.blocks.thumbs[0].clientHeight,l=s-n,u=y.blocks.thumbs.position().top,m=y.blocks.thumbs[0].childElementCount,"bottom"==w.thumbs||"top"==w.thumbs){if(f=d/m,g=n,b=c/f,(v=Math.round(.66*c))<2*f&&(v=2*f),"up"==a){if(p==-h||p<-h)return!1;v=Math.abs(p)+Math.abs(v)>h?e*h: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"==w.thumbs||"right"==w.thumbs)if(f=c,g=s/m,b=n/g,(v=Math.round(.66*n))<2*g&&(v=2*g),"up"==a){if(u==-l||u<-l)return!1;v=Math.abs(u)+Math.abs(v)>l?e*l:e*(Math.abs(u)+v)}else if("down"==a){if(0==u||u>0)return!1;v=u+v>0?0:e*(u+v)}"bottom"==w.thumbs||"top"==w.thumbs?r.stop().animate({left:v},250):"left"!=w.thumbs&&"right"!=w.thumbs||r.stop().animate({top:v},250)}})},swipeThumbs:function(t){if(!i.current)return!1;var e,r,a,o,s,n,l,u,d,c,h,p,m,f,g,b=i.current,v=b.opts,y=v.thumbs;if(!b||!y||"none"==y)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?r=-1:"right"!=a&&"down"!=a||(r=1),t.distance,(e=b.blocks.thumbs).stop(),d=b.blocks.bthumbs[0].clientWidth,u=b.blocks.thumbs[0].clientWidth,c=u-d,h=b.blocks.thumbs.position().left,s=b.blocks.bthumbs[0].clientHeight,o=b.blocks.thumbs[0].clientHeight,n=o-s,l=b.blocks.thumbs.position().top,p=b.blocks.thumbs[0].childElementCount,"bottom"==v.thumbs||"top"==v.thumbs){if(m=u/p,f=s,d/m,(g=Math.round(.66*d))<2*m&&(g=2*m),"left"==a){if(h==-c||h<-c)return!1;g=Math.abs(h)+Math.abs(g)>c?r*c:r*(Math.abs(h)+g)}else if("right"==a){if(0==h||h>0)return!1;g=h+g>0?0:r*(h+g)}}else if("left"==v.thumbs||"right"==v.thumbs)if(m=d,f=o/p,s/f,(g=Math.round(.66*s))<2*f&&(g=2*f),"up"==a){if(l==-n||l<-n)return!1;g=Math.abs(l)+Math.abs(g)>n?r*n:r*(Math.abs(l)+g)}else if("down"==a){if(0==l||l>0)return!1;g=l+g>0?0:r*(l+g)}"bottom"==v.thumbs||"top"==v.thumbs?e.stop().animate({left:g},250):"left"!=v.thumbs&&"right"!=v.thumbs||e.stop().animate({top:g},250)},scrollThumbs:function(){var t=i.current,e=t.opts.thumbs;t&&e&&"none"!=e&&t.blocks.bthumbs.perfectScrollbar({wheelSpeed:1,useBothWheelAxes:!0,wheelPropagation:!1,swipePropagation:!1,suppressScrollX:"left"==e||"right"==e,suppressScrollY:"bottom"==e||"top"==e,scrollXMarginOffset:10,scrollYMarginOffset:10})},toggleThumbs:function(){var t=i.current,e=t.main,r=t.opts.thumbs,a=0,o={};e.hasClass("kraut-lb-thumbs-hide")?a=0:"top"==r||"bottom"==r?a=t.blocks.bthumbs.outerHeight(!0):"left"!=r&&"right"!=r||(a=t.blocks.bthumbs.outerWidth(!0)),o[r]=-a+"px",t.blocks.bthumbs.animate(o,250,function(){e.toggleClass("kraut-lb-thumbs-hide"),c.updateLayout()})},swipeGesture:function(a){function o(t){if(!(l=t.gesture))return!1;d=l.deltaX,((h=Math.abs(d))>25||m)&&(m=!0,p.stop().scrollLeft(w(-d)),v(b,d/i.wsize))}function s(t){var e=i.current.set.length,a=i.current.current;h>f&&e>1&&("linear"==i.current.opts.mode?!(0==a&&d/h>0||a==e-1&&d/h<0):1)?(n=d>0?0:2*i.wsize,p.animate({scrollLeft:w(n-i.wsize)},r.fxspeed,function(){u[d/h<0?"next":"previous"](!0)}),v(b,d/h,!0)):(p.stop().animate({scrollLeft:w(0)},r.fxspeed),v(b,0,!0)),1==$TS_VCSC_Hammer_ReleaseNew?p.off("pan",o).off("panend release",s):p.off("drag",o).off("dragend",s)}if(a.gesture===e)return!1;if(i.isTouchDevice||(i.isTouchDevice=!(a.gesture.srcEvent.changedTouches===e)),i.zooming||!i.current||a.gesture===e)return!0;var n,l,d,h,p=t(this),m=(t(a.target),a.timeStamp,!1),f=i.wsize/3,g=i.current,b=g.css3,v=c.getFX(g.set[g.current].opts.effect,g.set[g.current]),y=v(0,0,0,1)!==e,w=function(t){return(y?v(0,0,0,t):t)+i.wsize};return a.gesture,1==$TS_VCSC_Hammer_ReleaseNew?p.on("pan",o).on("panend release",s):p.on("drag",o).on("dragend",s),!1},useTouch:function(t){1==$TS_VCSC_Hammer_ReleaseNew?t.hammer({prevent_default:!0}).on("swipeleft swiperight",c.swipeGesture):t.hammer({prevent_default:!0}).on("dragstart",c.swipeGesture)},disableTouch:function(t){1==$TS_VCSC_Hammer_ReleaseNew?t.hammer({prevent_default:!1}).off("swipeleft swiperight",c.swipeGesture):t.hammer({prevent_default:!1}).off("dragstart",c.swipeGesture)},pause:function(t){i.current.playing&&!i.current.paused&&(!0!==t&&"mouseover"!=t.type||(i.current.paused=!0,i.current.main.addClass("kraut-lb-paused"),u.play(!1)))},resume:function(){!i.current.playing&&i.current.paused&&(u.play(!1),i.current.paused=!1,i.current.main.removeClass("kraut-lb-paused"))},openShare:function(e){if(i.current){var r,a=i.current,o=a.current,s=a.set[o];"kraut-lb-icon-share"==e.target.className?s.share&&"block"==s.share.css("display")?(s.share.hide(),a.main.removeClass("kraut-lb-sharing")):(a.main.addClass("kraut-lb-sharing"),s.share||(s.share=r=t('<div class="kraut-lb-share-btns"></div>').appendTo(t("li.kraut-lb-share",a.blocks.menu)),c.shareButtons(r,a.opts.social,c.getMediaProperties(s))),s.share.show()):s.share&&(s.share.hide(),a.main.removeClass("kraut-lb-sharing"))}},closeShare:function(){if(i.current){var t=i.current,e=t.current,r=t.set[e];r.share&&(r.share.hide(),t.main.removeClass("kraut-lb-sharing"))}},renderGrid:function(r){var a,o,i,s,n=r.opts,l=r.set,d=!1,h=[];if(n.grid&&!r.hasGrid&&""!==n.grid){r.hasGrid=!0;var p=[],m=0,f=n.random;a=n.grid.toString().indexOf(",")>-1?n.grid.split(","):t.makeArray(n.grid);for(var g in a)a[g]=parseInt(a[g]);c.need(r.set,c.getPreview,function(){for(var r in l)if(l[r].preview!==e&&(o=l[r].main.hide(),d||(d=o),"true"==l[r].opts.include)){if(i=t(l[r].preview).clone(!0).data("kraut-lb-media",l[r]).click(u.open).get(0),i.title=l[r].opts.title?l[r].opts.title:"",i.alt=l[r].opts.alt?l[r].opts.alt:"",i.groups=l[r].opts.groups?l[r].opts.groups:"",i.thumbnail=l[r].opts.thumbnail?l[r].opts.thumbnail:"",i.preview=l[r].opts.preview?l[r].opts.preview:"",i.hover=l[r].opts.hover?l[r].opts.hover:"",""!=i.groups){i.groups.split(",").forEach(function(e){t.inArray(e,p)<0&&p.push(e)})}else m++;h.push(i)}if(p.length>0&&"true"==n.gridfilter){p.sort();t('<div id="kraut-lb-toggle-'+f+'" class="kraut-lb-toggle '+n.gridtogglestyle+'" data-grid="kraut-lb-grid-'+f+'" data-filter="kraut-lb-filter-'+f+'" data-showall="kraut-lb-showall-'+f+'" data-random="'+f+'">'+n.gridtoggle+"</div>").insertBefore(d),t('<div id="kraut-lb-showall-'+f+'" class="kraut-lb-showall '+n.gridshowallstyle+'" data-grid="kraut-lb-grid-'+f+'" data-filter="kraut-lb-filter-'+f+'" data-random="'+f+'">'+n.gridshowall+"</div>").insertBefore(d);var c=t('<select id="kraut-lb-filter-'+f+'" class="kraut-lb-filter" data-grid="kraut-lb-grid-'+f+'" data-toggle="kraut-lb-toggle-'+f+'" data-showall="kraut-lb-showall-'+f+'" data-random="'+f+'" multiple="multiple"></select>').insertBefore(d);p.forEach(function(e){t('<option value="'+e+'">'+e+"</option>").appendTo(c)}),m>0&&t('<option value="NoGroups">'+n.gridnogroups+"</option>").appendTo(c)}t('<div id="kraut-lb-grid-'+f+'" class="kraut-lb-grid" data-filter="kraut-lb-filter-'+f+'" data-toggle="kraut-lb-toggle-'+f+'" data-random="'+f+'"></div>').insertAfter(d).append(s=t(h)),s.krautgrid({grid:a,margin:parseInt(n.gridspace),order:"true"==n.gridorder,captions:"true"==n.captions,linkGrid:!1,preloader:"true"==n.gridpreloader,filter:"true"==n.gridfilter,random:n.random,selector:"kraut-lb-filter-"+f,toggle:"kraut-lb-toggle-"+f,showall:"kraut-lb-showall-"+f,textAvailable:n.gridavailable,textSelected:n.gridselected,textNoGroups:n.gridnogroups,textToggle:n.gridtoggle,textToggleStyle:n.gridtogglestyle,textShowAll:n.gridshowall,textShowAllStyle:n.gridshowallstyle})})}},parseColor:function(t){for(var e,r=(t+"").split(/bg|\_|\-|\.|\&|\#/),a=0;a<r.length;a++)if((6==(e=r[a].length)||3==e)&&new RegExp("[a-f0-9]{"+e+"}").test(r[a]))return"#"+r[a];return!1},toggleZoom:function(){var e=i.current,r=e.main,a=e.opts,o="kraut-lb-zooming",s=e.set[e.current];s.nsize;if(r.hasClass(o))i.zooming=!1,c.updateMediaLayout(s),a.perfectscroll&&t.isFunction(t.fn.perfectScrollbar)?e.blocks.zoom.find(".kraut-lb-zoom-container").perfectScrollbar("destroy").remove():e.blocks.zoom.find(".kraut-lb-zoom-container").remove();else{i.zooming=!0;var n,l=new Image;l.onload=function(){n=c.pinch.call(t(l),"100%","100%").css({position:"absolute"}).addClass("kraut-lb-zoom-container"),e.blocks.zoom.append(n),a.perfectscroll&&t.isFunction(t.fn.perfectScrollbar)&&n.perfectScrollbar({wheelSpeed:1,useBothWheelAxes:!1,wheelPropagation:!1,swipePropagation:!1,scrollXMarginOffset:10,scrollYMarginOffset:10})},l.src=s.target.src}r.toggleClass(o)},saveImage:function(){var e=i.current,r=e.main,a=e.set[e.current],o=r.find(".kraut-lb-media-save"),s=a.target.src.replace(/#.*$/,"").replace(/\?.*$/,""),n=s.split(/[\\\/]/).pop();0===o.length&&(o=t('<a class="kraut-lb-media-save kraut-lb-icon-save" href="javascript:void(0)" target="_blank"></a>').appendTo(r)),c.checkImageURL(s)&&(o.attr("href",s),o.attr("download",n)),setTimeout(function(){""!=o.attr("href")&&"#"!=o.attr("href")&&o[0].click(),o.attr("href","javascript:void(0)"),o.removeAttr("download")},50)},getMediaProperties:function(t){var e=t.opts,r=e.type,a={title:e.title||document.title,media:"html"!=r&&"ajax"!=r&&"video"!=r&&"audio"!=r&&"facebook"!=r&&"plyr"!=r?"image"==r||"iframe"==r?t.target.src:e.href:""};return a.url=l[r]&&(l[r].video||l[r].audio)||"iframe"==r?a.media:window.location.href,a},detachMedia:function(e){if(void 0!=e&&"undefined"!=e&&null!=e){if(e.hasOwnProperty("group")){var r=e.group.main;t(".kraut-lb-title",r).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 r=t[0].scrollHeight;return t.css({height:"auto"}),r},getInnerWidth:function(t,e){t.css({height:e,width:1});var r=t[0].scrollWidth;return t.css({width:"auto"}),r},renderMedia:function(e){function r(r){e.html=r,e.target=t(r)[0],t(e.target).hide().fadeTo(0,0),a()}function a(){h.loadicon.show(),setTimeout(function(){p.attr("class","kraut-lb-media").addClass("kraut-lb-media-"+m.type).append(e.target),"audio"==m.type&&"true"==m.audiobaronly&&p.addClass("kraut-lb-media-audiobaronly"),n.paused&&(u.play(!1),u.play(!1),n.paused=!1),c.updateMediaLayout(e),e.target&&t(e.target).fadeTo(0,1).show(),h.loadicon.hide()},100)}var o,s,n=i.current,d=n.main,h=n.blocks,p=h.media,m=e.opts,f=m.type;t(".kraut-lb-title",d).each(function(){t(this).html(m.title)}),h.loading.width(0),e.target?a():(l[f]&&"plyr"!=f&&(l[f].video||l[f].audio)?(e.target=o=t(l[f].create(e)).get(0),s=function(){a(),this.onload&&(this.onload=function(){})},o.attachEvent?o.attachEvent("onload",s):o.onload=s,i.root.append(o)):"iframe"==f?(e.target=o=t(l[f].create(e)).get(0),a()):"html"!=f&&"ajax"!=f&&"plyr"!=f||("html"==f||"plyr"==f?r(l[f].create(e)):l[f].create(e,r)),"plyr"==f&&new Plyr(jQuery("#"+e.opts.baseid+"-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}})),i.event.trigger("rendermedia",[n,e])},fitInto:function(t,e,r,a){var o,i,s=t/e;return r/a<s?i=(o=t<r?t:r)/s:o=(i=e<a?e:a)*s,[o,i]},updateMediaLayout:function(e){var r,a,o,s,n=!1,u=!1,d=i.current,h=d.blocks,p=h.media,m=d.mspace.width,f=d.mspace.height,g=e.opts,b=g.type,v={top:0,left:0,width:0,height:0},y=e.nsize;if("centercenter"!=d.opts.centerposition&&(("centerleft"==d.opts.centerposition||"centerright"==d.opts.centerposition)&&m>=d.opts.centerwidth?(m/=2,u=!0):("centertop"==d.opts.centerposition||"centerbottom"==d.opts.centerposition)&&f>=d.opts.centerheight&&(f/=2,u=!0)),i.zooming)return!0;if("image"!=b&&(y=e.nsize=e.group.opts.size.split(",")),o=c.fitInto(y[0],y[1],m,f),s=isNaN(g.width)||isNaN(g.height),"image"==b||l[b]&&(l[b].video||l[b].audio&&"false"==g.audiobaronly)){var w=y[0]/y[1];0==g.width&&0==g.height?(v.width=o[0],v.height=o[1]):0==g.height?(v.width=m<g.width?m:g.width,v.height=v.width/w>f?(v.width=f*w)/w:v.width/w):0==g.width?(v.height=f<g.height?f:g.height,v.width=v.height*w>m?(v.height=m/w)*w:v.height*w):s||(o=c.fitInto(g.width/1,g.height/1,m,f),v.width=o[0],v.height=o[1])}else"iframe"==b||l[b]&&l[b].audio&&"true"==g.audiobaronly?(0==g.width?v.width=m:s||(v.width=g.width>m?m:g.width),l[b]&&l[b].audio&&"true"==g.audiobaronly&&v.width>parseInt(g.audiobarwidth)&&(v.width=parseInt(g.audiobarwidth)),0==g.height?v.height=f:s||(v.height=g.height>f?f:g.height)):"html"!=b&&"ajax"!=b&&"plyr"!=b||e.target&&(n=!0,v.width||(g.width>0?v.width=g.width>m?m:g.width:g.height?v.width=parseInt(o[0])>m?m:parseInt(o[0]):v.width=Math.min(m,f)),v.height||g.height>0&&(v.height=g.height>f?f:g.height));if(s&&(g.width/1?v.width=g.width/1:g.height/1&&(v.height=g.height/1),r=isNaN(g.width)?parseFloat(g.width)/100*m:0,(a=isNaN(g.height)?parseFloat(g.height)/100*f:0)&&r?(a||(a=r/y[0]*y[1]),r||(r=a*y[0]/y[1]),o=c.fitInto(r,a,m,f),v.width=o[0],v.height=o[1]):a?r=v.width?v.width:a*y[0]/y[1]:r&&(a=v.height?v.height:r/y[0]*y[1]),o=c.fitInto(r,a,m,f),v.width=o[0],v.height=o[1]),n&&(t(e.target).addClass("kraut-lb-fixed").width(v.width+"px"),v.width||(v.width=Math.min(c.getInnerWidth(t(e.target),v.height),m)),v.height||(v.height=Math.min(c.getInnerHeight(t(e.target),v.width),f)),t(e.target).removeClass("kraut-lb-fixed").css("width","auto"),v.height>t(e.target).height()&&t(e.target).css("height","100%")),"centercenter"!=d.opts.centerposition&&u?"centerleft"==d.opts.centerposition||"centerright"==d.opts.centerposition?(v.top=i.mposy=(f-v.height)/2,"centerleft"==d.opts.centerposition?v.left=i.wsize+d.mspace.left+(m-v.width)/2:"centerright"==d.opts.centerposition&&(v.left=i.wsize+d.mspace.left+(3*m-v.width)/2)):"centertop"!=d.opts.centerposition&&"centerbottom"!=d.opts.centerposition||(v.left=i.wsize+d.mspace.left+(m-v.width)/2,"centertop"==d.opts.centerposition?v.top=i.mposy=(f-v.height)/2:"centerbottom"==d.opts.centerposition&&(v.top=i.mposy=(3*f-v.height)/2)):(v.top=i.mposy=(f-v.height)/2,v.left=i.wsize+d.mspace.left+(m-v.width)/2),"centercenter"!=d.opts.centerposition&&u&&!d.opts.centeroverlay?h.main.addClass("kraut-lb-nofuzz"):h.main.removeClass("kraut-lb-nofuzz"),e.group.main[("image"==b&&(y[0]>v.width||y[1]>v.height)&&d.opts.zoom?"add":"remove")+"Class"]("kraut-lb-can-zoom"),e.group.main[("image"==b&&d.opts.save?"add":"remove")+"Class"]("kraut-lb-can-save"),p.css(v),"iframe"==b||l[b]&&(l[b].video||l[b].audio)){var k=t("iframe.kraut-lb-iframe",p);isNaN(v.height)?k.height("100%"):k.height(v.height),isNaN(v.width)?k.width("100%"):k.width(v.width),l[b]&&l[b].audio&&"true"==g.audiobaronly&&k.css("max-width",g.audiobarwidth)}d.opts.notouch||("html"==b||"ajax"==b||"plyr"==b?d.hasGestures&&(c.disableTouch(h.preview),d.hasGestures=!1):d.hasGestures||(c.useTouch(h.preview),d.hasGestures=!0)),i.event.trigger("updatemedia",[d,e])},getMediaColor:function(t,e){var a=t.opts;return r.usecolor?e(r.backlight):a.color?e(a.color):void("image"==a.type&&i.hasCanvas?c.getMainColor(t.target,a,function(t){e("rgb("+t.join(",")+")")}):e(r.backlight))},enoughThumbs:function(t){for(var e=0,r=0;r<t.set.length;r++)t.set[r].opts.src&&e++;return e>1||(t.opts.thumbs=!1,!1)},toMedia:function(e){function r(){e.group.main&&e.group.blocks.media.css({width:0,height:0}),0==e.group.main&&(c.renderLayout(e.group),window.setTimeout(function(){c.selectThumb(e)},$TS_VCSC_Lightbox_FXSpeed)),i.current!==e.group?(i.current&&n.close(i.current.group),i.current=e.group,i.current.current=e.index,n.open(e)):s=e.group.current,c.updateLayout(),!1===o?o=!0:!0!==o&&o()}var a,o=!1,s=!1;if(i.current.current==e.index)return!1;u.open.call(e),i.onload&&(i.onload.onload=function(){},i.onload=!1),c.enoughThumbs(e.group),i.current&&i.current==e.group&&!1!==(s=i.current.current)&&(i.phase=s&&e.index||s+e.index!=e.group.set.length-1?s<e.index:s>e.index),e.group.main&&window.setTimeout(function(){c.selectThumb(e)},$TS_VCSC_Lightbox_FXSpeed),i.zooming&&c.toggleZoom(),i.current?n.slideOut(a=i.current.set[i.current.current],function(){c.detachMedia(a),r()}):r(),c.getMediaType(e,function(r){var a=function(){0!=i.current&&c.detachMedia(i.current.set[i.current.current]),function(r){e.opts.type=r,i.onload=!1,c.renderMedia(e),c.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.kraut-lb-share > .kraut-lb-icon-share").hide():1!=e.opts.share&&1!=e.opts.share&&"true"!=e.opts.share||t("li.kraut-lb-share > .kraut-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.kraut-lb-share > .kraut-lb-icon-share").hide():1!=e.opts.share&&1!=e.opts.share&&"true"!=e.opts.share||t("li.kraut-lb-share > .kraut-lb-icon-share").show():t("li.kraut-lb-share > .kraut-lb-icon-share").hide(),n.slideIn(e,function(){}),c.getMediaColor(e,function(t){function r(){c.light(e.opts.color)}e.opts.color=t,!1===i.light?i.event.on("maskload",r):r()}),i.current.current=e.index}(r)};!0===o?a():o=a})},renderLayout:function(e){var a,o=e.main=t('<div class="kraut-lb-main"></div>').appendTo(i.b),s=e.opts,n=0,l="",d={};d.main=o,e.main.addClass("kraut-lb-scheme-"+s.scheme),""!=s.classid&&e.main.addClass(s.classid),""==r.backlight&&e.main.addClass("kraut-lb-no-backlight"),""!=s.overlay&&0!=s.overlay&&""!=s.repeat&&0!=s.repeat?""!=s.overlay&&0!=s.overlay?""!=s.background&&0!=s.background?e.main.css("background",s.overlay+' url("'+s.background+'") '+s.repeat+" center center"):e.main.css("background",""+s.overlay):""!=s.background&&0!=s.background?e.main.css("background",'#000000 url("'+s.background+'") '+s.repeat+" center center"):e.main.css("background","#000000"):""!=s.overlay&&0!=s.overlay&&e.main.css("background",s.overlay),""!=s.noise&&0!=s.noise&&(e.noise=t('<div class="kraut-lb-noise"></div>').appendTo(e.main),e.noise.css("background-image","url("+s.noise+")")),o.find(".kraut-lb-media-save").remove(),s.save&&t('<a class="kraut-lb-media-save kraut-lb-icon-save" href="javascript:void(0) " target="_blank"></a>').appendTo(o);d.loadicon=t('<div class="kraut-lb-media-loading"></div>').appendTo(o);s.info&&t("#"+s.info).length>0&&0==t("#"+s.info).text().length&&(t("#"+s.info).remove(),s.info=!1),i.canFS&&s.fullscreen&&(l+="kraut-lb-can-fs "),s.share&&(l+="kraut-lb-can-share "),s.save&&(l+="kraut-lb-can-save "),s.play&&e.set.length>1&&(l+="kraut-lb-can-play "),s.zoom&&(l+="kraut-lb-can-zoom "),s.info&&(l+="kraut-lb-has-info "),i.scrollbar||(l+="kraut-lb-no-scrollbar "),s.thumbs&&(l+="kraut-lb-position-"+e.opts.thumbs+" "),o.addClass(l);var h={left:"v",right:"v",top:"h",bottom:"h"},p={v:"width",h:"height"};if(i.asb){var m=d.asb=t('<div class="kraut-lb-pngfix"></div>').appendTo(o);c.css3(m).transition("background-color 500ms linear")}s.info&&(e.info=(a=t("#"+s.info)).length?a:t("<div></div>"));var f,g=d.tbar=t('<div class="kraut-lb-tbar"></div>').appendTo(o),b=t('<ul class="kraut-lb-tbar-controls"></ul>'),v=d.bbar=t('<div class="kraut-lb-bar"></div>').appendTo(o),y=d.controls=t('<ul class="kraut-lb-controls"></ul>').appendTo(v),w={prev:"left",play:"play",next:"right",title:!1,exit:"exit",fs:"fs",info:"info",minis:"minis"},k={prev:"",play:"",next:"",title:"",exit:"",fs:"",info:"",minis:""};1==e.set.length&&o.addClass("kraut-lb-no-more");for(n in w)y.append(f='<li class="kraut-lb-'+n+'">'+(w[n]?'<div class="kraut-lb-icon-'+w[n]+'">'+k[n]+"</div>":"")+"</li>"),"exit"!=n&&"title"!=n&&"info"!=n&&"fs"!=n&&"thumbs"!=n||b.append(f);if(s.thumbs){var T=d.thumbs=t('<ul class="kraut-lb-thumbs"></ul>'),S=d.bthumbs=t('<div class="kraut-lb-thumbs-bar"></div>').append(T);if(S.addClass("kraut-lb-thumbs-"+s.thumbs).css(s.thumbs,0),T.addClass("kraut-lb-thumbs-"+{v:"vertical",h:"horizontal"}[h[s.thumbs]]).css(p[h[s.thumbs]],s.thumbsize),"bottom"==s.thumbs||"top"==s.thumbs?T.css("left",0):"left"!=s.thumbs&&"right"!=s.thumbs||T.css("top",0),"bottom"==s.thumbs?v.append(S):"top"==s.thumbs?g.append(S):o.append(S),"v"==h[s.thumbs]){var C={left:"auto",right:"auto"};C["left"==s.thumbs?"right":"left"]=S[p[h[s.thumbs]]](),g.css(C),v.css(C)}}b.appendTo(g);var _,x=d.preview=t('<div class="kraut-lb-media-space"></div>').appendTo(o);s.closer?d.scroller=t('<div class="kraut-lb-media-scroller"></div>').appendTo(x).append(_=d.media=t('<div class="kraut-lb-media"><div class="kraut-lb-exit-inner"><div class="kraut-lb-icon-exit"></div></div></div>')):d.scroller=t('<div class="kraut-lb-media-scroller"></div>').appendTo(x).append(_=d.media=t('<div class="kraut-lb-media"></div>')),e.css3=c.css3(_);var L=d.menu=t('<ul class="kraut-lb-photo-menu"></ul>').appendTo(_),I=["zoom","share","save"],E=["","",""];for(n=0;n<I.length;n++)L.append('<li class="kraut-lb-'+I[n]+'"><div class="kraut-lb-icon-'+I[n]+'">'+E[n]+"</li>");d.info=t('<div class="kraut-lb-project"><div class="kraut-lb-info-panel"><div class="kraut-lb-icon-info"></div></div></div>').appendTo(o),d.loading=t('<div class="kraut-lb-loadbar"></div>').appendTo(o);_.on("mouseover",c.pause).on("mouseout",c.resume),e.blocks=d,s.thumbs&&c.need(e.set,c.getThumbnail,function(){c.renderThumbnails(e)});d.zoom=t('<div class="kraut-lb-zoom-space"><div class="kraut-lb-icon-zoom"></div></div>').appendTo(o);s.autoplay&&(e.playing=!0,e.paused=!0,o.addClass("kraut-lb-playing")),t("li.kraut-lb-prev",y).click(u.previous),t("li.kraut-lb-next",y).click(u.next),t("li.kraut-lb-play",y).click(u.play),t("div.kraut-lb-icon-fs",o).each(function(){t(this).click(c.fs.toggle)}),t("li.kraut-lb-exit",o).each(function(){t(this).on("click",function(){u.close()})}),s.closer&&t(".kraut-lb-exit-inner",o).on("click touchstart",function(){u.close()}),t(document).on("click touchstart",".kraut-lb-exit-custom",function(){u.close()}),t("div.kraut-lb-icon-info",o).each(function(){t(this).on("click",c.toggleInfo)}),t("div.kraut-lb-icon-minis",o).each(function(){t(this).on("click",c.toggleThumbs)}),t("div.kraut-lb-icon-zoom",o).on("click",c.toggleZoom),t("div.kraut-lb-icon-save",o).on("click",c.saveImage),t("div.kraut-lb-icon-share",o).on("click",c.openShare),s.bgclose&&c.backgroundClose(d),r.tapping&&d.media.on("click",function(e){if(!i.current)return!1;var r=t(e.target);r.is("img")&&r.parent().hasClass("kraut-lb-media")&&u.next()})},backgroundClose:function(t){t.preview.on("click",function(t){var e=jQuery(t.target).attr("class");c.wordInString(e,"kraut-lb-media-space")&&u.close()})},wordInString:function(t,e){return new RegExp("\\b"+e+"\\b","i").test(t)},fs:{on:!1,request:function(t){return c.fs.on=!0,"js"==$TS_VCSC_Lightbox_ScrollBlock&&jQuery("body, html").addClass("ts-composer-extensions-noscroll"),screenfull.request(t)},has:function(){return 0!=c.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),c.fs.on=!1},toggle:function(){var t="kraut-lb-onfs",e=i.current.main;e.find(".kraut-lb-icon-fs");c.fs.on?(e.removeClass(t),c.fs.exit()):(e.addClass(t),c.fs.request(document.documentElement))}},loadThumb:function(t,e){var r;this.thumb=r=new Image,r.onload=e,r.src=t},updateLayout:function(r){function a(){i.asb||m.append(i.light[0].$el.height(p[2]+100),i.light[1].$el.height(p[2]+100))}var o=i.current,s=i.wsize=i.w.width(),n=i.hsize=i.w.height();if(o){var l,u=o.blocks,d=u.preview,h=o.opts,p=[h.margin,h.margin,h.margin,h.margin],m=o.main,f=u.bthumbs,g={top:0,right:1,bottom:2,left:3},b="height",v="width",y=[b,v,b,v];f===e||"bottom"==h.thumbs||"top"==h.thumbs||m.hasClass("kraut-lb-thumbs-hide")||(p[g[h.thumbs]]+=f[y[g[h.thumbs]]]()),p[0]+=u.tbar.height(),p[2]+=u.bbar.height(),l={top:p[0],left:p[3],width:s-p[1]-p[3],height:n-p[0]-p[2]},u.bbar.width(l.width+2*h.margin),u.tbar.width(l.width+2*h.margin),d.css(t.extend({},l,{left:0,width:s,height:l.height+40})),u.loadicon.css({left:l.left+l.width/2,top:l.top+l.height/2}),o.mspace=l,i.hasCanvas&&(i.light?a():i.event.on("maskload",a)),0!=o.set[o.current].opts.type&&o.set[o.current].target&&c.updateMediaLayout(o.set[o.current]),r!==e&&d.scrollLeft(i.wsize),h.perfectscroll&&t.isFunction(t.fn.perfectScrollbar)&&(0!=h.thumbs&&"none"!=h.thumbs&&h.perfectscroll&&o.blocks.bthumbs.perfectScrollbar("update"),i.zooming&&o.blocks.zoom.find(".kraut-lb-zoom-container").perfectScrollbar("update"))}},light:function(t,e){if(i.hasCanvas&&""!=i.current.opts.backlight)if(i.asb&&i.current){i.current.blocks.asb.get(0).style.backgroundColor=t}else{var r=arguments,a={opacity:1,display:"block"},o={opacity:0},s=i.light[0],n=i.light[1];2==r.length?t.main.append(s.$el,n.canvas):e=t;t=[0,0,n.width,n.height];"remove"===e?(s.$el.hide(),n.$el.hide()):(n.$el.stop().animate(o,500,function(){c.toColor(n,e),n.$el.css(a),s.$el.hide()}),c.toColor(s,e),s.$el.stop().show().css(o).animate(a,500))}},toColor:function(t,e){var r=t.width,a=t.height,o=t.context;o.clearRect(0,0,r,a),o.fillStyle=e,o.fillRect(0,0,r,a),t.mask()},masks:function(){t("div.kraut-lb-mask");var e=t('<canvas class="kraut-lb-effcurrent"></canvas>'),r=t('<canvas class="kraut-lb-effchange"></canvas>');i.color="#000000",i.light=i.asb?[]:[new c.canvasMask(e,this),new c.canvasMask(r,this)],i.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(){r.nohashes&&i.hash!=t&&0==(t=i.hash).search("#"+r.hashpath)&&c.route(t.replace("#","")),t!=window.location.hash&&0==(t=i.hash=window.location.hash).search("#"+r.hashpath)&&c.route(t.replace("#",""))},150)},route:function(t,r){if(o[t]!==e){var a=o[t];c.toMedia(a.call!=e?a():a)}},addRoute:function(t,e){o["nch_"+t]=e},isImage:function(t,a,o){var s=new Image,n=function(){a("image")};s.onerror=o||function(){c.getMediaType(t,a,!0)},s.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"):o===e&&!c.allowedOrigin(this,t.opts)&&(r.cors&&""!=r.backlight&&"global"==t.opts.usecors||"true"==t.opts.usecors&&"remove"!=t.opts.color)?c.isImage(t,a,n):a("image")},o!==e&&0==t.opts.color&&(s.crossOrigin="Anonymous"),s.src=t.opts.href,i.onload=s},getMediaType:function(t,r,a){var o=t.opts;if(0!=o.type)return t.target||l[o.type]&&l[o.type].video&&o.videoid===e&&l[o.type].is(t),r(o.type);if(a){for(var a in l)if(l[a].is(t))return r(a)}else c.isImage.apply(this,arguments)},need:function(t,e,r){for(var a=t.length-1,o=0,i=function(){o++==a&&r()},s=0;s<=a;s++)e(t[s],i)},getPreview:function(t,r){var a=new Image,o=t.opts,i=o.type,s=function(){r(t)};if(t.preview!==e)return r(t);o.preview?(a.onload=s,a.src=o.preview,t.preview=a):o.src?(a.onload=s,a.src=o.src,t.preview=a):l[i]&&(l[i].video||l[i].audio)?(t.opts.videoid===e&&l[i].is(t),l[i].preview(t,s)):r(t)},getThumbnail:function(t,r){var a=new Image,o=t.opts,i=o.type,s=function(){r(t)};if(t.thumb!==e)return r(t);o.thumbnail?(a.onload=s,a.src=o.thumbnail,t.thumb=a):o.src?(a.onload=s,a.src=o.src,t.thumb=a):o.href&&c.checkLinkIsImage(o.href)?(a.onload=s,a.src=o.href,t.thumb=a):l[i]&&(l[i].video||l[i].audio)?(t.opts.videoid===e&&l[i].is(t),l[i].thumb(t,s)):r(t)},renderThumbnails:function(r){var a,o,s,n=r.main,l=r.opts,d=r.blocks.thumbs.empty(),h=0,p={bottom:1,top:1,left:0,right:0};d[p[r.opts.thumbs]?"height":"width"](r.opts.thumbsize),window.setTimeout(function(){for(var m in r.set)(o=r.set[m].thumb)!==e&&(s=(o.naturalWidth||o.width)/(o.naturalHeight||o.height),h+=l.thumbsize*(p[r.opts.thumbs]?s:1/s)+8,d.append(t("<li></li>").append(t(r.set[m].thumb).removeAttr("width","height").data("kraut-lb-media",r.set[m]).off("click").on("click",u.open))));d[p[r.opts.thumbs]?"width":"height"](h-6),d.find("li").length>1&&n.addClass("kraut-lb-has-thumbs"),l.perfectscroll&&t.isFunction(t.fn.perfectScrollbar)?c.scrollThumbs():(i.isTouchDevice&&(a=new Hammer(d.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),c.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),c.swipeThumbs(t),!0})),c.wheelThumbs()),d.addClass("kraut-lb-thumbs-loaded")},50)},getFX:function(t,e){if(!1===t&&(e.opts.effect=t=e.group.opts.animation),"random"==t){var r=[];for(var a in s)r.push(a);e.opts.effect=e.opts.animation=t=r[Math.round(Math.random()*(r.length-1))]}return s[t]||function(){}},mediaGroup:function(e,a){var i,s,n,l=this;a||(a=c.randomName()),this.main=!1,this.name=i=a,this.opts=s=t.extend({},r,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 c.mediaItem(t,c.inheritProps(s,e));a.group=l,a.opts.rel=i,a.index=l.set.length,a.opts.href||(a.opts.href=a.opts.src),$TS_VCSC_Lightbox_URLColor&&(n=c.parseColor(a.opts.href+a.opts.src))&&(a.opts.color=n),o[r.hashpath+a.opts.hash]=a,l.set.push(a)}},allowedOrigin:function(e,r){if(!i.hasCanvas)return!0;var a=i.tcanvas,o=a.getContext("2d"),s=a.width,n=a.height;if(o.clearRect(0,0,s,n),o.drawImage(e,0,0),""==i.current.opts.backlight||"remove"==r.color)return t(i.tcanvas).remove(),t(i.tcanvas=document.createElement("canvas")).addClass("kraut-lb-testcanvas").appendTo(i.b),!1;try{o.getImageData(0,0,1,1)}catch(e){return t(i.tcanvas).remove(),t(i.tcanvas=document.createElement("canvas")).addClass("kraut-lb-testcanvas").appendTo(i.b),!1}return!0},inheritProps:function(t,r){for(var a in t)r[a]!==e&&(t[a]=r[a]);return r},mediaItem:function(e,r){this.main=e,this.opts=t.extend({hash:c.getHash(r)},a,r),this.target=!1,this.share=!1,e.data("kraut-lb-media",this),e.on("click",function(t){return t.preventDefault(),u.open.call(this),!1})},keyboard:function(t){var e=t.which,r=i.current;r&&r.opts.keyboard&&(32==e&&r.opts.play&&u.play(),37==e&&u.previous(!0),39==e&&u.next(!0),27==e&&u.close())},setFrom:function(r,a){var o,s=t(),n=new c.mediaGroup(a);for(var l in r)r[l].charAt!==e&&(r[l]={href:r[l]}),o=t('<a href="'+r[l].href+'"></a>'),r[l].src&&o.append('<img src="'+r[l].src+'">'),n.add(o,r[l]),s=s.add(o);return i.all[n.name]=n,s},randomName:function(){return"kraut_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 r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?r:7&r|8).toString(16)})},getHash:function(t){var a,i=t.href?t.href:t.href=t.src,s=0;t.hash;if(i===e||0==(i+"").length)return s;for(a=0;a<i.length;a++)s=(s<<5)-s+i.charCodeAt(a),s&=s;if(s=Math.abs(s),o[r.hashpath+s]!==e)for(;o[r.hashpath+s]!==e;)s++;return s},getDataProperties:function(e){e.jquery&&(e=e.get(0));for(var r,a=arguments,o=a[1]?a[1]:[],i={},s=0;s<e.attributes.length;s++){var n=e.attributes[s].name;(o[n]||t.inArray(n,o)>=0||0==n.search("data-"))&&(i[o[n]?o[n]:n.replace("data-","")]=(r=e.getAttribute(n))==parseInt(r)?parseInt(r):r)}return void 0===i.hover&&(i.hover=i.title),i},canvasMask:function(t,e){if(i.hasCanvas){var r,a,o;this.$el=t,this.canvas=t=t.get(0),this.context=r=t.getContext("2d"),this.mask=e,this.width=a=t.width=e.width,this.height=o=t.height=e.height,r.drawImage(e,0,0),this.maskdata=function(t){for(var e=[],r=0,i=0;i<o;i++)for(var s=0;s<a;s++,r+=4)e.push(t.data[r]);return e}(r.getImageData(0,0,a,o)),r.clearRect(0,0,a,o),this.mask=function(){for(var t=this.maskdata,e=4*t.length,i=0,s=r.getImageData(0,0,a,o);i<e;)s.data[i+3]*=t[i/4]/255,i+=4;r.putImageData(s,0,0)}}},hexToRGB:function(t){var e=t.replace("#",""),r=e.match(/.{1,1}/g);e.length/3<2&&(e=r[0]+r[0]+r[1]+r[1]+r[2]+r[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,r,a,o,i,s){var n=this,l=arguments;try{t.drawImage(e,r,a,o,i)}catch(t){return void window.setTimeout(function(){c.drawImageOnto.apply(n,l)},0)}s()},getMainColor:function(t,e,r){var a,o,s,n=document.createElement("canvas"),l=n.getContext("2d"),u=0,d=0,h=n.width=200,p=n.height=200,m=[0,0,0],f=c.hexToRGB(i.current.opts.backlight);if(!n.getContext||!l||"remove"==e.color)return r(f);c.drawImageOnto(l,t,0,0,200,200,function(){if(""==i.current.opts.backlight)return r(f);try{a=l.getImageData(0,0,h,p)}catch(t){return r(f)}for(var t=0;t<p;t++)for(var e=0;e<h;e++)o=(a.data[u]+a.data[u+1]+a.data[u+2])/3,(s=Math.abs(o-a.data[u])+Math.abs(o-a.data[u+1])+Math.abs(o-a.data[u+1]))>d&&(d=s,m=[a.data[u],a.data[u+1],a.data[u+2]]),u+=4;r(m)})},checkLinkIsImage:function(t){var e=(t=(t=t.toLowerCase()).split("?")[0]).split("."),r=e[e.length-1];return-1!==["jpg","jpeg","tiff","png","gif","bmp"].indexOf(r)},checkNumberRange:function(t,e,r){return(t-e)*(t-r)<=0},checkTouchDevice:function(){try{return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}catch(r){var e=t('<div id="kraut-lb-touch-device"></div>');return i.b.append(e),e.position().top<0&&(e.remove(),!0)}}};t.fn.krautlightbox=function(t){return u[t]?u[t].apply(this,Array.prototype.slice.call(arguments,1)):u.init.apply(this,arguments)},t.fn.krautlightbox.defaults=r,t(document).ready(function(){t(".kraut-lb-hide-if-javascript").hide(),i.b=t("body"),i.w=t(window).resize(c.updateLayout),i.doc=t(document.documentElement),i.doc.removeClass("kraut-lb-opened").addClass("kraut-lb-closed"),i.b.addClass("kraut-lb-controls-"+$TS_VCSC_Lightbox_Controls),c.hashChange(),i.isTouchDevice=c.checkTouchDevice(),i.isTouchDevice&&i.b.addClass("kraut-lb-photo-menu-visible");var a;i.asb=(a=navigator.userAgent.toLowerCase()).search("android")>0&&a.search("mobile safari")>0&&a.search("linux")>0&&a.search("chrome")<0;var o=document.createElement("canvas"),s=i.root=t('<div class="kraut-lb-mask"></div>').appendTo(i.b);(i.hasCanvas=!(!o.getContext||!o.getContext("2d")))&&""!=r.backlight?((d=new Image).onload=c.masks,d.src=c.getImageURL(s),t(i.tcanvas=document.createElement("canvas")).addClass("kraut-lb-testcanvas").appendTo(i.b)):(i.hasCanvas=!1,c.masks()),i.canFS=screenfull.enabled,c.fs.on=!1,i.w.keyup(c.keyboard);var n=t('<div class="kraut-lb-scrollbars"></div>').appendTo(i.b),l=n.get(0).clientWidth,u=n.get(0).offsetWidth;l!==e&&u!==e&&u==l&&(i.scrollbar=!1),n.remove(),"lightbox"==$TS_VCSC_Lightbox_Protection?jQuery("body").on("contextmenu dragstart",".kraut-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").krautlightbox(),t(".kraut-lightbox").krautlightbox()})}(jQuery),function(t,e,r,a){function o(t,e){var o,i=t,s=e||["ms","O","Moz","Webkit","Khtml"],l=(t=function(t){for(var e=t.split("-"),r=1;r<e.length;r++)e[r]=e[r].substr(0,1).toUpperCase()+e[r].substr(1);return e.join("")}(i)).substr(0,1).toUpperCase()+t.substr(1),u=r.documentElement;if(u.style[t]!==a)return n[i]=i,t;o=(s.join(l+"/")+l).split("/");for(var d in o)if(u.style[o[d]]!==a)return n[i]="-"+s[d].toLowerCase()+"-"+i,o[d];return!1}var i={},s={},n={},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++)s[t[e]]=o(t[e])}("transform","perspective","transition","transform-origin"),i.transform=function(t,e){var r=e===a?t:function(r){return r[t]=e,r}({}),o=[];if(!1!==s.transform){for(var i in r)l[i]!==a&&(r[i]+"").search(l[i])<0&&(r[i]+=l[i]),o.push(i+"("+r[i]+")");this.style[s.transform]=o.join(" ")}},i.transition=function(t){this.style.setProperty===a?this.style[s.transition]=t:this.style.setProperty(n.transition,t)},i.transformOrigin=function(t){this.style.setProperty===a?this.style[s["transform-origin"]]=t:this.style.setProperty(n["transform-origin"],t)},i.perspective=function(t){!1!==s.perspective&&((t+"").search(l.perspective)<0&&(t+=l.perspective),this.style.setProperty===a?this.style[s.perspective]=t:this.style.setProperty(n.perspective,t))},i.animate=function(t,r,o){var s=this,l=r||400,u=[n.transform].join(",")+" "+l/1e3+"s ease-in";i.transition.call(this,u),i.transform.call(this,t),e.setTimeout(function(){i.transition.call(s,"none"),o!==a&&o()},l)},t.fn.krautlightbox("access","css3",function(t){return new function(t){var e=this;this.el=t.jquery===a?t:(this.$el=t).get(0);for(var r in i)this[r]=function(t){return function(){i[t].apply(e.el,arguments)}}(r)}(t)})}(jQuery,window,document),function(t,e){function r(r,a,o){return function(i,s,n,l){if(l!==e)return 1==o?e:o*l;var u=a(s,Math.abs(s)),c=[u[0]];i.transformOrigin(u[2]||d),n&&c.push(r.fxspeed),u[0]!==e&&i[n?"animate":"transform"].apply({},c),u[1]!==e&&(c[0]=u[1],t.fn[n?"animate":"css"].apply(i.$el.stop(),c))}}var a="perspective",o="rotate",i="rotateX",s="rotateY",n="translateY",l="translateZ",u="opacity",d="50% 50%",c=t.fn.krautlightbox.defaults,h="scale";t.fn.krautlightbox("fx",{swipe:function(){},fade:r(c,function(t,r){var a={};return a[u]=1-r,[e,a]},1),scale:r(c,function(t,e){var r={};return r[h]=1-.6*e,[r]},1),slideUp:r(c,function(t,e){var r={};return r[n]=900*t,[r]},0),slideDown:r(c,function(t,e){var r={};return r[n]=-900*t,[r]},0),flip:r(c,function(t,e){var r={};return r[a]=1e3,r[s]=90*t,[r]},0),skew:r(c,function(t,e){var r={};return r[a]=1e3,r.skewX=30*t,[r]},1),bounceDown:r(c,function(t,e){var r={};return r[a]=100,r[n]=1e3*e,[r]},1),bounceUp:r(c,function(t,e){var r={};return r[a]=100,r[n]=-1e3*e,[r]},1),hangLeft:r(c,function(t){var r={};return r[o]=-179*t,[r,e,"0% 0%"]},0),hangRight:r(c,function(t){var r={};return r[o]=-179*t,[r,e,"100% 0%"]},0),zoomIn:r(c,function(t,e){var r={},i={};return r[a]=800,r[l]=800*e,r[o]=45*t,i[u]=1-e,[r,i]},0),simpleFade:r(c,function(t,r){var a={};return a[u]=1-r,[e,a]},0),simpleSwitch:r(c,function(t,r){var a={};return a[u]=1,[e,a]},0),breakIn:r(c,function(t){var e={};return e[o]=45*t,[e]},1),rotateIn:r(c,function(t,e){var r={};return r[a]=1e3,r[s]=90*t,r[h]=1-.3*e,[r]},1),rotateOut:r(c,function(t,e){var r={};return r[a]=1e3,r[s]=-90*t,r[h]=1-.3*e,[r]},1),cicleDown:r(c,function(t,e){var r={},o={};return r[a]=1200,r[i]=-90*t,r[n]=200*e,o[u]=1-e,[r,o,"50% 100%"]},0),cicleUp:r(c,function(t,e){var r={},o={};return r[a]=1200,r[i]=-90*t,r[n]=-200*e,o[u]=1-e,[r,o,"50% 1%"]},0),throwIn:r(c,function(t,e){var r={},i={};return r[a]=800,r[h]=1-.6*e,r[o]=180*t,i[u]=1-e,[r,i]},.3),fall:r(c,function(t,e){var r={},s={};return r[a]=1800,r[i]=-90*e,r[o]=90*t,r[l]=-400*t,s[u]=Math.pow(1-e,.25),[r,s,d]},0),jump:r(c,function(t,e){var r={};return r[a]=1500,r[h]=1-.999*e,r[n]=300*e,r[i]=100*e,r[l]=1e3*e,[r]},0)})}(jQuery),function(t){function e(t,e){for(var r="",a=!1,o="",i=0;i<t.length;i++)a?"}"==t.charAt(i)?(e[o]&&(r+=e[o]),a=!1,o=""):o+=t.charAt(i):"{"==t.charAt(i)?a=!0:r+=t.charAt(i);return r}function r(t){return void 0===t.has.charAt?t.has():void 0!==window[t.has]}function a(t){var e=document.createElement("script");e.async=!0,e.defer=!0,e.id=t.id,e.src=t.src,i.append(e)}function o(t,a,o){for(var i,n=a.split(","),l="",u=[],d=0;d<n.length;d++)(u[d]=r(i=s[n[d]]))&&(l+=e(i.create,o));t.append(l);for(var d in n)u[d]&&s[n[d]].parse(s[n[d]].api(),t.get(0))}var i,s={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="kraut-lb-facebook-container" data-share-kraut="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="kraut-lb-twitter-container" data-share-kraut="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||gapi.plusone,!1},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="kraut-lb-google-container" data-share-kraut="true"><div class="g-plusone" data-share-kraut="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,r){for(var a,o=t(r).is("a")?[r]:r.getElementsByTagName("a"),i=e.f.render,s=0;s<o.length;s++)void 0!==(a=t(o[s]).attr("data-pin-do"))&&0!=t(o[s]).parent(".kraut-lb-pinterest-container").length&&"undefined"!=i&&void 0!=i&&i[a](o[s])},id:"ts-kraut-pinterest-api",src:"https://assets.pinterest.com/js/pinit.js",create:'<div class="kraut-lb-pinterest-container" data-share-kraut="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>'}};jQuery(window).on("load",function(){if($TS_VCSC_Lightbox_LoadAPIs){var e,n=$TS_VCSC_Lightbox_Social.split(",");i=t("body");for(var l in s)e=s[l],t.inArray(e.code,n)>=0&&(r(e)||a(e))}t.fn.krautlightbox("access","shareButtons",o)})}(jQuery),function(t,e,r){var a={grid:function(e,r){this.name="",this.set=e,this.opts=t.extend({},t.fn.krautgrid.defaults,r),this.images=[],this.items=[],this.cols=[],this.width=0,this.columns=0,this.filters=[],r.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 r=0;e[r]<t;)r++;return r==e.length?r:r+1},resolveDeltaHeight:function(t,e,r,a){return(t+e*a)/(r+a)},spreadImages:function(t,e){var r=t.images,a=r.length,o=0;if(t.opts.order)for(o=0;o<a;o++)e[o%t.columns].addImage(r[o]);else{var i,s=r.length,n=0,l=t.columns,u=[];for(o=0;o<l;o++)u.push({index:u.length,aspect:0});for(;n<s;){for(i=[],o=0;o<l;o++)void 0!=r[n+o]&&i.push({aspect:1/r[n+o].aspect,index:n+o});for(i.sort(function(t,e){return t.aspect>e.aspect}),u.sort(function(t,e){return t.aspect<e.aspect}),o=0;o<i.length;o++)e[u[o].index].addImage(r[i[o].index]),u[o].aspect+=i[o].aspect;n+=l}}},renderGrid:function(e){var r=function(){a.updateGrid(e)};t(window).resize(r),jQuery(window).on("debouncedresize",function(t){window.setTimeout(function(){r()},750)}),r(),window.setTimeout(function(){jQuery(window).trigger("debouncedresize")},750)},filterGrid:function(e,r){var o=e.opts,i=0,s=0,n=(e.set,e.images,e.cols),l=o.target.width();e.columns=a.getColumns(e.width=l,o.grid);var u=r.split(",");if(e.columns!=n.length){for(n=[],i=0;i<e.columns;i++)n[i]=new a.column;a.spreadImages(e,n)}for(i=0;i<n.length;i++)for(c=n[i],all=c.images,s=0;s<all.length;s++)image=t(e.items[all[s].index]),groups=t.trim(image.attr("data-groups")),valid=!1,u.forEach(function(t){a.searchGrid(groups,t)&&(valid=!0)}),valid?(image.removeClass("krautgrid-tile-filtered"),image.attr("data-showing","true")):(image.addClass("krautgrid-tile-filtered"),image.attr("data-showing","false"))},searchGrid:function(t,e){return new RegExp("\\b"+e+"\\b","i").test(t)},updateGrid:function(e){var r=0,o=0,i=e.opts,s=(e.set,e.images),n=i.target,l=e.cols,u=i.target.width();if(e.width!=u){if(e.columns=a.getColumns(e.width=u,i.grid),e.columns!=l.length){for(l=[],r=0;r<e.columns;r++)l[r]=new a.column;a.spreadImages(e,l)}var d=e.width-(l.length-1)*i.margin,c=Math.floor(s.length/e.columns),h=0,p=0;for(r=0;r<e.columns;r++)(l[r].less=l[r].images.length==c)?h+=1/l[r].aspect:p+=1/l[r].aspect;var m,f,g=a.resolveDeltaHeight(d,i.margin,h,p),b=0,v=0;for(r=0;r<l.length;r++){for(f=l[r],all=f.images,m=1/f.aspect*(g-(f.less?0:i.margin)),v=0,o=0;o<all.length;o++)t(e.items[all[o].index]).css({position:"absolute",left:b,top:v,width:m,height:m*all[o].aspect,display:"block"}).addClass("krautgrid-tile"),v+=m*all[o].aspect+i.margin;b+=m+i.margin}n.height(v-i.margin),"static"==n.css("position")&&n.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 r=t(this).find("img").attr("data-link"),a=t(this).find("img").attr("data-target");t.trim(a).length>0?window.open(r,a):window.location.href=r}else if(""!=t(this).find("img").attr("data-image")&&void 0!==t(this).find("img").attr("data-image")){var o=t(this).find("img").attr("data-image"),i=t(this).find("img").attr("title");t.fn.krautlightbox([{href:o,title:i}],"")}else t(this).find("img").click()},loadTiles:function(e){var r=this,o=0,i=[],s=0,n=r.opts.random;this.set.each(function(e,n){var l=new Image;if(r.opts.linkGrid)if(""!=t(r.set[e]).attr("data-groups")){t(r.set[e]).attr("data-groups").split(",").forEach(function(e){t.inArray(e,i)<0&&i.push(e)})}else s++;l.onload=function(){!function(e,i,s){var n,l,u,d,c,h,p;r.images[e]={width:i,height:s,aspect:s/i,src:r.set[e].src,index:e,caption:r.set[e].title,alt:r.set[e].alt,title:r.set[e].title,hover:p=r.set[e].hover,thumbnail:h=r.set[e].thumbnail,groups:l=r.opts.linkGrid?t(r.set[e]).attr("data-groups"):r.set[e].groups,links:u=r.opts.linkGrid?t(r.set[e]).attr("data-link"):"",image:d=r.opts.linkGrid?t(r.set[e]).attr("data-image"):""},"undefined"!==p&&void 0!==p||(p=r.set[e].title),c=""!=u?"krautgrid-external":""!=d||""!=h?"krautgrid-lightbox":"krautgrid-nolink",r.items[e]=""!=l?(n=t('<div class="krautgrid-item '+c+'" data-thumbnail="'+h+'" data-groups="All,'+l+'" data-showing="true"></div>').insertAfter(r.set[e]).append(r.set[e])).get(0):(n=t('<div class="krautgrid-item '+c+'" data-thumbnail="'+h+'" data-groups="All,NoGroups" data-showing="true"></div>').insertAfter(r.set[e]).append(r.set[e])).get(0),r.opts.captions&&(p+"").length?n.append('<div class="krautgrid-caption"></div><div class="krautgrid-caption-text '+(r.opts.titles?"krautgrid-caption-text-always":"")+'">'+p+"</div>").on("click",a.triggerClick):n.append('<div class="krautgrid-caption"></div>').on("click",a.triggerClick),o++==r.set.length-1&&(r.opts.preloader&&jQuery("#ts-krautlightbox-grid-preloader-"+r.opts.random).css({position:"absolute"}).fadeOut(750),a.renderGrid(r))}(e,this.width,this.height),n.style.display="block"},l.src=this.src,n.style.display="none"});var l=null,u=null,d=null,c=null;r.opts.linkGrid&&i.length>0&&r.opts.filter&&(i.sort(),u=t('<div id="kraut-lb-toggle-'+n+'" class="kraut-lb-toggle '+r.opts.textToggleStyle+'" data-grid="kraut-lb-grid-'+n+'" data-filter="kraut-lb-filter-'+n+'" data-showall="kraut-lb-showall-'+n+'" data-random="'+n+'">'+r.opts.textToggle+"</div>").insertBefore(r.opts.target),d=t('<div id="kraut-lb-showall-'+n+'" class="kraut-lb-showall '+r.opts.textShowAllStyle+'" data-grid="kraut-lb-grid-'+n+'" data-filter="kraut-lb-filter-'+n+'" data-random="'+n+'">'+r.opts.textShowAll+"</div>").insertBefore(r.opts.target),c=t('<select id="kraut-lb-filter-'+n+'" class="kraut-lb-filter" data-grid="kraut-lb-grid-'+n+'" data-toggle="kraut-lb-toggle-'+n+'" data-showall="kraut-lb-showall-'+n+'" data-random="'+n+'" multiple="multiple"></select>').insertBefore(r.opts.target),i.forEach(function(e){t('<option value="'+e+'">'+e+"</option>").appendTo(c)}),s>0&&t('<option value="NoGroups">'+r.opts.textNoGroups+"</option>").appendTo(c)),r.opts.filter&&""!=r.opts.selector&&(l=t("#"+r.opts.selector),void 0!==jQuery.fn.multiSelect&&l.multiSelect({selectableHeader:"<div class='ms-header-selectable'>"+r.opts.textAvailable+"</div>",selectionHeader:"<div class='ms-header-selection'>"+r.opts.textSelected+"</div>",afterSelect:function(t){},afterDeselect:function(t){}}),l.on("change",function(e){a.filterGrid(r,t.trim(l.val())),""!=l.val()&&null!=l.val()?d.show():d.hide()}),u=t("#"+r.opts.toggle),d=t("#"+r.opts.showall),(c=t("#ms-"+r.opts.selector)).slideToggle(),d.hide(),u.on("click",function(t){c.slideToggle()}),d.on("click",function(t){l.multiSelect("deselect_all")}))}},o={init:function(e){var r=this;if(!this.length){var o,i=arguments,s=e,n=[];e=t.extend({},t.fn.krautgrid.defaults,2==i.length?i[1]:{});for(var l=0;l<s.length;l++)(o=new Image).src=s[l],n.push(o);r=this.add(n).appendTo(e.target)}return a.loadTiles.call(new a.grid(r,t.extend({},t.fn.krautgrid.defaults,e||{}))),r}};t.fn.krautgrid=function(t){return o[t]?o[t].apply(this,Array.prototype.slice.call(arguments,1)):o.init.apply(this,arguments)},t.fn.krautgrid.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,r,a){var o=t.fn.krautlightbox("access").css3,i=function(){var e=" -webkit- -moz- -o- -ms- ".split(" ");try{return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)||function(t){return window.matchMedia(t).matches}(["(",e.join("touch-enabled),("),"heartz",")"].join(""))}catch(e){var r=t('<div id="kraut-lb-touch-device"></div>');return _.b.append(r),r.position().top<0&&(r.remove(),!0)}}();t.fn.krautlightbox("access","pinch",function(e,r){var s;return t(this).each(function(n,l){var u;(l=t(l)).data("kraut-pinchzoom",u=new function(e,r,s){function n(){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 u(t){return t.e.join(", ")}function d(t){var e=v.width*t-v.cwidth,r=v.height*t-v.cheight;E=-Math.abs(e<0?0:e),j=-Math.abs(r<0?0:r)}var c,h,p,m=1,f=0,g=0,b=!1,v=this,y="kraut-lb-zoom-container-"+function(t,e){e=e||"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var r="",a=0;a<t;a++){var o=Math.floor(Math.random()*e.length);r+=e.substring(o,o+1)}return r}(10);this._el=o(e),this.$el=e.css({display:"block"}),this.container=p=t('<div id="'+y+'"></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:r||this.width,height:s||this.height,overflow:i?"hidden":"auto"});var w,k,T,S,C,_,x,L,I=0,E=0,j=0,V=0,z=0,U=0,$=!1,Q=!1;n(),this.transformStart=function(t){Q&&(Q=!1,v.dragEnd(t)),n(),$=!0,1==$TS_VCSC_Hammer_ReleaseNew?(w=t.center.x,k=t.center.y):(w=t.gesture.center.pageX,k=t.gesture.center.pageY),T=p.scrollLeft(),S=p.scrollTop(),C=p.offset(),_=C.left,x=C.top,v.centerX=c=(w-_-f-z)/v.width/v.scale,c=c<0?0:c>1?1:c,v.centerY=h=(k-x-g-U)/v.height/v.scale,h=h<0?0:h>1?1:h},this.transformStart2=function(t){Q&&(Q=!1,v.dragEnd(t)),n(),$=!0,w=t.center.x,k=t.center.y,T=p.scrollLeft(),S=p.scrollTop(),C=p.offset(),_=C.left,x=C.top,v.centerX=c=(w-_-f-z)/v.width/v.scale,c=c<0?0:c>1?1:c,v.centerY=h=(k-x-g-U)/v.height/v.scale,h=h<0?0:h>1?1:h},this.drag=function(t){if(!$){1==$TS_VCSC_Hammer_ReleaseNew?(z=t.deltaX+f+I,U=t.deltaY+g+V):(b=t.gesture,z=b.deltaX+f+I,U=b.deltaY+g+V),d(m);var e=l(m);e.e[12]=z=z<0?z>E?z:E:0,e.e[13]=U=U<0?U>j?U:j:0,v._el.transform("matrix3d",u(L=e))}},this.drag2=function(t){if(!$){z=t.deltaX+f+I,U=t.deltaY+g+V,d(m);var e=l(m);e.e[12]=z=z<0?z>E?z:E:0,e.e[13]=U=U<0?U>j?U:j:0,v._el.transform("matrix3d",u(L=e))}},this.pinch=function(t){$=!0,b=1==$TS_VCSC_Hammer_ReleaseNew?t:t.gesture,(m=v.scale*b.scale)<1&&(m=1),m>5&&(m=5),d(m),I=(v.scale-m)*v.width*v.centerX+f+z,V=(v.scale-m)*v.height*v.centerY+g+z;var e=l(m);e.e[12]=I=I<0?I>E?I:E:0,e.e[13]=V=V<0?V>j?V:j:0,v._el.transform("matrix3d",u(L=e))},this.pinch2=function(t){$=!0,(m=v.scale*t.scale)<1&&(m=1),m>5&&(m=5),d(m),I=(v.scale-m)*v.width*v.centerX+f+z,V=(v.scale-m)*v.height*v.centerY+g+z;var e=l(m);e.e[12]=I=I<0?I>E?I:E:0,e.e[13]=V=V<0?V>j?V:j:0,v._el.transform("matrix3d",u(L=e))},this.transformEnd=function(t){v.scale=m,v.transform=L,$=!0,f=I,g=V,z=U=I=V=0},this.transformEnd2=function(t){v.scale=m,v.transform=L,$=!0,f=I,g=V,z=U=I=V=0},this.dragEnd=function(t){Q=!1,$?$=!1:(v.transform=L,f=z,g=U,I=V=z=U=0)},this.dragEnd2=function(t){Q=!1,$?$=!1:(v.transform=L,f=z,g=U,I=V=z=U=0)},this.dragStart=function(t){n(),$||($=!1,Q=!0)},this.dragStart2=function(t){n(),$||($=!1,Q=!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 r=0,a=0,o=0;o<e;)r+=t[0].end.x-t[0].start.x,a+=t[0].end.y-t[0].start.y,o++;return{x:Math.round(r/e),y:Math.round(a/e)}},i&&(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,r)),s===a?s=t(u.container):s.add(u.container)}),s})}(jQuery,window,document),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self,t.urlParser=e())}(this,function(){"use strict";function t(e){"@babel/helpers - typeof";return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(){for(var t=0,e=["parseProvider","parse","bind","create"];t<e.length;t++){var r=e[t];this[r]=this[r].bind(this)}this.plugins={}}function r(){this.provider="canalplus",this.defaultFormat="embed",this.formats={embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video"}}function a(){this.provider="coub",this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video"}}function o(){this.provider="dailymotion",this.alternatives=["dai"],this.defaultFormat="long",this.formats={short:this.createShortUrl,long:this.createLongUrl,embed:this.createEmbedUrl,image:this.createImageUrl},this.mediaTypes={VIDEO:"video"}}function i(){this.provider="twitch",this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video",STREAM:"stream",CLIP:"clip"}}function s(){this.provider="vimeo",this.alternatives=["vimeopro"],this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video"}}function n(){this.provider="wistia",this.alternatives=[],this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl,embedjsonp:this.createEmbedJsonpUrl},this.mediaTypes={VIDEO:"video",EMBEDVIDEO:"embedvideo"}}function l(){this.provider="youku",this.defaultFormat="long",this.formats={embed:this.createEmbedUrl,long:this.createLongUrl,flash:this.createFlashUrl,static:this.createStaticUrl},this.mediaTypes={VIDEO:"video"}}function u(){this.provider="youtube",this.alternatives=["youtu","ytimg"],this.defaultFormat="long",this.formats={short:this.createShortUrl,long:this.createLongUrl,embed:this.createEmbedUrl,shortImage:this.createShortImageUrl,longImage:this.createLongImageUrl},this.imageQualities={0:"0",1:"1",2:"2",3:"3",DEFAULT:"default",HQDEFAULT:"hqdefault",SDDEFAULT:"sddefault",MQDEFAULT:"mqdefault",MAXRESDEFAULT:"maxresdefault"},this.defaultImageQuality=this.imageQualities.HQDEFAULT,this.mediaTypes={VIDEO:"video",PLAYLIST:"playlist",SHARE:"share",CHANNEL:"channel"}}function d(){this.provider="soundcloud",this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl},this.mediaTypes={TRACK:"track",PLAYLIST:"playlist",APITRACK:"apitrack",APIPLAYLIST:"apiplaylist"}}function c(){this.provider="teachertube",this.alternatives=[],this.defaultFormat="long",this.formats={long:this.createLongUrl,embed:this.createEmbedUrl},this.mediaTypes={VIDEO:"video",AUDIO:"audio",DOCUMENT:"document",CHANNEL:"channel",COLLECTION:"collection",GROUP:"group"}}function h(){this.provider="tiktok",this.defaultFormat="long",this.formats={long:this.createLongUrl},this.mediaTypes={VIDEO:"video"}}var p={getQueryParams:function(t){if("string"!=typeof t)return{};var e,r={},a=(t=t.split("+").join(" ")).match(/(?:[?](?:[^=]+)=(?:[^&#]*)(?:[&](?:[^=]+)=(?:[^&#]*))*(?:[#].*)?)|(?:[#].*)/);if(null===a)return{};e=a[0].substr(1).split(/[&#=]/);for(var o=0;o<e.length;o+=2)r[decodeURIComponent(e[o])]=decodeURIComponent(e[o+1]||"");return r},combineParams:function(e,r){if("object"!==t(e))return"";var a="",o=0,i=Object.keys(e);if(0===i.length)return"";for(i.sort(),r||(a+="?"+i[0]+"="+e[i[0]],o+=1);o<i.length;o+=1)a+="&"+i[o]+"="+e[i[o]];return a},getTime:function(t){return void 0===t?0:t.match(/^(\d+[smhdw]?)+$/)?function(t){var e,r=0,a={s:1,m:60,h:3600,d:86400,w:604800};e=(t=t.replace(/([smhdw])/g," $1 ").trim()).split(" ");for(var o=0;o<e.length;o+=2)r+=parseInt(e[o],10)*a[e[o+1]||"s"];return r}(t):t.match(/^(\d+:?)+$/)?function(t){for(var e=0,r=[1,60,3600,86400,604800],a=t.split(":"),o=0;o<a.length;o++)e+=parseInt(a[o],10)*r[a.length-o-1];return e}(t):0}},m=p.getQueryParams,f=e;e.prototype.parseProvider=function(t){var e=t.match(/(?:(?:https?:)?\/\/)?(?:[^.]+\.)?(\w+)\./i);return e?e[1]:void 0},e.prototype.parse=function(t){if(void 0!==t){var e,r=this.parseProvider(t),a=this.plugins[r];if(r&&a&&a.parse)return(e=a.parse.call(a,t,m(t)))&&((e=function(t){return t.params&&0===Object.keys(t.params).length&&delete t.params,t}(e)).provider=a.provider),e}},e.prototype.bind=function(t){if(this.plugins[t.provider]=t,t.alternatives)for(var e=0;e<t.alternatives.length;e+=1)this.plugins[t.alternatives[e]]=t},e.prototype.create=function(e){if("object"===t(e)&&"object"===t(e.videoInfo)){var r=e.videoInfo,a=e.params,o=this.plugins[r.provider];return a="internal"===a?r.params:a||{},o&&(e.format=e.format||o.defaultFormat,o.formats.hasOwnProperty(e.format))?o.formats[e.format].apply(o,[r,Object.assign({},a)]):void 0}};var g=new f,b=p.combineParams;r.prototype.parseParameters=function(t){return delete t.vid,t},r.prototype.parse=function(t,e){var r={mediaType:this.mediaTypes.VIDEO,id:e.vid};if(r.params=this.parseParameters(e),r.id)return r},r.prototype.createEmbedUrl=function(t,e){if(t.id&&t.mediaType===this.mediaTypes.VIDEO){var r="http://player.canalplus.fr/embed/";return e.vid=t.id,r+=b(e)}},g.bind(new r);var v=p.combineParams;a.prototype.parseUrl=function(t){var e=t.match(/(?:embed|view)\/([a-zA-Z\d]+)/i);return e?e[1]:void 0},a.prototype.parse=function(t,e){var r={mediaType:this.mediaTypes.VIDEO,params:e,id:this.parseUrl(t)};if(r.id)return r},a.prototype.createUrl=function(t,e,r){if(e.id&&e.mediaType===this.mediaTypes.VIDEO){var a=t+e.id;return a+=v(r)}},a.prototype.createLongUrl=function(t,e){return this.createUrl("https://coub.com/view/",t,e)},a.prototype.createEmbedUrl=function(t,e){return this.createUrl("//coub.com/embed/",t,e)},g.bind(new a);var y=p.combineParams,w=p.getTime;o.prototype.parseParameters=function(t){return this.parseTime(t)},o.prototype.parseTime=function(t){return t.start&&(t.start=w(t.start)),t},o.prototype.parseUrl=function(t){var e=t.match(/(?:\/video|ly)\/([A-Za-z0-9]+)/i);return e?e[1]:void 0},o.prototype.parse=function(t,e){var r={mediaType:this.mediaTypes.VIDEO,params:this.parseParameters(e),id:this.parseUrl(t)};return r.id?r:void 0},o.prototype.createUrl=function(t,e,r){if(e.id&&e.mediaType===this.mediaTypes.VIDEO)return t+e.id+y(r)},o.prototype.createShortUrl=function(t,e){return this.createUrl("https://dai.ly/",t,e)},o.prototype.createLongUrl=function(t,e){return this.createUrl("https://dailymotion.com/video/",t,e)},o.prototype.createEmbedUrl=function(t,e){return this.createUrl("https://www.dailymotion.com/embed/video/",t,e)},o.prototype.createImageUrl=function(t,e){return delete e.start,this.createUrl("https://www.dailymotion.com/thumbnail/video/",t,e)},g.bind(new o);var k=p.combineParams,T=p.getTime;i.prototype.seperateId=function(t){return{pre:t[0],id:t.substr(1)}},i.prototype.parseChannel=function(t,e){var r=e.channel||e.utm_content||t.channel;return delete e.utm_content,delete e.channel,r},i.prototype.parseUrl=function(t,e,r){var a;return(a=t.match(/(clips\.)?twitch\.tv\/(?:(?:videos\/(\d+))|(\w+)(?:\/clip\/(\w+))?)/i))&&a[2]?e.id="v"+a[2]:r.video?(e.id=r.video,delete r.video):r.clip?(e.id=r.clip,e.isClip=!0,delete r.clip):a&&a[1]&&a[3]?(e.id=a[3],e.isClip=!0):a&&a[3]&&a[4]?(e.channel=a[3],e.id=a[4],e.isClip=!0):a&&a[3]&&(e.channel=a[3]),e},i.prototype.parseMediaType=function(t){var e;return t.id?t.isClip?(e=this.mediaTypes.CLIP,delete t.isClip):e=this.mediaTypes.VIDEO:t.channel&&(e=this.mediaTypes.STREAM),e},i.prototype.parseParameters=function(t){return t.t&&(t.start=T(t.t),delete t.t),t},i.prototype.parse=function(t,e){var r={};return r=this.parseUrl(t,r,e),r.channel=this.parseChannel(r,e),r.mediaType=this.parseMediaType(r),r.params=this.parseParameters(e),r.channel||r.id?r:void 0},i.prototype.createLongUrl=function(t,e){var r="";if(t.mediaType===this.mediaTypes.STREAM&&t.channel)r="https://twitch.tv/"+t.channel;else if(t.mediaType===this.mediaTypes.VIDEO&&t.id){r="https://twitch.tv/videos/"+this.seperateId(t.id).id,e.start&&(e.t=e.start+"s",delete e.start)}else{if(t.mediaType!==this.mediaTypes.CLIP||!t.id)return;r=t.channel?"https://www.twitch.tv/"+t.channel+"/clip/"+t.id:"https://clips.twitch.tv/"+t.id}return r+=k(e)},i.prototype.createEmbedUrl=function(t,e){var r="https://player.twitch.tv/";if(t.mediaType===this.mediaTypes.STREAM&&t.channel)e.channel=t.channel;else if(t.mediaType===this.mediaTypes.VIDEO&&t.id)e.video=t.id,e.start&&(e.t=e.start+"s",delete e.start);else{if(t.mediaType!==this.mediaTypes.CLIP||!t.id)return;r="https://clips.twitch.tv/embed",e.clip=t.id}return r+=k(e)},g.bind(new i);var S=p.combineParams,C=p.getTime;s.prototype.parseUrl=function(t){var e=t.match(/(?:\/(?:channels\/[\w]+|(?:(?:album\/\d+|groups\/[\w]+)\/)?videos?))?\/(\d+)/i);return e?e[1]:void 0},s.prototype.parseParameters=function(t){return this.parseTime(t)},s.prototype.parseTime=function(t){return t.t&&(t.start=C(t.t),delete t.t),t},s.prototype.parse=function(t,e){var r={mediaType:this.mediaTypes.VIDEO,params:this.parseParameters(e),id:this.parseUrl(t)};return r.id?r:void 0},s.prototype.createUrl=function(t,e,r){if(e.id&&e.mediaType===this.mediaTypes.VIDEO){var a=t+e.id,o=r.start;return delete r.start,a+=S(r),o&&(a+="#t="+o),a}},s.prototype.createLongUrl=function(t,e){return this.createUrl("https://vimeo.com/",t,e)},s.prototype.createEmbedUrl=function(t,e){return this.createUrl("//player.vimeo.com/video/",t,e)},g.bind(new s);var _=p.combineParams,x=p.getTime;n.prototype.parseUrl=function(t){var e=t.match(/(?:(?:medias|iframe)\/|wvideo=)([\w-]+)/);return e?e[1]:void 0},n.prototype.parseChannel=function(t){var e=t.match(/(?:(?:https?:)?\/\/)?([^.]*)\.wistia\./),r=e?e[1]:void 0;if("fast"!==r&&"content"!==r)return r},n.prototype.parseParameters=function(t,e){return t.wtime&&(t.start=x(t.wtime),delete t.wtime),t.wvideo===e.id&&delete t.wvideo,t},n.prototype.parseMediaType=function(t){return t.id&&t.channel?this.mediaTypes.VIDEO:t.id?(delete t.channel,this.mediaTypes.EMBEDVIDEO):void 0},n.prototype.parse=function(t,e){var r={id:this.parseUrl(t),channel:this.parseChannel(t)};if(r.params=this.parseParameters(e,r),r.mediaType=this.parseMediaType(r),r.id)return r},n.prototype.createUrl=function(t,e,r){return e.start&&(e.wtime=e.start,delete e.start),r+=_(e)},n.prototype.createLongUrl=function(t,e){if(t.id&&t.mediaType===this.mediaTypes.VIDEO){var r="https://"+t.channel+".wistia.com/medias/"+t.id;return this.createUrl(t,e,r)}},n.prototype.createEmbedUrl=function(t,e){if(t.id&&(t.mediaType===this.mediaTypes.VIDEO||t.mediaType===this.mediaTypes.EMBEDVIDEO)){var r="https://fast.wistia.com/embed/iframe/"+t.id;return this.createUrl(t,e,r)}},n.prototype.createEmbedJsonpUrl=function(t){if(t.id&&(t.mediaType===this.mediaTypes.VIDEO||t.mediaType===this.mediaTypes.EMBEDVIDEO))return"https://fast.wistia.com/embed/medias/"+t.id+".jsonp"},g.bind(new n);var L=p.combineParams;l.prototype.parseUrl=function(t){var e=t.match(/(?:(?:embed|sid)\/|v_show\/id_|VideoIDS=)([a-zA-Z0-9]+)/);return e?e[1]:void 0},l.prototype.parseParameters=function(t){return t.VideoIDS&&delete t.VideoIDS,t},l.prototype.parse=function(t,e){var r={mediaType:this.mediaTypes.VIDEO,id:this.parseUrl(t),params:this.parseParameters(e)};if(r.id)return r},l.prototype.createUrl=function(t,e,r){if(e.id&&e.mediaType===this.mediaTypes.VIDEO){var a=t+e.id;return a+=L(r)}},l.prototype.createEmbedUrl=function(t,e){return this.createUrl("http://player.youku.com/embed/",t,e)},l.prototype.createLongUrl=function(t,e){return this.createUrl("http://v.youku.com/v_show/id_",t,e)},l.prototype.createStaticUrl=function(t,e){return this.createUrl("http://static.youku.com/v1.0.0638/v/swf/loader.swf?VideoIDS=",t,e)},l.prototype.createFlashUrl=function(t,e){if(t.id&&t.mediaType===this.mediaTypes.VIDEO){var r="http://player.youku.com/player.php/sid/"+t.id+"/v.swf";return r+=L(e)}},g.bind(new l);var I=p.combineParams,E=p.getTime;u.prototype.parseVideoUrl=function(t){var e=t.match(/(?:(?:v|vi|be|videos|embed)\/(?!videoseries)|(?:v|ci)=)([\w-]{11})/i);return e?e[1]:void 0},u.prototype.parseChannelUrl=function(t){var e=t.match(/\/channel\/([\w-]+)/);return e?{id:e[1],mediaType:this.mediaTypes.CHANNEL}:(e=t.match(/\/(?:c|user)\/([\w-]+)/))?{name:e[1],mediaType:this.mediaTypes.CHANNEL}:void 0},u.prototype.parseParameters=function(t,e){return(t.start||t.t)&&(t.start=E(t.start||t.t),delete t.t),t.v===e.id&&delete t.v,t.list===e.id&&delete t.list,t},u.prototype.parseMediaType=function(t){if(t.params.list&&(t.list=t.params.list,delete t.params.list),t.id&&!t.params.ci)t.mediaType=this.mediaTypes.VIDEO;else if(t.list)delete t.id,t.mediaType=this.mediaTypes.PLAYLIST;else{if(!t.params.ci)return;delete t.params.ci,t.mediaType=this.mediaTypes.SHARE}return t},u.prototype.parse=function(t,e){var r=this.parseChannelUrl(t);if(r)return r;var a={params:e,id:this.parseVideoUrl(t)};return a.params=this.parseParameters(e,a),a=this.parseMediaType(a)},u.prototype.createShortUrl=function(t,e){if(t.id&&t.mediaType===this.mediaTypes.VIDEO){var r="https://youtu.be/"+t.id;return e.start&&(r+="#t="+e.start),r}},u.prototype.createLongUrl=function(t,e){var r="",a=e.start;if(delete e.start,t.mediaType===this.mediaTypes.CHANNEL)if(t.id)r+="https://www.youtube.com/channel/"+t.id;else{if(!t.name)return;r+="https://www.youtube.com/c/"+t.name}else if(t.mediaType===this.mediaTypes.PLAYLIST&&t.list)e.feature="share",r+="https://www.youtube.com/playlist";else if(t.mediaType===this.mediaTypes.VIDEO&&t.id)e.v=t.id,r+="https://www.youtube.com/watch";else{if(t.mediaType!==this.mediaTypes.SHARE||!t.id)return;e.ci=t.id,r+="https://www.youtube.com/shared"}return t.list&&(e.list=t.list),r+=I(e),t.mediaType!==this.mediaTypes.PLAYLIST&&a&&(r+="#t="+a),r},u.prototype.createEmbedUrl=function(t,e){var r="https://www.youtube-nocookie.com/embed";if(t.mediaType===this.mediaTypes.PLAYLIST&&t.list)e.listType="playlist";else{if(t.mediaType!==this.mediaTypes.VIDEO||!t.id)return;r+="/"+t.id,"1"===e.loop&&(e.playlist=t.id)}return t.list&&(e.list=t.list),r+=I(e)},u.prototype.createImageUrl=function(t,e,r){if(e.id&&e.mediaType===this.mediaTypes.VIDEO){return t+e.id+"/"+(r.imageQuality||this.defaultImageQuality)+".jpg"}},u.prototype.createShortImageUrl=function(t,e){return this.createImageUrl("https://i.ytimg.com/vi/",t,e)},u.prototype.createLongImageUrl=function(t,e){return this.createImageUrl("https://img.youtube.com/vi/",t,e)},g.bind(new u);var j=p.combineParams,V=p.getTime;d.prototype.parseUrl=function(t,e){var r=t.match(/(?:m\.)?soundcloud\.com\/(?:([\w-]+)\/(sets\/)?)([\w-]+)/i);return r?(e.channel=r[1],"playlists"===r[1]||r[2]?e.list=r[3]:e.id=r[3],e):e},d.prototype.parseParameters=function(t){return t.t&&(t.start=V(t.t),delete t.t),t},d.prototype.parseMediaType=function(t){return t.id&&("tracks"===t.channel?(delete t.channel,delete t.params.url,t.mediaType=this.mediaTypes.APITRACK):t.mediaType=this.mediaTypes.TRACK),t.list&&("playlists"===t.channel?(delete t.channel,delete t.params.url,t.mediaType=this.mediaTypes.APIPLAYLIST):t.mediaType=this.mediaTypes.PLAYLIST),t},d.prototype.parse=function(t,e){var r={};if(r=this.parseUrl(t,r),r.params=this.parseParameters(e),(r=this.parseMediaType(r)).id||r.list)return r},d.prototype.createLongUrl=function(t,e){var r="",a=e.start;if(delete e.start,t.mediaType===this.mediaTypes.TRACK&&t.id&&t.channel)r="https://soundcloud.com/"+t.channel+"/"+t.id;else if(t.mediaType===this.mediaTypes.PLAYLIST&&t.list&&t.channel)r="https://soundcloud.com/"+t.channel+"/sets/"+t.list;else if(t.mediaType===this.mediaTypes.APITRACK&&t.id)r="https://api.soundcloud.com/tracks/"+t.id;else{if(t.mediaType!==this.mediaTypes.APIPLAYLIST||!t.list)return;r="https://api.soundcloud.com/playlists/"+t.list}return r+=j(e),a&&(r+="#t="+a),r},d.prototype.createEmbedUrl=function(t,e){var r="https://w.soundcloud.com/player/";if(delete e.start,t.mediaType===this.mediaTypes.APITRACK&&t.id)e.url="https%3A//api.soundcloud.com/tracks/"+t.id;else{if(t.mediaType!==this.mediaTypes.APIPLAYLIST||!t.list)return;e.url="https%3A//api.soundcloud.com/playlists/"+t.list}return r+=j(e)},g.bind(new d);var z=p.combineParams;c.prototype.parse=function(t,e){var r={};r.list=this.parsePlaylist(e),r.params=e;var a=t.match(/\/(audio|video|document|user\/channel|collection|group)\/(?:[\w-]+-)?(\w+)/);if(a)return r.mediaType=this.parseMediaType(a[1]),r.id=a[2],r},c.prototype.parsePlaylist=function(t){if(t["playlist-id"]){var e=t["playlist-id"];return delete t["playlist-id"],e}},c.prototype.parseMediaType=function(t){switch(t){case"audio":return this.mediaTypes.AUDIO;case"video":return this.mediaTypes.VIDEO;case"document":return this.mediaTypes.DOCUMENT;case"user/channel":return this.mediaTypes.CHANNEL;case"collection":return this.mediaTypes.COLLECTION;case"group":return this.mediaTypes.GROUP}},c.prototype.createLongUrl=function(t,e){if(t.id){var r="https://www.teachertube.com/";return t.list&&(e["playlist-id"]=t.list),t.mediaType===this.mediaTypes.CHANNEL?r+="user/channel/":r+=t.mediaType+"/",r+=t.id,r+=z(e)}},c.prototype.createEmbedUrl=function(t,e){if(t.id){var r="https://www.teachertube.com/embed/";if(t.mediaType===this.mediaTypes.VIDEO||t.mediaType===this.mediaTypes.AUDIO)return r+=t.mediaType+"/"+t.id,r+=z(e)}},g.bind(new c);var U=p.combineParams;h.prototype.parse=function(t,e){var r={params:e,mediaType:this.mediaTypes.VIDEO},a=t.match(/@([^/]+)\/video\/(\d{19})/);if(a)return r.channel=a[1],r.id=a[2],r},h.prototype.createLongUrl=function(t,e){var r="";if(t.mediaType===this.mediaTypes.VIDEO&&t.id&&t.channel)return r+="https://www.tiktok.com/@".concat(t.channel,"/video/").concat(t.id),r+=U(e)},g.bind(new h);return g}),function(){"use strict";var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},e="undefined"!=typeof module&&module.exports,r="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,a=function(){for(var e,r=[["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"]],a=0,o=r.length,i={};a<o;a++)if((e=r[a])&&e[1]in t){for(a=0;a<e.length;a++)i[r[0][a]]=e[a];return i}return!1}(),o={change:a.fullscreenchange,error:a.fullscreenerror},i={request:function(e){return new Promise(function(o){var i=a.requestFullscreen,s=function(){this.off("change",s),o()}.bind(this);e=e||t.documentElement,/ Version\/5\.1(?:\.\d+)? Safari\//.test(navigator.userAgent)?e[i]():e[i](r?Element.ALLOW_KEYBOARD_INPUT:{}),this.on("change",s)}.bind(this))},exit:function(){return new Promise(function(e){if(this.isFullscreen){var r=function(){this.off("change",r),e()}.bind(this);t[a.exitFullscreen](),this.on("change",r)}else e()}.bind(this))},toggle:function(t){return this.isFullscreen?this.exit():this.request(t)},onchange:function(t){this.on("change",t)},onerror:function(t){this.on("error",t)},on:function(e,r){var a=o[e];a&&t.addEventListener(a,r,!1)},off:function(e,r){var a=o[e];a&&t.removeEventListener(a,r,!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,module.exports.default=i):window.screenfull=i):e?module.exports=!1:window.screenfull=!1}();