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