var bwg_current_filmstrip_pos,total_thumbnail_count,key,startPoint,endPoint,bwg_image_info_pos,filmstrip_width,preloadCount,filmstrip_thumbnail_width,filmstrip_thumbnail_height,addthis_share,lightbox_comment_pos,bwg_transition_duration,bwg_playInterval,isPopUpOpened=!1,bwg_overflow_initial_value=!1,bwg_overflow_x_initial_value=!1,bwg_overflow_y_initial_value=!1;function gallery_box_ready(){filmstrip_thumbnail_width=jQuery(".bwg_filmstrip_thumbnail").width(),filmstrip_thumbnail_height=jQuery(".bwg_filmstrip_thumbnail").height(),1==gallery_box_data.open_with_fullscreen?(filmstrip_width=jQuery(window).width(),filmstrip_height=jQuery(window).height()):(filmstrip_width=jQuery(".bwg_filmstrip_container").width(),filmstrip_height=jQuery(".bwg_filmstrip_container").height()),preloadCount="horizontal"==gallery_box_data.filmstrip_direction?parseInt(filmstrip_width/filmstrip_thumbnail_width)+gallery_box_data.preload_images_count:parseInt(filmstrip_height/filmstrip_thumbnail_height)+gallery_box_data.preload_images_count,total_thumbnail_count=jQuery(".bwg_filmstrip_thumbnail").length,key=parseInt(jQuery("#bwg_current_image_key").val()),startPoint=0,endPoint=key+preloadCount,jQuery(function(){bwg_load_visible_images(key,preloadCount,total_thumbnail_count),jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var e=jQuery("#bwg_rated").attr("data-params");void 0!==e&&bwg_rating((e=JSON.parse(e)).current_rate,e.current_rate_count,e.current_avg_rating,e.current_image_key)}),1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&(addthis_share={url:gallery_box_data.share_url}),lightbox_comment_pos=gallery_box_data.lightbox_comment_pos,bwg_image_info_pos=jQuery(".bwg_ctrl_btn_container").length?jQuery(".bwg_ctrl_btn_container").height():0,bwg_transition_duration=gallery_box_data.slideshow_interval<4*gallery_box_data.slideshow_effect_duration&&0!=gallery_box_data.slideshow_interval?1e3*gallery_box_data.slideshow_interval/4:1e3*gallery_box_data.slideshow_effect_duration,gallery_box_data.bwg_transition_duration=bwg_transition_duration,gallery_box_data.bwg_trans_in_progress=!1,(jQuery("#spider_popup_wrap").width()>=jQuery(window).width()||jQuery("#spider_popup_wrap").height()>=jQuery(window).height())&&parseInt(jQuery(".spider_popup_close").css("right"))<0&&jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen"),window.clearInterval(bwg_playInterval),bwg_current_filmstrip_pos=gallery_box_data.current_pos,jQuery(document).on("keydown",function(e){jQuery("#bwg_name").is(":focus")||jQuery("#bwg_email").is(":focus")||jQuery("#bwg_comment").is(":focus")||jQuery("#bwg_captcha_input").is(":focus")||("ArrowRight"==e.key?parseInt(jQuery("#bwg_current_image_key").val())==gallery_box_data.data.length-1?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())+1):"ArrowLeft"==e.key?0==parseInt(jQuery("#bwg_current_image_key").val())?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),gallery_box_data.data.length-1):bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())-1):"Escape"==e.key?spider_destroypopup(1e3):"Space"==e.key&&jQuery(".bwg_play_pause").trigger("click"))}),jQuery(window).resize(function(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||bwg_popup_resize())});var r=gallery_box_data.image_width,_=gallery_box_data.image_height;1==gallery_box_data.enable_addthis&&gallery_box_data.addthis_profile_id&&jQuery(".at4-share-outer").show(),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form");var e=gallery_box_data.data,t=gallery_box_data.current_image_key;jQuery(".bwg_image_hits span").html(++e[t].hit_count);var i=window.location.hash;i&&"-1"!=i.indexOf("bwg")||(location.replace("#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+gallery_box_data.current_image_id)),1==gallery_box_data.image_right_click&&(jQuery(".bwg_image_wrap").bind("contextmenu",function(e){return!1}),jQuery(".bwg_image_wrap").css("webkitTouchCallout","none")),jQuery("#spider_popup_wrap").bind("touchmove",function(e){e.preventDefault()}),jQuery("#spider_popup_wrap .bwg_image_wrap").on("swiperight",function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),jQuery("#spider_popup_wrap .bwg_image_wrap").on("swipeleft",function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),bwg_reset_zoom();var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";jQuery("#spider_popup_left").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+gallery_box_data.data.length-1)%gallery_box_data.data.length),!1}),jQuery("#spider_popup_right").on(a,function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),(parseInt(jQuery("#bwg_current_image_key").val())+1)%gallery_box_data.data.length),!1}),-1!=navigator.appVersion.indexOf("MSIE 10")||-1!=navigator.appVersion.indexOf("MSIE 9")?setTimeout(function(){bwg_popup_resize()},1):bwg_popup_resize(),jQuery(".bwg_watermark").css({display:"none"}),setTimeout(function(){bwg_change_watermark_container()},500),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isNativelySupported()||jQuery(".bwg_fullscreen").hide()),"horizontal"==gallery_box_data.filmstrip_direction?(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()-gallery_box_data.image_filmstrip_height),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width())):(jQuery(".bwg_image_container").height(jQuery(".bwg_image_wrap").height()),jQuery(".bwg_image_container").width(jQuery(".bwg_image_wrap").width()-gallery_box_data.image_filmstrip_width)),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments,.bwg_ecommerce_panel, .bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}});var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_filmstrip").on(s,function(e){var t=window.event||e,i=(t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta,a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());0=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)})):jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)})):"width"==gallery_box_data.width_or_height?jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({left:-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width()-gallery_box_data.all_images_right_left_space)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)})):jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top<-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width+gallery_box_data.all_images_right_left_space))?jQuery(".bwg_filmstrip_thumbnails").animate({top:-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height()-gallery_box_data.all_images_right_left_space)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)},500,"linear",function(){bwg_disable_lightbox_filmstrip_right_arrow(gallery_box_data)}))}),"left"==gallery_box_data.left_or_top?jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().left<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().left>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({left:0},500,"linear",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}):jQuery(".bwg_filmstrip_thumbnails").animate({left:jQuery(".bwg_filmstrip_thumbnails").position().left+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}))}):jQuery(".bwg_filmstrip_left").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),jQuery(".bwg_filmstrip_thumbnails").position().top<0&&(jQuery(".bwg_filmstrip_right").css({opacity:1}),jQuery(".bwg_filmstrip_thumbnails").position().top>-(gallery_box_data.filmstrip_thumb_right_left_space+gallery_box_data.image_filmstrip_width)?jQuery(".bwg_filmstrip_thumbnails").animate({top:0},500,"linear",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}):jQuery(".bwg_filmstrip_thumbnails").animate({top:jQuery(".bwg_filmstrip_thumbnails").position().top+gallery_box_data.image_filmstrip_width+gallery_box_data.filmstrip_thumb_right_left_space},500,"linear",function(){bwg_disable_lightbox_filmstrip_left_arrow(gallery_box_data)}))}),"width"==gallery_box_data.width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").width(),"",gallery_box_data):bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip").height(),"",gallery_box_data),jQuery(".bwg_info").on(a,function(){if("none"==jQuery(".bwg_image_info_container1").css("display")){jQuery(".bwg_image_info_container1").css("display","table-cell"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_hide_info);jQuery(".bwg_ctrl_btn_container").length&&jQuery(".bwg_ctrl_btn_container").height();jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set()}else jQuery(".bwg_image_info_container1").css("display","none"),jQuery(".bwg_info").attr("title",bwg_objectsL10n.bwg_show_info)}),jQuery(".bwg_rate").on(a,function(){"none"==jQuery(".bwg_image_rate_container1").css("display")?(jQuery(".bwg_image_rate_container1").css("display","table-cell"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_hide_rating)):(jQuery(".bwg_image_rate_container1").css("display","none"),jQuery(".bwg_rate").attr("title",bwg_objectsL10n.bwg_show_rating))}),jQuery(".bwg_zoom").on(a,function(){var e=["mousemove","touchmove"];jQuery("figure.bwg_popup_image").each(function(){var i=jQuery(this);i.hasClass("zoom")?jQuery.each(e,function(e,t){i.removeClass("zoom"),i.off(t)}):jQuery.each(e,function(e,t){i.addClass("zoom"),i.on(t,function(e){var t,i,a,r;window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause");var _=e.target,s=_.getBoundingClientRect();e.targetTouches&&(a=e.targetTouches[0].clientX-s.left,r=e.targetTouches[0].clientY-s.top),t=e.offsetX?e.offsetX:e.targetTouches?a:_.offsetHeight,i=e.offsetY?e.offsetY:e.targetTouches?r:_.offsetWidth,x=t/_.offsetWidth*100,y=i/_.offsetHeight*100,_.parentNode.style.backgroundPosition=x+"% "+y+"%"})})})}),jQuery(".bwg_comment, .bwg_comments_close_btn").on(a,function(){bwg_comment()}),jQuery(".bwg_ecommerce, .bwg_ecommerce_close_btn").on(a,function(){bwg_ecommerce()}),jQuery(".bwg_toggle_container").on(a,function(){var e="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-up":"bwg-icon-caret-down",t="top"==gallery_box_data.lightbox_ctrl_btn_pos?"bwg-icon-caret-down":"bwg-icon-caret-up";jQuery(".bwg_toggle_container i").hasClass(e)?(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:0},500):jQuery(".bwg_image_rate").animate({bottom:0},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:0},500):jQuery(".bwg_image_hit").animate({bottom:0},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:"-"+jQuery(".bwg_ctrl_btn_container").height()},500).addClass("closed"),jQuery(".bwg_toggle_container").animate({top:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}}))):(gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_rate_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_rate_pos||jQuery(".bwg_image_rate").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_rate").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),gallery_box_data.enable_image_filmstrip&&"bottom"==gallery_box_data.lightbox_filmstrip_pos||"bottom"!=gallery_box_data.lightbox_ctrl_btn_pos||"bottom"!=gallery_box_data.lightbox_hit_pos?gallery_box_data.enable_image_filmstrip&&"top"==gallery_box_data.lightbox_filmstrip_pos||"top"!=gallery_box_data.lightbox_ctrl_btn_pos||"top"!=gallery_box_data.lightbox_hit_pos||jQuery(".bwg_image_hit").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_hit").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},500),"bottom"==gallery_box_data.lightbox_ctrl_btn_pos?(jQuery(".bwg_ctrl_btn_container").animate({bottom:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({bottom:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}})):(jQuery(".bwg_ctrl_btn_container").animate({top:0},500).removeClass("closed"),jQuery(".bwg_toggle_container").animate({top:jQuery(".bwg_ctrl_btn_container").height()},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+e)}}))),bwg_info_position(!0)});var o=window.innerHeight;jQuery(".bwg_resize-full").on(a,function(){bwg_resize_full()}),jQuery(".bwg_fullscreen").on(a,function(){jQuery(".bwg_watermark").css({display:"none"});var e,t=0;if((jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(t=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen))if(jQuery.fullscreen.isFullScreen())jQuery.fullscreen.exit(),e=o,jQuery(window).width()>gallery_box_data.image_width&&(r=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(_=gallery_box_data.image_height),gallery_box_data.open_with_fullscreen&&(r=jQuery(window).width(),_=e),jQuery("#spider_popup_wrap").on("fscreenclose",function(){jQuery("#spider_popup_wrap").css({width:r,height:_,left:"50%",top:"50%",marginLeft:-r/2,marginTop:-_/2,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:r-t}),jQuery(".bwg_image_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:r-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:_-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:r-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(r-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:_-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(_-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:_-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_fullscreen),jQuery("#spider_popup_wrap").width() .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),bwg_resize_instagram_post(),bwg_change_watermark_container(),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)},500),jQuery(".bwg_filmstrip").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(i-("horizontal"==gallery_box_data.filmstrip_direction?t:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction)?"comment_container_width":0}),jQuery(".bwg_filmstrip").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:a-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").hide(),jQuery(".bwg_fullscreen").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_exit_fullscreen),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")}return!1}),jQuery(".bwg_play_pause").on(a,function(){jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&!jQuery(".bwg_comment_container").hasClass("bwg_open")?(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")):(window.clearInterval(bwg_playInterval),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_play),jQuery(".bwg_play_pause").attr("class","bwg-icon-play bwg_ctrl_btn bwg_play_pause"))}),gallery_box_data.open_with_autoplay&&(bwg_play(gallery_box_data.data),jQuery(".bwg_play_pause").attr("title",bwg_objectsL10n.bwg_pause),jQuery(".bwg_play_pause").attr("class","bwg-icon-pause bwg_ctrl_btn bwg_play_pause")),gallery_box_data.open_with_fullscreen&&bwg_open_with_fullscreen(),jQuery(".bwg_popup_image").removeAttr("width"),jQuery(".bwg_popup_image").removeAttr("height"),jQuery(window).focus(function(){jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(gallery_box_data.data)}),jQuery(window).blur(function(){event_stack=[],window.clearInterval(bwg_playInterval)});gallery_box_data.lightbox_ctrl_btn_pos;1==gallery_box_data.open_ecommerce&&setTimeout(function(){bwg_ecommerce()},400),1==gallery_box_data.open_comment&&bwg_comment()}function spider_createpopup(e,t,a,r,_,s,o,l){e=e.replace(/&/g,"&"),isPopUpOpened||(isPopUpOpened=!0,spider_isunsupporteduseragent()||(bwg_overflow_initial_value=jQuery("html").css("overflow"),bwg_overflow_x_initial_value=jQuery("html").css("overflow-x"),bwg_overflow_y_initial_value=jQuery("html").css("overflow-y"),jQuery("html").attr("style","overflow:hidden !important;"),jQuery("#bwg_spider_popup_loading_"+t).show(),jQuery("#spider_popup_overlay_"+t).css({display:"block"}),jQuery.ajax({type:"GET",url:e,success:function(e){var t=jQuery('
'+e+"
").hide().appendTo("body");if(gallery_box_ready(),spider_showpopup(s,o,t,_,l),"undefined"!=typeof addthis){jQuery(".addthis-smartlayers").show();var i=setInterval(function(){void 0!==addthis.layers.refresh&&(clearInterval(i),addthis.layers.refresh())},100)}},beforeSend:function(){},complete:function(){}})))}function spider_showpopup(e,t,i,a,r){var _=gallery_box_data.data,s=parseInt(jQuery("#bwg_current_image_key").val());if(void 0!==_[s]&&(isPopUpOpened=!0,-1<_[s].filetype.indexOf("EMBED_")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").prop("complete")?bwg_first_image_load(i,r):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").on("load error",function(){bwg_first_image_load(i,r)}),"EMBED_OEMBED_INSTAGRAM_POST"==_[s].filetype&&"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds)){instgrm.Embeds.process();var o=parseInt(jQuery("#bwg_image_container").height());jQuery(".bwg_embed_frame .instagram-media").css({"max-height":o+"px"})}}function bwg_first_image_load(e,t){e.show(),""==gallery_box_data.data[key].alt&&""==gallery_box_data.data[key].description?jQuery(".bwg_info").hide():jQuery(".bwg_info").show();var i=jQuery(".bwg_ctrl_btn_container").height();"bottom"==t?jQuery(".bwg_toggle_container").css("bottom",i+"px"):"top"==t&&jQuery(".bwg_toggle_container").css("top",i+"px"),jQuery(".bwg_spider_popup_loading").hide(),1==gallery_box_data.preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key").val())),bwg_load_filmstrip(),bwg_info_height_set()}function spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function spider_destroypopup(e){jQuery(".addthis-smartlayers").hide(),null!=document.getElementById("spider_popup_wrap")&&(void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&jQuery.fullscreen.isFullScreen()&&jQuery.fullscreen.exit(),"undefined"!=typeof enable_addthis&&enable_addthis&&jQuery(".at4-share-outer").hide(),setTimeout(function(){jQuery(".spider_popup_wrap").remove(),jQuery(".bwg_spider_popup_loading").css({display:"none"}),jQuery(".spider_popup_overlay").css({display:"none"}),jQuery(document).off("keydown"),!1!==bwg_overflow_initial_value&&jQuery("html").css("overflow",bwg_overflow_initial_value),!1!==bwg_overflow_x_initial_value&&jQuery("html").css("overflow-x",bwg_overflow_x_initial_value),!1!==bwg_overflow_y_initial_value&&jQuery("html").css("overflow-y",bwg_overflow_y_initial_value)},20)),isPopUpOpened=!1;var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),i=document.querySelector('meta[name="viewport"]');t&&i&&(i.content="width=device-width, initial-scale=1");var a=jQuery(document).scrollTop();history.pushState(history.state,null,window.location.origin+window.location.pathname+window.location.search),jQuery(document).scrollTop(a),void 0!==gallery_box_data.bwg_playInterval&&clearInterval(gallery_box_data.bwg_playInterval)}function get_ajax_pricelist(){var e={};return jQuery(".add_to_cart_msg").html(""),e.ajax_task="display",e.image_id=jQuery("#bwg_popup_image").attr("image_id"),jQuery("#ecommerce_ajax_loading").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_opacity_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_loading_div").css("width",jQuery(".bwg_ecommerce_panel").css("width")),jQuery("#ecommerce_loading_div").css("height",jQuery(".bwg_ecommerce_panel").css("height")),jQuery("#ecommerce_opacity_div").css("display","block"),jQuery("#ecommerce_loading_div").css("display","table-cell"),jQuery.ajax({type:"POST",url:jQuery("#bwg_ecommerce_form").attr("action"),data:e,success:function(e){jQuery(".pge_tabs li a").on("click",function(){return jQuery(".pge_tabs_container > div").hide(),jQuery(".pge_tabs li").removeClass("pge_active"),jQuery(jQuery(this).attr("href")).show(),jQuery(this).closest("li").addClass("pge_active"),jQuery("[name=type]").val(jQuery(this).attr("href").substr(1)),!1});var t=jQuery(e).find(".manual").html();jQuery(".manual").html(t);var i=jQuery(e).find(".downloads").html();jQuery(".downloads").html(i);var a=jQuery(e).find(".pge_options").html();jQuery(".pge_options").html(a);var r=jQuery(e).find(".pge_add_to_cart").html();jQuery(".pge_add_to_cart").html(r)},beforeSend:function(){},complete:function(){jQuery("#ecommerce_opacity_div").css("display","none"),jQuery("#ecommerce_loading_div").css("display","none")}}),!1}function spider_ajax_save(e){var t={};return t.bwg_name=jQuery("#bwg_name").val(),t.bwg_comment=jQuery("#bwg_comment").val(),t.bwg_email=jQuery("#bwg_email").val(),t.bwg_captcha_input=jQuery("#bwg_captcha_input").val(),t.ajax_task=jQuery("#ajax_task").val(),t.image_id=jQuery("#image_id").val(),t.comment_id=jQuery("#comment_id").val(),jQuery("#ajax_loading").css("height",jQuery(".bwg_comments").css("height")),jQuery("#opacity_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#opacity_div").css("height",jQuery(".bwg_comments").css("height")),jQuery("#loading_div").css("width",jQuery(".bwg_comments").css("width")),jQuery("#loading_div").css("height",jQuery(".bwg_comments").css("height")),document.getElementById("opacity_div").style.display="",document.getElementById("loading_div").style.display="table-cell",jQuery.ajax({type:"POST",url:jQuery("#"+e).attr("action"),data:t,success:function(e){jQuery(".bwg_comments").mCustomScrollbar("destroy");var t=jQuery(e).find(".bwg_comments").html();jQuery(".bwg_comments").html(t)},beforeSend:function(){},complete:function(){document.getElementById("opacity_div").style.display="none",document.getElementById("loading_div").style.display="none",jQuery(".bwg_comments").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments_close_btn").click(bwg_comment),bwg_captcha_refresh("bwg_captcha")}}),!1}function spider_rate_ajax_save(i,e){var t={};t.image_id=jQuery("#rate_image_id").val(),t.rate=void 0!==e?e:jQuery("#"+i+" input[name='score']").val(),t.ajax_task=jQuery("#rate_ajax_task").val();var a=jQuery("#bwg_image_container").data("action");return jQuery.ajax({type:"POST",url:a,data:t,success:function(e){var t=jQuery(e).find("#"+i).html();jQuery("#"+i).html(t)},beforeSend:function(){},complete:function(){}})}function spider_set_input_value(e,t){document.getElementById(e)&&(document.getElementById(e).value=t)}function spider_form_submit(e,t){document.getElementById(t)&&document.getElementById(t).submit(),e.preventDefault?e.preventDefault():e.returnValue=!1}function spider_check_required(e,t){return""==jQuery("#"+e).val()&&(alert(t+" "+bwg_objectsL10n.bwg_field_required),jQuery("#"+e).attr("style","border-color: #FF0000;"),jQuery("#"+e).focus(),!0)}function comment_check_privacy_policy(){var e=jQuery("#bwg_submit");e.removeClass("bwg-submit-disabled"),e.removeAttr("disabled"),jQuery("#bwg_comment_privacy_policy").is(":checked")||(e.addClass("bwg-submit-disabled"),e.attr("disabled","disabled"))}function spider_check_email(e){if(""!=jQuery("#"+e).val())return-1==jQuery("#"+e).val().replace(/^\s+|\s+$/g,"").search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)&&(alert(bwg_objectsL10n.bwg_mail_validation),!0)}function bwg_captcha_refresh(e){document.getElementById(e+"_img")&&document.getElementById(e+"_input")&&(srcArr=document.getElementById(e+"_img").src.split("&r="),document.getElementById(e+"_img").src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_img").style.display="inline-block",document.getElementById(e+"_input").value="")}function bwg_play_instagram_video(e,t){jQuery(e).parent().find("video").each(function(){jQuery(this).get(0).paused?(jQuery(this).get(0).play(),jQuery(e).children().hide()):(jQuery(this).get(0).pause(),jQuery(e).children().show())})}function bwg_add_comment(){var t=jQuery("#bwg_comment_form"),e=t.attr("action"),i={ajax_task:"add_comment"};return i.comment_name=t.find("#bwg_name").val(),i.comment_email=t.find("#bwg_email").val(),i.comment_text=t.find("#bwg_comment").val(),i.comment_captcha=t.find("#bwg_captcha_input").val(),i.popup_enable_captcha=t.find("#bwg_popup_enable_captcha").val(),i.privacy_policy=t.find("#bwg_comment_privacy_policy").is(":checked")?1:0,i.comment_image_id=jQuery("#bwg_popup_image").attr("image_id"),i.comment_moderation=t.find("#bwg_comment_moderation").val(),jQuery(".bwg_spider_ajax_loading").hide(),jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){jQuery(".bwg_comment_error").text(""),1==e.error?jQuery.each(e.error_messages,function(e,t){t&&jQuery(".bwg_comment_"+e+"_error").text(t)}):(t.find("#bwg_comment").val(""),jQuery(".bwg_comment_waiting_message").hide(),0==e.published&&jQuery(".bwg_comment_waiting_message").show(),""!=e.html_comments_block&&jQuery("#bwg_added_comments").html(e.html_comments_block).show())},beforeSend:function(){jQuery(".bwg_spider_ajax_loading").show()},complete:function(){0jQuery(".bwg_image_info").height()&&jQuery(".mCSB_container").hasClass("mCS_no_scrollbar")&&jQuery(".bwg_image_info").mCustomScrollbar("destroy"),jQuery(".bwg_image_info").hasClass("mCustomScrollbar")||void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_image_info").mCustomScrollbar({scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}})},200),jQuery("#spider_popup_left").show(),jQuery("#spider_popup_right").show(),jQuery(".bwg_image_info").hide(),0==gallery_box_data.enable_loop&&(a==parseInt(r.length)-1&&jQuery("#spider_popup_right").hide(),0==a&&jQuery("#spider_popup_left").hide()),1==gallery_box_data.ecommerceACtive&&1==gallery_box_data.enable_image_ecommerce)if(0==gallery_box_data.data[a].pricelist)jQuery(".bwg_ecommerce").hide();else{jQuery(".bwg_ecommerce").show(),jQuery(".pge_tabs li").hide(),jQuery("#downloads").hide(),jQuery("#manual").hide();var i=gallery_box_data.data[a].pricelist_sections.split(",");if(i)if(jQuery("#"+i[0]).show(),jQuery("[name=type]").val(i[0]),1a)_="left";else if(bwg_current_key==a)return;jQuery(".bwg_image_count").html(r[a].number),jQuery(".bwg_watermark").css({display:"none"}),"width"==gallery_box_data.width_or_height?bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").width()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width):"height"==gallery_box_data.width_or_height&&(bwg_current_filmstrip_pos=a*(jQuery(".bwg_filmstrip_thumbnail").height()+2+2*gallery_box_data.lightbox_filmstrip_thumb_border_width)),gallery_box_data.bwg_current_key=a,location.replace("#bwg"+gallery_box_data.gallery_id+"/"+r[a].id),history.replaceState(void 0,void 0,"#bwg"+gallery_box_data.gallery_id+"/"+r[a].id),jQuery("#rate_image_id").val(r[a].id),spider_set_input_value("rate_ajax_task","save_hit_count"),spider_rate_ajax_save("bwg_rate_form"),gallery_box_data.popup_enable_rate&&(jQuery("#bwg_star").attr("data-score",r[a].avg_rating),jQuery("#bwg_star").removeAttr("title"),r[a].cur_key=a,bwg_rating(r[a].rate,r[a].rate_count,r[a].avg_rating,a)),jQuery(".bwg_image_hits span").html(++r[a].hit_count),jQuery("#bwg_popup_image").attr("image_id",r[a].id),jQuery(".bwg_image_title").html(jQuery("").html(r[a].alt).text()),jQuery(".bwg_image_description").html(jQuery("").html(r[a].description).text()),jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+a).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_image_info").css("opacity",1),""==r[a].alt.trim()&&""==r[a].description.trim()&&jQuery(".bwg_image_info").css("opacity",0),"none"!=jQuery(".bwg_image_info_container1").css("display")?jQuery(".bwg_image_info_container1").css("display","table-cell"):jQuery(".bwg_image_info_container1").css("display","none"),"none"!=jQuery(".bwg_image_rate_container1").css("display")?jQuery(".bwg_image_rate_container1").css("display","table-cell"):jQuery(".bwg_image_rate_container1").css("display","none");var s=2==jQuery(".bwg_popup_image_spun").css("zIndex")?".bwg_popup_image_spun":".bwg_popup_image_second_spun",o=".bwg_popup_image_second_spun"==s?".bwg_popup_image_spun":".bwg_popup_image_second_spun",l=-1';if(l){if(jQuery("#bwg_download").addClass("bwg-hidden"),u+=''+(g?'
':" "),n){var h=jQuery(".instagram-media"),m=jQuery(".bwg_embed_frame"),c=jQuery(".bwg_image_container").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),p=jQuery(".bwg_image_container").height()-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),y=r[a].image_width,f=r[a].image_height,j=bwg_resizing_ratio(y,f,c,p);m.attr("data-width",c),m.attr("data-height",p);var Q=j.width,v=j.height;Q").html(decodeURIComponent(r[a].image_url)).text()).split("?bwg")[0]+"'";gallery_box_data.popup_enable_zoom&&(u+='
'),u+='").html(decodeURIComponent(r[a].image_url)).text()+'" alt="'+r[a].alt+'" />'}function z(){gallery_box_data.preload_images&&bwg_preload_images(a),window["bwg_"+gallery_box_data.bwg_image_effect](s,o,_),jQuery(s).find(".bwg_fb_video").each(function(){jQuery(this).attr("src","")}),l?jQuery("#bwg_fullsize_image").attr("href",decodeURIComponent(r[a].image_url)):(jQuery("#bwg_fullsize_image").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].image_url)),jQuery("#bwg_download").attr("href",gallery_box_data.site_url+decodeURIComponent(r[a].thumb_url).replace("/thumb/","/.original/")));var e=decodeURIComponent(r[a].image_url).split("/");jQuery("#bwg_download").attr("download",e[e.length-1].replace(/\?bwg=(\d+)$/,""));var t=encodeURIComponent(gallery_box_data.bwg_share_url.replace("image_id","image_id="+ +r[a].id));if(l)var i=encodeURIComponent(r[a].thumb_url);else i=gallery_box_data.bwg_share_image_url+encodeURIComponent(encodeURIComponent(r[a].pure_image_url));i=i.replace(/%252F|%25252F/g,"%2F"),void 0!==addthis_share&&(addthis_share.url=t),jQuery("#bwg_facebook_a").attr("href","https://www.facebook.com/sharer/sharer.php?u="+t),jQuery("#bwg_twitter_a").attr("href","https://twitter.com/intent/tweet?url="+t),jQuery("#bwg_pinterest_a").attr("href","http://pinterest.com/pin/create/button/?s=100&url="+t+"&media="+i+"&description="+r[a].alt+"%0A"+r[a].description),jQuery("#bwg_tumblr_a").attr("href","https://www.tumblr.com/share/photo?source="+i+"&caption="+r[a].alt+"&clickthru="+t),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(jQuery(".bwg_comments .mCSB_container").css("top","0"),jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form")),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(0==r[a].pricelist?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce),jQuery(".spider_popup_close_fullscreen").show()):get_ajax_pricelist()),void 0!==jQuery().mCustomScrollbar&&jQuery.isFunction(jQuery().mCustomScrollbar)&&jQuery(".bwg_comments").mCustomScrollbar({advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments .mCSB_scrollTools").hide(),gallery_box_data.enable_image_filmstrip&&(bwg_slideshow_filmstrip_fix_dimension(),setTimeout(function(){bwg_disable_lightbox_filmstrip_left_right_arrow(gallery_box_data)},100)),bwg_resize_instagram_post()}if(gallery_box_data.popup_enable_zoom?u+="
":u+="
",jQuery(o).html(u),jQuery(o).find("img").on("load error",function(){jQuery(".bwg-loading").addClass("bwg-hidden")}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:d,maxHeight:w,height:"auto"}),l)z();else jQuery(o).find("img").one("load",function(){z()}).each(function(){this.complete&&jQuery(this).load()});"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&(jQuery(".instagram-media").hide(),instgrm.Embeds.process(),jQuery(".instagram-media").show())}}function bwg_preload_images_lightbox(e){for(var t=gallery_box_data.data,i=t.length,a=0==gallery_box_data.preload_images_count||gallery_box_data.preload_images_count>=i?i:gallery_box_data.preload_images_count,r=0,_=1;r").attr("src",gallery_box_data.site_url+jQuery("").html(decodeURIComponent(t[o].image_url)).text());s*=-1,r++}while(1!=s)}}function bwg_popup_sidebar_open(e){var t=gallery_box_data.lightbox_comment_width,i=gallery_box_data.lightbox_comment_pos;if(t>jQuery(window).width()){if(t=jQuery(window).width(),e.css({width:t}),jQuery(".spider_popup_close_fullscreen").hide(),jQuery(".spider_popup_close").hide(),jQuery(".bwg_ctrl_btn").hasClass("bwg-icon-pause")){var a=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase());jQuery(".bwg_play_pause").trigger(a?"touchend":"click")}}else jQuery(".spider_popup_close_fullscreen").show();"left"==i?e.animate({left:0},100):e.animate({right:0},100)}function bwg_comment(){if(jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","-1"),jQuery(".bwg_comment_wrap").css("z-index","25"),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)),jQuery(".bwg_comment_container").hasClass("bwg_open"))"1"==jQuery(".bwg_comment_container").attr("data-play-status")&&jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-play").addClass("bwg-icon-pause").attr("title",bwg_objectsL10n.bwg_pause),bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments),jQuery(".spider_popup_close_fullscreen").show();else{jQuery(".bwg_play_pause").hasClass("bwg-icon-pause")?jQuery(".bwg_comment_container").attr("data-play-status","1"):jQuery(".bwg_comment_container").attr("data-play-status","0"),jQuery(".bwg_ctrl_btn.bwg_play_pause").removeClass("bwg-icon-pause").addClass("bwg-icon-play").attr("title",bwg_objectsL10n.bwg_play),bwg_popup_sidebar_open(jQuery(".bwg_comment_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_open"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_hide_comments);var e=parseInt(jQuery("#bwg_current_image_key").val());void 0!==gallery_box_data.current_image_key&&0!=gallery_box_data.data[e].comment_count&&(jQuery("#bwg_added_comments").show(),spider_set_input_value("ajax_task","display"),spider_set_input_value("image_id",jQuery("#bwg_popup_image").attr("image_id")),spider_ajax_save("bwg_comment_form"))}jQuery(".bwg_comments").mCustomScrollbar("update",{scrollInertia:150,theme:"dark-thick",advanced:{updateOnContentResize:!0}})}function bwg_ecommerce(){jQuery(".bwg_watermark").css({display:"none"}),jQuery(".bwg_ecommerce_wrap").css("z-index","25"),jQuery(".bwg_comment_wrap").css("z-index","-1"),jQuery(".bwg_comment_container").hasClass("bwg_open")&&(bwg_popup_sidebar_close(jQuery(".bwg_comment_container")),jQuery(".bwg_comment_container").attr("class","bwg_comment_container bwg_close"),jQuery(".bwg_comment").attr("title",bwg_objectsL10n.bwg_show_comments)),jQuery(".bwg_ecommerce_container").hasClass("bwg_open")?(bwg_popup_sidebar_close(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_hide_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_close"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_show_ecommerce)):(bwg_popup_sidebar_open(jQuery(".bwg_ecommerce_container")),bwg_animate_image_box_for_show_sidebar(),jQuery(".bwg_ecommerce_container").attr("class","bwg_ecommerce_container bwg_open"),jQuery(".bwg_ecommerce").attr("title",bwg_objectsL10n.bwg_hide_ecommerce),get_ajax_pricelist())}function bwg_popup_sidebar_close(e){var t=parseInt(e.css("borderRightWidth"));t||(t=0),"left"==lightbox_comment_pos?e.animate({left:-e.width()-t},100):"right"==lightbox_comment_pos&&e.animate({right:-e.width()-t},100)}function bwg_animate_image_box_for_hide_sidebar(){"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:0,width:jQuery("#spider_popup_wrap").width()},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:0,width:jQuery("#spider_popup_wrap").width()},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({width:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)):"height"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").animate({height:jQuery(".spider_popup_wrap").width()},100),jQuery(".bwg_filmstrip").animate({height:jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100)),bwg_set_filmstrip_pos(jQuery(".spider_popup_wrap").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),jQuery(".spider_popup_close_fullscreen").show(100)}function bwg_animate_image_box_for_show_sidebar(){var e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width();"left"==lightbox_comment_pos?jQuery(".bwg_image_wrap").animate({left:e,width:jQuery("#spider_popup_wrap").width()-e},100):"right"==lightbox_comment_pos&&jQuery(".bwg_image_wrap").animate({right:e,width:jQuery("#spider_popup_wrap").width()-e},100),jQuery(".bwg_image_container").animate({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e},100),jQuery(".bwg_popup_image").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery("#spider_popup_wrap").width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},{duration:100,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height&&(jQuery(".bwg_filmstrip_container").css({width:jQuery("#spider_popup_wrap").width()-("vertical"==gallery_box_data.filmstrip_direction?0:e)}),jQuery(".bwg_filmstrip").animate({width:jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},100),bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip_container").width()-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data))}function bwg_reset_zoom(){var e=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),t=document.querySelector('meta[name="viewport"]');e&&t&&(t.content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0")}function bwg_open_with_fullscreen(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_video").css({width:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_change_watermark_container()}}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())}),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")}function bwg_resize_full(){jQuery(".bwg_watermark").css({display:"none"});var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=jQuery(".bwg_comment_container").width()||jQuery(".bwg_ecommerce_container").width()),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery(window).width()>gallery_box_data.image_width&&(bwg_popup_current_width=gallery_box_data.image_width),window.innerHeight>gallery_box_data.image_height&&(bwg_popup_current_height=gallery_box_data.image_height),jQuery("#spider_popup_wrap").animate({width:bwg_popup_current_width,height:bwg_popup_current_height,left:"50%",top:"50%",marginLeft:-bwg_popup_current_width/2,marginTop:-bwg_popup_current_height/2,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:bwg_popup_current_width-e},500),jQuery(".bwg_image_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)},500),jQuery(".bwg_popup_image").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width() .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:bwg_popup_current_width-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width() .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").animate({maxWidth:jQuery(window).width()-e-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0),maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)},{duration:500,complete:function(){bwg_resize_instagram_post(),bwg_change_watermark_container()}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())},500),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height()),"",gallery_box_data),"horizontal"!=gallery_box_data.filmstrip_direction&&jQuery(".bwg_filmstrip_right").css({top:window.innerHeight-jQuery(".bwg_filmstrip_right").height()})),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen")),setTimeout(function(){bwg_info_height_set()},500)}function bwg_popup_resize_lightbox(){void 0!==jQuery().fullscreen&&jQuery.isFunction(jQuery().fullscreen)&&(jQuery.fullscreen.isFullScreen()||(jQuery(".bwg_resize-full").show(),jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")||jQuery(".bwg_resize-full").attr("class","bwg-icon-expand bwg_ctrl_btn bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_maximize),jQuery(".bwg_fullscreen").attr("class","bwg-icon-arrows-out bwg_ctrl_btn bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.fullscreen)));var e=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(e=gallery_box_data.lightbox_comment_width),e>jQuery(window).width()?(e=jQuery(window).width(),jQuery(".bwg_comment_container").css({width:e}),jQuery(".bwg_ecommerce_container").css({width:e}),jQuery(".spider_popup_close_fullscreen").hide()):jQuery(".spider_popup_close_fullscreen").show(),window.innerHeight>gallery_box_data.image_height&&1!=gallery_box_data.open_with_fullscreen&&!jQuery(".bwg_resize-full").hasClass("bwg-icon-compress")?(jQuery("#spider_popup_wrap").css({height:gallery_box_data.image_height,top:"50%",marginTop:-gallery_box_data.image_height/2,zIndex:100002}),jQuery(".bwg_image_container").css({height:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:gallery_box_data.image_height-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:gallery_box_data.image_height}),jQuery(".bwg_filmstrip").css({height:gallery_box_data.image_height-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=gallery_box_data.image_height):(jQuery("#spider_popup_wrap").css({height:window.innerHeight,top:0,marginTop:0,zIndex:100002}),jQuery(".bwg_image_container").css({height:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxHeight:window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0)}),"vertical"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({height:window.innerHeight}),jQuery(".bwg_filmstrip").css({height:window.innerHeight-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_height=window.innerHeight),jQuery(window).width()>=gallery_box_data.image_width&&1!=gallery_box_data.open_with_fullscreen?(jQuery("#spider_popup_wrap").css({width:gallery_box_data.image_width,left:"50%",marginLeft:-gallery_box_data.image_width/2,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_image_container").css({width:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_image_info").css("height","auto"),bwg_info_height_set(),jQuery(".bwg_popup_image").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:gallery_box_data.image_width-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:gallery_box_data.image_width-e}),jQuery(".bwg_filmstrip").css({width:gallery_box_data.image_width-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=gallery_box_data.image_width):(jQuery("#spider_popup_wrap").css({width:jQuery(window).width(),left:0,marginLeft:0,zIndex:100002}),jQuery(".bwg_image_wrap").css({width:jQuery(window).width()-e}),jQuery(".bwg_image_container").css({width:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_image").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:jQuery(window).width()-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)-e}),"horizontal"==gallery_box_data.filmstrip_direction&&(jQuery(".bwg_filmstrip_container").css({width:jQuery(window).width()-e}),jQuery(".bwg_filmstrip").css({width:jQuery(window).width()-e-2*("horizontal"==gallery_box_data.filmstrip_direction?jQuery(".bwg_filmstrip_right").width():jQuery(".bwg_filmstrip_right").height())})),bwg_popup_current_width=jQuery(window).width()),bwg_resize_instagram_post(),bwg_change_watermark_container(),1!=gallery_box_data.open_with_fullscreen&&(gallery_box_data.lightbox_close_btn_right<0&&jQuery("#spider_popup_wrap").width()-2*gallery_box_data.lightbox_close_btn_right>=jQuery(window).width()||gallery_box_data.lightbox_close_btn_top<0&&jQuery("#spider_popup_wrap").height()-2*gallery_box_data.lightbox_close_btn_top>=jQuery(window).height()?jQuery(".spider_popup_close").attr("class","spider_popup_close_fullscreen"):jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close"));var t=jQuery(".bwg_ctrl_btn_container").height();"bottom"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-down")&&jQuery(".bwg_toggle_container").css("bottom",t+"px"),"top"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_toggle_container i").hasClass("bwg-icon-caret-up")&&jQuery(".bwg_toggle_container").css("top",t+"px")}function bwg_rating(e,t,i,a){lightbox_rate_stars_count=gallery_box_data.lightbox_rate_stars_count,lightbox_rate_size=gallery_box_data.lightbox_rate_size,lightbox_rate_icon=gallery_box_data.lightbox_rate_icon;var r="Not rated yet.";if(0!=i&&""!=i&&(r=parseFloat(i).toFixed(1)+"\n Votes: "+t),void 0!==jQuery().raty&&jQuery.isFunction(jQuery().raty)){var _=parseFloat(jQuery("#bwg_star").attr("data-score"));jQuery("#bwg_star").removeAttr("data-score").html("");var s={starType:"i",number:lightbox_rate_stars_count,size:lightbox_rate_size,noRatedMsg:"Not rated yet.",readOnly:!1,score:_,starHalf:"bwg-icon-"+lightbox_rate_icon+("star"==lightbox_rate_icon?"-half":"")+"-o",starOff:"bwg-icon-"+lightbox_rate_icon+"-o",starOn:"bwg-icon-"+lightbox_rate_icon,cancelOff:"bwg-icon-minus-square-o",cancelOn:"bwg-icon-minus-square-o",cancel:!1,cancelHint:"Cancel your rating.",hints:[r,r,r,r,r],alreadyRatedMsg:parseFloat(i).toFixed(1)+"\nYou have already rated.\nVotes: "+t};e||(s.click=function(e,t){jQuery("#bwg_star").hide(),jQuery("#bwg_rated").show(),spider_set_input_value("rate_ajax_task","save_rate"),jQuery.when(spider_rate_ajax_save("bwg_rate_form",e)).then(function(){gallery_box_data.data[a].rate=e,++gallery_box_data.data[a].rate_count,gallery_box_data.data[a].avg_rating=_?((_+e)/2).toFixed(1):e.toFixed(1),bwg_rating(gallery_box_data.data[a].rate,gallery_box_data.data[a].rate_count,gallery_box_data.data[a].avg_rating,gallery_box_data.current_image_key)})}),jQuery("#bwg_star").raty(s),jQuery(".bwg_image_rate_disabled").hide(),e&&jQuery(".bwg_image_rate_disabled").show()}}function changeDownloadsTotal(e){var t=0;0==jQuery("[name=option_show_digital_items_count]").val()?jQuery("[name=selected_download_item]:checked").each(function(){t+=Number(jQuery(this).closest("tr").attr("data-price"))}):jQuery(".digital_image_count").each(function(){0!=Number(jQuery(this).val())&&(t+=Number(jQuery(this).closest("tr").attr("data-price"))*Number(jQuery(this).val()))}),t=t.toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_downloads_price").html(t)}function changeMenualTotal(e){Number(jQuery(e).val())<=0&&jQuery(e).val("1");var t=Number(jQuery(e).val()),i=Number(jQuery(".product_manual_price").attr("data-actual-price"));i=(i*=t).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onSelectableParametersChange(e){var t=0,i=gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price?gallery_box_data.data[jQuery("#bwg_current_image_key").val()].pricelist_manual_price:"0";i=parseFloat(i.replace(",",""));var a=jQuery(e).closest(".image_selected_parameter").attr("data-parameter-type"),r=jQuery(e).val();r=r.split("*");var _=parseFloat(r[1]),s=r[0],o=Number(jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val());if("4"==a||"5"==a){var l=parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(l)}else if("6"==a){if(0==jQuery(e).is(":checked"))var n=o-parseFloat(s+_);else n=o+parseFloat(s+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(n)}jQuery(".already_selected_values").each(function(){t+=Number(jQuery(this).val())}),i+=t,jQuery(".product_manual_price").attr("data-actual-price",i),i=(i*=Number(jQuery(".image_count").val())<=0?1:Number(jQuery(".image_count").val())).toFixed(2).toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),jQuery(".product_manual_price").html(i)}function onBtnClickAddToCart(){var e=jQuery("[name=type]").val();if(""!=e){var t={};if("manual"==e){var i=jQuery(".image_count").val(),a={};jQuery(".manual").find(".image_selected_parameter").each(function(){var e=jQuery(this).attr("data-parameter-id"),t="";switch(jQuery(this).attr("data-parameter-type")){case"2":t=jQuery(this).find("input").val();break;case"3":t=jQuery(this).find("textarea").val();break;case"4":t=jQuery(this).find("select :selected").val();break;case"5":t=jQuery(this).find("[type=radio]:checked").val();break;case"6":var i=[];jQuery(this).find("[type=checkbox]:checked").each(function(){i.push(jQuery(this).val())}),t=i}a[e]=t}),t.count=i,t.parameters=a,t.price=jQuery(".product_manual_price").attr("data-price").replace(",","")}else{var r=[];if(0==jQuery("[name=option_show_digital_items_count]").val()){if(0==jQuery("[name=selected_download_item]:checked").length)return void jQuery(".add_to_cart_msg").html("You must select at least one item.");jQuery("[name=selected_download_item]:checked").each(function(){var e={};e.id=jQuery(this).val(),e.count=1,e.price=jQuery(this).closest("tr").attr("data-price"),r.push(e)})}else jQuery(".digital_image_count").each(function(){var e={};0checkout_page);?>")},beforeSend:function(){},complete:function(){}})}else jQuery(".add_to_cart_msg").html("Please select Prints and products or Downloads")}function onBtnViewCart(){var e=jQuery("[name=option_checkout_page]").val();jQuery("#bwg_ecommerce_form").attr("action",e),jQuery("#bwg_ecommerce_form").submit()}function bwg_load_visible_images(e,t,i){0<=e-t&&(startPoint=e-t),ijQuery(".bwg_filmstrip_thumbnails").width();"top"==e.left_or_top&&(t=jQuery(".bwg_filmstrip_thumbnails").position().top,i=jQuery(".bwg_filmstrip").height()>jQuery(".bwg_filmstrip_thumbnails").height()),jQuery(".bwg_filmstrip_container .bwg_filmstrip_left").css({opacity:"1"}),jQuery(".bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"1"}),jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail:first-child").index()!=jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail.bwg_thumb_active").index()&&0!=t||jQuery(".bwg_filmstrip_container .bwg_filmstrip_left").css({opacity:"0.3"}),jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail:last-child").index()==jQuery(".bwg_filmstrip_thumbnails .bwg_filmstrip_thumbnail.bwg_thumb_active").index()&&jQuery(".bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"0.3"}),jQuery(".bwg_filmstrip").width()>jQuery(".bwg_filmstrip_thumbnails").width()&&jQuery(".bwg_filmstrip_container .bwg_filmstrip_left, .bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"0.3"}),i&&jQuery(".bwg_filmstrip_container .bwg_filmstrip_left, .bwg_filmstrip_container .bwg_filmstrip_right").css({opacity:"0.3"})}function spider_display_embed(e,t,i,a){var r="";switch(e){case"EMBED_OEMBED_YOUTUBE_VIDEO":var _="";break;case"EMBED_OEMBED_VIMEO_VIDEO":var s="";break;case"EMBED_OEMBED_FLICKR_IMAGE":var o="
'),r+=o+="
";break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var l="
Your browser does not support the video tag. '),r+=l+="
";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":var n=a["data-max-width"],g=a["data-max-height"];l="
'),r+=l+="
";break;case"EMBED_OEMBED_INSTAGRAM_POST":l="
",""!=t&&(l+='
'+atob(t)+"
"),r+=l+="
";break;case"EMBED_OEMBED_FACEBOOK_IMAGE":var b="'),r+=b+="";break;case"EMBED_OEMBED_FACEBOOK_VIDEO":var w="
'),r+=w+="
";break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var d="";break;case"EMBED_OEMBED_IMGUR":var u="
'),r+=u+="
";break;case"EMBED_OEMBED_GOOGLE_PHOTO_IMAGE":var h="
'),r+=h+="
";break;default:var m={content:""};jQuery(document).trigger("bwg_display_embed",[m,e,t,i,a]),r=m.content}return r}function bwg_add_instagram_gallery(e,s){if(!0===(s=void 0!==s&&s)){if(bwg_check_instagram_gallery_input(e,s))return!1;var t="0";1==jQuery("input[name=popup_instagram_post_gallery]:checked").val()&&(t="1");var i=encodeURI(jQuery("#popup_instagram_gallery_source").val()),a=encodeURI(jQuery("#popup_instagram_image_number").val())}else{if(bwg_check_instagram_gallery_input(e,s))return!1;if(!bwg_check_gallery_empty(!1,!0))return!1;t="0";1==jQuery("input[name=instagram_post_gallery]:checked").val()&&(t="1");i=encodeURI(jQuery("#gallery_source").val());var r=jQuery("input[name=update_flag]:checked").val();a=encodeURI(jQuery("#autogallery_image_number").val())}jQuery("#bulk_embed").hide(),jQuery("#loading_div").show();var o=[],_={action:"addInstagramGallery",instagram_user:i,instagram_access_token:e,whole_post:t,autogallery_image_number:a,update_flag:r,async:!0};jQuery.post(bwg_ajax_url_nonce,_,function(e){if(0==e)return alert("Error: cannot get response from the server."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;var t=e.indexOf("WD_delimiter_start"),i=e.indexOf("WD_delimiter_end");if(-1==t||-1==i)return jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;if(e=e.substring(t+18,i),response_JSON=JSON.parse(e),response_JSON){if("error"==response_JSON[0])return alert("Error: "+JSON.parse(e)[1]),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1;for(var a=response_JSON.length,r=1;r<=a;r++)if(0!=response_JSON[a-r]){var _=response_JSON[a-r];o.push(_)}return bwg_add_image(o,"instagram"),s||(bwg_gallery_update_flag(),jQuery("#tr_instagram_gallery_add_button").hide()),jQuery("#loading_div").hide(),s&&jQuery(".opacity_bulk_embed").hide(),"ok"}return alert("There is some error. Cannot add Instagram gallery."),jQuery("#loading_div").hide(),s&&jQuery("#bulk_embed").show(),!1})}var bwg=0,isMobile=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()),bwg_click=isMobile?"touchend":"click",bwg_slideshow_filmstrip_thumbnail_timer=!1;window.bwg_slideshow_filmstrip_thumb={};var bwg_params=[],bwg_params_ib=[],bwg_params_carousel=[];function bwg_remove_lazy_loader_icon(){1==bwg_objectsL10n.lazy_load&&jQuery("img.bwg_lazyload").Lazy({afterLoad:function(){jQuery(".lazy_loader").removeClass("lazy_loader")},onFinishedAll:function(){jQuery(".lazy_loader").removeClass("lazy_loader")}})}function bwg_main_ready(e){var t=e.data("bwg");1===e.data("scroll")&&(form_id="gal_front_form_"+t,jQuery("html, body").animate({scrollTop:jQuery("#"+form_id).offset().top-150},500)),bwg_remove_lazy_loader_icon(),0
"+bwg_objectsL10n.bwg_tag_see_less),a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"})):jQuery(this).hasClass("bwg_hide")&&(jQuery(this).removeClass("bwg_hide").addClass("bwg_show").html("+"+bwg_objectsL10n.bwg_tag_see_all),a.css({"min-height":_,"max-height":s,overflow:"hidden"}))}),1==i&&(jQuery(this).find(".see_all_tags").removeClass("bwg_show").addClass("bwg_hide").html(""+bwg_objectsL10n.bwg_tag_see_less),a.css({"min-height":"auto","max-height":"100%",height:"auto",overflow:"visible"}))})}function bwg_slideshow_resize(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],bwg_popup_resize(bwg))})}function bwg_blog_style_resize(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg"),jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parent().width());var t=(jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96;jQuery(this).height(t),jQuery(this).find('iframe[id^="instagram-embed-"]').css({"max-height":t+"px"})})})}function bwg_blog_style_onload(){jQuery(".bwg_blog_style").each(function(){bwg=jQuery(this).attr("data-bwg");jQuery("#bwg_blog_style_"+bwg);jQuery(".bwg_embed_frame_16x9_"+bwg).each(function(e){if(jQuery(".bwg_blog_style_image_"+bwg).find(".fluid-width-video-wrapper").length){jQuery(".fluid-width-video-wrapper").removeAttr("style");var t=jQuery(this).parents(".bwg_blog_style_image_"+bwg).find(".fluid-width-video-wrapper").contents();jQuery(this).parents(".fluid-width-video-wrapper").replaceWith(t)}jQuery(this).width(jQuery(this).parents(".bwg_blog_style_image_"+bwg).width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".bwg_embed_frame_instapost_"+bwg).each(function(e){jQuery(this).width(jQuery(this).parents(".bwg_blog_style_image_"+bwg).width());var t=(jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96;jQuery(this).height(t),jQuery(this).find('iframe[id^="instagram-embed-"]').css({"max-height":t+"px"})}),bwg_container_loaded(bwg)})}function bwg_blog_style_ready(t){var e=t.data("bwg");bwg_container_loaded(e),"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&instgrm.Embeds.process();var i=!1;t.find(".bwg_lightbox_"+e).on("click",function(){var e=jQuery(this).attr("data-image-id");if(jQuery("#bwg_blog_style_share_buttons_"+e).removeAttr("data-open-comment"),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(e,t.closest(".bwg_container")),!1}),jQuery(".bwg_lightbox_"+e+" .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(t.attr("data-image-id"),t.closest(".bwg_container"),!0),!1});var a=window.location.hash.substring(1);a&&"-1"!=a.indexOf("bwg")&&(bwg_hash_array=a.replace("bwg","").split("/"),""==bwg_hash_array[0]&&bwg_gallery_box(bwg_hash_array[1]))}function bwg_slideshow_focus(){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).data("bwg"),jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]),jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-play")||bwg_play(bwg_params[bwg].data,bwg))})}function bwg_carousel_focus(){jQuery(".bwg_carousel").each(function(){bwg=jQuery(this).data("bwg"),jQuery(".bwg_carousel[data-bwg="+bwg+"]")[0].offsetHeight&&jQuery(".bwg_carousel_image_container_"+bwg).length&&jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-pause")&&bwg_params_carousel[bwg].carousel.start()})}function bwg_slideshow_blur(e){jQuery(".bwg_slideshow").each(function(){bwg=jQuery(this).data("bwg"),!e&&jQuery(".bwg_slideshow[data-bwg="+bwg+"]")[0].offsetHeight||jQuery("#bwg_slideshow_image_container_"+bwg).length&&(bwg_params[bwg]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+bwg).attr("data-params")),bwg_params[bwg].event_stack=[],window.clearInterval(window["bwg_playInterval"+bwg]))})}function bwg_carousel_blur(e){jQuery(".bwg_carousel").each(function(){bwg=jQuery(this).data("bwg"),!e&&jQuery(".bwg_carousel[data-bwg="+bwg+"]")[0].offsetHeight||jQuery(".bwg_carousel_image_container_"+bwg).length&&void 0!==bwg_params_carousel[bwg]&&bwg_params_carousel[bwg].carousel.pause()})}function bwg_carousel_ready(t){if(bwg_params_carousel[t]=[],bwg_params_carousel[t].bwg_currentCenterNum=1,bwg_params_carousel[t].bwg_currentlyMoving=!1,bwg_params_carousel[t].data=[],"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds){var e=jQuery(".bwg_embed_frame_"+t),i=e.data("height");e.css({display:"none"}),instgrm.Embeds.process(),jQuery(".bwg_embed_frame_"+t+" #instagram-embed-"+t).css({"max-height":i+"px"}),e.css({display:"inline-block"})}jQuery("#spider_carousel_left-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.prev(),e.stopPropagation(),e.stopImmediatePropagation()}),jQuery("#spider_carousel_right-ico_"+t).on("click",function(e){bwg_params_carousel[t].carousel.next(),e.stopPropagation(),e.stopImmediatePropagation()}),parseInt(bwg_params_carousel[t].carousel_enable_autoplay)&&(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t)),jQuery(".bwg_carousel_play_pause_"+t).on(bwg_click,function(e){jQuery(".bwg_ctrl_btn_"+t).hasClass("bwg-icon-play")?(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-pause bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.start()):(jQuery(".bwg_carousel_play_pause_"+t).attr("title",bwg_objectsL10n.play),jQuery(".bwg_carousel_play_pause_"+t).attr("class","bwg-icon-play bwg_ctrl_btn_"+t+" bwg_carousel_play_pause_"+t),bwg_params_carousel[t].carousel.pause()),e.stopPropagation(),e.stopImmediatePropagation()}),jQuery("#bwg_container1_"+t).on("swiperight",function(){bwg_params_carousel[t].carousel.prev()}),jQuery("#bwg_container1_"+t).on("swipeleft",function(){bwg_params_carousel[t].carousel.next()})}function bwg_carousel_resize(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");jQuery(".bwg_carousel-container"+e).length&&(bwg_carousel_params(e,!0),bwg_params_carousel[e].carousel.pause(),bwg_carousel_watermark(e),jQuery(".bwg_ctrl_btn_"+e).hasClass("bwg-icon-play")||bwg_params_carousel[e].carousel.start())})}function bwg_carousel_onload(e){var t=e.data("bwg"),i=e.find(".bwg_carousel-container"+t);i.length&&(bwg_params_carousel[t]=i.data("params"),bwg_params_carousel[t].parent_width=0,bwg_carousel_watermark(t),bwg_carousel_params(t,!1),bwg_container_loaded(t))}function bwg_carousel_params(t,e){var i=jQuery("#bwg_container1_"+t).parent();i.hasClass("elementor-tab-content")&&i.width(i.closest(".elementor-widget-wrap").width());var a=i.width(),r=1;abwg_params_carousel[t].count&&(bwg_params_carousel[t].carousel_image_column_number=bwg_params_carousel[t].count),jQuery(".bwg_carousel_play_pause_"+t).css({display:parseInt(bwg_params_carousel[t].carousel_play_pause_butt)?"":"none"}),parseInt(bwg_params_carousel[t].carousel_prev_next_butt)?(jQuery("#bwg_carousel-right"+t).css({display:""}),jQuery("#bwg_carousel-left"+t).css({display:""})):(jQuery("#bwg_carousel-left"+t).css({display:"none"}),jQuery("#bwg_carousel-right"+t).css({display:"none"})),jQuery(".inner_instagram_iframe_bwg_embed_frame_"+t).each(function(){var e=jQuery(this).parent();bwg_params_carousel[t].image_height/(parseInt(e.attr("data-height"))+96)=bwg_params_carousel[e].image_width)bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).css({fontSize:bwg_params_carousel[e].carousel_play_pause_btn_size}),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:bwg_params_carousel[e].watermark_width*t,maxHeight:bwg_params_carousel[e].watermark_height*t}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:t*bwg_params_carousel[e].watermark_font_size});else{var a=bwg_params_carousel[e].image_width/t;bwg_carousel_change_watermark_container(e),jQuery(".bwg_carousel_watermark_image_"+e).css({maxWidth:i*bwg_params_carousel[e].watermark_width/a,maxHeight:i*bwg_params_carousel[e].watermark_height/a}),jQuery(".bwg_carousel_watermark_text_"+e+", .bwg_carousel_watermark_text_"+e+":hover").css({fontSize:i*bwg_params_carousel[e].watermark_font_size/a})}}function bwg_carousel_change_watermark_container(a){jQuery(".bwg_carousel"+a).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");e.length||(e=jQuery(this).find("iframe"));var t=e.width(),i=e.height();jQuery(".bwg_carousel_watermark_spun_"+a).width(t),jQuery(".bwg_carousel_watermark_spun_"+a).height(i),jQuery(".bwg_carousel_title_spun_"+a).width(t),jQuery(".bwg_carouel_title_spun_"+a).height(i),jQuery(".bwg_carousel_watermark_"+a).css({display:"none"})}})}function bwg_carousel_preload(e,t){var i=jQuery(".bwg_carousel_preload").get();t||i.reverse();var a=0;jQuery(i).each(function(){if(1<++a)return!1;jQuery(this).parent().hasClass("bwg_carousel_embed_video_"+e)||jQuery(this).parent().hasClass("bwg_embed_frame_"+e)||jQuery(this).parent().hasClass("bwg_carousel_video")?(jQuery(this).attr("src",jQuery(this).attr("data-src")),jQuery(this).on("load",function(){jQuery(this).removeClass("bwg_carousel_preload")}),jQuery(this).parent().hasClass("bwg_carousel_video")&&(jQuery(".bwg_carousel_video")[0].load(),jQuery(this).parent().parent().removeClass("bwg_carousel_preload")),jQuery(this).removeAttr("data-src")):(jQuery(this).css({"background-image":"url('"+jQuery(this).attr("data-background")+"')",height:"100%"}),jQuery(this).removeClass("bwg_carousel_preload"),jQuery(this).removeAttr("data-background"))})}function bwg_slideshow_ready(r){if(jQuery("#bwg_slideshow_image_container_"+r).length){bwg_params[r]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+r).attr("data-params")),bwg_params[r].event_stack=[];var e=".bwg_slideshow_filmstrip_"+r,t="bwg_slideshow_filmstrip_thumbnail_"+r;bwg_slideshow_filmstrip_thumb[t]={},bwg_slideshow_filmstrip_thumb[t].next_prev_index=0;var i=!1;2==bwg_params[r].slideshow_filmstrip_type&&(i=!0,e=".bwg_slideshow_filmstrip_fix_count_"+r),bwg_container_loaded(r);var a=bwg_params[r].data;jQuery("#bwg_container1_"+r).on("swiperight",function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+r).val()),0<=parseInt(jQuery("#bwg_current_image_key_"+r).val())-bwg_iterator(r)?(parseInt(jQuery("#bwg_current_image_key_"+r).val())-bwg_iterator(r))%a.length:a.length-1,a,"",r),!1}),jQuery("#bwg_container1_"+r).on("swipeleft",function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+r).val()),parseInt(jQuery("#bwg_current_image_key_"+r).val())+bwg_iterator(r)%a.length,a,"",r),!1});var _=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";bwg_popup_resize(r),jQuery(".bwg_slideshow_watermark_"+r).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+r).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+r).css({display:"none"}),setTimeout(function(){bwg_change_watermark_container(r)},500),1==bwg_params[r].slideshow_filmstrip_type&&("horizontal"==bwg_params[r].filmstrip_direction?jQuery(".bwg_slideshow_image_container_"+r).height(jQuery(".bwg_slideshow_image_wrap_"+r).height()-bwg_params[r].slideshow_filmstrip_height):jQuery(".bwg_slideshow_image_container_"+r).width(jQuery(".bwg_slideshow_image_wrap_"+r).width()-bwg_params[r].slideshow_filmstrip_width));var s=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(e).bind(s,function(e){var t=window.event||e;return 0<((t=t.originalEvent?t.originalEvent:t).detail?-40*t.detail:t.wheelDelta)?jQuery(".bwg_slideshow_filmstrip_left_"+r).trigger("click"):jQuery(".bwg_slideshow_filmstrip_right_"+r).trigger("click"),!1});var o={bwg:r,params:bwg_params[r],slideshow_filmstrip_class_name:e};if(jQuery(".bwg_slideshow_filmstrip_right_"+r).on(_,function(){1==i?!1===bwg_slideshow_filmstrip_thumbnail_timer&&(bwg_slideshow_filmstrip_thumbnail_timer=!0,bwg_slideshow_filmstrip_next(o),setTimeout(function(){bwg_slideshow_filmstrip_thumbnail_timer=!1},505)):bwg_slideshow_filmstrip_next(o)}),jQuery(".bwg_slideshow_filmstrip_left_"+r).on(_,function(){1==i?!1===bwg_slideshow_filmstrip_thumbnail_timer&&(bwg_slideshow_filmstrip_thumbnail_timer=!0,bwg_slideshow_filmstrip_prev(o),setTimeout(function(){bwg_slideshow_filmstrip_thumbnail_timer=!1},505)):bwg_slideshow_filmstrip_prev(o)}),"width"==bwg_params[r].width_or_height?bwg_set_filmstrip_pos(jQuery(e).width(),r):bwg_set_filmstrip_pos(jQuery(e).height(),r),jQuery("#bwg_slideshow_play_pause_"+r).off(_).on(_,function(){jQuery(".bwg_ctrl_btn_"+r).hasClass("bwg-icon-play")?(bwg_play(bwg_params[r].data,r),jQuery(".bwg_slideshow_play_pause_"+r).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+r).attr("class","bwg-icon-pause bwg_ctrl_btn_"+r+" bwg_slideshow_play_pause_"+r),1==bwg_params[r].enable_slideshow_music&&document.getElementById("bwg_audio_"+r).play()):(window.clearInterval(window["bwg_playInterval"+r]),jQuery(".bwg_slideshow_play_pause_"+r).attr("title","Play"),jQuery(".bwg_slideshow_play_pause_"+r).attr("class","bwg-icon-play bwg_ctrl_btn_"+r+" bwg_slideshow_play_pause_"+r),1==bwg_params[r].enable_slideshow_music&&document.getElementById("bwg_audio_"+r).pause())}),0!=bwg_params[r].enable_slideshow_autoplay&&(bwg_play(bwg_params[r].data,r),jQuery(".bwg_slideshow_play_pause_"+r).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+r).attr("class","bwg-icon-pause bwg_ctrl_btn_"+r+" bwg_slideshow_play_pause_"+r),1==bwg_params[r].enable_slideshow_music&&jQuery("#bwg_audio_"+r).length&&document.getElementById("bwg_audio_"+r).play()),bwg_params[r].preload_images&&bwg_preload_images(parseInt(jQuery("#bwg_current_image_key_".$bwg).val()),r),jQuery(".bwg_slideshow_image_"+r).removeAttr("width"),jQuery(".bwg_slideshow_image_"+r).removeAttr("height"),jQuery("#instagram-embed-"+r).hide(),"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds){var l=jQuery(".bwg_embed_frame_"+r),n=l.data("height");l.css({display:"none"}),instgrm.Embeds.process(),jQuery(".bwg_embed_frame_"+r+" #instagram-embed-"+r).css({"max-height":n+"px"}),l.css({display:"inline-block"})}if(0").attr("src",e).on("load error",function(){++i>=a&&bwg_all_thumbnails_loaded_callback(t)})}),jQuery(".bwg_container").each(function(){var e=jQuery(this).data("bwg");02*i?(o.find(".bwg-extended-item0").css({width:"calc(50% - "+a+"px)"}),o.find(".bwg-extended-item1").css({width:"calc(100% - "+(i+2*a)+"px)"})):o.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(50% - "+a+"px)"}),jQuery(e).children(".bwg-extended-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item0"),i=jQuery(this).find(".bwg-item2"),a=e.data("width"),r=e.data("height");""!=a&&""!=r||(a=e.width(),r=e.height());var _=a/r;i.width()/i.height()>a/r?(i.width()>a?e.css({width:"100%",height:i.width()/_}):e.css({maxWidth:"100%",height:i.width()/_}),a=i.width(),r=i.width()/_):(i.height()>r?e.css({height:"100%",width:i.height()*_,maxWidth:"initial"}):e.css({maxHeight:"100%",width:i.height()*_,maxWidth:"initial"}),r=i.height(),a=i.height()*_),jQuery(this).find(".bwg-item2").css({marginLeft:(t.width()-a)/2,marginTop:(t.height()-r)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("max-count"),r=parseInt(t/i)+1;ae.height()?e.css({height:"100%",width:r*o,maxWidth:"initial"}):e.css({maxHeight:"100%",width:r*o,maxWidth:"initial"}),_=(s=r)*o),jQuery(this).find(".bwg-item2").css({marginLeft:(a-_)/2,marginTop:(r-s)/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail_masonry(e){var t="#bwg_thumbnails_masonry_"+(bwg=jQuery(e).attr("data-bwg"));jQuery("#bwg_album_masonry_"+bwg).length&&(t="#bwg_album_masonry_"+bwg),0===jQuery(".bwg-container-temp"+bwg).length&&(jQuery(t).clone().appendTo("#bwg_container3_"+bwg).removeAttr("id").removeClass("bwg-container-"+bwg).addClass("bwg-container-temp"+bwg),jQuery(".bwg-container-temp"+bwg).empty());var a=jQuery(".bwg-container-temp"+bwg),r=jQuery(t),_=a;if(a.prepend(r.html()),_.find(".bwg-empty-item").remove(),"horizontal"==_.data("masonry-type")){var s=_.data("thumbnail-height"),o=_.data("max-count"),l=[];for(i=0;i').css({height:s,order:i+1,width:n-l[i]}))}else{_.removeAttr("style");n=_.width();var g=_.data("thumbnail-width"),b=_.data("thumbnail-border"),w=(_.data("thumbnail-padding"),o=_.data("max-count"),parseInt(n/g)+("0"==_.data("resizable-thumbnails")?0:1));o').css({width:m+"%",order:i+1,height:p-c[i]}));_.outerWidth(w*(g+2*b)),_.height(p)}if(""!=a.html()){r.outerWidth(w*(g+2*b)),"0"!=p?(r.css("opacity","1"),r.height(p)):r.css("opacity","0"),r.empty();var y=a.html();r.append(y),r.find(".bwg_lazyload").each(function(){null!=jQuery(this).data("src")&&""!=jQuery(this).data("src")&&(jQuery(this).attr("src",jQuery(this).data("src")),jQuery(this).on("load",function(){jQuery(this).removeClass("lazy_loader")}))}),a.empty().hide()}bwg_container_loaded(_.data("bwg"))}function bwg_container_loaded(e){jQuery("#gal_front_form_"+e).removeClass("bwg-hidden"),jQuery("#ajax_loading_"+e).addClass("bwg-hidden"),jQuery(".bwg_container img").removeAttr("width").removeAttr("height")}function bwg_thumbnail_mosaic_logic(e){var t=e.attr("data-bwg"),i=e.attr("data-block-id"),a=parseInt(e.attr("data-thumb-padding"))/2,_=parseInt(e.attr("data-thumb-border"))+a;if("horizontal"==e.attr("data-mosaic-direction")){var r=parseInt(e.attr("data-height"));if("1"==e.attr("data-resizable"))if(1920<=jQuery(window).width())var s=(1+jQuery(window).width()/1920)*r;else if(jQuery(window).width()<=640)s=jQuery(window).width()/640*r;else s=r;else s=r;(p=jQuery(".bwg_mosaic_thumb_"+t)).each(function(e){var t=jQuery(this).data("width"),i=jQuery(this).data("height");""!=t&&""!=i&&void 0!==t&&void 0!==i||(t=p.get(e).naturalWidth,i=p.get(e).naturalHeight),t=t*s/i,p.eq(e).css({cssText:"width:"+t+"px !important; height:"+s+"px !important;"})});var o=jQuery("#bwg_mosaic_thumbnails_div_"+t).width()/100*parseInt(e.attr("data-total-width"));jQuery("#"+i).width(o);var l=s+2*_,n=0,g=[];g[0]=0;var b=[],w=b[0]=0;p.each(function(e){row_cum_width2=w+p.eq(e).width()+2*_,row_cum_width2-o<0?(w=row_cum_width2,g[e]=n,b[n]++):e!==p.length-1?Math.abs(w-o)>Math.abs(row_cum_width2-o)||Math.abs(w-o)<=Math.abs(row_cum_width2-o)&&0==b[n]?e!==p.length-2?(w=row_cum_width2,g[e]=n,b[n]++,b[++n]=0,w=0):(w=row_cum_width2,g[e]=n,b[n]++):(b[++n]=1,g[e]=n,w=row_cum_width2-w):(w=row_cum_width2,g[e]=n,b[n]++)});for(var d=[],u=[],h=0;h<=n;h++)w=0,p.each(function(e){g[e]==h&&(w+=p.eq(e).width())}),d[h]=C=(o-2*b[h]*_)/w,u[h]=(l-2*_)*d[h]+2*_;if(0==n)for(h=0;h<=n;h++)u[h]>s&&(d[h]=1,u[h]=l);(T=[])[0]=0;var m=[],c=[];m[0]=0,c[0]=0;for(h=1;h<=n;h++)m[h]=m[0],c[h]=c[h-1]+u[h-1];p.each(function(e){var t=p.eq(e).width(),i=p.eq(e).height(),a=t*d[g[e]],r=i*d[g[e]];p.eq(e).css({cssText:"width:"+a+"px !important; height:"+r+"px !important;"}),p.eq(e).parent().css({top:c[g[e]],left:m[g[e]]}),m[g[e]]+=t*d[g[e]]+2*_,T[g[e]]=e}),jQuery("#"+i).height(c[n]+u[n]-c[0])}else{var p,y=parseInt(e.attr("data-width"));if("1"==e.attr("data-resizable")){if(1920<=jQuery(window).width())var f=(1+jQuery(window).width()/1920)*y;else if(jQuery(window).width()<=640)f=jQuery(window).width()/640*y;else f=y;if(0z[a]&&(i=z[a],t=a);x[e]=t,k[t]++,A=i,H=0+t*(Q+2*_),p.eq(e).parent().css({top:A,left:H}),z[t]+=p.eq(e).height()+2*_}),(d=[])[0]=1;var I=0,E=[],M=0,S=0;for(C=0;C=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100),++i>=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))}),jQuery(".bwg_container").each(function(){var e=jQuery(this).data("bwg");0 .CaptionCont > label > i").addClass("bwg-icon-angle-down closed"),jQuery(this).find("search_placeholder_title").hide(),""==jQuery(this).find(".bwg_search_input").val()&&jQuery(this).find("search_placeholder_title").show(),jQuery(".bwg_thumbnail .bwg_search_container_2").focusout(function(e){""==jQuery(this).find(".bwg_search_input").val()&&(jQuery(this).find(".search_placeholder_title").show(),jQuery(this).find(".bwg_search_loupe_container1").addClass("bwg-hidden"),jQuery(this).find(".bwg_search_reset_container").addClass("bwg-hidden"))}),jQuery(".search_tags").on("sumo:opened",function(){var e=jQuery(this).parents(".bwg_container").height(),t=(jQuery(this).parents(".bwg_container").find(".wd_error").length,jQuery(this).parent(".SumoSelect").find(".optWrapper>.options"));void 0!==t&&(e-50').addClass("bwg_grid"+d));jQuery(o).prepend(c);var p,y,f,j,Q,v,x,k,z,C,I,E=jQuery(".bwg_slide_bg"+d),M=h.width(),S=h.height(),O=E.width(),T=E.height(),H=Math.floor(O/e),A=Math.floor(T/t),L=O-e*H,B=Math.ceil(L/e),W=T-t*A,D=Math.ceil(W/t),R=0,F=Math.ceil((jQuery(".bwg_slide_bg"+d).width()-h.width())/2),N=void 0===h.attr("src")?"":h.attr("src");a="min-auto"===(a="auto"===a?O:a)?-O:a,r="min-auto"===(r="auto"===r?T:r)?-T:r;for(var P=0;P').css({display:"block",width:p,height:y,top:f,left:Q,backgroundImage:'url("'+x+'")',backgroundColor:w?jQuery(".bwg_slideshow_image_wrap_"+C).css("background-color"):jQuery(".spider_popup_wrap").css("background-color"),backgroundRepeat:"no-repeat",backgroundPosition:v+"px "+j+"px",backgroundSize:k+"px "+z+"px",transition:"all "+b+"ms ease-in-out "+I+"ms",transform:"none"}))),U+=Y,V-=Y}F-=q,R+=q}var X=c.children().last();function K(){if(jQuery(o).css({opacity:0,"z-index":1}),jQuery(l).css({opacity:1,"z-index":2}),h.css("opacity",1),m.css("opacity",1),c.remove(),w){bwg_params[g].bwg_trans_in_progress=!1;var e=bwg_params[g].event_stack,t=bwg_params[g].data}else{gallery_box_data.bwg_trans_in_progress=!1;e=gallery_box_data.event_stack,t=""}if(jQuery(".bwg_image_info").show(),jQuery(o).html(""),void 0!==e&&0').html(i[t].alt).text()),jQuery(".bwg_slideshow_description_text_"+r).html(jQuery('').html(i[t].description).text());var s=2==jQuery(".bwg_slideshow_image_spun_"+r).css("zIndex")?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,o=s==".bwg_slideshow_image_second_spun_"+r?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,l=-1';if(l){if(d+='',g&&(d+=''),n){var u=jQuery(".bwg_embed_frame"),h=jQuery(".bwg_slideshow_image_container_"+r).width(),m=jQuery(".bwg_slideshow_image_container_"+r).height(),c=i[t].image_width,p=i[t].image_height,y=bwg_resizing_ratio(c,p,h,m);u.attr("data-width",h),u.attr("data-height",m);var f=y.width,j=y.height;f"}d+='").html(decodeURIComponent(i[t].image_url)).text()+'" alt="'+i[t].alt+'" image_id="'+i[t].id+'" />'}d+="",jQuery(o).html(d),bwg_params[r].preload_images&&bwg_preload_images(t,r),window["bwg_"+bwg_params[r].slideshow_effect](s,o,_,r),1==bwg_params[r].slideshow_filmstrip_type?bwg_slideshow_filmstrip_fix_dimension(r):2==bwg_params[r].slideshow_filmstrip_type?bwg_slideshow_filmstrip_fix_count(r):bwg_move_dots(r),i[t].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+r).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+r).css({display:""})}bwg_add_lightbox();var v="horizontal"==bwg_params[r].filmstrip_direction?"table-cell":"block",x=jQuery(".bwg_slideshow_filmstrip_thumbnails_"+r+" .bwg_slideshow_thumb_active_"+r).prev(),k=jQuery(".bwg_slideshow_filmstrip_thumbnails_"+r+" .bwg_slideshow_thumb_active_"+r).next(),z=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_left_"+r),C=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_left_disabled_"+r),I=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_right_"+r),E=jQuery(".bwg_slideshow_filmstrip_container_"+r+" .bwg_slideshow_filmstrip_right_disabled_"+r);x.length?(z.css({display:v}),C.css({display:"none"})):(z.css({display:"none"}),C.css({display:v}),I.css({display:v}),E.css({display:"none"})),k.length?(I.css({display:v}),E.css({display:"none"})):(I.css({display:"none"}),E.css({display:v}),z.css({display:v}),C.css({display:"none"})),void 0!==i[t]&&"EMBED_OEMBED_INSTAGRAM_POST"==i[t].filetype&&"undefined"!=typeof instgrm&&void 0!==instgrm.Embeds&&(jQuery(".instagram-media").hide(),instgrm.Embeds.process(),jQuery(".instagram-media").css({"max-height":j+"px","min-width":f+"px !important"}),jQuery(".instagram-media").show())}function bwg_preload_images_slideshow(e,t){var i=bwg_params[t].data;count=bwg_params[t].preload_images_count/2;var a=i.length;if(a").attr("src",bwg_params[t].upload_url+jQuery('').html(decodeURIComponent(i[_].image_url)).text()))}else for(r=0;r").attr("src",bwg_params[t].upload_url+jQuery('').html(decodeURIComponent(i[r].image_url)).text()))}}function bwg_preload_images(e,t){void 0!==t&&""!==t?bwg_preload_images_slideshow(e,t):bwg_preload_images_lightbox(e)}function bwg_popup_resize_slidshow(e){var t=".bwg_slideshow_filmstrip_"+e;2==bwg_params[e].slideshow_filmstrip_type&&(t=".bwg_slideshow_filmstrip_fix_count_"+e);var i=jQuery("#bwg_container1_"+e).parent();i.hasClass("content-area")&&i.width(i.closest(".content-area").width()),i.hasClass("elementor-tab-content")&&i.width(i.closest(".elementor-widget-wrap").width());var a=i.width(),r=bwg_params[e].data;if(a>=bwg_params[e].image_width){jQuery(".bwg_slideshow_image_wrap_"+e).css({width:bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_container_"+e).css({width:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_width:bwg_params[e].image_width-bwg_params[e].slideshow_filmstrip_width}),jQuery(".bwg_slideshow_image_container_"+e).css({height:"horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].image_height-bwg_params[e].slideshow_filmstrip_height:bwg_params[e].image_height}),jQuery(".bwg_slideshow_image_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:(bwg_params[e].filmstrip_direction,bwg_params[e].image_width)}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e);var _="horizontal"==bwg_params[e].filmstrip_direction?"width: "+bwg_params[e].image_width:"height: "+bwg_params[e].image_height,s="horizontal"==bwg_params[e].filmstrip_direction?"width: "+(bwg_params[e].image_width-40):"height: "+(bwg_params[e].image_height-40);if(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({cssText:_}),jQuery(t).css({cssText:s}),jQuery(".bwg_slideshow_dots_container_"+e).css({width:bwg_params[e].image_width}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:bwg_params[e].slideshow_play_pause_btn_size}),"image"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:bwg_params[e].watermark_width,maxHeight:bwg_params[e].watermark_height}),"text"==bwg_params[e].watermark_type&&jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+" :hover").css({fontSize:bwg_params[e].watermark_font_size}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*bwg_params[e].slideshow_title_font_size}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*bwg_params[e].slideshow_description_font_size}),2==bwg_params[e].slideshow_filmstrip_type){var o=bwg_params[e].filmstrip_direction,l="#bwg_container1_"+e+" #bwg_container2_"+e;jQuery(l).removeAttr("style");var n=l+" .bwg_slideshow_filmstrip_container_"+e,g=bwg_params[e].slideshow_filmstrip_rl_btn_size,b=jQuery(".bwg_slideshow_filmstrip_fix_count_"+e).width();"horizontal"==o&&(b=jQuery(".bwg_slideshow_filmstrip_fix_count_"+e).height());var w="horizontal"==o?"table-cell":"block";jQuery(n).find(".bwg_slideshow_filmstrip_left_"+e).css({display:"none"}),jQuery(n).find(".bwg_slideshow_filmstrip_left_disabled_"+e).css({display:w}),jQuery(n).find(".bwg_slideshow_filmstrip_right_"+e).css({display:w}),jQuery(n).find(".bwg_slideshow_filmstrip_right_disabled_"+e).css({display:"none"}),b=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width()-(parseInt(i.filmstrip_thumb_margin_hor)+r))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left-(parseInt(i.filmstrip_thumb_margin_hor)+r)},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height()-(parseInt(i.filmstrip_thumb_margin_hor)+r))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left-(parseInt(i.filmstrip_thumb_margin_hor)+r)},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)):"width"==i.width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width()-parseInt(i.filmstrip_thumb_margin_hor)+r)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top-parseInt(i.filmstrip_thumb_margin_hor)+r},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).width()-jQuery(a).width())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())&&(jQuery(s).css({display:g}),jQuery(o).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height()-(parseInt(i.filmstrip_thumb_margin_hor)+r))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top-(parseInt(i.filmstrip_thumb_margin_hor)+r)},500,"linear")),window.setTimeout(function(){parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top)==-parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).height()-jQuery(a).height())?(jQuery(l).css({display:"none"}),jQuery(n).css({display:g})):(jQuery(l).css({display:g}),jQuery(n).css({display:"none"}))},510)),bwg_slideshow_filmstrip_thumb[_].next_prev_index=bwg_slideshow_filmstrip_thumb[_].next_prev_index+1}function bwg_slideshow_filmstrip_prev(e){var t=e.bwg,i=e.params,a=bwg_calculate_slideshow_filmstrip_thumbnail_size({bwg:t,params:i}),r="bwg_slideshow_filmstrip_thumbnail_"+t,_="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_"+t,s="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_left_disabled_"+t,o="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_"+t,l="#bwg_container1_"+t+" #bwg_container2_"+t+" .bwg_slideshow_filmstrip_right_disabled_"+t,n="horizontal"==i.filmstrip_direction?"table-cell":"block";"left"==i.left_or_top?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left<0&&(jQuery(o).css({display:n}),jQuery(l).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left>-(i.filmstrip_thumb_margin_hor+a)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left+parseInt(i.filmstrip_thumb_margin_hor)+a},500,"linear")),window.setTimeout(function(){0==parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().left)?(jQuery(_).css({display:"none"}),jQuery(s).css({display:n})):(jQuery(_).css({display:n}),jQuery(s).css({display:"none"}))},510)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top<0&&(jQuery(o).css({display:n}),jQuery(l).css({display:"none"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top>-(i.filmstrip_thumb_margin_hor+a)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top+parseInt(i.filmstrip_thumb_margin_hor)+a},500,"linear")),window.setTimeout(function(){0==parseInt(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+t).position().top)?(jQuery(_).css({display:"none"}),jQuery(s).css({display:n})):(jQuery(_).css({display:n}),jQuery(s).css({display:"none"}))},510)),bwg_slideshow_filmstrip_thumb[r].next_prev_index=bwg_slideshow_filmstrip_thumb[r].next_prev_index-1}jQuery(function(){isMobile&&(jQuery(".bwg-container.bwg-standard-thumbnails .bwg-title1, .bwg-container.bwg-masonry-thumbnails .bwg-title1, .bwg-mosaic-thumbnails").css("opacity","1"),jQuery(".bwg-zoom-effect .bwg-zoom-effect-overlay, .bwg-zoom-effect-overlay > span").css({opacity:1,"background-color":"unset"}))}),jQuery(function(){function i(e){bwg_slideshow_blur(e),bwg_carousel_blur(e),0