Files
sls/js/lc_lightbox.min.js
2024-04-06 11:55:24 +02:00

127 lines
56 KiB
JavaScript

/**
* LC Lightbox
* yet.. another jQuery lightbox.. or not?
*
* @version : 1.2.10
* @copyright : Luca Montanari aka LCweb
* @website : https://lcweb.it
* @requires : jQuery v1.7 or later
* Commercial license
*/
/*
: Luca Montanari aka LCweb
@website : https://lcweb.it
@requires : jQuery v1.7 or later
Commercial license
*/
(function(b){lcl_objs=[];lcl_is_active=lcl_shown=!1;lcl_slideshow=void 0;lcl_on_mobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);lcl_hashless_url=lcl_deeplink_tracked=lcl_curr_vars=lcl_curr_opts=lcl_curr_obj=!1;lcl_url_hash="";lcl_vid_instance_num=0;lc_lightbox=function(p,N){if("string"!=typeof p&&("object"!=typeof p||!p.length))return!1;var z=!1;b.each(lcl_objs,function(q,h){if(JSON.stringify(h)==JSON.stringify(p))return z=h,!1});if(!1===z){var A=
new ja(p,N);lcl_objs.push(A);return A}return z};lcl_destroy=function(p){p=b.inArray(p,lcl_objs);-1!==p&&lcl_objs.splice(p,1)};var ja=function(p,N){var z=b.extend({gallery:!0,gallery_hook:"rel",live_elements:!0,preload_all:!1,global_type:!1,deeplink:!1,img_zoom:!1,comments:!1,src_attr:"href",title_attr:"title",txt_attr:"data-lcl-txt",author_attr:"data-lcl-author",slideshow:!0,open_close_time:400,ol_time_diff:100,fading_time:80,animation_time:250,slideshow_time:6E3,autoplay:!1,counter:!1,progressbar:!0,
carousel:!0,max_width:"93%",max_height:"93%",wrap_padding:!1,ol_opacity:.7,ol_color:"#111",ol_pattern:!1,border_w:0,border_col:"#ddd",padding:0,radius:0,shadow:!0,remove_scrollbar:!0,wrap_class:"",skin:"light",data_position:"over",cmd_position:"inner",ins_close_pos:"normal",nav_btn_pos:"normal",txt_hidden:500,show_title:!0,show_descr:!0,show_author:!0,thumbs_nav:!0,tn_icons:!0,tn_hidden:500,thumbs_w:110,thumbs_h:110,thumb_attr:!1,thumbs_maker_url:!1,fullscreen:!1,fs_img_behavior:"fit",fs_only:500,
browser_fs_mode:!0,socials:!1,fb_share_params:!1,txt_toggle_cmd:!0,download:!1,touchswipe:!0,mousewheel:!0,modal:!1,rclick_prevent:!1,elems_parsed:function(){},html_is_ready:function(){},on_open:function(){},on_elem_switch:function(){},slideshow_start:function(){},slideshow_end:function(){},on_fs_enter:function(){},on_fs_exit:function(){},on_close:function(){}},N),A={elems:[],is_arr_instance:"string"!=typeof p&&"undefined"==typeof p[0].childNodes?!0:!1,elems_count:"string"!=typeof p&&"undefined"==
typeof p[0].childNodes?p.length:b(p).length,elems_selector:"string"==typeof p?p:!1,elem_index:!1,gallery_hook_val:!1,preload_all_used:!1,img_sizes_cache:[],vimeo_thumb_cache:[],inner_cmd_w:!1,txt_exists:!1,txt_und_sizes:!1,force_fullscreen:!1,html_style:"",body_style:""};"string"==typeof p&&(p=b(p));var q=b.data(p,"lcl_settings",z),h=b.data(p,"lcl_vars",A),I=function(c){if("string"!=typeof c)return c;for(var d=0,e=0,f=c.toString().length;e<f;)d=(d<<5)-d+c.charCodeAt(e++)<<0;return 0>d?-1*d:d},ka=
function(c){var d=!1;b.each(h.elems,function(e,f){if(f.hash==c)return d=f,!1});return d},U=function(c,d){var e="";switch(c){case "youtube":e=(e=d.src.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&\?]*).*/))&&11==e[7].length?e[7]:!1;break;case "vimeo":e=d.src.split("/");e=e[e.length-1];break;case "dailymotion":e=d.src.split("/"),e=e[e.length-1].split("_")[0]}return e},K=function(c){if(!c)return c;c=c.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&quot;/g,
'"').replace(/&#039;/g,"'");return b.trim(c)},O=function(c,d){var e=q[d];return-1!==e.indexOf("> ")?c.find(e.replace("> ","")).length?b.trim(c.find(e.replace("> ","")).html()):"":"undefined"!=typeof c.attr(e)?K(c.attr(e)):""},la=function(c){var d=q,e=[];c.each(function(){var f=b(this),g=f.attr(d.src_attr),k=I(g);if(h.gallery_hook_val&&f.attr(d.gallery_hook)!=h.gallery_hook_val)return!0;k=ka(k);if(!k){k=g;var n=f.data("lcl-type");"undefined"==typeof n&&(n=q.global_type);if(-1===b.inArray(n,"image video youtube vimeo dailymotion html iframe".split(" "))){k=
k.toLowerCase();n=/^(http|https)?:\/\/(?:[a-z\-]+\.)+[a-z]{2,6}(?:\/[^\/#?]+)+\.(?:mp4|ogg|webm)$/;var l=/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/,m=/^(http|https)?:\/\/[a-zA-Z0-9-\.]+\.[a-z]{2,4}/;n=/^(http|https)?:\/\/(?:[a-z\-]+\.)+[a-z]{2,6}(?:\/[^\/#?]+)+\.(?:jpe?g|gif|png)$/.test(k)?"image":n.test(k)?"video":l.test(k)?"youtube":-1!==k.indexOf("vimeo.com/")?"vimeo":-1!==k.indexOf("dailymotion.com/video")?"dailymotion":
m.test(k)?"iframe":"#"==k.substr(0,1)&&b(k).length?"html":"unknown"}"unknown"!=n?(k={src:g,type:n,hash:d.deeplink?I(g):!1,title:d.show_title?O(f,"title_attr"):"",txt:d.show_descr?O(f,"txt_attr"):"",author:d.show_author?O(f,"author_attr"):"",thumb:d.thumb_attr&&"undefined"!=typeof d.thumb_attr?f.attr(d.thumb_attr):"",width:"image"!=n&&"undefined"!=typeof f.data("lcl-w")?f.data("lcl-w"):!1,height:"image"!=n&&"undefined"!=typeof f.data("lcl-h")?f.data("lcl-h"):!1,force_over_data:"undefined"!=typeof f.data("lcl-force-over-data")?
parseInt(f.data("lcl-force-over-data"),10):"",force_outer_cmd:"undefined"!=typeof f.data("lcl-outer-cmd")?f.data("lcl-outer-cmd"):"",canonical_url:"undefined"!=typeof f.data("lcl-canonical-url")?f.data("lcl-canonical-url"):""},k.download="image"==n?"undefined"!=typeof f.data("lcl-path")?f.data("lcl-path"):g:"video"!=n&&"html"!=n||"undefined"==typeof f.data("lcl-path")?!1:f.data("lcl-path"),-1!==b.inArray(n,["youtube","vimeo","dailymotion"])&&(k.video_id=U(n,k)),"image"!=n&&"undefined"!=typeof f.data("lcl-poster")&&
("youtube"==n&&"auto"==f.data("lcl-poster")?k.poster="https://img.youtube.com/vi/"+k.video_id+"/maxresdefault.jpg":k.poster=f.data("lcl-poster"))):k={src:g,type:n,hash:d.deeplink?I(g):!1}}e.push(k)});2>e.length&&b(".lcl_prev, .lcl_next, #lcl_thumb_nav").remove();if(!e.length)return!1;h.elems=e;return!0},V=function(){if(2>h.elems.length||!q.gallery)return!1;0<h.elem_index&&E(!1,h.elem_index-1);h.elem_index!=h.elems.length-1&&E(!1,h.elem_index+1)},E=function(c,d,e){var f=h;"undefined"==typeof d&&(d=
f.elem_index);if("undefined"==typeof d)return!1;var g="image"==f.elems[d].type||-1!==b.inArray(f.elems[d].type,["video","youtube","vimeo","dailymotion"])&&f.elems[d].poster?"image"==f.elems[d].type?f.elems[d].src:f.elems[d].poster:"";g&&"undefined"==typeof f.img_sizes_cache[g]?b("<img/>").bind("load",function(){f.img_sizes_cache[g]={w:this.width,h:this.height};c&&d==f.elem_index&&W()}).attr("src",g):((c||"undefined"!=typeof e)&&b("#lcl_loader").addClass("no_loader"),c&&W())};b(document).on("click",
".lcl_postered_video:not(.lcl_poster_clicked)",function(){var c=b(this).find("iframe");b(this).addClass("lcl_poster_clicked");c.attr("src",c.data("lazy-src"));c.on("load",function(){b("#lcl_wrap").addClass("lcl_playing_video");setTimeout(function(){c.parent().removeAttr("style")},100)})});var ma=function(){var c=b("#lcl_wrap[lc-lelem="+h.elem_index+"] #lcl_elem_wrap > iframe");if(!c.length)return!1;b("#lcl_wrap").addClass("lcl_loading_iframe");X();c.on("load",function(){b("#lcl_wrap").removeClass("lcl_loading_iframe");
setTimeout(function(){b("iframe.lcl_elem").length&&b("iframe.lcl_elem")[0].contentWindow.focus()},20);b(".lcl_is_playing").length&&lcl_start_slideshow(!0)})},Y=function(c,d){var e=b.data(c,"lcl_settings"),f=b.data(c,"lcl_vars");if(f.is_arr_instance){var g=[];b.each(c,function(n,l){var m={},t="undefined"==typeof l.type&&e.global_type?e.global_type:!1;"undefined"!=typeof l.type&&(t=l.type);t&&-1!==b.inArray(t,"image video youtube vimeo dailymotion html iframe".split(" "))?"undefined"!=typeof l.src&&
l.src&&(m.src=l.src,m.type=t,m.hash=I(l.src),m.title="undefined"==typeof l.title?"":K(l.title),m.txt="undefined"==typeof l.txt?"":K(l.txt),m.author="undefined"==typeof l.author?"":K(l.author),m.width="undefined"==typeof l.width?!1:l.width,m.height="undefined"==typeof l.height?!1:l.height,m.force_over_data="undefined"==typeof l.force_over_data?!1:parseInt(l.force_over_data,10),m.force_outer_cmd="undefined"==typeof l.force_outer_cmd?!1:l.force_outer_cmd,m.canonical_url="undefined"==typeof l.canonical_url?
!1:l.canonical_url,m.thumb="undefined"==typeof l.thumb?!1:l.thumb,m.download="image"==t?"undefined"!=typeof l.download?l.download:l.src:"video"!=t&&"html"!=t||"undefined"==typeof l.download?!1:l.download,-1!==b.inArray(t,["youtube","vimeo","dailymotion"])&&(m.video_id=U(t,l)),m.poster="image"==t||"undefined"==typeof l.poster?"":l.poster,g.push(m)):(m={src:m.src,type:"unknown",hash:e.deeplink?I(m.src):!1},g.push(m))});f.elems=g}else{var k=c;e.live_elements&&f.elems_selector&&(k=d&&e.gallery&&e.gallery_hook&&
"undefined"!=typeof b(p[0]).attr(e.gallery_hook)?f.elems_selector+"["+e.gallery_hook+"="+d.attr(e.gallery_hook)+"]":f.elems_selector,k=b(k));if(!la(k))return(!e.live_elements||e.live_elements&&!f.elems_selector)&&console.error("LC Lightbox - no valid elements found"),!1}e.preload_all&&!f.preload_all_used&&(f.preload_all_used=!0,b(document).ready(function(n){b.each(f.elems,function(l,m){E(!1,l)})}));"function"==typeof e.elems_parsed&&e.elems_parsed.call(null,q,h);f.is_arr_instance||(k=f.elems_selector?
b(f.elems_selector):c,k.first().trigger("lcl_elems_parsed",[f.elems]));return!0};Y(p);var Q=function(c,d){if(lcl_shown||lcl_is_active)return!1;lcl_is_active=lcl_shown=!0;lcl_curr_obj=c;q=b.data(c,"lcl_settings");h=b.data(c,"lcl_vars");lcl_curr_opts=q;lcl_curr_vars=h;var e=q,f=h,g="undefined"!=typeof d?d:!1;if(!h)return console.error("LC Lightbox - cannot open. Object not initialized"),!1;f.gallery_hook_val=g&&e.gallery&&e.gallery_hook&&"undefined"!=typeof g.attr(e.gallery_hook)?g.attr(e.gallery_hook):
!1;if(!Y(c,d))return!1;if(g)b.each(f.elems,function(k,n){if(n.src==g.attr(e.src_attr))return f.elem_index=k,!1});else if(parseInt(f.elem_index,10)>=f.elems_count)return console.error("LC Lightbox - selected index does not exist"),!1;E(!1);na();oa();f.force_fullscreen&&P(!0,!0);b("#lcl_thumbs_nav").length&&pa();E(!0);V()},Z=function(){b("#lcl_wrap").removeClass("lcl_pre_show").addClass("lcl_shown");b("#lcl_loader").removeClass("lcl_loader_pre_first_el")},na=function(){var c=q,d=h,e=[],f="";"number"==
typeof document.documentMode&&(b("body").addClass("lcl_old_ie"),"outer"!=c.cmd_position&&(c.nav_btn_pos="normal"));b("#lcl_wrap").length&&b("#lcl_wrap").remove();b("body").append('<div id="lcl_wrap" class="lcl_pre_show lcl_pre_first_el lcl_first_sizing lcl_is_resizing"><div id="lcl_window"><div id="lcl_corner_close" title="close"></div><div id="lcl_loader" class="lcl_loader_pre_first_el"><span id="lcll_1"></span><span id="lcll_2"></span></div><div id="lcl_nav_cmd"><div class="lcl_icon lcl_prev" title="previous"></div><div class="lcl_icon lcl_play"></div><div class="lcl_icon lcl_next" title="next"></div><div class="lcl_icon lcl_counter"></div><div class="lcl_icon lcl_right_icon lcl_close" title="close"></div><div class="lcl_icon lcl_right_icon lcl_fullscreen" title="toggle fullscreen"></div><div class="lcl_icon lcl_right_icon lcl_txt_toggle" title="toggle text"></div><div class="lcl_icon lcl_right_icon lcl_download" title="download"></div><div class="lcl_icon lcl_right_icon lcl_thumbs_toggle" title="toggle thumbnails"></div><div class="lcl_icon lcl_right_icon lcl_socials" title="toggle socials"></div><div class="lcl_icon lcl_right_icon lcl_zoom_icon lcl_zoom_in" title="zoom in"></div><div class="lcl_icon lcl_right_icon lcl_zoom_icon lcl_zoom_out" title="zoom out"></div></div><div id="lcl_contents_wrap"><div id="lcl_subj"><div id="lcl_elem_wrap"></div></div><div id="lcl_txt"></div></div></div><div id="lcl_thumbs_nav" class="lcl_pre_tn_scroll"></div><div id="lcl_overlay"></div></div>');
b("#lcl_wrap").attr("data-lcl-max-w",c.max_width).attr("data-lcl-max-h",c.max_height);e.push("lcl_"+c.ins_close_pos+"_close lcl_nav_btn_"+c.nav_btn_pos+" lcl_"+c.ins_close_pos+"_close lcl_nav_btn_"+c.nav_btn_pos);(!0===c.tn_hidden||"number"==typeof c.tn_hidden&&(b(window).width()<c.tn_hidden||b(window).height()<c.tn_hidden))&&e.push("lcl_tn_hidden");(!0===c.txt_hidden||"number"==typeof c.txt_hidden&&(b(window).width()<c.txt_hidden||b(window).height()<c.txt_hidden))&&e.push("lcl_hidden_txt");c.carousel||
e.push("lcl_no_carousel");c.comments&&e.push("lcl_has_comments");lcl_on_mobile&&e.push("lcl_on_mobile");c.wrap_class&&e.push(c.wrap_class);e.push("lcl_"+c.cmd_position+"_cmd");if("inner"!=c.cmd_position){var g=b("#lcl_nav_cmd").detach();b("#lcl_wrap").prepend(g)}c.slideshow||b(".lcl_play").remove();c.txt_toggle_cmd||b(".lcl_txt_toggle").remove();c.socials||b(".lcl_socials").remove();c.download||b(".lcl_download").remove();c.img_zoom||b(".lcl_zoom_icon").remove();(!c.counter||2>d.elems.length||!c.gallery)&&
b(".lcl_counter").remove();d.force_fullscreen=!1;if(!c.fullscreen)b(".lcl_fullscreen").remove();else if(!0===c.fs_only||"number"==typeof c.fs_only&&(b(window).width()<c.fs_only||b(window).height()<c.fs_only))b(".lcl_fullscreen").remove(),h.force_fullscreen=!0;2>d.elems.length||!c.gallery?b(".lcl_prev, .lcl_play, .lcl_next").remove():"middle"==c.nav_btn_pos&&(f+=".lcl_prev, .lcl_next {margin: "+c.padding+"px;}");!c.thumbs_nav||2>h.elems.length||!c.gallery?b("#lcl_thumbs_nav, .lcl_thumbs_toggle").remove():
(b("#lcl_thumbs_nav").css("height",c.thumbs_h),g=b("#lcl_thumbs_nav").outerHeight(!0)-c.thumbs_h,f+="#lcl_window {margin-top: "+-1*(c.thumbs_h-g)+"px;}",f+=".lcl_tn_hidden.lcl_outer_cmd:not(.lcl_fullscreen_mode) #lcl_window {margin-bottom: "+-1*b(".lcl_close").outerHeight(!0)+"px;}");e.push("lcl_txt_"+c.data_position+" lcl_"+c.skin);f+="#lcl_overlay {background-color: "+c.thumbs_h+"px; opacity: "+c.ol_opacity+";}";c.ol_pattern&&b("#lcl_overlay").addClass("lcl_pattern_"+c.ol_pattern);c.modal&&b("#lcl_overlay").addClass("lcl_modal");
c.wrap_padding&&(f+="#lcl_wrap {padding: "+c.wrap_padding+";}");c.border_w&&(f+="#lcl_window {border: "+c.border_w+"px solid "+c.border_col+";}");c.padding&&(f+="#lcl_subj, #lcl_txt, #lcl_nav_cmd {margin: "+c.padding+"px;}");c.radius&&(f+="#lcl_window, #lcl_contents_wrap {border-radius: "+c.radius+"px;}");c.shadow&&(f+="#lcl_window {box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);}");"inner"==c.cmd_position&&"corner"==c.ins_close_pos&&(f+="#lcl_corner_close {top: "+-1*(c.border_w+Math.ceil(b("#lcl_corner_close").outerWidth()/
2))+"px;right: "+-1*(c.border_w+Math.ceil(b("#lcl_corner_close").outerHeight()/2))+";}",b("#lcl_nav_cmd > *:not(.lcl_close)").length||(f+="#lcl_wrap:not(.lcl_fullscreen_mode):not(.lcl_forced_outer_cmd) #lcl_nav_cmd {display: none;}"));b("#lcl_inline_style").length&&b("#lcl_inline_style").remove();b("head").append('<style type="text/css" id="lcl_inline_style">'+f+"#lcl_overlay {background-color: "+c.ol_color+";opacity: "+c.ol_opacity+";}#lcl_window, #lcl_txt, #lcl_subj {-webkit-transition-duration: "+
c.animation_time+"ms; transition-duration: "+c.animation_time+"ms;}#lcl_overlay {-webkit-transition-duration: "+c.open_close_time+"ms; transition-duration: "+c.open_close_time+"ms;}.lcl_first_sizing #lcl_window, .lcl_is_closing #lcl_window {-webkit-transition-duration: "+(c.open_close_time-c.ol_time_diff)+"ms; transition-duration: "+(c.open_close_time-c.ol_time_diff)+"ms;}.lcl_first_sizing #lcl_window {-webkit-transition-delay: "+c.ol_time_diff+"ms; transition-delay: "+c.ol_time_diff+"ms;}#lcl_loader, #lcl_contents_wrap, #lcl_corner_close {-webkit-transition-duration: "+
c.fading_time+"ms; transition-duration: "+c.fading_time+"ms;}.lcl_toggling_txt #lcl_subj {-webkit-transition-delay: "+(c.fading_time+200)+"ms !important; transition-delay: "+(c.fading_time+200)+"ms !important;}.lcl_fullscreen_mode.lcl_txt_over:not(.lcl_tn_hidden) #lcl_txt, .lcl_fullscreen_mode.lcl_force_txt_over:not(.lcl_tn_hidden) #lcl_txt {max-height: calc(100% - 42px - "+c.thumbs_h+"px);}.lcl_fullscreen_mode.lcl_playing_video.lcl_txt_over:not(.lcl_tn_hidden) #lcl_txt,.lcl_fullscreen_mode.lcl_playing_video.lcl_force_txt_over:not(.lcl_tn_hidden) #lcl_txt {max-height: calc(100% - 42px - 45px - "+
c.thumbs_h+"px);}</style>");c.remove_scrollbar&&(h.html_style="undefined"!=typeof jQuery("html").attr("style")?jQuery("html").attr("style"):"",h.body_style="undefined"!=typeof jQuery("body").attr("style")?jQuery("body").attr("style"):"",f=b(window).width(),b("html").css("overflow","hidden"),b("html").css({"margin-right":b(window).width()-f,"touch-action":"none"}),b("body").css({overflow:"visible","touch-action":"none"}));f=h.elems[d.elem_index];"image"!=f.type||"image"==f.type&&"undefined"!=typeof d.img_sizes_cache[f.src]?
e.push("lcl_show_already_shaped"):Z();b("#lcl_wrap").addClass(e.join(" "));"function"==typeof c.html_is_ready&&c.html_is_ready.call(null,q,h);h.is_arr_instance||(h.elems_selector?b(h.elems_selector):lcl_curr_obj).first().trigger("lcl_html_is_ready",[q,h])},qa=function(c){var d=b(c)[0],e=null;d.addEventListener("touchstart",function(f){1===f.targetTouches.length&&(e=f.targetTouches[0].clientY)},!1);d.addEventListener("touchmove",function(f){if(1===f.targetTouches.length){var g=f.targetTouches[0].clientY-
e;0===d.scrollTop&&0<g&&f.preventDefault();d.scrollHeight-d.scrollTop<=d.clientHeight&&0>g&&f.preventDefault()}},!1)},W=function(){if(!lcl_shown)return!1;var c=h,d=c.elems[c.elem_index];b("#lcl_wrap").attr("lc-lelem",c.elem_index);q.carousel||(b("#lcl_wrap").removeClass("lcl_first_elem lcl_last_elem"),c.elem_index?c.elem_index==c.elems.length-1&&b("#lcl_wrap").addClass("lcl_last_elem"):b("#lcl_wrap").addClass("lcl_first_elem"));b(document).trigger("lcl_before_populate_global",[d,c.elem_index]);aa(d);
if(!c.is_arr_instance){var e=c.elems_selector?b(c.elems_selector):lcl_curr_obj;e.first().trigger("lcl_before_show",[d,c.elem_index])}b(document).trigger("lcl_before_show_global",[d,c.elem_index]);b("#lcl_wrap").hasClass("lcl_pre_first_el")&&("function"==typeof q.on_open&&q.on_open.call(null,q,h),c.is_arr_instance||(e=c.elems_selector?b(c.elems_selector):lcl_curr_obj,e.first().trigger("lcl_on_open",[d,c.elem_index])));B(d);b("#lcl_subj").removeClass("lcl_switching_el")},L=function(c){return c.title||
c.txt||c.author?!0:!1},aa=function(c){var d=h.elem_index;b("#lcl_elem_wrap").removeAttr("style").removeAttr("class").empty();b("#lcl_wrap").attr("lcl-type",c.type);b("#lcl_elem_wrap").addClass("lcl_"+c.type+"_elem");switch(c.type){case "image":b("#lcl_elem_wrap").css("background-image","url('"+c.src+"')");break;case "video":b("#lcl_videojs_css").length||(b("head").append('<link id="lcl_videojs_css" href="https://vjs.zencdn.net/5.11/video-js.min.css" rel="stylesheet">'),"function"!=typeof videojs&&
b("head").append('<script src="https://vjs.zencdn.net/5.11/video.min.js" type="text/javascript">\x3c/script>'));if("function"!=typeof videojs)return b("#lcl_wrap").addClass("lcl_loading_videojs"),X(),setTimeout(function(){d==h.elem_index&&aa(c)},30),!1;b("#lcl_wrap").removeClass("lcl_loading_videojs");lcl_vid_instance_num++;var e=c.src.split(";"),f="";b.each(e,function(g,k){f+='<source src="'+k+'">'});b("#lcl_elem_wrap").html('<video id="lcl_'+c.type+"_elem"+lcl_vid_instance_num+'" class="lcl_elem" controls>'+
f+" Your browser does not support HTML5 videos.</video>");b("#lcl_elem_wrap").css("position","static");videojs("lcl_video_elem"+lcl_vid_instance_num,{poster:c.poster});b(".lcl_elem").addClass("video-js");b(".lcl_is_playing").length&&lcl_start_slideshow(!0);break;case "youtube":c.poster?b("#lcl_elem_wrap").html('<div class="lcl_postered_video" style="background-image: url('+c.poster+');"><iframe class="lcl_elem" src="" data-lazy-src="https://www.youtube.com/embed/'+c.video_id+'?rel=0&amp;showinfo=0&amp;autoplay=1" frameborder="0"></iframe></div>'):
(b("#lcl_elem_wrap").html('<iframe class="lcl_elem" src="https://www.youtube.com/embed/'+c.video_id+'?rel=0&amp;showinfo=0" frameborder="0"></iframe>'),b("#lcl_wrap").addClass("lcl_playing_video"));b("#lcl_elem_wrap").css("position","static");break;case "vimeo":c.poster?b("#lcl_elem_wrap").html('<div class="lcl_postered_video" style="background-image: url('+c.poster+');"><iframe class="lcl_elem" src="" data-lazy-src="https://player.vimeo.com/video/'+c.video_id+'?title=0&byline=0&portrait=0&autoplay=1" frameborder="0"></iframe></div>'):
(b("#lcl_elem_wrap").html('<iframe class="lcl_elem" src="https://player.vimeo.com/video/'+c.video_id+'?title=0&byline=0&portrait=0" frameborder="0"></iframe>'),b("#lcl_wrap").addClass("lcl_playing_video"));b("#lcl_elem_wrap").css("position","static");break;case "dailymotion":c.poster?b("#lcl_elem_wrap").html('<div class="lcl_postered_video" style="background-image: url('+c.poster+');"><iframe class="lcl_elem" src="" data-lazy-src="https://www.dailymotion.com/embed/video/'+c.video_id+'?info=0&logo=0&related=0&social=0&controls=1&autoPlay=1" frameborder="0"></iframe></div>'):
(b("#lcl_elem_wrap").html('<iframe class="lcl_elem" src="https://www.dailymotion.com/embed/video/'+c.video_id+'?info=0&logo=0&related=0&social=0&controls=1" frameborder="0"></iframe>'),b("#lcl_wrap").addClass("lcl_playing_video"));b("#lcl_elem_wrap").css("position","static");break;case "html":b("#lcl_elem_wrap").html('<div class="lcl_html_container">'+b(c.src).html()+"</div>");break;case "iframe":b("#lcl_elem_wrap").html('<iframe class="lcl_elem" src="'+c.src+'" frameborder="0"></iframe>');b("#lcl_elem_wrap").css("position",
"static");break;default:b("#lcl_elem_wrap").html('<div id="lcl_inline" class="lcl_elem"><br/>Error loading the resource .. </div>')}-1===b.inArray(c.type,["image","video","unknown","html"])&&ma();lcl_curr_opts.download&&(c.download?(b(".lcl_download").show(),e=c.download.split("/"),e=e[e.length-1],b(".lcl_download").html('<a href="'+c.download+'" target="_blank" download="'+e+'"></a>')):b(".lcl_download").hide());b(".lcl_counter").html(d+1+" / "+h.elems.length);L(c)&&"unknown"!=c.type?(b("#lcl_wrap").removeClass("lcl_no_txt"),
b(".lcl_txt_toggle").show(),c.title&&b("#lcl_txt").append('<h3 id="lcl_title">'+c.title+"</h3>"),c.author&&b("#lcl_txt").append('<h5 id="lcl_author">by '+c.author+"</h5>"),c.txt&&b("#lcl_txt").append('<section id="lcl_descr">'+c.txt+"</section>"),c.txt&&(c.title&&c.author?b("#lcl_txt h5").addClass("lcl_txt_border"):b("#lcl_txt h3").length?b("#lcl_txt h3").addClass("lcl_txt_border"):b("#lcl_txt h5").addClass("lcl_txt_border")),ra()):(b(".lcl_txt_toggle").hide(),b("#lcl_wrap").addClass("lcl_no_txt"));
qa("#lcl_txt")},D=function(c,d,e){var f=0,g=b("#lcl_wrap"),k=b(window).width()-parseInt(g.css("padding-left"),10)-parseInt(g.css("padding-right"),10);g=b(window).height()-parseInt(g.css("padding-top"),10)-parseInt(g.css("padding-bottom"),10);!isNaN(parseFloat(c))&&isFinite(c)?f=parseInt(c,10):-1!==c.toString().indexOf("%")?f=("w"==d?k:g)*(parseInt(c,10)/100):-1!==c.toString().indexOf("vw")?f=k*(parseInt(c,10)/100):-1!==c.toString().indexOf("vh")&&(f=g*(parseInt(c,10)/100));"undefined"==typeof e&&
("w"==d&&f>k&&(f=k),"h"==d&&f>g&&(f=g));return f},B=function(c,d,e){var f=q,g=h;"undefined"==typeof d&&(d={});var k=b(".lcl_fullscreen_mode").length?!0:!1;e=k?0:2*parseInt(f.border_w,10)+2*parseInt(f.padding,10);"undefined"!=typeof d.side_txt_checked||"undefined"!=typeof d.no_txt_under&&d.no_txt_under||b("#lcl_wrap").removeClass("lcl_force_txt_over");var n=b(".lcl_force_txt_over").length||b(".lcl_hidden_txt").length||-1===b.inArray(f.data_position,["rside","lside"])||!L(c)?0:b("#lcl_txt").outerWidth(),
l=k||!b("#lcl_thumbs_nav").length||b(".lcl_tn_hidden").length?0:b("#lcl_thumbs_nav").outerHeight(!0)-parseInt(b("#lcl_wrap").css("padding-bottom"),10),m=!k&&b(".lcl_outer_cmd").length?b(".lcl_close").outerHeight(!0)+parseInt(b("#lcl_nav_cmd").css("padding-top"),10)+parseInt(b("#lcl_nav_cmd").css("padding-bottom"),10):0,t=e+n,F=e+l+m;m=b("#lcl_wrap").attr("data-lcl-max-w");l=b("#lcl_wrap").attr("data-lcl-max-h");m=k?b(window).width():Math.floor(D(m,"w"))-t;l=k?b(window).height():Math.floor(D(l,"h"))-
F;if("object"==typeof g.txt_und_sizes){var u=g.txt_und_sizes.w;var r=g.txt_und_sizes.h;if("image"==c.type)var v=g.img_sizes_cache[c.src]}else switch(c.type){case "image":b("#lcl_elem_wrap").css("bottom",0);if("undefined"==typeof g.img_sizes_cache[c.src])return!1;v=g.img_sizes_cache[c.src];v.w<=m?(u=v.w,r=v.h):(u=m,r=Math.floor(v.h/v.w*u));r>l&&(r=l,u=Math.floor(v.w/v.h*r));if(L(c)&&!b(".lcl_hidden_txt").length&&"under"==f.data_position&&"undefined"==typeof d.no_txt_under)return R(u,r,l),b(document).off("lcl_txt_und_calc").on("lcl_txt_und_calc",
function(){if(g.txt_und_sizes)return"no_under"==g.txt_und_sizes&&(d.no_txt_under=!0),B(g.elems[g.elem_index],d)}),!1;b("#lcl_subj").css("maxHeight","none");break;case "video":case "youtube":case "vimeo":case "dailymotion":case "iframe":b(".lcl_elem").css("height","100%");c.width&&(m=D(c.width,"w")-t);c.height&&(l=D(c.height,"h")-F);if(c.width&&c.height){u=D(c.width,"w",!0);var x=D(c.height,"h",!0);t=u/x;r=x/u}else t="iframe"==c.type?m/l:1.779,r="iframe"==c.type?l/m:.562;c.width&&c.height&&u<=m&&x<=
l?(u=m,r=l):(u=m,r=Math.round(u*r),r>l&&(r=l,u=Math.round(r*t)));if(L(c)&&!b(".lcl_hidden_txt").length&&"under"==f.data_position&&"undefined"==typeof d.no_txt_under)return R(u,r,l),b(document).off("lcl_txt_und_calc").on("lcl_txt_und_calc",function(){if(g.txt_und_sizes)return"no_under"==g.txt_und_sizes&&(d.no_txt_under=!0),B(g.elems[g.elem_index],d)}),!1;b("#lcl_subj").css("maxHeight","none");break;case "html":c.width&&(m=D(c.width,"w")-t);c.height&&(l=D(c.height,"h")-F);u=m;"under"==f.data_position&&
(k?b("#lcl_wrap").addClass("lcl_force_txt_over"):b("#lcl_wrap").removeClass("lcl_force_txt_over"));x=k?"none":l;"under"!=f.data_position||k?(b("#lcl_contents_wrap").css("maxHeight","none"),b("#lcl_subj").css("maxHeight",x)):(b("#lcl_contents_wrap").css("maxHeight",x),b("#lcl_subj").css("maxHeight","none"));k||(b(".lcl_first_sizing").length?b("#lcl_window").css("height","auto"):(b(".lcl_html_elem").css("width",u),r=b("#lcl_elem_wrap").outerHeight(!0),b(".lcl_html_elem").css("width","auto"),"under"==
f.data_position&&!k&&b("#lcl_txt").length&&(b("#lcl_txt").css("width",u),r+=b("#lcl_txt").outerHeight(!0),b("#lcl_txt").css("width","auto")),r>l&&(r=l)));break;default:u=280,r=125}if(("rside"==f.data_position||"lside"==f.data_position)&&!b(".lcl_no_txt").length&&"undefined"==typeof d.side_txt_checked&&(v="image"==c.type?g.img_sizes_cache[c.src]:"",(x=c.force_over_data)||(x=400),("image"!=c.type||"image"==c.type&&v.w>x&&v.h>x)&&!sa(c,x,u+e,r+e,n)))return d.side_txt_checked=!0,B(c,d);g.txt_und_sizes=
!1;if("undefined"==typeof d.inner_cmd_checked&&("inner"==f.cmd_position||c.force_outer_cmd)&&ta(c,u))return d.inner_cmd_checked=!0,B(c,d);b("#lcl_wrap").removeClass("lcl_pre_first_el");b("#lcl_window").css({width:k?"100%":u+e+n,height:k?"100%":r+e});b(".lcl_show_already_shaped").length&&setTimeout(function(){b("#lcl_wrap").removeClass("lcl_show_already_shaped");Z()},10);ba();"undefined"!=typeof lcl_size_n_show_timeout&&clearTimeout(lcl_size_n_show_timeout);r=b(".lcl_first_sizing").length?f.open_close_time+
20:f.animation_time;if(b(".lcl_browser_resize").length||b(".lcl_toggling_fs").length||k)r=0;lcl_size_n_show_timeout=setTimeout(function(){lcl_is_active&&(lcl_is_active=!1);b(".lcl_first_sizing").length&&f.autoplay&&1<g.elems.length&&(f.carousel||g.elem_index<g.elems.length-1)&&lcl_start_slideshow();"html"!=c.type||k||b(".lcl_first_sizing").length||b("#lcl_window").css("height","auto");if("image"==c.type){if(b(".lcl_fullscreen_mode").length){var w=v,C=q.fs_img_behavior;if(b(".lcl_fullscreen_mode").length&&
w.w<=b("#lcl_subj").width()&&w.h<=b("#lcl_subj").height())b(".lcl_image_elem").css("background-size","auto");else if("fit"==C)b(".lcl_image_elem").css("background-size","contain");else if("fill"==C)b(".lcl_image_elem").css("background-size","cover");else if("undefined"==typeof w)b(".lcl_image_elem").css("background-size","cover");else{C=b(window).width()/b(window).height()-w.w/w.h;var G=b(window).width()-w.w;w=b(window).height()-w.h;1.15>=C&&-1.15<=C&&350>=G&&350>=w?b(".lcl_image_elem").css("background-size",
"cover"):b(".lcl_image_elem").css("background-size","contain")}}else b(".lcl_image_elem").css("background-size","cover");b(".lcl_zoomable").length&&(parseFloat(b("#lcl_elem_wrap").attr("lcl-zoom")),w=h,w=w.elems[w.elem_index],"undefined"!=typeof w&&(w=h.img_sizes_cache[w.src],w.w<=b("#lcl_subj").width()&&w.h<=b("#lcl_subj").height()?(b(".lcl_zoom_icon").hide(),b("#lcl_elem_wrap").css({width:"100%",height:"100%"}),b("#lcl_elem_wrap").attr("lcl-zoom",1),b(".lcl_zoom_out").addClass("lcl_zoom_disabled"),
b(".lcl_zoom_in").removeClass("lcl_zoom_disabled"),b("#lcl_subj").removeClass("lcl_zoom_wrap")):b(".lcl_zoom_icon").show()))}b(".lcl_loading_iframe").length&&ua();b("#lcl_wrap").removeClass("lcl_first_sizing lcl_switching_elem lcl_is_resizing lcl_browser_resize");b("#lcl_loader").removeClass("no_loader");b(document).trigger("lcl_resized_window")},r)};b(window).resize(function(){if(!lcl_shown||p!=lcl_curr_obj||b(".lcl_toggling_fs").length)return!1;b("#lcl_wrap").addClass("lcl_browser_resize");"undefined"!=
typeof lcl_rs_defer&&clearTimeout(lcl_rs_defer);lcl_rs_defer=setTimeout(function(){lcl_resize()},50)});var R=function(c,d,e,f){var g="undefined"==typeof f?1:f,k=b(".lcl_fullscreen_mode").length;b("#lcl_txt").outerHeight();var n=c/d;if(k&&b("#lcl_thumbs_nav").length)return b("#lcl_wrap").addClass("lcl_force_txt_over"),b("#lcl_subj").css("maxHeight","none"),b("#lcl_txt").css({right:0,width:"auto"}),h.txt_und_sizes="no_under",b(document).trigger("lcl_txt_und_calc"),!1;b("#lcl_wrap").removeClass("lcl_force_txt_over").addClass("lcl_txt_under_calc");
k?b("#lcl_txt").css({right:0,width:"auto"}):b("#lcl_txt").css({right:"auto",width:c});"undefined"!=typeof lcl_txt_under_calc&&clearInterval(lcl_txt_under_calc);lcl_txt_under_calc=setTimeout(function(){var l=Math.ceil(b("#lcl_txt").outerHeight()),m=d+l-e;if(k)return b("#lcl_wrap").removeClass("lcl_txt_under_calc"),b("#lcl_subj").css("maxHeight","calc(100% - "+l+"px)"),h.txt_und_sizes={w:c,h:d},b(document).trigger("lcl_txt_und_calc"),!1;if(0<m&&("undefined"==typeof f||10>f)){l=d-m;m=Math.floor(l*n);
var t=h.elems[h.elem_index].force_over_data;t||(t=400);return m<t||l<t?(b("#lcl_wrap").removeClass("lcl_txt_under_calc").addClass("lcl_force_txt_over"),b("#lcl_subj").css("maxHeight","none"),b("#lcl_txt").css({right:0,width:"auto"}),h.txt_und_sizes="no_under",b(document).trigger("lcl_txt_und_calc"),!0):R(m,l,e,g+1)}b("#lcl_wrap").removeClass("lcl_txt_under_calc");b("#lcl_subj").css("maxHeight",d+q.padding);h.txt_und_sizes={w:c,h:d+l};b(document).trigger("lcl_txt_und_calc");return!0},120)},sa=function(c,
d,e,f,g){g=b(".lcl_force_txt_over").length;if(e<d||"html"!=c.type&&f<d){if(g)return!0;b("#lcl_wrap").addClass("lcl_force_txt_over")}else{if(!g)return!0;b("#lcl_wrap").removeClass("lcl_force_txt_over")}return!1},ta=function(c,d){var e=q,f=b(".lcl_fullscreen_mode").length?!0:!1;if(b(".lcl_forced_outer_cmd").length){b("#lcl_wrap").removeClass("lcl_forced_outer_cmd");b("#lcl_wrap").removeClass("lcl_outer_cmd").addClass("lcl_inner_cmd");var g=b("#lcl_nav_cmd").detach();b("#lcl_window").prepend(g)}f||!1!==
h.inner_cmd_w||(h.inner_cmd_w=0,jQuery("#lcl_nav_cmd .lcl_icon").each(function(){if((b(this).hasClass("lcl_prev")||b(this).hasClass("lcl_next"))&&"middle"==e.nav_btn_pos)return!0;h.inner_cmd_w+=b(this).outerWidth(!0)}));return f||c.force_outer_cmd||d<=h.inner_cmd_w?(b("#lcl_wrap").addClass("lcl_forced_outer_cmd"),b("#lcl_wrap").removeClass("lcl_inner_cmd").addClass("lcl_outer_cmd"),g=b("#lcl_nav_cmd").detach(),b("#lcl_wrap").prepend(g),!0):!1},y=function(c,d){var e=h,f=q.carousel;if(lcl_is_active||
2>e.elems.length||!q.gallery||b(".lcl_switching_elem").length)return!1;if("next"==c)if(e.elem_index==e.elems.length-1){if(!f)return!1;c=0}else c=e.elem_index+1;else if("prev"==c)if(e.elem_index)c=e.elem_index-1;else{if(!f)return!1;c=e.elems.length-1}else if(c=parseInt(c,10),0>c||c>=e.elems.length||c==e.elem_index)return!1;"undefined"!=typeof lcl_slideshow&&("undefined"==typeof d||!f&&c==e.elems.length-1)&&lcl_stop_slideshow();lcl_is_active=!0;ca(c);E(!1,c,!0);b("#lcl_wrap").addClass("lcl_switching_elem");
setTimeout(function(){b("#lcl_wrap").removeClass("lcl_playing_video");"html"==e.elems[e.elem_index].type&&(b("#lcl_window").css("height",b("#lcl_contents_wrap").outerHeight()),b("#lcl_contents_wrap").css("maxHeight","none"));"function"==typeof q.on_elem_switch&&q.on_elem_switch.call(null,q,h,c);!e.is_arr_instance&&lcl_curr_obj&&(e.elems_selector?b(e.elems_selector):lcl_curr_obj).first().trigger("lcl_on_elem_switch",[e.elem_index,c]);b("#lcl_wrap").removeClass("lcl_no_txt lcl_loading_iframe");b("#lcl_txt").empty();
e.elem_index=c;E(!0);V()},q.fading_time)},X=function(){if("undefined"==typeof lcl_slideshow)return!1;clearInterval(lcl_slideshow)},da=function(c){var d=q;if(!d.progressbar)return!1;c=c?0:d.animation_time+d.fading_time;var e=d.slideshow_time+d.animation_time-c;b("#lcl_progressbar").length||b("#lcl_wrap").append('<div id="lcl_progressbar"></div>');"undefined"!=typeof lcl_pb_timeout&&clearTimeout(lcl_pb_timeout);lcl_pb_timeout=setTimeout(function(){b("#lcl_progressbar").stop(!0).removeAttr("style").css("width",
0).animate({width:"100%"},e,"linear",function(){b("#lcl_progressbar").fadeTo(0,0)})},c)},S=function(){if(!lcl_shown)return!1;"function"==typeof q.on_close&&q.on_close.call(null,q,h);h.is_arr_instance||(h.elems_selector?b(h.elems_selector):lcl_curr_obj).first().trigger("lcl_on_close");b(document).trigger("lcl_on_close_global");b("#lcl_wrap").removeClass("lcl_shown").addClass("lcl_is_closing lcl_tn_hidden");lcl_stop_slideshow();b(".lcl_fullscreen_mode").length&&ea();setTimeout(function(){b("#lcl_wrap, #lcl_inline_style").remove();
q.remove_scrollbar&&(jQuery("html").attr("style",h.html_style),jQuery("body").attr("style",h.body_style));b(document).trigger("lcl_closed_global");lcl_is_active=lcl_shown=lcl_curr_vars=lcl_curr_opts=lcl_curr_obj=!1},q.open_close_time+80);"undefined"!=typeof lcl_size_check&&clearTimeout(lcl_size_check)},M=function(){lcl_hashless_url=window.location.href;if(-1!==lcl_hashless_url.indexOf("#")){var c=lcl_hashless_url.split("#");lcl_hashless_url=c[0];lcl_url_hash="#"+c[1]}var d={};c=lcl_hashless_url.slice(lcl_hashless_url.indexOf("?")+
1).split("&");jQuery.each(c,function(e,f){var g=f.split("=");d[g[0]]=g[1]});return d};if(0==lcl_objs.length)b(document).on("lcl_before_show_global",function(c,d){if(lcl_curr_opts.deeplink&&d.hash&&-1===navigator.appVersion.indexOf("MSIE 9.")){var e=M(),f=d.title?d.hash+"/"+encodeURIComponent(d.title.replace(/\s+/g,"-")):d.hash,g="lcl="+f+lcl_url_hash;if(-1===lcl_hashless_url.indexOf("?"))history.pushState(null,null,lcl_hashless_url+"?"+g);else{if("undefined"!=typeof e.lcl&&e.lcl==f)return!0;var k=
lcl_hashless_url.slice(0,lcl_hashless_url.indexOf("?")+1),n=0,l=!1;jQuery.each(e,function(m,t){"undefined"!=typeof m&&(0<n&&(k+="&"),"lcl"!=m&&(k+=t?m+"="+t:m,l=!0,n++))});l&&(k+="&");k+=g;history.pushState(null,null,k)}}});if(0==lcl_objs.length)b(document).on("lcl_on_close_global",function(){var c=M();if("undefined"==typeof c.lcl||-1!==navigator.appVersion.indexOf("MSIE 9."))return!0;var d=[];jQuery.each(c,function(e,f){"undefined"!=typeof e&&e&&"lcl"!=e&&d.push(f?e+"="+f:e)});c=d.length?"?":"";
c=lcl_hashless_url.slice(0,lcl_hashless_url.indexOf("?"))+c+d.join("&")+lcl_url_hash;history.pushState(null,null,c)});z.deeplink&&!lcl_deeplink_tracked&&(lcl_deeplink_tracked=!0,window.onpopstate=function(c){c=M();if("undefined"==typeof c.lcl)lcl_shown&&lcl_close();else{var d=-1!==c.lcl.indexOf("/")?c.lcl.split("/"):c.lcl.split("%2F");lcl_shown?b.each(lcl_curr_vars.elems,function(e,f){if(f.hash==d[0])return lcl_switch(e),!1}):b.each(lcl_objs,function(e,f){b(document).trigger("lcl_open_from_hash",
[f,d[0]])})}});var va=function(){var c=M();if(!lcl_shown&&"undefined"!=typeof c.lcl){var d=-1!==c.lcl.indexOf("/")?c.lcl.split("/"):c.lcl.split("%2F");b.each(lcl_objs,function(e,f){b(document).trigger("lcl_open_from_hash",[f,d[0]])})}};b(document).ready(function(){setTimeout(function(){b(document).trigger("lcl_look_for_deeplink")},100)});b(document).off("lcl_look_for_deeplink").on("lcl_look_for_deeplink",function(){va()});b(document).off("lcl_open_from_hash").on("lcl_open_from_hash",function(c,d,
e){c=b.data(d,"lcl_vars");if("undefined"==typeof c||!c)return!1;b.each(c.elems,function(f,g){if(g.hash==e)return lcl_curr_obj=d,lcl_open(d,f),!1})});var P=function(c,d){"undefined"==typeof d&&(d=!1);if(!lcl_shown||!q.fullscreen||!d&&lcl_is_active)return!1;var e=q,f=h;b("#lcl_wrap").addClass("lcl_toggling_fs");e.browser_fs_mode&&"undefined"!=typeof c&&(document.documentElement.requestFullscreen?document.documentElement.requestFullscreen():document.documentElement.msRequestFullscreen?document.documentElement.msRequestFullscreen():
document.documentElement.mozRequestFullScreen?document.documentElement.mozRequestFullScreen():document.documentElement.webkitRequestFullscreen&&document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT));setTimeout(function(){b("#lcl_wrap").addClass("lcl_fullscreen_mode");B(f.elems[f.elem_index]);b(document).on("lcl_resized_window",function(){b(document).off("lcl_resized_window");(d||"under"==lcl_curr_opts.data_position&&!b(".lcl_force_txt_over").length)&&B(lcl_curr_vars.elems[lcl_curr_vars.elem_index]);
setTimeout(function(){b("#lcl_wrap").removeClass("lcl_toggling_fs")},150)})},d?e.open_close_time:e.fading_time);"function"==typeof e.on_fs_enter&&e.on_fs_enter.call(null,e,f);h.is_arr_instance||lcl_curr_obj.first().trigger("lcl_on_fs_enter")},fa=function(c){if(!lcl_shown||!q.fullscreen||lcl_is_active)return!1;var d=q;b("#lcl_wrap").addClass("lcl_toggling_fs");b("#lcl_window").fadeTo(70,0);setTimeout(function(){if(d.browser_fs_mode&&"undefined"!=typeof c){ea();var e=250}else e=0;b("#lcl_wrap").removeClass("lcl_fullscreen_mode");
setTimeout(function(){B(h.elems[h.elem_index]);var f=f||navigator.userAgent;f=-1<f.indexOf("MSIE ")||-1<f.indexOf("Trident/")?100:0;setTimeout(function(){b("#lcl_window").fadeTo(30,1);b("#lcl_wrap").removeClass("lcl_toggling_fs")},300+f)},e)},70);"function"==typeof d.on_fs_exit&&d.on_fs_exit.call(null,q,h);h.is_arr_instance||(h.elems_selector?b(h.elems_selector):lcl_curr_obj).first().trigger("lcl_on_fs_exit")},ea=function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?
document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()};if(0==lcl_objs.length)b(document).on("lcl_before_show_global",function(c,d,e){b(".lcl_zoom_icon").hide();b("#lcl_subj").removeClass("lcl_zoomable lcl_zoom_wrap");if("image"!=d.type||!lcl_curr_opts.img_zoom)return b("#lcl_elem_wrap").removeAttr("lcl-zoom"),!0;c=lcl_curr_vars.img_sizes_cache[d.src];if(b("#lcl_subj").width()>=c.w&&b("#lcl_subj").height()>=
c.h)return!0;b("#lcl_elem_wrap").css({width:"100%",height:"100%"});b("#lcl_elem_wrap").attr("lcl-zoom",1);b("#lcl_subj").addClass("lcl_zoomable");b(".lcl_zoom_out").addClass("lcl_zoom_disabled");b(".lcl_zoom_in").removeClass("lcl_zoom_disabled");b(".lcl_zoom_in .lcl_zoom_helper").remove();b(".lcl_zoom_icon").show()});var H=function(c,d){var e=b("#lcl_elem_wrap"),f=e.width(),g=e.height(),k=parseFloat(b("#lcl_elem_wrap").attr("lcl-zoom")),n=0,l=h,m=h.img_sizes_cache[l.elems[l.elem_index].src];c&&(f<
m.w||g<m.h)?(n=k+.25,e.css({width:100*n+"%",height:100*n+"%"}),lcl_stop_slideshow()):!c&&f>b("#lcl_subj").width()&&(n=k-.25,1>=n&&(n=1),e.css({width:100*n+"%",height:100*n+"%"}));n&&(b("#lcl_elem_wrap").attr("lcl-zoom",n),b(".lcl_zoom_in .lcl_zoom_helper").remove(),1<n&&b(".lcl_zoom_in").append('<span class="lcl_zoom_helper">'+n+"x</span>"),1<n?(b(".lcl_zoom_out").removeClass("lcl_zoom_disabled"),b("#lcl_subj").addClass("lcl_zoom_wrap"),b("#lcl_subj").lcl_smoothscroll(.35,400),f=b("#lcl_subj").scrollTop(),
g=b("#lcl_subj").scrollLeft(),k=c?1.25:.75,b("#lcl_subj").clearQueue().animate({scrollTop:f||g?f*k:b("#lcl_subj").height()/4,scrollLeft:f||g?g*k:b("#lcl_subj").width()/4},300,"linear"),setTimeout(function(){m.w<=e.width()&&m.h<=e.height()?b(".lcl_zoom_in").addClass("lcl_zoom_disabled"):b(".lcl_zoom_in").removeClass("lcl_zoom_disabled")},310)):(b(".lcl_zoom_out").addClass("lcl_zoom_disabled"),b(".lcl_zoom_in").removeClass("lcl_zoom_disabled"),b("#lcl_subj").removeClass("lcl_zoom_wrap")))};b(document).on("click",
".lcl_zoom_in",function(){if(p!=lcl_curr_obj)return!0;H(!0)});b(document).on("click",".lcl_zoom_out",function(){if(p!=lcl_curr_obj)return!0;H(!1)});var ra=function(){var c=q;if(!c.comments||"undefined"==typeof c.comments.type||"rside"!=c.data_position&&"lside"!=c.data_position)return!1;var d=h.elems[h.elem_index];if(d.canonical_url)var e=d.canonical_url;else{e=window.location.origin;if("undefined"!=typeof c.comments.local_comments&&c.comments.local_comments||"undefined"!=typeof lcl_local_comments)e+=
window.location.pathname;e+="?lcl="+d.hash}"facebook"==c.comments.type?(b("#lcl_txt > *").last().addClass("lcl_txt_border"),b("#lcl_txt").append('<div class="lcl_comments_wrap" class="lcl_fb_comments"><div class="fb-comments" data-href="'+e+'" data-width="100%" data-numposts="1" data-colorscheme="'+c.comments.style+'"></div></div><script type="text/javascript">if(jQuery("#fb-root").length && window.FB) {FB.XFBML.parse();}\x3c/script>')):"disqus"==c.comments.type&&(b("#lcl_txt > *").last().addClass("lcl_txt_border"),
b("#lcl_txt").append('<div class="lcl_comments_wrap" class="lcl_disqus_comments"><div id="disqus_thread"></div></div>'),b(document).ready(function(f){f=document;var g=f.createElement("script");g.src="//"+c.comments.shortname+".disqus.com/embed.js";g.setAttribute("data-timestamp",+new Date);(f.head||f.body).appendChild(g)}))},pa=function(){var c=!1,d=!1,e=Date.now();b("#lcl_thumbs_nav").append('<span class="lcl_tn_prev"></span><ul class="lcl_tn_inner"></ul><span class="lcl_tn_next"></span>');b("#lcl_thumbs_nav").attr("rel",
e);b.each(h.elems,function(f,g){if("unknown"!=g.type){c||(d&&d!=g.type?c=!0:d=g.type);var k="",n="";tpc="";if(g.thumb)n=g.thumb,k="style=\"background-image: url('"+g.thumb+"');\"";else{switch(g.type){case "image":n=g.src;break;case "youtube":n=g.poster?g.poster:"https://img.youtube.com/vi/"+g.video_id+"/maxresdefault.jpg";break;case "vimeo":g.poster?n=g.poster:"undefined"==typeof h.vimeo_thumb_cache[g.src]?(tpc="lcl_tn_preload",b.ajax({url:"https://vimeo.com/api/v2/video/"+g.video_id+".json",success:function(m){ha(m[0].thumbnail_large,
f,e);h.vimeo_thumb_cache[g.src]=m[0].thumbnail_large;b(".lcl_tn_inner li[rel="+f+"]").attr("style",b(".lcl_tn_inner li[rel="+f+"]").attr("style")+" background-image: url('"+m[0].thumbnail_large+"');")},error:function(m){console.error("LCL Vimeo thumb retrieval",m)}})):n=h.vimeo_thumb_cache[g.src];break;case "video":case "iframe":case "html":g.poster&&(n=g.poster);break;case "dailymotion":n=g.poster?g.poster:"http://www.dailymotion.com/thumbnail/video/"+g.video_id}n&&(q.thumbs_maker_url&&(g.poster||
-1===b.inArray(g.type,["youtube","vimeo","dailymotion"]))&&(n=q.thumbs_maker_url.replace("%URL%",encodeURIComponent(n)).replace("%W%",q.thumbs_w).replace("%H%",q.thumbs_h)),k="style=\"background-image: url('"+n+"');\"",-1===b.inArray(g.type,["youtube","vimeo","dailymotion"])||g.poster||(h.elems[f].vid_poster=n))}if(("html"==g.type||"iframe"==g.type)&&!k)return!0;var l="video"!=g.type||k?"":'<video src="'+g.src+'"></video>';tpc="lcl_tn_preload";b(".lcl_tn_inner").append('<li class="lcl_tn_'+g.type+
" "+tpc+'" title="'+g.title+'" rel="'+f+'" '+k+">"+l+"</li>");tpc&&ha(n,f,e)}});if(2>b(".lcl_tn_inner > li").length)return b("#lcl_thumbs_nav").remove(),!1;b(".lcl_tn_inner > li").css("width",q.thumbs_w);b(".lcl_tn_inner").lcl_smoothscroll(.3,400,!1,!0);c&&q.tn_icons&&b(".lcl_tn_inner").addClass("lcl_tn_mixed_types");setTimeout(function(){ca(h.elem_index)},300)},ha=function(c,d,e){b("<img/>").bind("load",function(){if(!h)return!1;h.img_sizes_cache[c]={w:this.width,h:this.height};b("#lcl_thumbs_nav[rel="+
e+"] li[rel="+d+"]").removeClass("lcl_tn_preload");setTimeout(function(){ba();T()},500)}).attr("src",c)},ia=function(){var c=0;b(".lcl_tn_inner > li").each(function(){c+=b(this).outerWidth(!0)});return c},ba=function(){if(!b("#lcl_thumbs_nav").length)return!1;ia()>b(".lcl_tn_inner").width()?b("#lcl_thumbs_nav").addClass("lcl_tn_has_arr"):b("#lcl_thumbs_nav").removeClass("lcl_tn_has_arr")},T=function(){var c=b(".lcl_tn_inner").scrollLeft();c?b(".lcl_tn_prev").removeClass("lcl_tn_disabled_arr").stop(!0).fadeTo(150,
1):b(".lcl_tn_prev").addClass("lcl_tn_disabled_arr").stop(!0).fadeTo(150,.5);c>=ia()-b(".lcl_tn_inner").width()?b(".lcl_tn_next").addClass("lcl_tn_disabled_arr").stop(!0).fadeTo(150,.5):b(".lcl_tn_next").removeClass("lcl_tn_disabled_arr").stop(!0).fadeTo(150,1)};b(document).on("lcl_smoothscroll_end",".lcl_tn_inner",function(c){if(p!=lcl_curr_obj)return!0;T()});var ca=function(c){var d=b(".lcl_tn_inner > li[rel="+c+"]");if(!d.length)return!1;var e=0;b(".lcl_tn_inner > li").each(function(n,l){if(b(this).attr("rel")==
c)return e=n,!1});var f=b(".lcl_tn_inner > li").last().outerWidth(),g=parseInt(b(".lcl_tn_inner > li").last().css("margin-left"),10);b(".lcl_tn_inner").width();var k=Math.floor((b(".lcl_tn_inner").width()-f-g)/2);f=f*e+g*(e-1)+Math.floor(g/2)-k;b(".lcl_tn_inner").stop(!0).animate({scrollLeft:f},500,function(){b(".lcl_tn_inner").trigger("lcl_smoothscroll_end");b("#lcl_thumbs_nav").removeClass("lcl_pre_tn_scroll")});b(".lcl_tn_inner > li").removeClass("lcl_sel_thumb");d.addClass("lcl_sel_thumb")};b.fn.lcl_smoothscroll=
function(c,d,e,f){if(lcl_on_mobile)return!1;this.off("mousemove mousedown mouseup mouseenter mouseleave");var g=this,k="undefined"!=typeof e&&e?!1:!0,n="undefined"!=typeof f&&f?!1:!0,l=!1,m=!1,t=0,F=0,u=0,r=0;g.mousemove(function(v){!0===m&&(g.stop(!0),k&&g.scrollLeft(r+(F-v.pageX)),n&&g.scrollTop(u+(t-v.pageY)))});g.mouseover(function(){l&&clearTimeout(l)});g.mouseout(function(){l=setTimeout(function(){l=m=!1},500)});g.mousedown(function(v){"undefined"!=typeof lc_sms_timeout&&clearTimeout(lc_sms_timeout);
m=!0;u=g.scrollTop();r=g.scrollLeft();t=v.pageY;F=v.pageX});g.mouseup(function(v){m=!1;var x=g.scrollTop(),w=-1*(u-x);x+=w*c;var C=g.scrollLeft(),G=-1*(r-C);C+=G*c;if(3>w&&-3<w&&3>G&&-3<G)return b(v.target).trigger("lcl_tn_elem_click"),!1;if(20<w||20<G)v={},n&&(v.scrollTop=x),k&&(v.scrollLeft=C),g.stop(!0).animate(v,d,"linear",function(){g.trigger("lcl_smoothscroll_end")})})};if(!A.is_arr_instance)if(z.live_elements&&A.elems_selector)b(document).off("click",A.elems_selector).on("click",A.elems_selector,
function(c){c.preventDefault();b.data(p,"lcl_vars").elems_count=b(A.elems_selector).length;Q(p,b(this));p.first().trigger("lcl_clicked_elem",[b(this)])});else p.off("click"),p.on("click",function(c){c.preventDefault();Q(p,b(this));p.first().trigger("lcl_clicked_elem",[b(this)])});b(document).on("click","#lcl_overlay:not(.lcl_modal), .lcl_close, #lcl_corner_close",function(c){if(p!=lcl_curr_obj)return!0;S()});b(document).on("click",".lcl_prev",function(c){if(p!=lcl_curr_obj)return!0;y("prev")});b(document).on("click",
".lcl_next",function(c){if(p!=lcl_curr_obj)return!0;y("next")});b(document).bind("keydown",function(c){if(lcl_shown){if(p!=lcl_curr_obj)return!0;39==c.keyCode?(c.preventDefault(),y("next")):37==c.keyCode?(c.preventDefault(),y("prev")):27==c.keyCode?(c.preventDefault(),S()):122==c.keyCode&&q.fullscreen&&("undefined"!=typeof lcl_fs_key_timeout&&clearTimeout(lcl_fs_key_timeout),lcl_fs_key_timeout=setTimeout(function(){b(".lcl_fullscreen_mode").length?fa():P()},50))}});b(document).on("wheel","#lcl_overlay, #lcl_window, #lcl_thumbs_nav:not(.lcl_tn_has_arr)",
function(c){if(p!=lcl_curr_obj||!lcl_curr_opts.mousewheel)return!0;var d=b(c.target);if(d.is("#lcl_window")||d.parents("#lcl_window").length){var e=!0;for(a=0;20>a&&!d.is("#lcl_window");a++)if(d[0].scrollHeight>d.outerHeight()){e=!1;break}else d=d.parent();e&&(c.preventDefault(),c=c.originalEvent.deltaY,0<c?y("next"):y("prev"))}else c.preventDefault(),c=c.originalEvent.deltaY,0<c?y("next"):y("prev")});b(document).on("click",".lcl_image_elem",function(c){if(p!=lcl_curr_obj)return!0;lcl_img_click_track=
setTimeout(function(){b(".lcl_zoom_wrap").length||y("next")},250)});b(document).on("dblclick",".lcl_image_elem",function(c){if(p!=lcl_curr_obj||!lcl_curr_opts.img_zoom||!b(".lcl_zoom_icon").length)return!0;"undefined"!=typeof lcl_img_click_track&&(clearTimeout(lcl_img_click_track),H(!0))});b(document).on("click",".lcl_txt_toggle",function(c){if(p!=lcl_curr_obj)return!0;c=q;if(!lcl_is_active&&!b(".lcl_no_txt").length&&!b(".lcl_toggling_txt").length)if("over"!=c.data_position){var d="rside"==c.data_position||
"lside"==c.data_position?!0:!1,e=b(".lcl_force_txt_over").length,f=150>c.animation_time?c.animation_time:150,g=0;d&&!e?b("#lcl_subj").fadeTo(f,0):e||(b("#lcl_contents_wrap").fadeTo(f,0),g=f);setTimeout(function(){b("#lcl_wrap").toggleClass("lcl_hidden_txt")},g);e||(lcl_is_active=!0,b("#lcl_wrap").addClass("lcl_toggling_txt"),setTimeout(function(){lcl_is_active=!1;lcl_resize()},c.animation_time),setTimeout(function(){b("#lcl_wrap").removeClass("lcl_toggling_txt");d&&!e?b("#lcl_subj").fadeTo(f,1):e||
b("#lcl_contents_wrap").fadeTo(f,1)},2*c.animation_time+50))}else b("#lcl_wrap").toggleClass("lcl_hidden_txt")});b(document).on("click",".lcl_play",function(c){if(p!=lcl_curr_obj)return!0;b(".lcl_is_playing").length?lcl_stop_slideshow():lcl_start_slideshow()});b(document).on("click",".lcl_elem",function(c){if(p!=lcl_curr_obj)return!0;b(".lcl_playing_video").length||-1===b.inArray(b("#lcl_wrap").attr("lcl-type"),["video"])||(lcl_stop_slideshow(),b("#lcl_wrap").addClass("lcl_playing_video"))});var ua=
function(){"undefined"!=typeof lcl_iframe_click_intval&&clearInterval(lcl_iframe_click_intval);lcl_iframe_click_intval=setInterval(function(){var c=b(document.activeElement);c.is("iframe")&&c.hasClass("lcl_elem")&&(b(".lcl_youtube_elem").length||b(".lcl_vimeo_elem").length||b(".lcl_dailymotion_elem").length)&&(lcl_stop_slideshow(),b("#lcl_wrap").addClass("lcl_playing_video"),clearInterval(lcl_iframe_click_intval))},300)};b(document).on("click",".lcl_socials",function(c){if(p!=lcl_curr_obj)return!0;
if(b(".lcl_socials > div").length)b(".lcl_socials_tt").removeClass("lcl_show_tt"),setTimeout(function(){b(".lcl_socials").removeClass("lcl_socials_shown").empty()},260);else{var d=lcl_curr_vars.elems[lcl_curr_vars.elem_index];c=encodeURIComponent(window.location.href);var e=encodeURIComponent(d.title).replace(/'/g,"\\'"),f=encodeURIComponent(d.txt).replace(/'/g,"\\'");if("image"==d.type)var g=d.src;else g=d.poster?d.poster:!1,g||"undefined"==typeof d.vid_poster||(g=d.vid_poster);d='<div class="lcl_socials_tt lcl_tooltip lcl_tt_bottom">';
if(lcl_curr_opts.fb_share_params){var k=c+(-1===window.location.href.indexOf("?")?"%3F":"%26");k+=encodeURIComponent(lcl_curr_opts.fb_share_params.replace("%TITLE%",e).replace("%DESCR%",f).replace("%IMG%",g));d+='<a class="lcl_icon lcl_fb" onClick="window.open(\'https://www.facebook.com/sharer?u='+k+"&display=popup','sharer','toolbar=0,status=0,width=590,height=500');\" href=\"javascript: void(0)\"></a>"}else d+='<a class="lcl_icon lcl_fb" onClick="window.open(\'https://www.facebook.com/sharer?u='+
c+"&display=popup','sharer','toolbar=0,status=0,width=590,height=500');\" href=\"javascript: void(0)\"></a>";d+='<a class="lcl_icon lcl_twit" onClick="window.open(\'https://twitter.com/share?text=Check%20out%20%22'+e+"%22%20@&url="+c+"','sharer','toolbar=0,status=0,width=548,height=325');\" href=\"javascript: void(0)\"></a>";lcl_on_mobile&&(d+='<br/><a class="lcl_icon lcl_wa" href="whatsapp://send?text='+c+'" data-action="share/whatsapp/share"></a>');g&&(d+='<a class="lcl_icon lcl_pint" onClick="window.open(\'http://pinterest.com/pin/create/button/?url='+
c+"&media="+encodeURIComponent(g)+"&description="+e+"','sharer','toolbar=0,status=0,width=575,height=330');\" href=\"javascript: void(0)\"></a>");d+="</div>";b(".lcl_socials").addClass("lcl_socials_shown").html(d);setTimeout(function(){b(".lcl_socials_tt").addClass("lcl_show_tt")},20)}});b(document).on("click",".lcl_fullscreen",function(c){if(p!=lcl_curr_obj)return!0;b(".lcl_fullscreen_mode").length?fa(!0):P(!0)});b(document).on("click",".lcl_thumbs_toggle",function(c){if(p!=lcl_curr_obj)return!0;
c=b(".lcl_fullscreen_mode").length;b("#lcl_wrap").addClass("lcl_toggling_tn").toggleClass("lcl_tn_hidden");c||setTimeout(function(){lcl_resize()},160);setTimeout(function(){b("#lcl_wrap").removeClass("lcl_toggling_tn")},lcl_curr_opts.animation_time+50)});z=lcl_on_mobile?" click":"";b(document).on("lcl_tn_elem_click"+z,".lcl_tn_inner > li",function(c){if(p!=lcl_curr_obj)return!0;c=b(this).attr("rel");y(c)});b(document).on("click",".lcl_tn_prev:not(.lcl_tn_disabled_arr)",function(c){if(p!=lcl_curr_obj)return!0;
b(".lcl_tn_inner").stop(!0).animate({scrollLeft:b(".lcl_tn_inner").scrollLeft()-lcl_curr_opts.thumbs_w-10},300,"linear",function(){b(".lcl_tn_inner").trigger("lcl_smoothscroll_end")})});b(document).on("click",".lcl_tn_next:not(.lcl_tn_disabled_arr)",function(c){if(p!=lcl_curr_obj)return!0;b(".lcl_tn_inner").stop(!0).animate({scrollLeft:b(".lcl_tn_inner").scrollLeft()+lcl_curr_opts.thumbs_w+10},300,"linear",function(){b(".lcl_tn_inner").trigger("lcl_smoothscroll_end")})});b(document).on("wheel","#lcl_thumbs_nav.lcl_tn_has_arr",
function(c){if(p!=lcl_curr_obj)return!0;c.preventDefault();0<c.originalEvent.deltaY?b(".lcl_tn_prev:not(.lcl_tn_disabled_arr)").trigger("click"):b(".lcl_tn_next:not(.lcl_tn_disabled_arr)").trigger("click")});b(document).on("contextmenu","#lcl_wrap *",function(){if(p!=lcl_curr_obj)return!0;if(q.rclick_prevent)return!1});b(window).on("touchmove",function(c){b(c.target);if(!lcl_shown||!lcl_on_mobile||p!=lcl_curr_obj)return!0;b(c.target).parents("#lcl_window").length||b(c.target).parents("#lcl_thumbs_nav").length||
c.preventDefault()});var oa=function(){if("function"!=typeof AlloyFinger)return!1;lcl_is_pinching=!1;var c=document.querySelector("#lcl_wrap");new AlloyFinger(c,{singleTap:function(d){"lcl_overlay"!=b(d.target).attr("id")||q.modal||lcl_close()},doubleTap:function(d){d.preventDefault();H(!0)},pinch:function(d){d.preventDefault();lcl_is_pinching=!0;"undefined"!=typeof lcl_swipe_delay&&clearTimeout(lcl_swipe_delay);"undefined"!=typeof lcl_pinch_delay&&clearTimeout(lcl_pinch_delay);lcl_pinch_delay=setTimeout(function(){1.2<
d.scale?H(!0):.8>d.scale&&H(!1);setTimeout(function(){lcl_is_pinching=!1},300)},20)},touchStart:function(d){lcl_touchstartX=d.changedTouches[0].clientX},touchEnd:function(d){var e=lcl_touchstartX-d.changedTouches[0].clientX;if((-50>e||50<e)&&!lcl_is_pinching){if(b(d.target).parents("#lcl_thumbs_nav").length||b(d.target).parents(".lcl_zoom_wrap").length)return!1;d=b(d.target).parents(".lcl_zoomable").length?250:0;"undefined"!=typeof lcl_swipe_delay&&clearTimeout(lcl_swipe_delay);lcl_swipe_delay=setTimeout(function(){-50>
e?y("prev"):y("next")},d)}}})},J=function(){if(!lcl_curr_obj)return!1;h=b.data(lcl_curr_obj,"lcl_vars");q=b.data(lcl_curr_obj,"lcl_settings");return h?!0:(console.error("LC Lightbox. Object not initialized"),!1)};lcl_open=function(c,d){var e=h=b.data(c,"lcl_vars");if(e){if("undefined"==typeof e.elems[d])return console.error("LC Lightbox - cannot open. Unexisting index"),!1;e.elem_index=d;$clicked_obj=e.is_arr_instance?!1:b(c[d]);return Q(c,$clicked_obj)}console.error("LC Lightbox - cannot open. Object not initialized");
return!1};lcl_resize=function(){if(!lcl_shown||lcl_is_active||!J())return!1;var c=h;"undefined"!=typeof lcl_size_check&&clearTimeout(lcl_size_check);lcl_size_check=setTimeout(function(){b("#lcl_wrap").addClass("lcl_is_resizing");T();return B(c.elems[c.elem_index])},20)};lcl_close=function(){return lcl_shown&&!lcl_is_active&&J()?S():!1};lcl_switch=function(c){return lcl_shown&&!lcl_is_active&&J()?y(c):!1};lcl_start_slideshow=function(c){if(!lcl_shown||"undefined"==typeof c&&"undefined"!=typeof lcl_slideshow||
!J())return!1;var d=q;if(!d.carousel&&h.elem_index==h.elems.length-1)return!1;"undefined"!=typeof lcl_slideshow&&clearInterval(lcl_slideshow);b("#lcl_wrap").addClass("lcl_is_playing");var e=d.animation_time+d.slideshow_time;da(!0);lcl_slideshow=setInterval(function(){da(!1);y("next",!0)},e);"undefined"==typeof c&&("function"==typeof d.slideshow_start&&d.slideshow_start.call(null,d,h),h.is_arr_instance||(h.elems_selector?b(h.elems_selector):lcl_curr_obj).first().trigger("lcl_slideshow_start",[e]));
return!0};lcl_stop_slideshow=function(){if(!lcl_shown||"undefined"==typeof lcl_slideshow||!J())return!1;var c=q;if(!c)return console.error("LC Lightbox. Object not initialized"),!1;clearInterval(lcl_slideshow);lcl_slideshow=void 0;b("#lcl_wrap").removeClass("lcl_is_playing");b("#lcl_progressbar").stop(!0).animate({marginTop:-3*b("#lcl_progressbar").height()},300,function(){b(this).remove()});"function"==typeof c.slideshow_end&&c.slideshow_end.call(null,q,h);h.is_arr_instance||(h.elems_selector?b(h.elems_selector):
lcl_curr_obj).first().trigger("lcl_slideshow_end",[]);return!0};return p}})(jQuery);