1!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(o){o.fn.SumoSelect=function(e){var _=o.extend({placeholder:"Select Here",csvDispCount:3,captionFormat:"{0} Selected",captionFormatAllSelected:"{0} all selected!",floatWidth:400,forceCustomRendering:!1,nativeOnDevice:["Android","BlackBerry","iPhone","iPad","iPod","Opera Mini","IEMobile","Silk"],outputAsCSV:!1,csvSepChar:",",okCancelInMulti:!1,isClickAwayOk:!1,triggerChangeCombined:!0,selectAll:!1,search:!1,searchText:"Search...",noMatch:'No matches for "{0}"',prefix:"",locale:["OK","Cancel","Select All"],up:!1,showTitle:!0},e),t=this.each(function(){var r=this;!this.sumo&&o(this).is("select")&&(this.sumo={E:o(r),is_multi:o(r).attr("multiple"),select:"",caption:"",placeholder:"",optDiv:"",CaptionCont:"",ul:"",is_floating:!1,is_opened:!1,mob:!1,Pstate:[],createElems:function(){var e=this;e.E.wrap('<div class="SumoSelect" tabindex="0" role="button" aria-expanded="false">'),e.select=e.E.parent(),e.caption=o("<span>"),e.CaptionCont=o('<p class="CaptionCont SelectBox" ><label><i></i></label></p>').attr("style",e.E.attr("style")).prepend(e.caption),e.select.append(e.CaptionCont),e.is_multi||(_.okCancelInMulti=!1),e.E.attr("disabled")&&e.select.addClass("disabled").removeAttr("tabindex"),_.outputAsCSV&&e.is_multi&&e.E.attr("name")&&(e.select.append(o('<input class="HEMANT123" type="hidden" />').attr("name",e.E.attr("name")).val(e.getSelStr())),e.E.removeAttr("name")),!e.isMobile()||_.forceCustomRendering?(e.E.attr("name")&&e.select.addClass("sumo_"+e.E.attr("name").replace(/\[\]/,"")),e.E.addClass("SumoUnder").attr("tabindex","-1"),e.optDiv=o('<div class="optWrapper '+(_.up?"up":"")+'">'),e.floatingList(),e.ul=o('<ul class="options">'),e.optDiv.append(e.ul),_.selectAll&&e.is_multi&&e.SelAll(),_.search&&e.Search(),e.ul.append(e.prepItems(e.E.children())),e.is_multi&&e.multiSelelect(),e.select.append(e.optDiv),e.basicEvents(),e.selAllState()):e.setNativeMobile()},prepItems:function(e,i){var a=[],r=this;return o(e).each(function(e,t){t=o(t),a.push(t.is("optgroup")?o('<li class="group '+(t[0].disabled?"disabled":"")+'"><label>'+t.attr("label")+"</label><ul></ul></li>").find("ul").append(r.prepItems(t.children(),t[0].disabled)).end():r.createLi(t,i))}),a},createLi:function(e,t){e.attr("value")||e.attr("value",e.val());var i=o('<li class="opt"><label>'+e.text()+"</label></li>");return i.data("opt",e),e.data("li",i),this.is_multi&&i.prepend("<span><i></i></span>"),(e[0].disabled||t)&&(i=i.addClass("disabled")),this.onOptClick(i),e[0].selected&&i.addClass("selected"),e.attr("class")&&i.addClass(e.attr("class")),e.attr("title")&&i.attr("title",e.attr("title")),i},getSelStr:function(){return sopt=[],this.E.find("option:selected").each(function(){sopt.push(o(this).val())}),sopt.join(_.csvSepChar)},multiSelelect:function(){var i=this;i.optDiv.addClass("multiple"),i.okbtn=o('<p tabindex="0" class="btnOk">'+_.locale[0]+"</p>").click(function(){i._okbtn(),i.hideOpts()}),i.cancelBtn=o('<p tabindex="0" class="btnCancel">'+_.locale[1]+"</p>").click(function(){i._cnbtn(),i.hideOpts()});var e=i.okbtn.add(i.cancelBtn);i.optDiv.append(o('<div class="MultiControls">').append(e)),e.on("keydown.sumo",function(e){var t=o(this);switch(e.which){case 32:case 13:t.trigger("click");break;case 9:if(t.hasClass("btnOk"))return;case 27:return i._cnbtn(),void i.hideOpts()}e.stopPropagation(),e.preventDefault()})},_okbtn:function(){var i=this,a=0;_.triggerChangeCombined&&(i.E.find("option:selected").length!=i.Pstate.length?a=1:i.E.find("option").each(function(e,t){t.selected&&i.Pstate.indexOf(e)<0&&(a=1)}),a&&(i.callChange(),i.setText()))},_cnbtn:function(){var e=this;e.E.find("option:selected").each(function(){this.selected=!1}),e.optDiv.find("li.selected").removeClass("selected");for(var t=0;t<e.Pstate.length;t++)e.E.find("option")[e.Pstate[t]].selected=!0,e.ul.find("li.opt").eq(e.Pstate[t]).addClass("selected");e.selAllState()},SelAll:function(){var e=this;e.is_multi&&(e.selAll=o('<p class="select-all"><span><i></i></span><label>'+_.locale[2]+"</label></p>"),e.optDiv.addClass("selall"),e.selAll.on("click",function(){e.selAll.toggleClass("selected"),e.toggSelAll(e.selAll.hasClass("selected"),1)}),e.optDiv.prepend(e.selAll))},Search:function(){var a=this,e=a.CaptionCont.addClass("search"),t=o('<p class="no-match">');a.ftxt=o('<input type="text" class="search-txt" value="" placeholder="'+_.searchText+'">').on("click",function(e){e.stopPropagation()}),e.append(a.ftxt),a.optDiv.children("ul").after(t),a.ftxt.on("keyup.sumo",function(){var e=a.optDiv.find("ul.options li.opt").each(function(e,t){var i=(t=o(t)).data("opt")[0];i.hidden=t.text().toLowerCase().indexOf(a.ftxt.val().toLowerCase())<0,t.toggleClass("hidden",i.hidden)}).not(".hidden");t.html(_.noMatch.replace(/\{0\}/g,"<em></em>")).toggle(!e.length),t.find("em").text(a.ftxt.val()),a.selAllState()})},selAllState:function(){var e=this;if(_.selectAll&&e.is_multi){var i=0,a=0;e.optDiv.find("li.opt").not(".hidden").each(function(e,t){o(t).hasClass("selected")&&i++,o(t).hasClass("disabled")||a++}),i==a?e.selAll.removeClass("partial").addClass("selected"):0==i?e.selAll.removeClass("selected partial"):e.selAll.addClass("partial")}},showOpts:function(){var t=this;t.E.attr("disabled")||(t.E.trigger("sumo:opening",t),t.is_opened=!0,t.select.addClass("open").attr("aria-expanded","true"),t.E.trigger("sumo:opened",t),t.ftxt?t.ftxt.focus():t.select.focus(),o(document).on("click.sumo",function(e){if(!t.select.is(e.target)&&0===t.select.has(e.target).length){if(!t.is_opened)return;t.hideOpts(),_.okCancelInMulti&&(_.isClickAwayOk?t._okbtn():t._cnbtn())}}),t.is_floating&&(H=t.optDiv.children("ul").outerHeight()+2,t.is_multi&&(H+=parseInt(t.optDiv.css("padding-bottom"))),t.optDiv.css("height",H),o("body").addClass("sumoStopScroll")),t.setPstate())},setPstate:function(){var i=this;i.is_multi&&(i.is_floating||_.okCancelInMulti)&&(i.Pstate=[],i.E.find("option").each(function(e,t){t.selected&&i.Pstate.push(e)}))},callChange:function(){this.E.trigger("change").trigger("click")},hideOpts:function(){var e=this;e.is_opened&&(e.E.trigger("sumo:closing",e),e.is_opened=!1,e.select.removeClass("open").attr("aria-expanded","true").find("ul li.sel").removeClass("sel"),e.E.trigger("sumo:closed",e),o(document).off("
1click.sumo"),e.select.focus(),o("body").removeClass("sumoStopScroll"),_.search&&(e.ftxt.val(""),e.ftxt.trigger("keyup.sumo")))},setOnOpen:function(){var e=this,t=e.optDiv.find("li.opt:not(.hidden)").eq(_.search?0:e.E[0].selectedIndex);t.hasClass("disabled")&&!(t=t.next(":not(disabled)")).length||(e.optDiv.find("li.sel").removeClass("sel"),t.addClass("sel"),e.showOpts())},nav:function(e){var t,i=this,a=i.ul.find("li.opt:not(.disabled, .hidden)"),r=i.ul.find("li.opt.sel:not(.hidden)"),_=a.index(r);if(i.is_opened&&r.length){if(e&&0<_)t=a.eq(_-1);else{if(!(!e&&_<a.length-1&&-1<_))return;t=a.eq(_+1)}r.removeClass("sel"),r=t.addClass("sel");var o=i.ul,s=o.scrollTop(),l=r.position().top+s;l>=s+o.height()-r.outerHeight()&&o.scrollTop(l-o.height()+r.outerHeight()),l<s&&o.scrollTop(l)}else i.setOnOpen()},basicEvents:function(){var t=this;t.CaptionCont.click(function(e){t.E.trigger("click"),t.is_opened?t.hideOpts():t.showOpts(),e.stopPropagation()}),t.select.on("keydown.sumo",function(e){switch(e.which){case 38:t.nav(!0);break;case 40:t.nav(!1);break;case 65:if(t.is_multi&&e.ctrlKey){t.toggSelAll(!e.shiftKey,1);break}return;case 32:if(_.search&&t.ftxt.is(e.target))return;case 13:t.is_opened?t.optDiv.find("ul li.sel").trigger("click"):t.setOnOpen();break;case 9:return void(_.okCancelInMulti||t.hideOpts());case 27:return _.okCancelInMulti&&t._cnbtn(),void t.hideOpts();default:return}e.preventDefault()}),o(window).on("resize.sumo",function(){t.floatingList()})},onOptClick:function(e){var t=this;e.click(function(){var e=o(this);if(!e.hasClass("disabled")){t.is_multi?(e.toggleClass("selected"),e.data("opt")[0].selected=e.hasClass("selected"),t.selAllState()):(e.parent().find("li.selected").removeClass("selected"),e.toggleClass("selected"),e.data("opt")[0].selected=!0),t.is_multi&&_.triggerChangeCombined&&(t.is_floating||_.okCancelInMulti)||(t.setText(),t.callChange()),t.is_multi||t.hideOpts()}})},setText:function(){var e=this;if(e.placeholder="",e.is_multi){for(sels=e.E.find(":selected").not(":disabled"),i=0;i<sels.length;i++){if(i+1>=_.csvDispCount&&_.csvDispCount){sels.length==e.E.find("option").length&&_.captionFormatAllSelected?e.placeholder=_.captionFormatAllSelected.replace(/\{0\}/g,sels.length)+",":e.placeholder=_.captionFormat.replace(/\{0\}/g,sels.length)+",";break}e.placeholder+=o(sels[i]).text()+", "}e.placeholder=e.placeholder.replace(/,([^,]*)$/,"$1")}else e.placeholder=e.E.find(":selected").not(":disabled").text();var t=!1;e.placeholder||(t=!0,e.placeholder=e.E.attr("placeholder"),e.placeholder||(e.placeholder=e.E.find("option:disabled:selected").text())),e.placeholder=e.placeholder?_.prefix+" "+e.placeholder:_.placeholder,e.caption.html(e.placeholder),_.showTitle&&e.CaptionCont.attr("title",e.placeholder);var a=e.select.find("input.HEMANT123");return a.length&&a.val(e.getSelStr()),t?e.caption.addClass("placeholder"):e.caption.removeClass("placeholder"),e.placeholder},isMobile:function(){for(var e=navigator.userAgent||navigator.vendor||window.opera,t=0;t<_.nativeOnDevice.length;t++)if(0<e.toString().toLowerCase().indexOf(_.nativeOnDevice[t].toLowerCase()))return _.nativeOnDevice[t];return!1},setNativeMobile:function(){var e=this;e.E.addClass("SelectClass"),e.mob=!0,e.E.change(function(){e.setText()})},floatingList:function(){var e=this;e.is_floating=o(window).width()<=_.floatWidth,e.optDiv.toggleClass("isFloating",e.is_floating),e.is_floating||e.optDiv.css("height",""),e.optDiv.toggleClass("okCancelInMulti",_.okCancelInMulti&&!e.is_floating)},vRange:function(e){if(this.E.find("option").length<=e||e<0)throw"index out of bounds";return this},toggSel:function(e,t){var i,a=this;(i="number"==typeof t?(a.vRange(t),a.E.find("option")[t]):a.E.find('option[value="'+t+'"]')[0]||0)&&!i.disabled&&i.selected!=e&&(i.selected=e,a.mob||o(i).data("li").toggleClass("selected",e),a.callChange(),a.setPstate(),a.setText(),a.selAllState())},toggDis:function(e,t){var i=this.vRange(t);(i.E.find("option")[t].disabled=e)&&(i.E.find("option")[t].selected=!1),i.mob||i.optDiv.find("ul.options li").eq(t).toggleClass("disabled",e).removeClass("selected"),i.setText()},toggSumo:function(e){var t=this;return t.enabled=e,t.select.toggleClass("disabled",e),e?(t.E.attr("disabled","disabled"),t.select.removeAttr("tabindex")):(t.E.removeAttr("disabled"),t.select.attr("tabindex","0")),t},toggSelAll:function(a,e){var t=this;t.E.find("option:not(:disabled,:hidden)").each(function(e,t){var i=t.selected;(t=o(t).data("li")).hasClass("hidden")||(a?i||t.trigger("click"):i&&t.trigger("click"))}),e||(!t.mob&&t.selAll&&t.selAll.removeClass("partial").toggleClass("selected",!!a),t.callChange(),t.setText(),t.setPstate())},reload:function(){var e=this.unload();return o(e).SumoSelect(_)},unload:function(){var e=this;return e.select.before(e.E),e.E.show(),_.outputAsCSV&&e.is_multi&&e.select.find("input.HEMANT123").length&&e.E.attr("name",e.select.find("input.HEMANT123").attr("name")),e.select.remove(),delete r.sumo,r},add:function(e,t,i){if(void 0===e)throw"No value to add";var a=this;if(opts=a.E.find("option"),"number"==typeof t&&(i=t,t=e),void 0===t&&(t=e),opt=o("<option></option>").val(e).html(t),opts.length<i)throw"index out of bounds";return void 0===i||opts.length==i?(a.E.append(opt),a.mob||a.ul.append(a.createLi(opt))):(opts.eq(i).before(opt),a.mob||a.ul.find("li.opt").eq(i).before(a.createLi(opt))),r},remove:function(e){var t=this.vRange(e);t.E.find("option").eq(e).remove(),t.mob||t.optDiv.find("ul.options li").eq(e).remove(),t.setText()},selectItem:function(e){this.toggSel(!0,e)},unSelectItem:function(e){this.toggSel(!1,e)},selectAll:function(){this.toggSelAll(!0)},unSelectAll:function(){this.toggSelAll(!1)},disableItem:function(e){this.toggDis(!0,e)},enableItem:function(e){this.toggDis(!1,e)},enabled:!0,enable:function(){return this.toggSumo(!1)},disable:function(){return this.toggSumo(!0)},init:function(){return this.createElems(),this.setText(),this}},r.sumo.init())});return 1==t.length?t[0]:t}}),function(t,i,a){"function"==typeof define&&define.amd?define(["jquery"],function(e){return a(e,t,i),e.mobile}):a(t.jQuery,t,i)}(this,document,function(e,t,r,i){var a,_;(function(d,e,t,c){function h(e){for(;e&&void 0!==e.originalEvent;)e=e.originalEvent;return e}function _(e){for(var t,i,a={};e;){for(i in t=d.data(e,j))t[i]&&(a[i]=a.hasVirtualBinding=!0);e=e.parentNode}return a}function r(){M=!0}function o(){M=!1}function s(){l(),k=setTimeout(function(){H=k=0,T.length=0,O=!1,r()},d.vmouse.resetTimerDuration)}function l(){k&&(clearTimeout(k),k=0)}function n(e,t,i){var a;return(i&&i[e]||!i&&function(e,t){for(var i;e;
1){if((i=d.data(e,j))&&(!t||i[t]))return e;e=e.parentNode}return null}(t.target,e))&&(a=function(e,t){var i,a,r,_,o,s,l,n,g,u=e.type;if((e=d.Event(e)).type=t,i=e.originalEvent,a=d.event.props,-1<u.search(/^(mouse|click)/)&&(a=S),i)for(l=a.length;l;)e[_=a[--l]]=i[_];if(-1<u.search(/mouse(down|up)|click/)&&!e.which&&(e.which=1),-1!==u.search(/^touch/)&&(u=(r=h(i)).touches,o=r.changedTouches,s=u&&u.length?u[0]:o&&o.length?o[0]:c))for(n=0,g=v.length;n<g;n++)e[_=v[n]]=s[_];return e}(t,e),d(t.target).trigger(a)),a}function g(e){var t=d.data(e.target,Q);if(!(O||H&&H===t)){var i=n("v"+e.type,e);i&&(i.isDefaultPrevented()&&e.preventDefault(),i.isPropagationStopped()&&e.stopPropagation(),i.isImmediatePropagationStopped()&&e.stopImmediatePropagation())}}function u(e){var t,i,a=h(e).touches;if(a&&1===a.length&&(i=_(t=e.target)).hasVirtualBinding){H=B++,d.data(t,Q,H),l(),o(),z=!1;var r=h(e).touches[0];E=r.pageX,I=r.pageY,n("vmouseover",e,i),n("vmousedown",e,i)}}function b(e){M||(z||n("vmousecancel",e,_(e.target)),z=!0,s())}function p(e){if(!M){var t=h(e).touches[0],i=z,a=d.vmouse.moveDistanceThreshold,r=_(e.target);(z=z||Math.abs(t.pageX-E)>a||Math.abs(t.pageY-I)>a)&&!i&&n("vmousecancel",e,r),n("vmousemove",e,r),s()}}function m(e){if(!M){r();var t,i=_(e.target);if(n("vmouseup",e,i),!z){var a=n("vclick",e,i);a&&a.isDefaultPrevented()&&(t=h(e).changedTouches[0],T.push({touchID:H,x:t.clientX,y:t.clientY}),O=!0)}n("vmouseout",e,i),z=!1,s()}}function w(e){var t,i=d.data(e,j);if(i)for(t in i)if(i[t])return!0;return!1}function y(){}function i(r){var _=r.substr(1);return{setup:function(e,t){w(this)||d.data(this,j,{}),d.data(this,j)[r]=!0,C[r]=(C[r]||0)+1,1===C[r]&&A.bind(_,g),d(this).bind(_,y),D&&(C.touchstart=(C.touchstart||0)+1,1===C.touchstart&&A.bind("touchstart",u).bind("touchend",m).bind("touchmove",p).bind("scroll",b))},teardown:function(e,t){--C[r],C[r]||A.unbind(_,g),D&&(--C.touchstart,C.touchstart||A.unbind("touchstart",u).unbind("touchmove",p).unbind("touchend",m).unbind("scroll",b));var i=d(this),a=d.data(this,j);a&&(a[r]=!1),i.unbind(_,y),w(this)||i.removeData(j)}}}var f,j="virtualMouseBindings",Q="virtualTouchID",a="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),v="clientX clientY pageX pageY screenX screenY".split(" "),x=d.event.mouseHooks?d.event.mouseHooks.props:[],S=d.event.props.concat(x),C={},k=0,E=0,I=0,z=!1,T=[],O=!1,M=!1,D="addEventListener"in t,A=d(t),B=1,H=0;d.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(var P=0;P<a.length;P++)d.event.special[a[P]]=i(a[P]);D&&t.addEventListener("click",function(e){var t,i,a,r,_,o=T.length,s=e.target;if(o)for(t=e.clientX,i=e.clientY,f=d.vmouse.clickDistanceThreshold,a=s;a;){for(r=0;r<o;r++)if(_=T[r],0,a===s&&Math.abs(_.x-t)<f&&Math.abs(_.y-i)<f||d.data(a,Q)===_.touchID)return e.preventDefault(),void e.stopPropagation();a=a.parentNode}},!0)})(e,0,r),e.mobile={},_={touch:"ontouchend"in r},(a=e).mobile.support=a.mobile.support||{},a.extend(a.support,_),a.extend(a.mobile.support,_),function(l,e,t){function n(e,t,i){var a=i.type;i.type=t,l.event.dispatch.call(e,i),i.type=a}var g=l(r);l.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(e,t){l.fn[t]=function(e){return e?this.bind(t,e):this.trigger(t)},l.attrFn&&(l.attrFn[t]=!0)});var i=l.mobile.support.touch,a=i?"touchstart":"mousedown",_=i?"touchend":"mouseup",o=i?"touchmove":"mousemove";l.event.special.scrollstart={enabled:!0,setup:function(){function t(e,t){n(r,(i=t)?"scrollstart":"scrollstop",e)}var i,a,r=this;l(r).bind("touchmove scroll",function(e){l.event.special.scrollstart.enabled&&(i||t(e,!0),clearTimeout(a),a=setTimeout(function(){t(e,!1)},50))})}},l.event.special.tap={tapholdThreshold:750,setup:function(){var o=this,s=l(o);s.bind("vmousedown",function(e){function t(){clearTimeout(r)}function i(){t(),s.unbind("vclick",a).unbind("vmouseup",t),g.unbind("vmousecancel",i)}function a(e){i(),_===e.target&&n(o,"tap",e)}if(e.which&&1!==e.which)return!1;var r,_=e.target;e.originalEvent;s.bind("vmouseup",t).bind("vclick",a),g.bind("vmousecancel",i),r=setTimeout(function(){n(o,"taphold",l.Event("taphold",{target:_}))},l.event.special.tap.tapholdThreshold)})}},l.event.special.swipe={scrollSupressionThreshold:10,durationThreshold:1e3,horizontalDistanceThreshold:10,verticalDistanceThreshold:475,start:function(e){var t=e.originalEvent.touches?e.originalEvent.touches[0]:e;return{time:(new Date).getTime(),coords:[t.pageX,t.pageY],origin:l(e.target)}},stop:function(e){var t=e.originalEvent.touches?e.originalEvent.touches[0]:e;return{time:(new Date).getTime(),coords:[t.pageX,t.pageY]}},handleSwipe:function(e,t){t.time-e.time<l.event.special.swipe.durationThreshold&&Math.abs(e.coords[0]-t.coords[0])>l.event.special.swipe.horizontalDistanceThreshold&&Math.abs(e.coords[1]-t.coords[1])<l.event.special.swipe.verticalDistanceThreshold&&e.origin.trigger("swipe").trigger(e.coords[0]>
1t.coords[0]?"swipeleft":"swiperight")},setup:function(){var r=l(this);r.bind(a,function(e){function t(e){a&&(i=l.event.special.swipe.stop(e),Math.abs(a.coords[0]-i.coords[0])>l.event.special.swipe.scrollSupressionThreshold&&e.preventDefault())}var i,a=l.event.special.swipe.start(e);r.bind(o,t).one(_,function(){r.unbind(o,t),a&&i&&l.event.special.swipe.handleSwipe(a,i),a=i=void 0})})}},l.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(e,t){l.event.special[e]={setup:function(){l(this).bind(t,l.noop)}}})}(e)}),function(o){function t(e){var t=e||window.event,i=[].slice.call(arguments,1),a=0,r=0,_=0;return(e=o.event.fix(t)).type="mousewheel",t.wheelDelta&&(a=t.wheelDelta/120),t.detail&&(a=-t.detail/3),_=a,void 0!==t.axis&&t.axis===t.HORIZONTAL_AXIS&&(_=0,r=-1*a),void 0!==t.wheelDeltaY&&(_=t.wheelDeltaY/120),void 0!==t.wheelDeltaX&&(r=-1*t.wheelDeltaX/120),i.unshift(e,a,r,_),(o.event.dispatch||o.event.handle).apply(this,i)}var i=["DOMMouseScroll","mousewheel"];if(o.event.fixHooks)for(var e=i.length;e;)o.event.fixHooks[i[--e]]=o.event.mouseHooks;o.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=i.length;e;)this.addEventListener(i[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=i.length;e;)this.removeEventListener(i[--e],t,!1);else this.onmousewheel=null}},o.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(jQuery),function(x){var t={init:function(c){c=x.extend(!0,{set_width:!1,set_height:!1,horizontalScroll:!1,scrollInertia:950,mouseWheel:!0,mouseWheelPixels:"auto",autoDraggerLength:!0,autoHideScrollbar:!1,snapAmount:null,snapOffset:0,scrollButtons:{enable:!1,scrollType:"continuous",scrollSpeed:"auto",scrollAmount:40},advanced:{updateOnBrowserResize:!0,updateOnContentResize:!1,autoExpandHorizontalScroll:!1,autoScrollOnFocus:!0,normalizeMouseWheelDelta:!1},contentTouchScroll:!0,callbacks:{onScrollStart:function(){},onScroll:function(){},onTotalScroll:function(){},onTotalScrollBack:function(){},onTotalScrollOffset:0,onTotalScrollBackOffset:0,whileScrolling:function(){}},theme:"light"},c);return this.each(function(){var i=x(this);if(c.set_width&&i.css("width",c.set_width),c.set_height&&i.css("height",c.set_height),x(document).data("mCustomScrollbar-index")){var e=parseInt(x(document).data("mCustomScrollbar-index"));x(document).data("mCustomScrollbar-index",e+1)}else x(document).data("mCustomScrollbar-index","1");i.wrapInner("<div class='mCustomScrollBox mCS-"+c.theme+"' id='mCSB_"+x(document).data("mCustomScrollbar-index")+"' style='position:relative; height:100%; overflow:hidden; max-width:100%;' />").addClass("mCustomScrollbar _mCS_"+x(document).data("mCustomScrollbar-index"));var a=i.children(".mCustomScrollBox");if(c.horizontalScroll){a.addClass("mCSB_horizontal").wrapInner("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />");var t=a.children(".mCSB_h_wrapper");t.wrapInner("<div class='mCSB_container' style='position:absolute; left:0;' />").children(".mCSB_container").css({width:t.children().outerWidth(),position:"relative"}).unwrap()}else a.wrapInner("<div class='mCSB_container' style='position:relative; top:0;' />");var r=a.children(".mCSB_container");x.support.touch&&r.addClass("mCS_touch"),r.after("<div class='mCSB_scrollTools' style='position:absolute;'><div class='mCSB_draggerContainer'><div class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' style='position:relative;'></div></div><div class='mCSB_draggerRail'></div></div></div>");var _=a.children(".mCSB_scrollTools"),o=_.children(".mCSB_draggerContainer").children(".mCSB_dragger");if(c.horizontalScroll?o.data("minDraggerWidth",o.width()):o.data("minDraggerHeight",o.height()),c.scrollButtons.enable&&(c.horizontalScroll?_.prepend("<a class='mCSB_buttonLeft' oncontextmenu='return false;'></a>").append("<a class='mCSB_buttonRight' oncontextmenu='return false;'></a>
1"):_.prepend("<a class='mCSB_buttonUp' oncontextmenu='return false;'></a>").append("<a class='mCSB_buttonDown' oncontextmenu='return false;'></a>")),a.bind("scroll",function(){i.is(".mCS_disabled")||a.scrollTop(0).scrollLeft(0)}),i.data({mCS_Init:!0,mCustomScrollbarIndex:x(document).data("mCustomScrollbar-index"),horizontalScroll:c.horizontalScroll,scrollInertia:c.scrollInertia,scrollEasing:"mcsEaseOut",mouseWheel:c.mouseWheel,mouseWheelPixels:c.mouseWheelPixels,autoDraggerLength:c.autoDraggerLength,autoHideScrollbar:c.autoHideScrollbar,snapAmount:c.snapAmount,snapOffset:c.snapOffset,scrollButtons_enable:c.scrollButtons.enable,scrollButtons_scrollType:c.scrollButtons.scrollType,scrollButtons_scrollSpeed:c.scrollButtons.scrollSpeed,scrollButtons_scrollAmount:c.scrollButtons.scrollAmount,autoExpandHorizontalScroll:c.advanced.autoExpandHorizontalScroll,autoScrollOnFocus:c.advanced.autoScrollOnFocus,normalizeMouseWheelDelta:c.advanced.normalizeMouseWheelDelta,contentTouchScroll:c.contentTouchScroll,onScrollStart_Callback:c.callbacks.onScrollStart,onScroll_Callback:c.callbacks.onScroll,onTotalScroll_Callback:c.callbacks.onTotalScroll,onTotalScrollBack_Callback:c.callbacks.onTotalScrollBack,onTotalScroll_Offset:c.callbacks.onTotalScrollOffset,onTotalScrollBack_Offset:c.callbacks.onTotalScrollBackOffset,whileScrolling_Callback:c.callbacks.whileScrolling,bindEvent_scrollbar_drag:!1,bindEvent_content_touch:!1,bindEvent_scrollbar_click:!1,bindEvent_mousewheel:!1,bindEvent_buttonsContinuous_y:!1,bindEvent_buttonsContinuous_x:!1,bindEvent_buttonsPixels_y:!1,bindEvent_buttonsPixels_x:!1,bindEvent_focusin:!1,bindEvent_autoHideScrollbar:!1,mCSB_buttonScrollRight:!1,mCSB_buttonScrollLeft:!1,mCSB_buttonScrollDown:!1,mCSB_buttonScrollUp:!1}),c.horizontalScroll)"none"!==i.css("max-width")&&(c.advanced.updateOnContentResize||(c.advanced.updateOnContentResize=!0));else if("none"!==i.css("max-height")){var s=!1,l=parseInt(i.css("max-height"));0<=i.css("max-height").indexOf("%")&&(s=l,l=i.parent().height()*s/100),i.css("overflow","hidden"),a.css("max-height",l)}if(i.mCustomScrollbar("update"),c.advanced.updateOnBrowserResize){var n,g=x(window).width(),u=x(window).height();x(window).bind("resize."+i.data("mCustomScrollbarIndex"),function(){n&&clearTimeout(n),n=setTimeout(function(){if(!i.is(".mCS_disabled")&&!i.is(".mCS_destroyed")){var e=x(window).width(),t=x(window).height();g===e&&u===t||("none"!==i.css("max-height")&&s&&a.css("max-height",i.parent().height()*s/100),i.mCustomScrollbar("update"),g=e,u=t)}},150)})}if(c.advanced.updateOnContentResize){if(c.horizontalScroll)var d=r.outerWidth();else d=r.outerHeight();setInterval(function(){if(c.horizontalScroll){c.advanced.autoExpandHorizontalScroll&&r.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:r.outerWidth(),position:"relative"}).unwrap();var e=r.outerWidth()}else e=r.outerHeight();e!=d&&(i.mCustomScrollbar("update"),d=e)},300)}})},update:function(){var e=x(this),t=e.children(".mCustomScrollBox"),i=t.children(".mCSB_container");i.removeClass("mCS_no_scrollbar"),e.removeClass("mCS_disabled mCS_destroyed"),t.scrollTop(0).scrollLeft(0);var a=t.children(".mCSB_scrollTools"),r=a.children(".mCSB_draggerContainer"),_=r.children(".mCSB_dragger");if(e.data("horizontalScroll")){var o=a.children(".mCSB_buttonLeft"),s=a.children(".mCSB_buttonRight"),l=t.width();e.data("autoExpandHorizontalScroll")&&i.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:i.outerWidth(),position:"relative"}).unwrap();var n=i.outerWidth()}else var g=a.children(".mCSB_buttonUp"),u=a.children(".mCSB_buttonDown"),d=t.height(),c=i.outerHeight();if(d<c&&!e.data("horizontalScroll")){a.css("display","block");var h=r.height();if(e.data("autoDraggerLength")){var b=Math.round(d/c*h),p=_.data("minDraggerHeight");if(b<=p)_.css({height:p});else if(h-10<=b){var m=h-10;_.css({height:m})}else _.css({height:b});_.children(".mCSB_dragger_bar").css({"line-height":_.height()+"px"})}var w=(c-d)/(h-_.height());e.data("scrollAmount",w).mCustomScrollbar("scrolling",t,i,r,_,g,u,o,s);var y=Math.abs(i.position().top);e.mCustomScrollbar("scrollTo",y,{scrollInertia:0,trigger:"internal"})}else if(l<n&&e.data("horizontalScroll")){a.css("display","block");var f=r.width();if(e.data("autoDraggerLength")){var j=Math.round(l/n*f),Q=_.data("minDraggerWidth");if(j<=Q)_.css({width:Q});else if(f-10<=j){var v=f-10;_.css({width:v})}else _.css({width:j})}w=(n-l)/(f-_.width());e.data("scrollAmount",w).mCustomScrollbar("scrolling",t,i,r,_,g,u,o,s);y=Math.abs(i.position().left);e.mCustomScrollbar("scrollTo",y,{scrollInertia:0,trigger:"internal"})}else t.unbind("mousewheel focusin"),e.data("horizontalScroll")?_.add(i).css("left",0):_.add(i).css("top",0),a.css("display","none"),i.addClass("mCS_no_scrollbar"),e.data({bindEvent_mousewheel:!1,bindEvent_focusin:!1})},scrolling:function(r,s,l,n,e,t,i,a){var o,g,_,u,d,c,h,b,p,m=x(this);m.data("bindEvent_scrollbar_drag")||(x.support.msPointer?(n.bind("MSPointerDown",function(e){e.preventDefault(),m.data({on_drag:!0}),n.addClass("mCSB_dragger_onDrag");var t=x(this),i=t.offset(),a=e.originalEvent.pageX-i.left,r=e.originalEvent.pageY-i.top;a<t.width()&&0<a&&r<t.height()&&0<r&&(o=r,g=a)}),x(document).bind("MSPointerMove."+m.data("mCustomScrollbarIndex"),function(e){if(e.preventDefault(),m.data("on_drag")){var t=n.offset(),i=e.originalEvent.pageX-t.left,a=e.originalEvent.pageY-t.top;w(o,g,a,i)}}).bind("MSPointerUp."+m.data("mCustomScrollbarIndex"),function(e){m.data({on_drag:!1}),n.removeClass("mCSB_dragger_onDrag")})):(n.bind("mousedown touchstart",function(e){e.preventDefault(),e.stopImmediatePropagation();var t,i,a=x(this),r=a.offset();if("touchstart"===e.type){var _=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];t=_.pageX-r.left,i=_.pageY-r.top}else m.data({on_drag:!0}),n.addClass("mCSB_dragger_onDrag"),t=e.pageX-r.left,i=e.pageY-r.top;t<a.width()&&0<t&&i<a.height()&&0<i&&(o=i,g=t)}).bind("touchmove",function(e){e.preventDefault(),e.stopImmediatePropagation();var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],i=x(this).offset(),a=t.pageX-i.left,r=t.pageY-i.top;w(o,g,r,a)}),x(document).bind("mousemove."+m.data("mCustomScrollbarIndex"),function(e){if(m.data("on_drag")){var t=n.offset(),i=e.pageX-t.left,a=e.pageY-t.top;w(o,g,a,i)}}).bind("mouseup."+m.data("mCustomScrollbarIndex"),function(e){m.data({on_drag:!1}),n.removeClass("mCSB_dragger_onDrag")})),m.data({bindEvent_scrollbar_drag:!0}));function w(e,t,i,a){m.data("horizontalScroll")?m.mCustomScrollbar("scrollTo",n.position().left-t+a,{moveDragger:!0,trigger:"internal"}):m.mCustomScrollbar("scrollTo",n.position().top-e+i,{moveDragger:!0,trigger:"internal"})}x.support.touch&&m.data("contentTouchScroll")&&(m.data("bindEvent_content_touch")||(s.bind("touchstart",function(e){e.stopImmediatePropagation(),_=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],u=x(this),d=u.offset(),h=_.pageX-d.left,c=_.pageY-d.top,b=c,p=h}),s.bind("touchmove",function(e){e.preventDefault(),e.stopImmediatePropagation(),_=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],u=x(this).parent(),d=u.offset(),h=_.pageX-d.left,c=_.pageY-d.top,m.data("horizontalScroll")?m.mCustomScrollbar("scrollTo",p-h,{trigger:"internal"}):m.mCustomScrollbar("scrollTo",b-c,{trigger:"internal"})})));if(m.data("bindEvent_scrollbar_click")||(l.bind("click",function(e){var t=(e.pageY-l.offset().top)*m.data("scrollAmount"),i=x(e.target);m.data("horizontalScroll")&&(t=(e.pageX-l.offset().left)*m.data("scrollAmount")),(i.hasClass("mCSB_draggerContainer")||i.hasClass("mCSB_draggerRail"))&&m.mCustomScrollbar("scrollTo",t,{trigger:"internal",scrollEasing:"draggerRailEase"})}),m.data({bindEvent_scrollbar_click:!0})),m.data("mouseWheel")&&(m.data("bindEvent_mousewheel")||(r.bind("mousewheel",function(e,t){var i,a=m.data("mouseWheelPixels"),r=Math.abs(s.position().top),_=n.position().top,o=l.height()-n.height();m.data("normalizeMouseWheelDelta")&&(t=t<0?-1:1),"auto"===a&&(a=100+Math.round(m.data("scrollAmount")/2)),m.data("horizontalScroll")&&(_=n.position().left,o=l.width()-n.width(),r=M
1ath.abs(s.position().left)),(0<t&&0!==_||t<0&&_!==o)&&(e.preventDefault(),e.stopImmediatePropagation()),i=r-t*a,m.mCustomScrollbar("scrollTo",i,{trigger:"internal"})}),m.data({bindEvent_mousewheel:!0}))),m.data("scrollButtons_enable"))if("pixels"===m.data("scrollButtons_scrollType")){function y(e){n.data("preventAction")||(n.data("preventAction",!0),m.mCustomScrollbar("scrollTo",e,{trigger:"internal"}))}m.data("horizontalScroll")?(a.add(i).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",f,j),m.data({bindEvent_buttonsContinuous_x:!1}),m.data("bindEvent_buttonsPixels_x")||(a.bind("click",function(e){e.preventDefault(),y(Math.abs(s.position().left)+m.data("scrollButtons_scrollAmount"))}),i.bind("click",function(e){e.preventDefault(),y(Math.abs(s.position().left)-m.data("scrollButtons_scrollAmount"))}),m.data({bindEvent_buttonsPixels_x:!0}))):(t.add(e).unbind("mousedown touchstart MSPointerDown mouseup MSPointerUp mouseout MSPointerOut touchend",f,j),m.data({bindEvent_buttonsContinuous_y:!1}),m.data("bindEvent_buttonsPixels_y")||(t.bind("click",function(e){e.preventDefault(),y(Math.abs(s.position().top)+m.data("scrollButtons_scrollAmount"))}),e.bind("click",function(e){e.preventDefault(),y(Math.abs(s.position().top)-m.data("scrollButtons_scrollAmount"))}),m.data({bindEvent_buttonsPixels_y:!0})))}else{if(m.data("horizontalScroll")){if(a.add(i).unbind("click"),m.data({bindEvent_buttonsPixels_x:!1}),!m.data("bindEvent_buttonsContinuous_x")){a.bind("mousedown touchstart MSPointerDown",function(e){e.preventDefault();var t=Q();m.data({mCSB_buttonScrollRight:setInterval(function(){m.mCustomScrollbar("scrollTo",Math.abs(s.position().left)+t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var f=function(e){e.preventDefault(),clearInterval(m.data("mCSB_buttonScrollRight"))};a.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",f),i.bind("mousedown touchstart MSPointerDown",function(e){e.preventDefault();var t=Q();m.data({mCSB_buttonScrollLeft:setInterval(function(){m.mCustomScrollbar("scrollTo",Math.abs(s.position().left)-t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});var j=function(e){e.preventDefault(),clearInterval(m.data("mCSB_buttonScrollLeft"))};i.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",j),m.data({bindEvent_buttonsContinuous_x:!0})}}else if(t.add(e).unbind("click"),m.data({bindEvent_buttonsPixels_y:!1}),!m.data("bindEvent_buttonsContinuous_y")){t.bind("mousedown touchstart MSPointerDown",function(e){e.preventDefault();var t=Q();m.data({mCSB_buttonScrollDown:setInterval(function(){m.mCustomScrollbar("scrollTo",Math.abs(s.position().top)+t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});t.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",function(e){e.preventDefault(),clearInterval(m.data("mCSB_buttonScrollDown"))}),e.bind("mousedown touchstart MSPointerDown",function(e){e.preventDefault();var t=Q();m.data({mCSB_buttonScrollUp:setInterval(function(){m.mCustomScrollbar("scrollTo",Math.abs(s.position().top)-t,{trigger:"internal",scrollEasing:"easeOutCirc"})},17)})});e.bind("mouseup touchend MSPointerUp mouseout MSPointerOut",function(e){e.preventDefault(),clearInterval(m.data("mCSB_buttonScrollUp"))}),m.data({bindEvent_buttonsContinuous_y:!0})}function Q(){var e=m.data("scrollButtons_scrollSpeed");return"auto"===m.data("scrollButtons_scrollSpeed")&&(e=Math.round((m.data("scrollInertia")+100)/40)),e}}m.data("autoScrollOnFocus")&&(m.data("bindEvent_focusin")||(r.bind("focusin",function(){r.scrollTop(0).scrollLeft(0);var e=x(document.activeElement);if(e.is("input,textarea,select,button,a[tabindex],area,object")){var t=s.position().top,i=e.position().top,a=r.height()-e.outerHeight();m.data("horizontalScroll")&&(t=s.position().left,i=e.position().left,a=r.width()-e.outerWidth()),(t+i<0||a<t+i)&&m.mCustomScrollbar("scrollTo",i,{trigger:"internal"})}}),m.data({bindEvent_focusin:!0}))),m.data("autoHideScrollbar")&&(m.data("bindEvent_autoHideScrollbar")||(r.bind("mouseenter",function(e){r.addClass("mCS-mouse-over"),v.showScrollbar.call(r.children(".mCSB_scrollTools"))}).bind("mouseleave touchend",function(e){r.removeClass("mCS-mouse-over"),"mouseleave"===e.type&&v.hideScrollbar.call(r.children(".mCSB_scrollTools"))}),m.data({bindEvent_autoHideScrollbar:!0})))},scrollTo:function(e,t){var i,a,r,_,o,s=x(this),l={moveDragger:!1,trigger:"external",callbacks:!0,scrollInertia:s.data("scrollInertia"),scrollEasing:s.data("scrollEasing")},n=(t=x.extend(l,t),s.children(".mCustomScrollBox")),g=n.children(".mCSB_container"),u=n.children(".mCSB_scrollTools"),d=u.children(".mCSB_draggerContainer"),c=d.children(".mCSB_dragger"),h=draggerSpeed=t.scrollInertia;if(!g.hasClass("mCS_no_scrollbar")&&(s.data({mCS_trigger:t.trigger}),s.data("mCS_Init")&&(t.callbacks=!1),e||0===e)){var b,p;if("number"==typeof e)t.moveDragger?(i=e,e=s.data("horizontalScroll")?c.position().left*s.data("scrollAmount"):c.position().top*s.data("scrollAmount"),draggerSpeed=0):i=e/s.data("scrollAmount");else if("string"==typeof e)i=1===(b="top"===e?0:"bottom"!==e||s.data("horizontalScroll")?"left"===e?0:"right"===e&&s.data("horizontalScroll")?g.outerWidth()-n.width():"first"===e?s.find(".mCSB_container").find(":first"):"last"===e?s.find(".mCSB_container").find(":last"):s.find(e):g.outerHeight()-n.height()).length?(e=s.data("horizontalScroll")?b.position().left:b.position().top)/s.data("scrollAmount"):e=b;if(s.data("horizontalScroll"))s.data("onTotalScrollBack_Offset")&&(r=-s.data("onTotalScrollBack_Offset")),s.data("onTotalScroll_Offset")&&(o=n.width()-g.outerWidth()+s.data("onTotalScroll_Offset")),i<0?(i=e=0,clearInterval(s.data("mCSB_buttonScrollLeft")),r||(a=!0)):i>=d.width()-c.width()?(i=d.width()-c.width(),e=n.width()-g.outerWidth(),clearInterval(s.data("mCSB_buttonScrollRight")),o||(_=!0)):e=-e,(p=s.data("snapAmount"))&&(e=Math.round(e/p)*p-s.data("snapOffset")),v.mTweenAxis.call(this,c[
10],"left",Math.round(i),draggerSpeed,t.scrollEasing),v.mTweenAxis.call(this,g[0],"left",Math.round(e),h,t.scrollEasing,{onStart:function(){t.callbacks&&!s.data("mCS_tweenRunning")&&m("onScrollStart"),s.data("autoHideScrollbar")&&v.showScrollbar.call(u)},onUpdate:function(){t.callbacks&&m("whileScrolling")},onComplete:function(){t.callbacks&&(m("onScroll"),(a||r&&g.position().left>=r)&&m("onTotalScrollBack"),(_||o&&g.position().left<=o)&&m("onTotalScroll")),c.data("preventAction",!1),s.data("mCS_tweenRunning",!1),s.data("autoHideScrollbar")&&(n.hasClass("mCS-mouse-over")||v.hideScrollbar.call(u))}});else s.data("onTotalScrollBack_Offset")&&(r=-s.data("onTotalScrollBack_Offset")),s.data("onTotalScroll_Offset")&&(o=n.height()-g.outerHeight()+s.data("onTotalScroll_Offset")),i<0?(i=e=0,clearInterval(s.data("mCSB_buttonScrollUp")),r||(a=!0)):i>=d.height()-c.height()?(i=d.height()-c.height(),e=n.height()-g.outerHeight(),clearInterval(s.data("mCSB_buttonScrollDown")),o||(_=!0)):e=-e,(p=s.data("snapAmount"))&&(e=Math.round(e/p)*p-s.data("snapOffset")),v.mTweenAxis.call(this,c[0],"top",Math.round(i),draggerSpeed,t.scrollEasing),v.mTweenAxis.call(this,g[0],"top",Math.round(e),h,t.scrollEasing,{onStart:function(){t.callbacks&&!s.data("mCS_tweenRunning")&&m("onScrollStart"),s.data("autoHideScrollbar")&&v.showScrollbar.call(u)},onUpdate:function(){t.callbacks&&m("whileScrolling")},onComplete:function(){t.callbacks&&(m("onScroll"),(a||r&&g.position().top>=r)&&m("onTotalScrollBack"),(_||o&&g.position().top<=o)&&m("onTotalScroll")),c.data("preventAction",!1),s.data("mCS_tweenRunning",!1),s.data("autoHideScrollbar")&&(n.hasClass("mCS-mouse-over")||v.hideScrollbar.call(u))}});s.data("mCS_Init")&&s.data({mCS_Init:!1})}function m(e){switch(this.mcs={top:g.position().top,left:g.position().left,draggerTop:c.position().top,draggerLeft:c.position().left,topPct:Math.round(100*Math.abs(g.position().top)/Math.abs(g.outerHeight()-n.height())),leftPct:Math.round(100*Math.abs(g.position().left)/Math.abs(g.outerWidth()-n.width()))},e){case"onScrollStart":s.data("mCS_tweenRunning",!0).data("onScrollStart_Callback").call(s,this.mcs);break;case"whileScrolling":s.data("whileScrolling_Callback").call(s,this.mcs);break;case"onScroll":s.data("onScroll_Callback").call(s,this.mcs);break;case"onTotalScrollBack":s.data("onTotalScrollBack_Callback").call(s,this.mcs);break;case"onTotalScroll":s.data("onTotalScroll_Callback").call(s,this.mcs)}}},stop:function(){var e=x(this),t=e.children().children(".mCSB_container"),i=e.children().children().children().children(".mCSB_dragger");v.mTweenAxisStop.call(this,t[0]),v.mTweenAxisStop.call(this,i[0])},disable:function(e){var t=x(this),i=t.children(".mCustomScrollBox"),a=i.children(".mCSB_container"),r=i.children(".mCSB_scrollTools"),_=r.children().children(".mCSB_dragger");i.unbind("mousewheel focusin mouseenter mouseleave touchend"),a.unbind("touchstart touchmove"),e&&(t.data("horizontalScroll")?_.add(a).css("left",0):_.add(a).css("top",0)),r.css("display","none"),a.addClass("mCS_no_scrollbar"),t.data({bindEvent_mousewheel:!1,bindEvent_focusin:!1,bindEvent_content_touch:!1,bindEvent_autoHideScrollbar:!1}).addClass("mCS_disabled")},destroy:function(){var e=x(this);e.removeClass("mCustomScrollbar _mCS_"+e.data("mCustomScrollbarIndex")).addClass("mCS_destroyed").children().children(".mCSB_container").unwrap().children().unwrap().siblings(".mCSB_scrollTools").remove(),x(document).unbind("mousemove."+e.data("mCustomScrollbarIndex")+" mouseup."+e.data("mCustomScrollbarIndex")+" MSPointerMove."+e.data("mCustomScrollbarIndex")+" MSPointerUp."+e.data("mCustomScrollbarIndex")),x(window).unbind("resize."+e.data("mCustomScrollbarIndex"))}},v={showScrollbar:function(){this.stop().animate({opacity:1},"fast")},hideScrollbar:function(){this.stop().animate({opacity:0}
1,"fast")},mTweenAxis:function(e,t,i,a,r,_){var o,s=(_=_||{}).onStart||function(){},l=_.onUpdate||function(){},n=_.onComplete||function(){},g=b(),u=0,d=e.offsetTop,c=e.style;"left"===t&&(d=e.offsetLeft);var h=i-d;function b(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()}function p(){u||s.call(),u=b()-g,m(),u>=e._time&&(e._time=u>e._time?u+o-(u-e._time):u+o-1,e._time<u+1&&(e._time=u+1)),e._time<a?e._id=_request(p):n.call()}function m(){c[t]=0<a?(e.currVal=function(e,t,i,a,r){switch(r){case"linear":return i*e/a+t;case"easeOutQuad":return-i*(e/=a)*(e-2)+t;case"easeInOutQuad":return(e/=a/2)<1?i/2*e*e+t:-i/2*(--e*(e-2)-1)+t;case"easeOutCubic":return e/=a,i*(--e*e*e+1)+t;case"easeOutQuart":return e/=a,-i*(--e*e*e*e-1)+t;case"easeOutQuint":return e/=a,i*(--e*e*e*e*e+1)+t;case"easeOutCirc":return e/=a,e--,i*Math.sqrt(1-e*e)+t;case"easeOutSine":return i*Math.sin(e/a*(Math.PI/2))+t;case"easeOutExpo":return i*(1-Math.pow(2,-10*e/a))+t;case"mcsEaseOut":var _=(e/=a)*e,o=_*e;return t+i*(.499999999999997*o*_+-2.5*_*_+5.5*o+-6.5*_+4*e);case"draggerRailEase":return(e/=a/2)<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}}(e._time,d,h,a,r),Math.round(e.currVal)+"px"):i+"px",l.call()}!function(){if(null==e._id)return;window.requestAnimationFrame?window.cancelAnimationFrame(e._id):clearTimeout(e._id);e._id=null}(),o=1e3/60,e._time=u+o,_request=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return m(),setTimeout(e,.01)},e._id=_request(p)},mTweenAxisStop:function(e){null!=e._id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._id):clearTimeout(e._id),e._id=null)},rafPolyfill:function(){for(var e=["ms","moz","webkit","o"],t=e.length;-1<--t&&!window.requestAnimationFrame;)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"]}};v.rafPolyfill.call(),x.support.touch=!!("ontouchstart"in window),x.support.msPointer=window.navigator.msPointerEnabled;var e="https:"==document.location.protocol?"https:":"http:";
1x.event.special.mousewheel||document.write('<script src="'+e+'//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.0.6/jquery.mousewheel.min.js"><\/script>'),x.fn.mCustomScrollbar=function(e){return t[e]?t[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void x.error("Method "+e+" does not exist"):t.init.apply(this,arguments)}}(jQuery),function(r){function _(e){return void 0!==e}function e(e,t,i){var a=function(){};a.prototype=t.prototype,e.prototype=new a,e.prototype.constructor=e,t.prototype.constructor=t,e._super=t.prototype,i&&r.extend(e.prototype,i)}var o=[["",""],["exit","cancel"],["screen","Screen"]],s=["","o","ms","moz","webkit","webkitCurrent"];function i(e,t){var i;"string"==typeof e&&(t=e,e=document);for(var a=0;a<o.length;++a){t=t.replace(o[a][0],o[a][1]);for(var r=0;r<s.length;++r)if(i=s[r],_(e[i+=0===r?t:t.charAt(0).toUpperCase()+t.substr(1)]))return e[i]}}var t=navigator.userAgent,a=i("fullscreenEnabled"),l=!(-1!==t.indexOf("Android")&&-1!==t.indexOf("Chrome"))&&_(i("fullscreenElement"))&&(!_(a)||!0===a),n=r.fn.jquery.split("."),g=parseInt(n[0])<2&&parseInt(n[1])<7,u=function(){this.__options=null,this._fullScreenElement=null,this.__savedStyles={}};u.prototype={_DEFAULT_OPTIONS:{styles:{boxSizing:"border-box",MozBoxSizing:"border-box",WebkitBoxSizing:"border-box"},toggleClass:null},__documentOverflow:"",__htmlOverflow:"",_preventDocumentScroll:function(){this.__documentOverflow=r("body")[0].style.overflow,this.__htmlOverflow=r("html")[0].style.overflow},_allowDocumentScroll:function(){},_fullScreenChange:function(){this.isFullScreen()?(this._preventDocumentScroll(),this._triggerEvents()):(this._allowDocumentScroll(),this._revertStyles(),this._triggerEvents(),this._fullScreenElement=null)},_fullScreenError:function(e){this._revertStyles(),this._fullScreenElement=null,e&&r(document).trigger("fscreenerror",[e])},_triggerEvents:function(){r(this._fullScreenElement).trigger(this.isFullScreen()?"fscreenopen":"fscreenclose"),r(document).trigger("fscreenchange",[this.isFullScreen(),this._fullScreenElement])},_saveAndApplyStyles:function(){var e=r(this._fullScreenElement);for(var t in this.__savedStyles={},this.__options.styles)this.__savedStyles[t]=this._fullScreenElement.style[t],this._fullScreenElement.style[t]=this.__options.styles[t];this.__options.toggleClass&&e.addClass(this.__options.toggleClass)},_revertStyles:function(){var e=r(this._fullScreenElement);for(var t in this.__options.styles)this._fullScreenElement.style[t]=this.__savedStyles[t];this.__options.toggleClass&&e.removeClass(this.__options.toggleClass)},open:function(e,t){e!==this._fullScreenElement&&(this.isFullScreen()&&this.exit(),this._fullScreenElement=e,this.__options=r.extend(!0,{},this._DEFAULT_OPTIONS,t),this._saveAndApplyStyles())},exit:null,isFullScreen:null,isNativelySupported:function(){return l}};var d=function(){d._super.constructor.apply(this,arguments),this.exit=r.proxy(i("exitFullscreen"),document),this._DEFAULT_OPTIONS=r.extend(!0,{},this._DEFAULT_OPTIONS,{styles:{width:"100%",height:"100%"}}),r(document).bind(this._prefixedString("fullscreenchange")+" MSFullscreenChange",r.proxy(this._fullScreenChange,this)).bind(this._prefixedString("fullscreenerror")+" MSFullscreenError",r.proxy(this._fullScreenError,this))};e(d,u,{VENDOR_PREFIXES:["","o","moz","webkit"],_prefixedString:function(t){return r.map(this.VENDOR_PREFIXES,function(e){return e+t}).join(" ")},open:function(e,t){d._super.open.apply(this,arguments),i(e,"requestFullscreen").call(e)},exit:r.noop,isFullScreen:function(){return null!==i("fullscreenElement")},element:function(){return i("fullscreenElement")}});var c=function(){c._super.constructor.apply(this,arguments),this._DEFAULT_OPTIONS=r.extend({},this._DEFAULT_OPTIONS,{styles:{position:"fixed",zIndex:"2147483647",left:0,top:0,bottom:0,right:0}}),this.__delegateKeydownHandler()};e(c,u,{__isFullScreen:!1,__delegateKeydownHandler:function(){var e=r(document);e.delegate("*","keydown.fullscreen",r.proxy(this.__keydownHandler,this));var t=g?e.data("events"):r._data(document).events,i=t.keydown;g?t.live.unshift(t.live.pop()):i.splice(0,0,i.splice(i.delegateCount-1,1)[0])},__keydownHandler:function(e){return!this.isFullScreen()||27!==e.which||(this.exit(),!1)},_revertStyles:function(){c._super._revertStyles.apply(this,arguments),this._fullScreenElement.offsetHeight},open:function(e){c._super.open.apply(this,arguments),this.__isFullScreen=!0,this._fullScreenChange()},exit:function(){this.__isFullScreen=!1,this._fullScreenChange()},isFullScreen:function(){return this.__isFullScreen},element:function(){return this.__isFullScreen?this._fullScreenElement:null}}),r.fullscreen=l?new d:new c,r.fn.fullscreen=function(e){var t=this[0];return(e=r.extend({toggleClass:null},e)).styles={},t&&r.fullscreen.open(t,e),this}}(jQuery);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,isPopUpOpe
1ned=!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(document).ready(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");bwg_rating((e=JSON.parse(e)).current_rate,e.current_rate_count,e.current_avg_rating,e.current_image_key)}),1==gallery_box_data.is_pro&&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,setTimeout(function(){jQuery(".bwg_image_info_container1").height()<jQuery(".bwg_image_info").height()+jQuery(".bwg_toggle_container").height()+bwg_image_info_pos+2*parseInt(gallery_box_data.lightbox_info_margin)&&("top"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_image_info").css("top",bwg_image_info_pos+"px"),jQuery(".bwg_image_info").height(jQuery(".bwg_image_info_container1").height()-jQuery(".bwg_toggle_container").height()-bwg_image_info_pos-2*parseInt(gallery_box_data.lightbox_info_margin)))},100),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())&&jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn 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")||(39===e.keyCode?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(j
1Query("#bwg_current_image_key").val())+1):37===e.keyCode?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(jQuery("#bwg_current_image_key").val())-1):27===e.keyCode?spider_destroypopup(1e3):32===e.keyCode&&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;if(1==gallery_box_data.is_pro){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()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#spider_popup_wrap .bwg_image_wrap").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}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#spider_popup_wrap .bwg_image_wrap").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").mCustomScrollbar({scrollInertia:150}),jQuery(".bwg_ecommerce_panel").mCustomScrollbar({scrollInertia:150,advanced:{updateOnContentResize:!0}}));var o=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_filmstrip").on(o,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<i?jQuery(".bwg_filmstrip_left").trigger(a?"touchend":"click"):jQuery(".bwg_filmstrip_right").trigger(a?"touchend":"click")}),jQuery(".bwg_filmstrip_right").on(a,function(){jQuery(".bwg_filmstrip_thumbnails").stop(!0,!1),"left"==gallery_box_data.left_or_top?"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&(jQuery(".bwg_filmstrip_left").css({opacity:1,filter:"Alpha(opacity=100)"}),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"):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")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3,filter:"Alpha(opacity=30)"})},500)):(jQuery(".bwg_filmstrip_thumbnails").position().left>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&
1(jQuery(".bwg_filmstrip_left").css({opacity:1,filter:"Alpha(opacity=100)"}),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"):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")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3,filter:"Alpha(opacity=30)"})},500)):"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,filter:"Alpha(opacity=100)"}),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"):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")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").width()-jQuery(".bwg_filmstrip").width())&&jQuery(".bwg_filmstrip_right").css({opacity:.3,filter:"Alpha(opacity=30)"})},500)):(jQuery(".bwg_filmstrip_thumbnails").position().top>=-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&(jQuery(".bwg_filmstrip_left").css({opacity:1,filter:"Alpha(opacity=100)"}),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"):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")),window.setTimeout(function(){jQuery(".bwg_filmstrip_thumbnails").position().left==-(jQuery(".bwg_filmstrip_thumbnails").height()-jQuery(".bwg_filmstrip").height())&&jQuery(".bwg_filmstrip_right").css({opacity:.3,filter:"Alpha(opacity=30)"})},500))}),"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,filter:"Alpha(opacity=100)"}),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"):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")),window.setTimeout(function(){0==jQuery(".bwg_filmstrip_thumbnails").position().left&&jQuery(".bwg_filmstrip_left").css({opacity:.3,filter:"Alpha(opacity=30)"})},500)}):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,filter:"Alpha(opacity=100)"}),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"):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")),window.setTimeout(function(){0==jQuery(".bwg_filmstrip_thumbnails").position().top&&jQuery(".bwg_filmstrip_left").css({opacity:.3,filter:"Alpha(opacity=30)"})},500)}),"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);
1var e=jQuery(".bwg_ctrl_btn_container").length?jQuery(".bwg_ctrl_btn_container").height():0;setTimeout(function(){jQuery(".bwg_image_info_container1").height()<jQuery(".bwg_image_info").height()+e+2*parseInt(gallery_box_data.lightbox_info_margin)&&("top"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_image_info").css("top",e+"px"),jQuery(".bwg_image_info").height(jQuery(".bwg_image_info_container1").height()-e-2*parseInt(gallery_box_data.lightbox_info_margin)))},100)}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_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",i=jQuery(".bwg_image_info_container1").height()-jQuery(".bwg_ctrl_btn_container").height()-2*parseInt(gallery_box_data.lightbox_info_margin),a=jQuery(".bwg_image_description").outerHeight()+jQuery(".bwg_image_title").outerHeight()+2*parseInt(gallery_box_data.lightbox_info_margin);if(jQuery(".bwg_toggle_container i").hasClass(e)){var r=i+jQuery(".bwg_ctrl_btn_container").height(),_=parseInt(jQuery(".bwg_image_info").css("top"))-jQuery(".bwg_ctrl_btn_container").height();jQuery(".bwg_ctrl_btn_container").height();"top"==gallery_box_data.lightbox_ctrl_btn_pos&&"top"==gallery_box_data.lightbox_info_pos?jQuery(".bwg_image_info_container1").height()<a?jQuery(".bwg_image_info").animate({top:_+"px",height:r},500):jQuery(".bwg_image_info").animate({top:_+"px"},500):"bottom"==gallery_box_data.lightbox_ctrl_btn_pos&&(jQuery(".bwg_image_info_container1").height()<a?jQuery(".bwg_image_info").animate({bottom:0,height:r},500):"bottom"==gallery_box_data.lightbox_info_pos?jQuery(".bwg_image_info").animate({top:-_+"px"},500):jQuery(".bwg_image_info").animate({top: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_info_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_info_pos||jQuery(".bwg_image_info").animate({top:0},500):jQuery(".bwg_image_info").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_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),jQuery(".bwg_toggle_container").animate({bottom:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}}
1)):(jQuery(".bwg_ctrl_btn_container").animate({top:"-"+jQuery(".bwg_ctrl_btn_container").height()},500),jQuery(".bwg_toggle_container").animate({top:0},{duration:500,complete:function(){jQuery(".bwg_toggle_container i").attr("class","bwg_toggle_btn "+t)}}))}else{i=jQuery(".bwg_image_info_container1").height()-2*parseInt(gallery_box_data.lightbox_info_margin)-jQuery(".bwg_toggle_container").height(),a=jQuery(".bwg_image_description").outerHeight()+jQuery(".bwg_image_title").outerHeight()+2*parseInt(gallery_box_data.lightbox_info_margin)+jQuery(".bwg_toggle_container").height(),r=i,_=parseInt(jQuery(".bwg_image_info").css("top"))+jQuery(".bwg_ctrl_btn_container").height();"top"==gallery_box_data.lightbox_ctrl_btn_pos&&"top"==gallery_box_data.lightbox_info_pos?jQuery(".bwg_image_info_container1").height()<a?jQuery(".bwg_image_info").animate({top:_+"px",height:r},500):jQuery(".bwg_image_info").animate({top:_+"px"},500):"bottom"==gallery_box_data.lightbox_ctrl_btn_pos&&(jQuery(".bwg_image_info_container1").height()<a?jQuery(".bwg_image_info").animate({bottom:0,height:r},500):jQuery(".bwg_image_info").animate({top: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_info_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_info_pos||jQuery(".bwg_image_info").animate({top:jQuery(".bwg_ctrl_btn_container").height()},500):jQuery(".bwg_image_info").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_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),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),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)}}))}});var s=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(j
1Query.fullscreen.isFullScreen())jQuery.fullscreen.exit(),e=s,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_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)-40}),bwg_set_filmstrip_pos(r-40,"",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)-40}),bwg_set_filmstrip_pos(_-40,"",gallery_box_data)),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()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")});else{jQuery("#spider_popup_wrap").fullscreen();var i=screen.width,a=screen.height;jQuery("#spider_popup_wrap").css({width:i,height:a,left:0,top:0,margin:0,zIndex:1e5}),jQuery(".bwg_image_wrap").css({width:i-t}),jQuery(".bwg_image_container").css({height:a-("horizontal"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_height:0),width:i-t-("vertical"==gallery_box_data.filmstrip_direction?gallery_box_data.image_filmstrip_width:0)}),jQuery(".bwg_popup_image").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)}),jQuery(".bwg_popup_embed > .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)?"comment_container_width":0}),jQuery(".bwg_filmstrip").css({width:i-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-40}),bwg_set_filmstrip_pos(i-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-40,"",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:i-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-40}),bwg_set_filmstrip_pos(a-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-40,"",gallery_box_data)),jQuery(".bwg_resize-full").hide(),jQuery(".bwg_fullscreen").attr("class","bwg-icon-compress bwg_ctrl_bt
1n bwg_fullscreen"),jQuery(".bwg_fullscreen").attr("title",bwg_objectsL10n.bwg_exit_fullscreen),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen")}return!1}),jQuery(".bwg_play_pause, .bwg_popup_image").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,i,a,r,_,o,s){e=e.replace(/&/g,"&"),isPopUpOpened||(isPopUpOpened=!0,spider_hasalreadyreceivedpopup(_)||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('<div id="spider_popup_wrap" class="spider_popup_wrap" style=" width:'+i+"px; height:"+a+"px; margin-top:-"+a/2+"px; margin-left: -"+i/2+'px; ">'+e+"</div>").hide().appendTo("body");gallery_box_ready(),spider_showpopup(_,o,t,r,s)},beforeSend:function(){},complete:function(){}})))}function spider_showpopup(e,t,i,a,r){var _=gallery_box_data.data,o=parseInt(jQuery("#bwg_current_image_key").val());void 0!==_[o]&&(isPopUpOpened=!0,-1<_[o].filetype.indexOf("EMBED_")?bwg_first_image_load(i):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").prop("complete")?bwg_first_image_load(i):jQuery("#spider_popup_wrap .bwg_popup_image_spun img").on("load error",function(){bwg_first_image_load(i)}),spider_receivedpopup(e,t,r))}function bwg_first_image_load(e){e.show(),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()}function spider_hasalreadyreceivedpopup(e){return-1<document.cookie.indexOf(e)&&delete document.cookie[document.cookie.indexOf(e)],!1}function spider_receivedpopup(e,t,i){var a=new Date;a.setDate(a.getDate()+t),document.cookie=e+"=true;expires="+a.toUTCString()+";path=/";var r=gallery_box_data.bwg_ctrl_btn_container_height;"bottom"==i?jQuery(".bwg_toggle_container").css("bottom",r+"px"):"top"==i&&jQuery(".bwg_toggle_container").css("top",r+"px")}function spider_isunsupporteduseragent(){return!window.XMLHttpRequest}function spider_destroypopup(e){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)}
1,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();bwg_objectsL10n.is_pro&&location.replace("#"),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")),document.getElementById("ecommerce_opacity_div").style.display="",document.getElementById("ecommerce_loading_div").style.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(){document.getElementById("ecommerce_opacity_div").style.display="none",document.getElementById("ecommerce_loading_div").style.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){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,advanced:{updateOnContentResize:!0}}),jQuery(".bwg_comments_close_btn").click(bwg_comment),bwg_captcha_refresh("bwg_captcha")}}),!1}function spider_rate_ajax_save(i){var e={};return e.image_id=jQuery("#"+i+" input[name='image_id']").val(),e.rate=jQuery("#"+i+" input[name='score']").val(),e.ajax_task=jQuery("#rate_ajax_task").val(),jQuery.ajax({type:"POST",url:jQuery("#"+i).attr("action"),data:e,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.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(){0<t.find("#bwg_comment_privacy_policy").length&&(t.find("#bwg_comment_privacy_policy").prop("checked",!1),comment_check_privacy_policy()),bwg_captcha_refresh("bwg_captcha"),jQuery(".bwg_spider_ajax_loading").hide()},error:function(){}}),!1}function bwg_remove_comment(t){var e=jQuery("#bwg_comment_form").attr("action"),i={ajax_task:"delete_comment"};return i.id_image=jQuery("#bwg_popup_image").attr("image_id"),i.id_comment=t,jQuery.ajax({url:e,type:"POST",dataType:"json",data:i,success:function(e){0==e.error&&jQuery("#bwg_comment_block_"+t).fadeOut("slow").remove()},beforeSend:function(){},complete:function(){},error:function(){}}),!1}function bwg_gallery_box(e,t,i,a){jQuery(".bwg-validate").each(function(){jQuery(this).on("keypress change",function(){jQuery(this).parent().next().find(".bwg_comment_error").html("")})}),void 0===i&&(i=!1);var r,_=t.data("bwg");r=t.find(".bwg-container").data("lightbox-url")?t.find(".bwg-container").data("lightbox-url"):t.data("lightbox-url");var o=jQuery("#bwg_tag_id_"+_).val();o=o||0;var s=1==i?"&open_ecommerce=1":"",l=jQuery("#bwg_search_input_"+_).val(),n=jQuery("#bwg_order_"+_).val()?"&filtersortby="+jQuery("#bwg_order_"+_).val():"";l=l||"",void 0!==a&&(r+="&gallery_id="+a);var g="",u=jQuery("#bwg_blog_style_share_buttons_"+e).attr("data-open-comment");void 0!==u&&!1!==u&&(g="&open_comment=1"),spider_createpopup(r+"&image_id="+e+"&filter_tag="+o+s+g+"&filter_search_name="+l+n,_,t.data("popup-width"),t.data("popup-height"),1,"testpopup",5,t.data("buttons-position"))}function bwg_change_image_lightbox(e,a,r,t){if(bwg_current_key=gallery_box_data.bwg_current_key,jQuery(".bwg_image_info").css("height","auto"),setTimeout(function(){jQuery(".bwg_image_info_container1").height()<jQuery(".bwg_image_info").height()+jQuery(".bwg_toggle_container").height()+bwg_image_info_pos+2*parseInt(gallery_box_data.lightbox_info_margin)&&("top"==gallery_box_data.lightbox_ctrl_btn_pos&&jQuery(".bwg_image_info").css("top",bwg_image_info_pos+"px"),jQuery(".bwg_image_info").height(jQuery(".bwg_image_info_container1").height()-jQuery(".bwg_toggle_container").height()-bwg_image_info_pos-2*parseInt(gallery_box_data.lightbox_info_margin)))},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]),1<i.length)for(jQuery(".pge_tabs").show(),k=0;k<i.length;k++)jQuery("#"+i[k]+"_li").show();else jQuery(".pge_tabs").hide();else jQuery("[name=type]").val("")}if(jQuery("#bwg_image_container").find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#bwg_image_container").find("video").each(function(){jQuery(this).trigger("pause")}),void 0===r&&(r=gallery_box_data.data),void 0!==r[a]&&void 0!==r[e]){if(jQuery(".bwg_play_pause").length&&!jQuery(".bwg_play_pause").hasClass("bwg-icon-play")&&bwg_play(r),t||jQuery("#bwg_current_image_key").val(a),gallery_box_data.bwg_trans_in_progress)return void gallery_box_data.event_stack.push(e+"-"+a);var _="right";if(bwg_current_key>a)_="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,bwg_objectsL10n.is_pro&&(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)),gallery_box_data.popup_enable_rate&&(jQuery("#bwg_rate_form input[name='image_id']").val(r[a].id),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)),spider_set_input_value("rate_ajax_task","
1save_hit_count"),spider_rate_ajax_save("bwg_rate_form"),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('<span style="display: block;" />').html(r[a].alt).text()),jQuery(".bwg_image_description").html(jQuery('<span style="display: block;" />').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 o=2==jQuery(".bwg_popup_image_spun").css("zIndex")?".bwg_popup_image_spun":".bwg_popup_image_second_spun",s=".bwg_popup_image_second_spun"==o?".bwg_popup_image_spun":".bwg_popup_image_second_spun",l=-1<r[a].filetype.indexOf("EMBED_"),n=-1<r[a].filetype.indexOf("INSTAGRAM_POST"),g=-1<r[a].filetype.indexOf("INSTAGRAM_VIDEO"),u=-1!==jQuery.inArray(r[a].filetype,["EMBED_OEMBED_YOUTUBE_VIDEO","EMBED_OEMBED_VIMEO_VIDEO","EMBED_OEMBED_FACEBOOK_VIDEO","EMBED_OEMBED_DAILYMOTION_VIDEO"]),d=jQuery(o).height(),c=jQuery(o).width(),h='<span class="bwg_popup_image_spun1" style="display: '+(l?"block":"table")+'; width: inherit; height: inherit;"><span class="bwg_popup_image_spun2" style="display:'+(l?"block":"table-cell")+'; vertical-align: middle;text-align: center;height: 100%;">';if(l){if(jQuery("#bwg_download").addClass("hidden"),h+='<span class="bwg_popup_embed bwg_popup_watermark" style="display: '+(u?"block":"table")+'; table-layout: fixed; height: 100%;">'+(g?'<div class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)" ><div class="bwg_inst_play"></div></div>':" "),n){var b=0,p=0;d<c+88?b=(p=d)-88:p=(b=c)+88,h+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame","data-width":r[a].image_width,"data-height":r[a].image_height,frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:"+b+"px; height:"+p+"px; vertical-align:middle; display:inline-block; position:relative;"})}else h+=spider_display_embed(r[a].filetype,r[a].image_url,r[a].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"display:"+(u?"block":"table-cell")+"; width:inherit; height:inherit; vertical-align:middle;"});h+="</span>"}else jQuery(".bwg-loading").removeClass("hidden"),jQuery("#bwg_download").removeClass("hidden"),h+='<img style="max-height: '+d+"px; max-width: "+c+'px;" class="bwg_popup_image bwg_popup_watermark" src="'+gallery_box_data.site_url+jQuery('<span style="display: block;" />').html(r[a].image_url).text()+'" alt="'+r[a].alt+'" />';function m(){gallery_box_data.preload_images&&bwg_preload_images(a),window["bwg_"+gallery_box_data.bwg_image_effect](o,s,_),jQuery(o).find(".bwg_fb_video").each(function(){jQuery(this).attr("src","")}),l?jQuery("#bwg_fullsize_image").attr("href",r[a].image_url):(jQuery("#bwg_fullsize_image").attr("href",gallery_box_data.site_url+r[a].image_url),jQuery("#bwg_download").attr("href",gallery_box_data.site_url+r[a].thumb_url.replace("/thumb/","/.original/")));var e=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)+"="+r[a].id+encodeURIComponent("#bwg"+gallery_box_data.gallery_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].image_url));i=i.replace(/%252F/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/share?url="+t),jQuery("#bwg_google_a").attr("href","https://plus.google.com/share?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")&&(0==r[a].comment_count?jQuery("#bwg_added_comments").hide():(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_move_filmstrip(),bwg_resize_instagram_post()}if(h+="</span></span>",jQuery(s).html(h),jQuery(s).find("img").on("load error",function(){jQuery(".bwg-loading").addClass("hidden")}),jQuery(".bwg_popup_embed > .bwg_embed_frame > img, .bwg_popup_embed > .bwg_embed_frame > video").css({maxWidth:c,maxHeight:d,height:"auto"}),l)m();else jQuery(s).find("img").one("load",function(){m()}).each(function(){this.complete&&jQuery(this).load()})}}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<a;_++){var o=1;do{var s=(e+_*o+i)%i;if(void 0!==t[s])-1<t[s].filetype.indexOf("EMBED_")||jQuery("<img/>
1").attr("src",gallery_box_data.site_url+jQuery('<span style="display: block;" />').html(t[s].image_url).text());o*=-1,r++}while(1!=o)}}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[e]&&0!=gallery_box_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({scrollInertia:150,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()-40},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()-40},100)),bwg_set_filmstrip_pos(jQuery(".spider_popup_wrap").width()-40,"",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()-40},100),bwg_set_filmstrip_pos(jQuery(".bwg_filmstrip_container").width()-40,"",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=j
1Query(".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)-40}),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-40,"",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)-40}),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?"comment_container_width":0)-40,"",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","bwg_ctrl_btn 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_he
1ight:0)},{duration:500,complete:function(){bwg_change_watermark_container(),jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),jQuery(".bwg_popup_embed > .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()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<window.innerHeight&&jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close")}}),"width"==gallery_box_data.width_or_height?(jQuery(".bwg_filmstrip_container").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({width:bwg_popup_current_width-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-40},500),bwg_set_filmstrip_pos(bwg_popup_current_width-40,"",gallery_box_data)):(jQuery(".bwg_filmstrip_container").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)},500),jQuery(".bwg_filmstrip").animate({height:bwg_popup_current_height-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-40},500),bwg_set_filmstrip_pos(bwg_popup_current_height-40,"",gallery_box_data)),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)):(bwg_popup_current_width=jQuery(window).width(),bwg_popup_current_height=window.innerHeight,jQuery("#spider_popup_wrap").animate({width:jQuery(window).width(),height:window.innerHeight,left:0,top:0,margin:0,zIndex:100002},500),jQuery(".bwg_image_wrap").animate({width:jQuery(window).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: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_change_watermark_container()}}),jQuery(".bwg_popup_embed > .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)-40},500),bwg_set_filmstrip_pos(jQuery(window).width()-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-40,"",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)-40},500),bwg_set_filmstrip_pos(window.innerHeight-("horizontal"==gallery_box_data.filmstrip_direction?e:0)-40,"",gallery_box_data)),jQuery(".bwg_resize-full").attr("class","bwg-icon-compress bwg_ctrl_bt
1n bwg_resize-full"),jQuery(".bwg_resize-full").attr("title",bwg_objectsL10n.bwg_restore),jQuery(".spider_popup_close").attr("class","bwg_ctrl_btn spider_popup_close_fullscreen"))}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_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-40})),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_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-40})),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_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-40})),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-40})),bwg_popup_current_width=jQuery(window).width()),bwg_resize_instagram_post(),bwg_change_watermark_container(),window.innerHeight>gallery_box_data.image_height-2*gallery_box_data.lightbox_close_btn_top&&jQuery(window).width()>=gallery_box_data.image_width-2*gallery_box_data.lightbox_close_btn_right&&1!=gallery_box_data.open_with_fullscreen?jQuery(".spider_popup_close_fullscreen").attr("class","spider_popup_close"):jQuery("#spider_popup_wrap").width()<jQuery(window).width()&&jQuery("#spider_popup_wrap").height()<jQuery(window).height()&&jQuery(".spider_popup_close").attr("class","bwg_ctrl_bt
1n spider_popup_close_fullscreen");var t=gallery_box_data.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.";0!=i&&""!=i&&(r=parseFloat(i).toFixed(1)+"\n Votes: "+t),void 0!==jQuery().raty&&jQuery.isFunction(jQuery().raty)&&jQuery("#bwg_star").raty({score:function(){return jQuery(this).attr("data-score")},starType:"i",number:lightbox_rate_stars_count,size:lightbox_rate_size,readOnly:function(){return!!e},noRatedMsg:"Not rated yet.",click:function(t,e){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")).then(function(){gallery_box_data.data[a].rate=t,++gallery_box_data.data[a].rate_count;var e=parseFloat(jQuery("#bwg_star").attr("data-score"));gallery_box_data.data[a].avg_rating=e?((e+t)/2).toFixed(1):t.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)})},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})}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[jQuery("#bwg_current_image_key").val()].pricelist_manual_price?gallery_box_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]),o=r[0],s=Number(jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val());if("4"==a||"5"==a){var l=parseFloat(o+_);jQuery(e).closest(".image_selected_parameter").find(".already_selected_values").val(l)}else if("6"==a){if(0==jQuery(e).is(":checked"))var n=s-parseFloat(o+_);else n=s+parseFloat(o+_);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={};0<jQuery(this).val()&&(e.id=jQuery(this).closest("tr").attr("data-id"),e.price=jQuery(this).closest("tr").attr("data-price"),e.count=jQuery(this).val(),r.push(e))});if(0==(t.downloadItems=r).length)return void jQuery(".add_to_cart_msg").html("Please select at least one item")}var _=jQuery("#ajax_url").val(),o={action:"add_cart",task:"add_cart",controller:"checkout",image_id:jQuery("#bwg_popup_image").attr("image_id"),t
1ype:e,data:JSON.stringify(t)};jQuery.ajax({type:"POST",url:_,data:o,success:function(e){responseData=JSON.parse(e),jQuery(".add_to_cart_msg").html(responseData.msg),jQuery(".products_in_cart").html(responseData.products_in_cart),1==responseData.redirect&&(window.location.href="<?php echo get_permalink($options->checkout_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),i<e+t&&(endPoint=i);for(var a=startPoint;a<=endPoint;a++){var r=jQuery("#bwg_filmstrip_thumbnail_"+a+" img");r.removeClass("hidden"),r.attr("src",r.data("url"))}}function bwg_load_filmstrip(){for(var e=1;e<=total_thumbnail_count;e++){var t;if(leftIndex=startPoint-e,rightIndex=endPoint+e,rightIndex<total_thumbnail_count)(t=jQuery("#bwg_filmstrip_thumbnail_"+rightIndex+" img")).removeClass("hidden"),t.attr("src",t.data("url"));if(0<=leftIndex)(t=jQuery("#bwg_filmstrip_thumbnail_"+leftIndex+" img")).removeClass("hidden"),t.attr("src",t.data("url"))}jQuery(".bwg_filmstrip_thumbnail").each(function(){var e,t=jQuery(this).find("img");void 0===t.attr("style")&&(0==t.width()?t.on("load",function(){e=jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(t,e)}):(e=jQuery(this).find(".bwg_filmstrip_thumbnail_img_wrap"),bwg_filmstrip_thumb_view(t,e)))})}function bwg_filmstrip_thumb_view(e,t){var i=gallery_box_data.image_filmstrip_height,a=gallery_box_data.image_filmstrip_width,r=a-gallery_box_data.filmstrip_thumb_right_left_space,_=i,o=Math.max(a/e.width(),i/e.height()),s=e.width()*o,l=e.height()*o;e.css({width:s,height:l,marginLeft:(r-s)/2,marginTop:(_-l)/2})}function spider_display_embed(e,t,i,a){var r="";switch(e){case"EMBED_OEMBED_YOUTUBE_VIDEO":var _="<iframe ";for(attr in""!=i&&(_+=' src="//www.youtube.com/embed/'+i+'?enablejsapi=1&wmode=transparent"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(_+=" "+attr+'="'+a[attr]+'"');r+=_+=" ></iframe>";break;case"EMBED_OEMBED_VIMEO_VIDEO":var o="<iframe ";for(attr in""!=i&&(o+=' src="//player.vimeo.com/video/'+i+'?enablejsapi=1"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(o+=" "+attr+'="'+a[attr]+'"');r+=o+=" ></iframe>";break;case"EMBED_OEMBED_FLICKR_IMAGE":var s="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(s+=" "+attr+'="'+a[attr]+'"');s+=" >",""!=i&&(s+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto !important; height:auto !important;">'),r+=s+="</div>";break;case"EMBED_OEMBED_FLICKR_VIDEO":break;case"EMBED_OEMBED_INSTAGRAM_VIDEO":var l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=i&&(l+='<video style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls><source src="'+i+'" type="video/mp4"> Your browser does not support the video tag. </video>'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_IMAGE":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');l+=" >",""!=i&&(l+='<img src="//instagram.com/p/'+i+'/media/?size=l" style=" max-width:100% !important; max-height:100% !important; width:auto; height:auto;">'),r+=l+="</div>";break;case"EMBED_OEMBED_INSTAGRAM_POST":l="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"',"CLASS"!=attr&&"class"!=attr&&"Class"!=attr||(obj_class=a[attr]));l+=" >",""!=i&&(l+='<iframe class="inner_instagram_iframe_'+obj_class+'" src="//instagr.am/p/'+i+'/embed/?enablejsapi=1" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'),r+=l+="</div>";break;case"EMBED_OEMBED_FACEBOOK_IMAGE":var n="<span ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(n+=" "+attr+'="'+a[attr]+'"');n+=" >",""!=i&&(n+='<img src="'+t+'" style=" max-width:100% !important; max-height:100% !important; width:auto; height:100%;">'),r+=n+="</span>";break;case"EMBED_OEMBED_FACEBOOK_VIDEO":var g="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(g+=" "+attr+'="'+a[attr]+'"');g+=" >",""!=i&&(g+='<iframe src="//www.facebook.com/video/embed?video_id='+t+'&enablejsapi=1&wmode=transparent" style="max-width:100% !important; max-height:100% !important; width:100%; height:100%; margin:0; display:table-cell; vertical-align:middle;"frameborder="0" class="bwg_fb_video" scrolling="no" allowtransparency="false" allowfullscreen></iframe>'),r+=g+="</div>";break;case"EMBED_OEMBED_DAILYMOTION_VIDEO":var u="<iframe ";for(attr in""!=i&&(u+=' src="//www.dailymotion.com/embed/video/'+i+'?api=postMessage"'),a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(u+=" "+attr+'="'+a[attr]+'"');r+=u+=" ></iframe>";break;case"EMBED_OEMBED_IMGUR":var d="<div ";for(attr in a)/src/i.test(attr)||""!=attr&&""!=a[attr]&&(l+=" "+attr+'="'+a[attr]+'"');d+=" >",""!=i&&(d+='<img src="'+i+'" style="max-width:100% !important; max-height:100% !important; width:auto; height:auto !important;">'),r+=d+="</div>"}return r}function bwg_add_instagram_gallery(e,o){if(!0===(o=void 0!==o&&o)){if
1(bwg_check_instagram_gallery_input(e,o))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,o))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 s=[],_={action:"addInstagramGallery",instagram_user:i,instagram_access_token:e,whole_post:t,autogallery_image_number:a,update_flag:r,async:!0};jQuery.post(ajax_url,_,function(e){if(0==e)return alert("Error: cannot get response from the server."),jQuery("#loading_div").hide(),o&&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(),o&&jQuery("#bulk_embed").show(),!1;if(e=e.substring(t+18,i),response_JSON=jQuery.parseJSON(e),response_JSON){if("error"==response_JSON[0])return alert("Error: "+jQuery.parseJSON(e)[1]),jQuery("#loading_div").hide(),o&&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];s.push(_)}return bwg_add_image(s),o||(bwg_gallery_update_flag(),jQuery("#tr_instagram_gallery_add_button").hide()),jQuery("#loading_div").hide(),o&&jQuery(".opacity_bulk_embed").hide(),"ok"}return alert("There is some error. Cannot add Instagram gallery."),jQuery("#loading_div").hide(),o&&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_params=[],bwg_params_ib=[],bwg_params_carousel=[];function bwg_main_ready(){jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&bwg_container_loaded(jQuery(this).data("bwg"))}),bwg_document_ready(),jQuery(".bwg-thumbnails, .bwg-masonry-thumbn
1ails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}),bwg_slideshow_ready(),bwg_carousel_ready(),bwg_carousel_onload(),bwg_image_browser_ready()}function bwg_resize_search_line(){jQuery(".search_line").each(function(){var e=jQuery(this);e.width()<410?e.addClass("bwg-search-line-responsive"):e.removeClass("bwg-search-line-responsive")})}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()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)})})}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()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)}),bwg_container_loaded(bwg)})}function bwg_blog_style_ready(){jQuery(".bwg_blog_style").each(function(){var e=jQuery(this).attr("data-bwg");bwg_container_loaded(e);var t=!1;jQuery(this).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"),!t)return t=!0,setTimeout(function(){t=!1},100),bwg_gallery_box(e,jQuery(this).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox_"+e+" .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!t)return t=!0,setTimeout(function(){t=!1},100),bwg_gallery_box(jQuery(this).attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1});var i=window.location.hash.substring(1);i&&"-1"!=i.indexOf("bwg")&&(bwg_hash_array=i.replace("bwg","").split("/"),"<?php echo $params_array['gallery_id']; ?>"==bwg_hash_array[0]&&bwg_gallery_box(bwg_hash_array[1]))})}function bwg_slideshow_focus(){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=[],window.clearInterval(window["bwg_playInterval"+bwg]),jQuery(".bwg_ctrl_btn_"+bwg).hasClass("bwg-icon-play")||bwg_play(bwg_params[bwg].data,bwg))})}function bwg_slideshow_blur(){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=[],window.clearInterval(window["bwg_playInterval"+bwg]))})}function bwg_carousel_ready(){jQuery(".bwg-carousel").each(function(){var t=jQuery(this).data("bwg");bwg_params_carousel[t]=[],bwg_params_carousel[t].bwg_currentCenterNum=1,bwg_params_carousel[t].bwg_currentlyMoving=!1,bwg_params_carousel[t].data=[],jQuery("#spider_carousel_left-ico_"+t).on("click",function(){bwg_params_carousel[t].carousel.prev()}),jQuery("#spider_carousel_right-ico_"+t).on("click",function(){bwg_params_carousel[t].carousel.next()}),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_bt
1n_"+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()}),void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+t).swiperight(function(){bwg_params_carousel[t].carousel.prev()}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+t).swipeleft(function(){bwg_params_carousel[t].carousel.next()})})}function bwg_carousel_resize(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");bwg_carousel_params(e),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(){jQuery(".bwg-carousel").each(function(){var e=jQuery(this).data("bwg");bwg_params_carousel[e]=jQuery(this).data("params"),bwg_carousel_watermark(e),bwg_carousel_params(e),bwg_container_loaded(e)})}function bwg_carousel_params(t){var e=jQuery("#bwg_container1_"+t).parent().width(),i=1;e<bwg_params_carousel[t].carousel_r_width?i=e/bwg_params_carousel[t].carousel_r_width:e=bwg_params_carousel[t].carousel_r_width,bwg_params_carousel[t].carousel_image_column_number>bwg_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[t].image_width/parseInt(e.attr("data-width"))?(e.height(bwg_params_carousel[t].image_height*i),e.width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(bwg_params_carousel[t].image_width*i),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),jQuery(".bwg_carousel_image_container_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_watermark_text_"+t+", .bwg_carousel_watermark_text_"+t+":hover").css({fontSize:e*(bwg_params_carousel[t].watermark_font_size/bwg_params_carousel[t].image_width)*i}),jQuery(".bwg_carousel-image "+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_watermark_container_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_embed_video_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel_watermark_spun_"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_carousel-container"+t).css({width:e,height:bwg_params_carousel[t].image_height*i}),jQuery(".bwg_video_hide"+t).css({width:bwg_params_carousel[t].image_width*i,height:bwg_params_carousel[t].image_height*i}),bwg_params_carousel[t].carousel=jQuery("#bwg_carousel"+t).featureCarousel({containerWidth:e*i,containerHeight:bwg_params_carousel[t].image_height*i,fit_containerWidth:bwg_params_carousel[t].carousel_fit_containerWidth,largeFeatureWidth:bwg_params_carousel[t].image_width*i,largeFeatureHeight:bwg_params_carousel[t].image_height*i,smallFeaturePar:bwg_params_carousel[t].carousel_image_par,currentlyMoving:!1,startingFeature:bwg_params_carousel[t].bwg_currentCenterNum,featuresArray:[],timeoutVar:null,rotationsRemaining:0,autoPlay:1e3*bwg_params_carousel[t].car_inter,interval:1e3*bwg_params_carousel[t].carousel_interval,imagecount:bwg_params_carousel[t].carousel_image_column_number,bwg_number:t,enable_image_title:bwg_params_carousel[t].enable_image_title,borderWidth:0})}function bwg_carousel_watermark(e){var t=1,i=jQuery("#bwg_container1_"+e).parent().width();if(i<bwg_params_carousel[e].carousel_r_width&&(t=i/bwg_params_carousel[e].carousel_r_width),i>=bwg_params_carousel[e].image_width)bwg_carousel_change_watermark_container(e),jQuery("#bwg_carousel_play_pause-ico_"+e).
1css({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_play_pause-ico_"+e).css({fontSize:i*bwg_params_carousel[e].carousel_play_pause_btn_size/a}),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(){jQuery(".bwg_slideshow").each(function(){var i=jQuery(this).data("bwg");if(jQuery("#bwg_slideshow_image_container_"+i).length){bwg_params[i]=JSON.parse(jQuery("#bwg_slideshow_image_container_"+i).attr("data-params")),bwg_params[i].event_stack=[],bwg_container_loaded(i);var e=bwg_params[i].data;void 0!==jQuery().swiperight&&jQuery.isFunction(jQuery().swiperight)&&jQuery("#bwg_container1_"+i).swiperight(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),0<=parseInt(jQuery("#bwg_current_image_key_"+i).val())-bwg_iterator(i)?(parseInt(jQuery("#bwg_current_image_key_"+i).val())-bwg_iterator(i))%e.length:e.length-1,e,"",i),!1}),void 0!==jQuery().swipeleft&&jQuery.isFunction(jQuery().swipeleft)&&jQuery("#bwg_container1_"+i).swipeleft(function(){return bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),parseInt(j
1Query("#bwg_current_image_key_"+i).val())+bwg_iterator(i)%e.length,e,"",i),!1});var t=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase())?"touchend":"click";bwg_popup_resize(i),jQuery(".bwg_slideshow_watermark_"+i).css({display:"none"}),jQuery(".bwg_slideshow_title_text_"+i).css({display:"none"}),jQuery(".bwg_slideshow_description_text_"+i).css({display:"none"}),setTimeout(function(){bwg_change_watermark_container(i)},500),"horizontal"==bwg_params[i].filmstrip_direction?jQuery(".bwg_slideshow_image_container_"+i).height(jQuery(".bwg_slideshow_image_wrap_"+i).height()-bwg_params[i].slideshow_filmstrip_height):jQuery(".bwg_slideshow_image_container_"+i).width(jQuery(".bwg_slideshow_image_wrap_"+i).width()-bwg_params[i].slideshow_filmstrip_width);var a=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";jQuery(".bwg_slideshow_filmstrip_"+i).bind(a,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_"+i).trigger("click"):jQuery(".bwg_slideshow_filmstrip_right_"+i).trigger("click"),!1}),jQuery(".bwg_slideshow_filmstrip_right_"+i).on(t,function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).stop(!0,!1),"left"==bwg_params[i].left_or_top?"width"==bwg_params[i].width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1,filter:"Alpha(opacity=100)"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3,filter:"Alpha(opacity=30)"})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1,filter:"Alpha(opacity=100)"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3,filter:"Alpha(opacity=30)"})},500)):"width"==bwg_params[i].width_or_height?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1,filter:"Alpha(opacity=100)"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width()-parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top-parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).width()-jQuery(".bwg_slideshow_filmstrip_"+i).width())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3,filter:"Alpha(opacity=30)"})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>=-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&
1(jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:1,filter:"Alpha(opacity=100)"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height()-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)))?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top-(parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width))},500,"linear")),window.setTimeout(function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top==-(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).height()-jQuery(".bwg_slideshow_filmstrip_"+i).height())&&jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:.3,filter:"Alpha(opacity=30)"})},500))}),jQuery(".bwg_slideshow_filmstrip_left_"+i).on(t,function(){jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).stop(!0,!1),"left"==bwg_params[i].left_or_top?(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left<0&&(jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:1,filter:"Alpha(opacity=100)"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left>-(bwg_params[i].filmstrip_thumb_margin_hor+bwg_params[i].slideshow_filmstrip_width)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({left:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left+parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().left&&jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:.3,filter:"Alpha(opacity=30)"})},500)):(jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top<0&&(jQuery(".bwg_slideshow_filmstrip_right_"+i).css({opacity:1,filter:"Alpha(opacity=100)"}),jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top>-(bwg_params[i].filmstrip_thumb_margin_hor+bwg_params[i].slideshow_filmstrip_width)?jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:0},500,"linear"):jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).animate({top:jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top+parseInt(bwg_params[i].filmstrip_thumb_margin_hor)+parseInt(bwg_params[i].slideshow_filmstrip_width)},500,"linear")),window.setTimeout(function(){0==jQuery(".bwg_slideshow_filmstrip_thumbnails_"+i).position().top&&jQuery(".bwg_slideshow_filmstrip_left_"+i).css({opacity:.3,filter:"Alpha(opacity=30)"})},500))}),"width"==bwg_params[i].width_or_height?bwg_set_filmstrip_pos(jQuery(".bwg_slideshow_filmstrip_"+i).width(),i):bwg_set_filmstrip_pos(jQuery(".bwg_slideshow_filmstrip_"+i).height(),i),jQuery("#bwg_slideshow_play_pause_"+i).off(t).on(t,function(){jQuery(".bwg_ctrl_btn_"+i).hasClass("bwg-icon-play")?(bwg_play(bwg_params[i].data,i),jQuery(".bwg_slideshow_play_pause_"+i).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-pause bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&document.getElementById("bwg_audio_"+i).play()):(window.clearInterval(window["bwg_playInterval"+i]),jQuery(".bwg_slideshow_play_pause_"+i).attr("title","Play"),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-play bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&document.getElementById("bwg_audio_"+i).pause())}),0!=bwg_params[i].enable_slideshow_autoplay&&(bwg_play(bwg_params[i].data,i),jQuery(".bwg_slideshow_play_pause_"+i).attr("title",bwg_objectsL10n.pause),jQuery(".bwg_slideshow_play_pause_"+i).attr("class","bwg-icon-pause bwg_ctrl_btn_"+i+" bwg_slideshow_play_pause_"+i),1==bwg_params[i].enable_slideshow_music&&jQuery("#bwg_audio_"+i).length&&document.getElementById("bwg_audio_"+i).play()),bwg_params[i].preload_images&&bwg_preload_images(parseInt(j
1Query("#bwg_current_image_key_".$bwg).val()),i),jQuery(".bwg_slideshow_image_"+i).removeAttr("width"),jQuery(".bwg_slideshow_image_"+i).removeAttr("height")}})}function bwg_image_browser_resize(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery("#bwg_container1_"+e+" .image_browser_images_conteiner_"+e).attr("data-params")),bwg_image_browser(e))})}function bwg_image_browser_ready(){jQuery(".bwg_image_browser").each(function(){var e=jQuery(this).attr("data-bwg");bwg_container_loaded(e),jQuery(".image_browser_images_conteiner_"+e).length&&(bwg_params_ib[e]=JSON.parse(jQuery(".image_browser_images_conteiner_"+e).attr("data-params")),setTimeout(function(){bwg_image_browser(e)},3))})}function bwg_search_focus(e){jQuery(e).parent().find(".bwg_search_input").focus(),jQuery(e).hide()}function bwg_key_press(e){jQuery(e).parent().find(".bwg_search_reset_container").removeClass("hidden"),jQuery(e).parent().find(".bwg_search_loupe_container1").removeClass("hidden")}function bwg_all_thumnails_loaded(t){var i=0,a=jQuery(t).find("img").length;
1return 0==a?bwg_all_thumbnails_loaded_callback(t):jQuery(t).find("img").each(function(){var e=jQuery(this).attr("src");jQuery("<img/>").attr("src",e).on("load error",function(){++i>=a&&bwg_all_thumbnails_loaded_callback(t)})}),0==a}function bwg_all_thumbnails_loaded_callback(e){jQuery(e).hasClass("bwg-thumbnails")&&bwg_thumbnail(e),jQuery(e).hasClass("bwg-masonry-thumbnails")&&bwg_thumbnail_masonry(e),jQuery(e).hasClass("bwg-album-extended")&&bwg_album_extended(e)}function bwg_container_loaded(e){jQuery("#gal_front_form_"+e).removeClass("bwg-hidden"),jQuery("#ajax_loading_"+e).addClass("bwg-hidden")}function bwg_album_thumbnail(e){bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_album_extended(e){var t=jQuery(e).width(),i=jQuery(e).data("thumbnail-width"),a=jQuery(e).data("spacing"),r=jQuery(e).data("max-count"),_=parseInt(t/(2*i));_<1&&(_=1),r<_&&(_=r);var o=100/_,s=jQuery(e).find(".bwg-extended-item"),l=parseInt(s.css("margin-left")),n=parseInt(s.css("margin-right"));s.css({width:"calc("+o+"% - "+(l+n)+"px)"}),s.width()<i?s.find(".bwg-extended-item0, .bwg-extended-item1").css({width:"calc(100% - "+a+"px)"}):s.width()>2*i?(s.find(".bwg-extended-item0").css({width:"calc(50% - "+a+"px)"}),s.find(".bwg-extended-item1").css({width:"calc(100% - "+(i+2*a)+"px)"})):s.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");i.width()/i.height()>e.width()/e.height()?i.width()>e.width()?e.css({width:"100%"}):e.css({maxWidth:"100%"}):i.height()>e.height()?e.css({height:"100%"}):e.css({maxHeight:"100%"}),jQuery(this).find(".bwg-item2").css({marginLeft:(t.width()-e.width())/2,marginTop:(t.height()-e.height())/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;a<r&&(r=a);var _=100/r;jQuery(e).find(".bwg-item").css({width:_+"%"}),jQuery(e).children(".bwg-item").each(function(){var e=jQuery(this).find("img"),t=jQuery(this).find(".bwg-item2");t.width()/t.height()>e.width()/e.height()?t.width()>e.width()?e.css({width:"100%"}):e.css({maxWidth:"100%"}):t.height()>e.height()?e.css({height:"100%"}):e.css({maxHeight:"100%"}),jQuery(this).find(".bwg-item2").css({marginLeft:(t.width()-e.width())/2,marginTop:(t.height()-e.height())/2})}),bwg_container_loaded(jQuery(e).data("bwg"))}function bwg_thumbnail_masonry(e){var t=jQuery(e);if(t.find(".bwg-empty-item").remove(),"horizontal"==t.data("masonry-type")){var a=t.data("thumbnail-height"),r=t.data("max-count"),_=[];for(i=0;i<r;i++)_.push(0);t.find(".bwg-item").each(function(){var e=_.indexOf(Math.min.apply(Math,_));jQuery(this).css({height:a,order:e+1}),_[e]+=jQuery(this)[0].getBoundingClientRect().width});var o=Math.max.apply(Math,_);for(t.width(o),i=0;i<r;i++)_[i]<o&&t.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({height:a,order:i+1,width:o-_[i]}))}else{t.removeAttr("style");o=t.width();var s=t.data("thumbnail-width"),l=(r=t.data("max-count"),parseInt(o/s)+("0"==t.data("resizable-thumbnails")?0:1));r<l&&(l=r);var n=t.find(".bwg-item").length;n<l&&(l=n);var g=100/l,u=[];for(i=0;i<l;i++)u.push(0);t.find(".bwg-item").each(function(){var e=u.indexOf(Math.min.apply(Math,u));jQuery(this).css({width:g+"%",order:e+1}),u[e]+=jQuery(this)[0].getBoundingClientRect().height});var d=Math.max.apply(Math,u);for(i=0;i<l;i++)u[i]<d&&t.append(jQuery('<div class="bwg-item bwg-empty-item"></div>').css({width:g+"%",order:i+1,height:d-u[i]}));t.outerWidth(l*s),t.height(d)}bwg_container_loaded(t.data("bwg"))}function bwg_thumbnail_mosaic(e){var t=jQuery(e),r=t.attr("data-bwg"),i=t.attr("data-block-id"),a=parseInt(t.attr("data-thumb-padding"))/2,_=parseInt(t.attr("data-thumb-border"))+a;if("horizontal"==t.attr("data-mosaic-direction")){var o=parseInt(t.attr("data-height"));if("1"==t.attr("data-resizable"))if(1920<=jQuery(window).width())var s=(1+jQuery(window).width()/1920)*o;else if(jQuery(window).width()<=640)s=jQuery(window).width()/640*o;else s=o;else s=o;(y=jQuery(".bwg_mosaic_thumb_"+r)).each(function(e){var t=y.get(e).naturalWi
1dth,i=y.get(e).naturalHeight;t=t*s/i,y.eq(e).height(s),y.eq(e).width(t)});var l=jQuery("#bwg_mosaic_thumbnails_div_"+r).width()/100*parseInt(t.attr("data-total-width"));jQuery("#"+i).width(l);var n=s+2*_,g=0,u=[];u[0]=0;var d=[],c=d[0]=0;y.each(function(e){row_cum_width2=c+y.eq(e).width()+2*_,row_cum_width2-l<0?(c=row_cum_width2,u[e]=g,d[g]++):e!==y.length-1?Math.abs(c-l)>Math.abs(row_cum_width2-l)||Math.abs(c-l)<=Math.abs(row_cum_width2-l)&&0==d[g]?e!==y.length-2?(c=row_cum_width2,u[e]=g,d[g]++,d[++g]=0,c=0):(c=row_cum_width2,u[e]=g,d[g]++):(d[++g]=1,u[e]=g,c=row_cum_width2-c):(c=row_cum_width2,u[e]=g,d[g]++)});for(var h=[],b=[],p=0;p<=g;p++)h[p]=1,b[p]=n;for(p=0;p<=g;p++)c=0,y.each(function(e){u[e]==p&&(c+=y.eq(e).width())}),h[p]=k=(l-2*d[p]*_)/c,b[p]=(n-2*_)*h[p]+2*_;(M=[])[0]=0;var m=[],w=[];m[0]=0,w[0]=0;for(p=1;p<=g;p++)m[p]=m[0],w[p]=w[p-1]+b[p-1];y.each(function(e){var t=y.eq(e).width(),i=y.eq(e).height();y.eq(e).width(t*h[u[e]]),y.eq(e).height(i*h[u[e]]),y.eq(e).parent().css({top:w[u[e]],left:m[u[e]]}),m[u[e]]+=t*h[u[e]]+2*_,M[u[e]]=e}),jQuery("#"+i).height(w[g]+b[g]-w[0])}else{var y,f=parseInt(t.attr("data-width"));if("1"==t.attr("data-resizable"))if(1920<=jQuery(window).width())var j=(1+jQuery(window).width()/1920)*f;else if(jQuery(window).width()<=640)j=jQuery(window).width()/640*f;else j=f;else j=f;(y=jQuery(".bwg_mosaic_thumb_"+r)).each(function(e){var t=y.get(e).naturalWidth,i=y.get(e).naturalHeight;y.eq(e).height(i*j/t),y.eq(e).width(j)});l=jQuery("#bwg_mosaic_thumbnails_div_"+r).width()/100*parseInt(t.attr("data-total-width"));jQuery("#"+i).width(l);var Q=j+2*_<l?j:l-2*_,v=Math.floor(l/(Q+2*_)),x=[];x[0]=0;for(var S=[],C=[],k=0;k<v;k++)C[k]=0,S[k]=0;y.each(function(e){for(var t=0,i=C[0],a=0;a<v;a++)i>C[a]&&(i=C[a],t=a);x[e]=t,S[t]++,A=i,D=0+t*(Q+2*_),y.eq(e).parent().css({top:A,left:D}),C[t]+=y.eq(e).height()+2*_}),(h=[])[0]=1;var E=0,I=[],z=0,T=0;for(k=0;k<v;k++)E+=Q,I[k]=0,y.each(function(e){x[e]==k&&(I[k]+=y.eq(e).height())}),0!=I[k]&&(z+=Q/I[k],T+=Q*S[k]*2*_/I[k]);var O=0;0!=z&&(O=(E+T)/z);for(k=0;k<v;k++)0!=I[k]&&(h[k]=(O-2*S[k]*_)/I[k]);var M,D=[];D[0]=0;for(k=1;k<=v;k++)D[k]=D[k-1]+Q*h[k-1]+2*_;var A=[];for(k=0;k<v;k++)A[k]=0;(M=[])[0]=0,y.each(function(e){var t=y.eq(e).width(),i=y.eq(e).height();y.eq(e).width(t*h[x[e]]),y.eq(e).height(i*h[x[e]]),y.eq(e).parent().css({top:A[x[e]],left:D[x[e]]}),A[x[e]]+=i*h[x[e]]+2*_,M[x[e]]=e}),jQuery("#"+i).width(D[v]).height(A[0])}jQuery(".bwg_mosaic_thumbnails_"+r).css({visibility:"visible"}),jQuery(".tablenav-pages_"+r).css({visibility:"visible"}),bwg_container_loaded(r),jQuery(".bwg_mosaic_thumb_"+r).removeClass("bwg-hidden"),jQuery("#bwg_mosaic_thumbnails_div_"+r).removeClass("bwg-hidden"),"hover"==t.attr("data-image-title")&&bwg_mosaic_title_on_hover(r,t,_),"hover"==t.attr("data-ecommerce-icon")&&(jQuery(".bwg_mosaic_thumb_spun_"+r).on("mouseenter",function(){var e=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+r).width(),t=jQuery(this).parents(".bwg-mosaic-thumb-span").children(".bwg_mosaic_thumb_"+r).height();jQuery(this).children(".bwg_ecommerce_spun1_"+r).width(e);var i=jQuery(this).children(".bwg_ecommerce_spun1_"+r).width(),a=jQuery(this).children(".bwg_ecommerce_spun1_"+r).height();jQuery(this).children(".bwg_ecommerce_spun1_"+r).css({top:_+.5*t-.5*a,left:_+.5*e-.5*i,opacity:1,filter:"Alpha(opacity=100)"})}),jQuery(".bwg_mosaic_thumb_spun_"+r).on("mouseleave",function(){jQuery(this).children(".bwg_ecommerce_spun1_"+r).css({top:0,left:-1e4,opacity:0,filter:"Alpha(opacity=0)",padding:t.attr("data-title-margin")})}))}function bwg_mosaic_title_on_hover(r,e,_){jQuery(".bwg-mosaic-thumb-span").on("mouseenter",function(){var e=jQuery(this).children(".bwg_mosaic_thumb_"+r).width(),t=jQuery(this).children(".bwg_mosaic_thumb_"+r).height();jQuery(this).find(".bwg_mosaic_title_spun1_"+r).width(e);var i=jQuery(this).find(".bwg_mosaic_title_spun1_"+r).width(),a=jQuery(this).find(".bwg_mosaic_title_spun1_"+r).height();jQuery(this).find(".bwg_mosaic_title_spun1_"+r).css({top:_+.5*t-.5*a<0?_:_+.5*t-.5*a,left:_+.5*e-.5*i,opacity:1,filter:"Alpha(opacity=100)","max-height":"calc(100% - "+2*_+"px)",overflow:"hidden"})}),jQuery(".bwg-mosaic-thumb-span").on("mouseleave",function(){jQuery(this).find(".bwg_mosaic_title_spun1_"+r).css({top:0,left:-1e4,opacity:0,filter:"Alpha(opacity=0)",padding:e.attr("data-title-margin"),"max-height":"calc(100% - "+2*_+"px)",overflow:"hidden"})})}function bwg_mosaic_ajax(e,t){var i=0;jQuery(".bwg_mosaic_thumb_spun_"+e+" img").on("load",function(){++i>=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>
1=t&&bwg_thumbnail_mosaic(jQuery(".bwg-mosaic-thumbnails[data-bwg="+e+"]"))})}function bwg_add_album(){var t=!1;jQuery(".bwg-album").off("click").on("click",function(){if(!t){var e=jQuery(this).attr("data-bwg");return t=!0,setTimeout(function(){t=!1},100),bwg_ajax("gal_front_form_"+e,e,jQuery(this).attr("data-container_id"),jQuery(this).attr("data-alb_gal_id"),jQuery(this).attr("data-album_gallery_id"),jQuery(this).attr("data-def_type"),"",jQuery(this).attr("data-title")),!1}}),jQuery(".bwg_description_more").on("click",function(){jQuery(this).hasClass("bwg_more")?(jQuery(this).parent().find(".bwg_description_full").show(),jQuery(this).addClass("bwg_hide").removeClass("bwg_more"),jQuery(this).html(jQuery(this).data("hide-msg"))):(jQuery(this).parent().find(".bwg_description_full").hide(),jQuery(this).addClass("bwg_more").removeClass("bwg_hide"),jQuery(this).html(jQuery(this).data("more-msg")))})}function bwg_add_lightbox(){var i=!1;jQuery(".bwg_lightbox .bwg-item0, .bwg_lightbox .bwg_slide, .bwg_lightbox .bwg-carousel-image").on("click",function(e){e.stopPropagation(),e.preventDefault();var t=jQuery(this).parent();if(!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(t).attr("data-image-id"),jQuery(t).closest(".bwg_container")),!1}),jQuery(".bwg_lightbox .bwg_ecommerce").on("click",function(e){if(e.stopPropagation(),!i)return i=!0,setTimeout(function(){i=!1},100),bwg_gallery_box(jQuery(this).closest(".bwg_lightbox").attr("data-image-id"),jQuery(this).closest(".bwg_container"),!0),!1})}function bwg_filter_by_tag(e){var t="",i=jQuery(e).parent().parent(),a=i.find(".current_view").val(),r=i.find(".form_id").val(),_=i.find(".cur_gal_id").val(),o=i.find(".album_gallery_id").val(),s=i.find(".type").val();jQuery(e).parent().find(".opt.selected").each(function(){t=t+jQuery(e).text()+","}),""==(t=t.slice(0,-1))&&(t=bwg_objectsL10n.bwg_select_tag),jQuery(e).parent().find(".CaptionCont").attr("title",t),jQuery(e).parent().find(".CaptionCont .placeholder").html(t),jQuery("#bwg_tag_id_"+a).val(jQuery("#bwg_tag_id_"+_).val()),bwg_select_tag(a,r,_,o,s,!1)}function bwg_document_ready(){bwg_add_lightbox(),jQuery('div[id^="bwg_container1_"]').each(function(){var e=jQuery(this);e.data("right-click-protection")&&bwg_disable_right_click(e),jQuery(".SumoSelect > .CaptionCont > label > i").addClass("bwg-icon-angle-down closed");var t=e.find(".search_tags");t.length&&(t.SumoSelect({triggerChangeCombined:!0,placeholder:bwg_objectsL10n.bwg_select_tag,search:!0,searchText:bwg_objectsL10n.bwg_search,forceCustomRendering:!0,noMatch:bwg_objectsL10n.bwg_tag_no_match,captionFormatAllSelected:bwg_objectsL10n.bwg_all_tags_selected,captionFormat:"{0} "+bwg_objectsL10n.bwg_tags_selected,okCancelInMulti:!0,locale:[bwg_objectsL10n.ok,bwg_objectsL10n.cancel,bwg_objectsL10n.select_all]}),t.off("change").on("change",function(){bwg_filter_by_tag(this)}));var i=e.find(".bwg_order");i.length&&i.SumoSelect({triggerChangeCombined:!0,forceCustomRendering:!0}),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("hidden"),jQuery(this).find(".bwg_search_reset_container").addClass("hidden"))})}),jQuery(".search_tags").on("sumo:opened",function(){0==jQuery(this).parent().find("ul li").length&&(jQuery(".no-match").html(bwg_objectsL10n.bwg_tag_no_match),jQuery(".no-match").show())}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:closed",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-up opened"),jQuery(this).find("label i").addClass("bwg-icon-angle-down closed")}),jQuery(".bwg_thumbnail .SumoSelect").on("sumo:opened",function(){jQuery(this).find("label i").removeClass("bwg-icon-angle-down closed"),jQuery(this).find("label i").addClass("bwg-icon-angle-up opened")}),bwg_add_album();var e=window.location.hash.substring(1);if(e&&"-1"!=e.indexOf("bwg")){bwg_hash_array=e.replace("bwg","").split("/");var t=jQuery(".bwg_container");t&&bwg_gallery_box(bwg_hash_array[1],t,!1,bwg_hash_array[0])}bwg_blog_style_ready(),bwg_image_browser_ready(),bwg_resize_search_line()}function bwg_clear_search_input(e){jQuery("#bwg_search_input_"+e).val(""),jQuery("#bwg_search_container_1_"+e+" .bwg_search_loupe_container1").addClass("hidden"),jQuery("#bwg_search_container_1_"+e+" .bwg_search_reset_container").addClass("hidden")}function bwg_check_search_input_enter(e,t){return 13!=(t.which||t.keyCode)||(jQuery(e).closest(".bwg_search_container_1").find(".bwg_search").trigger("click"),!1)}function bwg_ajax(t,i,a,r,e,_,o,s,l,n,g){jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),"function"==typeof bwg_scroll_load_action&&jQuery(window).off("scroll",bwg_scroll_load_action),jQuery(".bwg_thumbnail .search_tags").off("sumo:closed");var u=jQuery("#"+t).data("ajax-url"),d=0;if(void 0===n)n=!1;var c=jQuery("#page_number_"+i).val(),h=jQuery("#bwg_search_input_"+i).val(),b={},p=jQuery("#bwg_album_breadcrumb_"+i).val();if(p&&!0!==n){var m=JSON.parse(p);if("back"==r){m.splice(-1,1);var w=m.slice(-1)[0];r=w.id,c=w.page,b["action_"+i]="back"}else"numeric"===n||o?(m.splice(-1,1),m.push({id:r,page:c,search:h})):(m.push({id:r,page:1}),c=1);b["bwg_album_breadcrumb_"+i]=JSON.stringify(m)}if(b.gallery_type=jQuery("#"+t).data("gallery-type"),b.gallery_id=jQuery("#"+t).data("gallery-id"),b.tag=jQuery("#"+t).data("tag"),b.album_id=jQuery("#"+t).data("album-id"),b.theme_id=jQuery("#"+t).data("theme-id"),b.shortcode_id=jQuery("#"+t).data("shortcode-id"),b.bwg=i,o&&(c=1),void 0===s||""==s)s="";if(void 0===g||""==g)g="";if(void 0===l||""==l)l=jQuery(".bwg_order_"+i).val();b["page_number_"+i]=c,b["bwg_load_more_"+i]=jQuery("#bwg_load_more_"+i).val(),b["album_gallery_id_"+i]=r,b["type_"+i]=_,b["title_"+i]=s,b["description_"+i]=g,b["sortImagesByValue_"+i]=l,0<jQuery("#bwg_search_input_"+i).length&&(b["bwg_search_"+i]=jQuery("#bwg_search_input_"+i).val());var y=jQuery.parseJSON(b["bwg_album_breadcrumb_"+i]);return jQuery.each(y,function(e,t){b["bwg_search_"+i]="",r==t.id&&(b["bwg_search_"+i]=t.search)}),b["bwg_tag_id_"+a]=jQuery("#bwg_tag_id_"+a).val(),jQuery("#gal_front_form_"+i).addClass("bwg-hidden"),jQuery("#ajax_loading_"+i).removeClass("bwg-hidden"),jQuery.ajax({type:"POST",url:u,data:b,success:function(e){jQuery(e).find(".bwg_masonry_thumb_spun_"+i+" img").length,d=jQuery(e).find(".bwg_mosaic_thumb_spun_"+i+" img").length,!0===n?(a=="bwg_thumbnails_mosaic_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).find("#"+a).html()):a=="bwg_album_compact_"+i?jQuery("#"+a).append(jQuery(e).closest(".bwg-album-thumbnails").html()):jQuery("#"+a).append(jQuery(e).closest(".bwg-container-"+i).html()),jQuery(".bwg_nav_cont_"+i).html(jQuery(e).closest(".bwg_nav_cont_"+i).html())):jQuery("#bwg_container3_"+i).html(e)}
1,complete:function(){jQuery("div[id^='bwg_container1_'] img").each(function(){null!=jQuery(this).attr("data-lazy-src")&&""!=jQuery(this).attr("data-lazy-src")?jQuery(this).attr("src",jQuery(this).attr("data-lazy-src")):null!=jQuery(this).attr("data-src")&&""!=jQuery(this).attr("data-src")&&jQuery(this).attr("src",jQuery(this).attr("data-src"))}),jQuery(".blog_style_image_buttons_conteiner_"+i).find(jQuery(".bwg_blog_style_img_"+i)).on("load",function(){jQuery(".bwg_blog_style_img_"+i).closest(jQuery(".blog_style_image_buttons_conteiner_"+i)).show()}),jQuery("#bwg_tags_id_"+a).val(jQuery("#bwg_tag_id_"+a).val()),jQuery(".pagination-links_"+i).length&&jQuery("html, body").animate({scrollTop:jQuery("#"+t).offset().top-150},500),bwg_document_ready(),bwg_mosaic_ajax(i,d),bwg_all_thumnails_loaded(".bwg-container-"+i)&&bwg_container_loaded(i),jQuery(".blog_style_images_conteiner_"+i+" .bwg_embed_frame_16x9_"+i).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height(.5625*jQuery(this).width())}),jQuery(".blog_style_images_conteiner_"+i+" .bwg_embed_frame_instapost_"+i).each(function(e){jQuery(this).width(jQuery(this).parent().width()),jQuery(this).height((jQuery(this).width()-16)*jQuery(this).attr("data-height")/jQuery(this).attr("data-width")+96)}),jQuery("#bwg_embed_frame_16x9_"+i).width(jQuery("#bwg_embed_frame_16x9_"+i).parent().width()),jQuery("#bwg_embed_frame_16x9_"+i).height(.5625*jQuery("#bwg_embed_frame_16x9_"+i).width()),jQuery("#bwg_embed_frame_instapost_"+i).width(jQuery("#bwg_embed_frame_16x9_"+i).parent().width()),jQuery(".bwg_embed_frame_instapost_"+i).height((jQuery(".bwg_embed_frame_instapost_"+i).width()-16)*jQuery(".bwg_embed_frame_instapost_"+i).attr("data-height")/jQuery(".bwg_embed_frame_instapost_"+i).attr("data-width")+96),jQuery("#bwg_search_input_"+i).val(b["bwg_search_"+i]),""!=jQuery("#bwg_search_input_"+i).val()?(jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").hide(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_reset_container").show(),jQuery("#bwg_search_input_"+i).parent().parent().find(".bwg_search_loupe_container1").show()):jQuery("#bwg_search_input_"+i).parent().find(".search_placeholder_title").show();var e=jQuery("#bwg_container2_"+i+" .cur_gal_id").val();jQuery("#bwg_tag_id_"+i).val(jQuery("#bwg_tag_id_"+e).val())}}),!1}function bwg_select_tag(e,t,i,a,r,_){_&&jQuery("#bwg_tag_id_"+i).val(""),bwg_ajax(t,e,i,a,"",r,1,"")}function bwg_cube(e,t,i,a,r,_,o,s,l,n,g){var u,d=!1,c="";if(void 0!==g&&""!==g){d=!0,bwg_params[g].bwg_trans_in_progress=!0,c="_"+g,u=bwg_params[g].bwg_transition_duration;bwg_params[g].event_stack}else u=bwg_transition_duration;if(!bwg_testBrowser_cssTransitions(g))return bwg_fallback(s,l,n,g);if(!bwg_testBrowser_cssTransforms3d(g))return bwg_fallback3d(s,l,n,g);function h(){if(jQuery(s).removeAttr("style"),jQuery(l).removeAttr("style"),jQuery(".bwg_slider"+c).removeAttr("style"),jQuery(s).css({opacity:0,filter:"Alpha(opacity=0)","z-index":1}),jQuery(l).css({opacity:1,filter:"Alpha(opacity=100)","z-index":2}),jQuery(".bwg_image_info").show(),jQuery(s).html(""),d){bwg_change_watermark_container(g),bwg_params[g].bwg_trans_in_progress=!1;var e=bwg_params[g].data,t=bwg_params[g].event_stack}else{gallery_box_data.bwg_trans_in_progress=!1;t=gallery_box_data.event_stack}void 0!==t&&0<t.length&&(key=t[0].split("-"),t.shift(),bwg_change_image(key[0],key[1],e,!0,g)),bwg_change_watermark_container()}d?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+g).removeClass("bwg_slideshow_thumb_active_"+g).addClass("bwg_slideshow_thumb_deactive_"+g),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[g].bwg_current_key+"_"+g).removeClass("bwg_slideshow_thumb_deactive_"+g).addClass("bwg_slideshow_thumb_active_"+g),jQuery(".bwg_slideshow_dots_"+g).removeClass("bwg_slideshow_dots_active_"+g).addClass("bwg_slideshow_dots_deactive_"+g),jQuery("#bwg_dots_"+bwg_params[g].bwg_current_key+"_"+g).removeClass("bwg_slideshow_dots_deactive_"+g).addClass("bwg_slideshow_dots_active_"+g),jQuery(".bwg_slide_bg_"+g).css("perspective",1e3)):(gallery_box_data.bwg_trans_in_progress=!0,jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active"),jQuery(".bwg_slide_bg").css("perspective",1e3)),jQuery(s).css({transform:"translateZ("+e+"px)",backfaceVisibility:"hidden"}),jQuery(l).css({opacity:1,filter:"Alpha(opacity=100)",backfaceVisibility:"hidden",transform:"translateY("+i+"px) translateX("+t+"px) rotateY("+r+"deg) rotateX("+a+"deg)"}),jQuery(".bwg_slider"+c).css({transform:"translateZ(-"+e+"px)",transformStyle:"preserve-3d"}),setTimeout(function(){jQuery(".bwg_slider"+c).css({transition:"all "+u+"ms ease-in-out",transform:"translateZ(-"+e+"px) rotateX("+_+"deg) rotateY("+o+"deg)"})},20),jQuery(".bwg_slider"+c).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(h)),0==u&&h()}function bwg_fade(e,t,i,a){var r,_=!1;function o(){jQuery(".bwg_image_info").show(),bwg_change_watermark_container(a),_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1}r=void 0!==a&&""!==a?(_=!0,bwg_params[a].bwg_trans_in_progress=!0,bwg_params[a].bwg_transition_duration):(gallery_box_data.bwg_trans_in_progress=!0,gallery_box_data.bwg_transition_duration),_?(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+a).removeClass("bwg_slideshow_thumb_active_"+a
1).addClass("bwg_slideshow_thumb_deactive_"+a),jQuery("#bwg_filmstrip_thumbnail_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_thumb_deactive_"+a).addClass("bwg_slideshow_thumb_active_"+a),jQuery(".bwg_slideshow_dots_"+a).removeClass("bwg_slideshow_dots_active_"+a).addClass("bwg_slideshow_dots_deactive_"+a),jQuery("#bwg_dots_"+bwg_params[a].bwg_current_key+"_"+a).removeClass("bwg_slideshow_dots_deactive_"+a).addClass("bwg_slideshow_dots_active_"+a)):(jQuery(".bwg_filmstrip_thumbnail").removeClass("bwg_thumb_active").addClass("bwg_thumb_deactive"),jQuery("#bwg_filmstrip_thumbnail_"+gallery_box_data.bwg_current_key).removeClass("bwg_thumb_deactive").addClass("bwg_thumb_active")),bwg_testBrowser_cssTransitions()?(jQuery(t).css("transition","opacity "+r+"ms linear"),jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),jQuery(t).one("webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend",jQuery.proxy(o))):(jQuery(e).animate({opacity:0,"z-index":1},r),jQuery(t).animate({opacity:1,"z-index":2},{duration:r,complete:function(){_?bwg_params[a].bwg_trans_in_progress=!1:gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),o()}}),jQuery(e).fadeTo(r,0),jQuery(t).fadeTo(r,1)),0==r&&o()}function bwg_change_watermark_container(t){jQuery(".bwg_slider"+(void 0!==t&&""!==t?"_"+t:"")).children().each(function(){if(2==jQuery(this).css("zIndex")){var e=jQuery(this).find("img");if(e.length)if(e.prop("complete"))bwg_change_each_watermark_container(e.width(),e.height(),t);else e.on("load",function(){bwg_change_each_watermark_container(e.width(),e.height(),t)});else(e=jQuery(this).find("iframe")).length||(e=jQuery(this).find("video")),bwg_change_each_watermark_container(e.width(),e.height(),t)}})}function bwg_change_each_watermark_container(e,t,i){var a=void 0!==i&&""!==i?"_"+i:"",r=void 0!==i&&""!==i?"_slideshow":"";if(jQuery(".bwg"+r+"_watermark_spun"+a).width(e),jQuery(".bwg"+r+"_watermark_spun"+a).height(t),jQuery(".bwg"+r+"_watermark"+a).css({display:""}),void 0===i||""===i){var _=0;(jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_ecommerce_container").hasClass("bwg_open"))&&(_=gallery_box_data.lightbox_comment_width),e<=jQuery(window).width()-_&&(jQuery(".bwg_watermark_image").css({width:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}),jQuery(".bwg_watermark_text, .bwg_watermark_text:hover").css({fontSize:(jQuery(".spider_popup_wrap").width()-_)*gallery_box_data.watermark_font_size/gallery_box_data.image_width}))}else jQuery(".bwg"+r+"_title_spun"+a).width(e),jQuery(".bwg"+r+"_title_spun"+a).height(t),jQuery(".bwg"+r+"_description_spun"+a).width(e),jQuery(".bwg"+r+"_description_spun"+a).height(t);jQuery.trim(jQuery(".bwg"+r+"_title_text"+a).text())&&jQuery(".bwg_slideshow_title_text"+a).css({display:""}),jQuery.trim(jQuery(".bwg"+r+"_description_text"+a).text())&&jQuery(".bwg"+r+"_description_text"+a).css({display:""})}function bwg_set_filmstrip_pos(e,t,i){var a,r=void 0!==t&&""!==t?"_"+t:"",_=void 0!==t&&""!==t?"_slideshow":"";a=void 0!==t&&""!==t?bwg_params[t].left_or_top:gallery_box_data.left_or_top;var o=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-top-bottom-space")),s=parseInt(jQuery(".bwg_filmstrip_thumbnails").attr("data-all-images-right-left-space"));if(void 0===t||""===t){if("outerWidth"==gallery_box_data.outerWidth_or_outerHeight)var l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerWidth(!0)/2;else if("outerHeight"==gallery_box_data.outerWidth_or_outerHeight)l=-bwg_current_filmstrip_pos-jQuery(".bwg_filmstrip_thumbnail").outerHeight(!0)/2;if("width"==gallery_box_data.width_or_height)var n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").width(),l+e/2));else if("height"==gallery_box_data.width_or_height)n=Math.min(0,Math.max(e-jQuery(".bwg_filmstrip_thumbnails").height(),l+e/2))}else if("width"==bwg_params[t].width_or_height)l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).width()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).width(),l+e/2));else l=-bwg_params[t].bwg_current_filmstrip_pos-(jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).height()+bwg_params[t].filmstrip_thumb_margin_hor)/2,n=Math.min(0,Math.max(e-jQuery(".bwg_slideshow_filmstrip_thumbnails"+r).height(),l+e/2));0<n+s&&(s=0),0<n+o&&(o=0),"left"==a?jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({left:n+s},{duration:500,complete:function(){bwg_filmstrip_arrows(t)}}):jQuery(".bwg"+_+"_filmstrip_thumbnails"+r).animate({top:n+o},{duration:500,complete:function(){bwg_filmstrip_arrows(t)}})}function bwg_filmstrip_arrows(e){var t=void 0!==e&&""!==e?"_"+e:"",i=void 0!==e&&""!==e?"_slideshow":"";if("width"==(void 0!==e&&""!==e?bwg_params[e].width_or_heigh:gallery_box_data.width_or_height))var a=jQuery(".bwg"+i+"_filmstrip_thumbnails"+t).width(),r=jQuery(".bwg"+i+"_filmstrip"+t).width();else a=jQuery(".bwg"+i+"_filmstrip_thumbnails"+t).height(),r=jQuery(".bwg"+i+"_filmstrip"+t).height();a<r?(jQuery(".bwg"+i+"_filmstrip_left"+t).hide(),jQuery(".bwg"+i+"_filmstrip_right"+t).hide()):(jQuery(".bwg"+i+"_filmstrip_left"+t).show(),jQuery(".bwg"+i+"_filmstrip_right"+t).show())}function bwg_move_filmstrip(e){var t,i,a,r,_,o,s=void 0!==e&&""!==e?"_"+e:"",l=void 0!==e&&""!==e?"_slideshow":"",n=void 0!==e&&""!==e?bwg_params[e].outerWidth_or_outerHeight:gallery_box_data.outerWidth_or_outerHeight,g=void 0!==e&&""!==e?bwg_params[e].left_or_top:gallery_box_data.left_or_top;i="outerWidth"==n?(t=jQuery(".bwg"+l+"_filmstrip"+s).outerWidth(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+s).outerWidth(!0)):(t=jQuery(".bwg"+l+"_filmstrip"+s).outerHeight(!0),jQuery(".bwg"+l+"_filmstrip_thumbnails"+s).outerHeight(!0)),o="left"==g?(a=jQuery(".bwg"+l+"_thumb_active"+s).position().left,r="outerWidth"==n?jQuery(".bwg"+l+"_thumb_active"+s).position().left+jQuery(".bwg"+l+"_thumb_active"+s).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+s).position().left+jQuery(".bwg"+l+"_thumb_active"+s).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+s).position().left,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+s).position().left)+t):(a=jQuery(".bwg"+l+"_thumb_active"+s).position().top,r="outerWidth"==n?jQuery(".bwg"+l+"_thumb_active"+s).position().top+jQuery(".bwg"+l+"_thumb_active"+s).outerWidth(!0):jQuery(".bwg"+l+"_thumb_active"+s).position().top+jQuery(".bwg"+l+"_thumb_active"+s).outerHeight(!0),_=jQuery(".bwg"+l+"_filmstrip_thumbnails"+s).position().top,Math.abs(jQuery(".bwg"+l+"_filmstrip_thumbnails"+s).position().top)+t),i<t||(a<Math.abs(_)?"left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+s).animate({left:-a},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+s).animate({top:-a},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):o<r&&("left"==g?jQuery(".bwg"+l+"_filmstrip_thumbnails"+s).animate({left:-(r-t)},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}}):jQuery(".bwg"+l+"_filmstrip_thumbnails"+s).animate({top:-(r-t)},{duration:500,complete:function(){bwg_filmstrip_arrows(e)}})))}function bwg_move_dots(e){var t=jQuery(".bwg_slideshow_dots_active_"+e).position().left,i=jQuery(".bwg_slideshow_dots_active_"+e).position().left+jQuery(".bwg_slideshow_dots_active_"+e).outerWidth(!0),a=jQuery(".bwg_slideshow_dots_container_"+e).outerWidth(!0),r=jQuery(".bwg_slideshow_dots_thumbnails_"+e).outerWidth(!1),_=jQuery(".bwg_slideshow_dots_thumbnails_"+e).position().left,o=Math.abs(jQuery(".bwg_slideshow_dots_thumbnails_"+e).position().left)+a;r<a||(t<Math.abs(_)?jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-t},{duration:500,complete:function(){}}):o<i&&jQuery(".bwg_slideshow_dots_thumbnails_"+e).animate({left:-(i-a)},{duration:500,complete:function(){}}))}function bwg_testBrowser_cssTransitions(e){return bwg_testDom("Transition",e)}function bwg_testBrowser_cssTransforms3d(e){return bwg_testDom("Perspective",e)}function bwg_testDom(e,t){for(var i=["","Webkit","Moz","ms","O","Khtml"],a=i.length;a--;)if(void 0!==document.body.style[i[a]+e])return!0;return!1}function bwg_fallback(e,t,i,a){bwg_fade(e,t,i,a)}function bwg_fallback3d(e,t,i,a){bwg_sliceV(e,t,i,a)}function bwg_none(e,t,i,a){var r=void 0!==a&&""!==a?"_"+a:"";if(jQuery(e).css({opacity:0,"z-index":1}),jQuery(t).css({opacity:1,"z-index":2}),void 0!==a&&""!==a){var _=bwg_params[a].bwg_current_key;bwg_change_watermark_container(a),jQuery(".bwg_slideshow_filmstrip_thumbnail"+r).removeClass("bwg_slideshow_thumb_active"+r).addClass("bwg_slideshow_thumb_deactive"+r),jQuery("#bwg_filmstrip_thumbnail_"+_+r).removeClass("bwg_slideshow_thumb_deactive"+r).addClass("bwg_slideshow_thumb_active"+r),jQuery(".bwg_slideshow_dots"+r).removeClass("bwg_slideshow_dots_active"+r).addClass("bwg_slideshow_dots_deactive"+r),jQuery("#bwg_dots_"+_+r).removeClass("bwg_slideshow_dots_deactive"+r).addClass("bwg_slideshow_dots_active"+r)}else jQuery(".bwg_image_info").show(),gallery_box_data.bwg_trans_in_progress=!1,jQuery(e).html(""),bwg_change_watermark_container()}function bwg_iterator(e){var t=1;return void 0!==e&&""!==e&&void 0!==bwg_params[e]&&1==bwg_params[e].enable_slideshow_shuffle&&(t=Math.floor((bwg_params[e].data.length-1)*Math.random()+1)),t}function bwg_change_image_slideshow(e,t,i,a,r){i=bwg_params[r].data;if(jQuery("#bwg_slideshow_image_container_"+r).find("iframe").each(function(){jQuery(this)[0].contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),jQuery(this)[0].contentWindow.postMessage('{ "method": "pause" }',"*"),jQuery(this)[0].contentWindow.postMessage("pause","*")}),jQuery("#image_id_"+r+"_"+i[e].id).find(".bwg_fb_video").each(function(){jQuery(this).attr("src",jQuery(this).attr("src"))}
1),i[t]){if(jQuery(".bwg_ctrl_btn_"+r).hasClass("bwg-icon-pause")&&bwg_play(bwg_params[r].data,r),a||(jQuery("#bwg_current_image_key_"+r).val(t),"-1"==e?e=jQuery(".bwg_slideshow_thumb_active_"+r).children("img").attr("image_key"):"-2"==e&&(e=jQuery(".bwg_slideshow_dots_active_"+r).attr("image_key"))),bwg_params[r].bwg_trans_in_progress)return void bwg_params[r].event_stack.push(e+"-"+t);var _="right";if(t<e)_="left";else if(e==t)return;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"}),"width"==bwg_params[r].width_or_height?bwg_params[r].bwg_current_filmstrip_pos=t*(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+r).width()+2+2*bwg_params[r].lightbox_filmstrip_thumb_border_width):bwg_params[r].bwg_current_filmstrip_pos=t*(jQuery(".bwg_slideshow_filmstrip_thumbnail_"+r).height()+2+2*bwg_params[r].lightbox_filmstrip_thumb_border_width),e=t,bwg_params[r].bwg_current_key=e,jQuery("#bwg_slideshow_image_"+r).attr("image_id",i[t].id),jQuery(".bwg_slideshow_title_text_"+r).html(jQuery('<span style="display: block;" />').html(i[t].alt).text()),jQuery(".bwg_slideshow_description_text_"+r).html(jQuery('<span style="display: block;" />').html(i[t].description).text());var o=2==jQuery(".bwg_slideshow_image_spun_"+r).css("zIndex")?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,s=o==".bwg_slideshow_image_second_spun_"+r?".bwg_slideshow_image_spun_"+r:".bwg_slideshow_image_second_spun_"+r,l=-1<i[t].filetype.indexOf("EMBED_"),n=-1<i[t].filetype.indexOf("INSTAGRAM_POST"),g=-1<i[t].filetype.indexOf("INSTAGRAM_VIDEO"),u=jQuery(o).height(),d=jQuery(o).width(),c='<span class="bwg_slideshow_image_spun1_'+r+'" style="display: '+(l?"block":"table")+' ;width: inherit; height: inherit;"><span class="bwg_slideshow_image_spun2_'+r+'" style="display: '+(l?"block":"table-cell")+'; vertical-align: middle; text-align: center; ">';if(l){if(c+='<span style="height: '+u+"px; width: "+d+'px;" class="bwg_popup_embed bwg_popup_watermark">',g&&(c+='<span class="bwg_inst_play_btn_cont" onclick="bwg_play_instagram_video(this)"><span class="bwg_inst_play"></span></span>'),n){var h=0,b=0;u<d+88?h=(b=u)-88:b=(h=d)+88,c+=spider_display_embed(i[t].filetype,i[t].image_url,i[t].filename,{class:"bwg_embed_frame","data-width":i[t].image_width,"data-height":i[t].image_height,frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:"+h+"px; height:"+b+"px; vertical-align:middle; display:inline-block; position:relative;"})}else c+=spider_display_embed(i[t].filetype,i[t].image_url,i[t].filename,{class:"bwg_embed_frame",frameborder:"0",allowfullscreen:"allowfullscreen",style:"width:inherit; height:inherit; vertical-align:middle; display:table-cell;"});c+="</span>"}else{if("do_nothing"!=bwg_params[r].thumb_click_action){var p="";"open_lightbox"==bwg_params[r].thumb_click_action?p+=' class="bwg_lightbox" data-image-id="'+i[t].id+'"':"redirect_to_url"==bwg_params[r].thumb_click_action&&i[t].redirect_url&&(p+='href="'+i[t].redirect_url+'"'+(bwg_params[r].thumb_link_target&&1==bwg_params[r].thumb_link_target?' target="_blank"':"")),c+="<a "+p+">"}c+='<img style="max-height: '+u+"px !important; max-width: "+d+'px !important; display:inline-block;" ',c+=' class="bwg_slide bwg_slideshow_image_'+r+'" ',c+=' id="bwg_slideshow_image_'+r+'" ',c+=' src="'+bwg_params[r].upload_url+jQuery("<span style='display: block;' />").html(i[t].image_url).text()+'" alt="'+i[t].alt+'" image_id="'+i[t].id+'" /></a>'}c+="</span></span>",jQuery(s).html(c),bwg_params[r].preload_images&&bwg_preload_images(t,r),window["bwg_"+bwg_params[r].slideshow_effect](o,s,_,r),0<bwg_params[r].enable_slideshow_filmstrip?bwg_move_filmstrip(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()}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<bwg_params[t].preload_images_count&&(count=0),0!=count)for(var r=e-count;r<e+count;r++){var _=parseInt((r+a)%a),o=-1<i[_].filetype.indexOf("EMBED_");void 0!==i[_]&&(o||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(i[_].image_url).text()))}else for(r=0;r<i.length;r++){o=-1<i[r].filetype.indexOf("EMBED_");void 0!==i[r]&&(o||jQuery("<img/>").attr("src",bwg_params[t].upload_url+jQuery('<span style="display: block;" />').html(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=jQuery(".bwg_slideshow_image_wrap_"+e).parent().width(),i=bwg_params[e].data;if(t>=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_he
1ight: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 a="horizontal"==bwg_params[e].filmstrip_direction?"width: "+bwg_params[e].image_width:"height: "+bwg_params[e].image_height,r="horizontal"==bwg_params[e].filmstrip_direction?"width: "+(bwg_params[e].image_width-40):"height: "+(bwg_params[e].image_height-40);jQuery(".bwg_slideshow_filmstrip_container_"+e).css({cssText:a}),jQuery(".bwg_slideshow_filmstrip_"+e).css({cssText:r}),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})}else jQuery(".bwg_slideshow_image_wrap_"+e).css({width:t}),jQuery(".bwg_slideshow_image_wrap_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_container_"+e).css({width:t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width)}),jQuery(".bwg_slideshow_image_container_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)}),jQuery(".bwg_slideshow_image_"+e).css({cssText:"max-width: "+(t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; max-height: "+(t*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),jQuery(".bwg_slideshow_embed_"+e).css({cssText:"width: "+(t-("horizontal"==bwg_params[e].filmstrip_direction?0:bwg_params[e].slideshow_filmstrip_width))+"px !important; height: "+(t*(bwg_params[e].image_height/bwg_params[e].image_width)-("horizontal"==bwg_params[e].filmstrip_direction?bwg_params[e].slideshow_filmstrip_height:0)-1)+"px !important;"}),bwg_resize_instagram_post(e),bwg_change_watermark_container(e),"horizontal"==bwg_params[e].filmstrip_direction?(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({width:t}),jQuery(".bwg_slideshow_filmstrip_"+e).css({width:t-40})):(jQuery(".bwg_slideshow_filmstrip_container_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_filmstrip_"+e).css({height:t*bwg_params[e].image_height/bwg_params[e].image_width-40})),jQuery(".bwg_slideshow_dots_container_"+e).css({width:t}),jQuery("#bwg_slideshow_play_pause-ico_"+e).css({fontSize:t*bwg_params[e].slideshow_play_pause_btn_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_image_"+e).css({maxWidth:t*bwg_params[e].watermark_width/bwg_params[e].image_width,maxHeight:t*bwg_params[e].watermark_height/bwg_params[e].image_width}),jQuery(".bwg_slideshow_watermark_text_"+e+", .bwg_slideshow_watermark_text_"+e+":hover").css({fontSize:t*bwg_params[e].watermark_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_title_text_"+e).css({fontSize:2*t*bwg_params[e].slideshow_title_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_description_text_"+e).css({fontSize:2*t*bwg_params[e].slideshow_description_font_size/bwg_params[e].image_width}),jQuery(".bwg_slideshow_image_"+e).css({display:"inline-block"});i[parseInt(jQuery("#bwg_current_image_key_"+e).val())].is_embed_video?jQuery("#bwg_slideshow_play_pause_"+e).css({display:"none"}):jQuery("#bwg_slideshow_play_pause_"+e).css({display:""})}function bwg_popup_resize(e){void 0!==e&&""!==e?bwg_popup_resize_slidshow(e):bwg_popup_resize_lightbox()}function bwg_change_image(e,t,i,a,r){void 0!==r&&""!==r?bwg_change_image_slideshow(e,t,i,a,r):bwg_change_image_lightbox(e,t,i=gallery_box_data.data,a)}function bwg_resize_instagram_post(e){if(void 0!==e&&""!==e){if(jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).length){var t=jQuery(".bwg_slideshow_embed_"+e).width(),i=jQuery(".bwg_slideshow_embed_").height();jQuery(".inner_instagram_iframe_bwg_embed_frame_"+e).each(function(){var e=jQuery(this).parent();i/(parseInt(e.attr("data-height"))+96)<t/parseInt(e.attr("data-width"))?(e.height(i),e.
1width((e.height()-96)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(t),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96))}),bwg_change_watermark_container(e)}}else if(jQuery(".inner_instagram_iframe_bwg_embed_frame").length){t=jQuery(".bwg_image_container").width(),i=jQuery(".bwg_image_container").height();jQuery(".inner_instagram_iframe_bwg_embed_frame").each(function(){var e=jQuery(this).parent();i/(parseInt(e.attr("data-height"))+176)<t/parseInt(e.attr("data-width"))?(e.height(i),e.width((e.height()-176)*e.attr("data-width")/e.attr("data-height")+16)):(e.width(t),e.height((e.width()-16)*e.attr("data-height")/e.attr("data-width")+96)),e.css({top:.5*(i-e.height())})}),bwg_change_watermark_container()}}function bwg_play(t,i){if(void 0!==i&&""!==i)t=bwg_params[i].data;void 0!==i&&""!==i?(window.clearInterval(window["bwg_playInterval"+i]),window["bwg_playInterval"+i]=setInterval(function(){var e=1;1==bwg_params[i].enable_slideshow_shuffle&&(e=Math.floor((t.length-1)*Math.random()+1)),bwg_change_image(parseInt(jQuery("#bwg_current_image_key_"+i).val()),(parseInt(jQuery("#bwg_current_image_key_"+i).val())+e)%t.length,t,"",i)},1e3*bwg_params[i].slideshow_interval)):(window.clearInterval(gallery_box_data.bwg_playInterval),gallery_box_data.bwg_playInterval=setInterval(function(){jQuery(".bwg_comment_container").hasClass("bwg_open")||jQuery(".bwg_play_pause").length&&jQuery(".bwg_play_pause").hasClass("bwg-icon-play")||(void 0===t||void 0!==t[parseInt(jQuery("#bwg_current_image_key").val())+1]?bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),parseInt(j
1Query("#bwg_current_image_key").val())+1):1==gallery_box_data.enable_loop&&bwg_change_image(parseInt(jQuery("#bwg_current_image_key").val()),0))},1e3*gallery_box_data.slideshow_interval))}function bwg_image_browser(e){if(jQuery("#bwg_embed_frame_16x9_"+e).width(jQuery("#bwg_embed_frame_16x9_"+e).parents(".image_browser_image_buttons_"+e).width()),jQuery("#bwg_embed_frame_16x9_"+e).height(.5625*jQuery("#bwg_embed_frame_16x9_"+e).width()),jQuery("#bwg_embed_frame_instapost_"+e).width(jQuery("#bwg_embed_frame_16x9_"+e).parents(".image_browser_image_buttons_"+e).width()),jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").length){var t=jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").contents();jQuery(".image_browser_images_conteiner_"+e).find(".fluid-width-video-wrapper").replaceWith(t)}jQuery(".bwg_embed_frame_instapost_"+e).height((jQuery(".bwg_embed_frame_instapost_"+e).width()-16)*jQuery(".bwg_embed_frame_instapost_"+e).attr("data-height")/jQuery(".bwg_embed_frame_instapost_"+e).attr("data-width")+96);var i=jQuery(".image_browser_images_"+e).width();i<=108?jQuery(".paging-input_"+e).css("display","none"):(i<=200?(jQuery(".paging-input_"+e).css("margin","0% 0% 0% 0%"),jQuery(".paging-input_"+e).css("display","inline")):i<=580?(jQuery(".paging-input_"+e).css("display","inline"),jQuery(".tablenav-pages_"+e+" a").css("font-size","13px"),jQuery(".paging-input_"+e).css("margin","0% 7% 0% 7%")):(jQuery(".tablenav-pages_"+e+" a").css("font-size","15px"),jQuery(".paging-input_"+e).css("margin","0% 14% 0% 14%"),jQuery(".paging-input_"+e).css("display","inline")),jQuery(".tablenav-pages_"+e+" .next-page").css("margin","0% 0% 0% 0%"),jQuery(".tablenav-pages_"+e+" .prev-page").css("margin","0% 0% 0% 0%"))}function bwg_disable_right_click(e){e.bind("contextmenu",function(){return!1}),e.css("webkitTouchCallout","none")}jQuery.fn.extend({hideShow:function(e){return this.checkForVisiblilityChange(e),this},checkForVisiblilityChange:function(e){if(this.length>>>0){for(var t,i,a,r=0;t=this[r++];){var _=jQuery(t).is(":visible");void 0===t.lastVisibility&&(t.lastVisibility=_),_!==t.lastVisibility&&(t.lastVisibility=_,"function"==typeof e&&e.apply(this,[new jQuery.Event("visibilityChanged"),_?"shown":"hidden"]),function(e,t){setTimeout(function(){jQuery(e).trigger("visibilityChanged",[t?"shown":"hidden"])},10)}(t,_))}i=this,a=arguments,setTimeout(function(){i.checkForVisiblilityChange.apply(i,a)},10)}}}),jQuery(document).ajaxComplete(function(){setTimeout(function(){bwg_main_ready()})}),jQuery(document).ready(function(){document.addEventListener("visibilitychange",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),e||("visible"==document.visibilityState&&bwg_slideshow_focus(),"hidden"==document.visibilityState&&bwg_slideshow_blur())}),bwg_main_ready(),jQuery(this).hideShow(function(e,t){"shown"==t&&bwg_main_ready()})}),jQuery(window).on("resize",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}
1),e||(jQuery(".bwg-thumbnails, .bwg-masonry-thumbnails, .bwg-album-thumbnails").each(function(){bwg_all_thumnails_loaded(this)}),bwg_slideshow_resize(),bwg_image_browser_resize(),bwg_carousel_resize(),bwg_blog_style_resize(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)})),bwg_resize_search_line()}),jQuery(window).on("load",function(){var e=!1;jQuery(".bwg_container").each(function(){0<jQuery(this).find(".wd_error").length&&(e=!0)}),e||(bwg_blog_style_onload(),jQuery(".bwg-mosaic-thumbnails").each(function(){bwg_thumbnail_mosaic(this)}))}),jQuery(".bwg-masonry-thumb-span img, .bwg-mosaic-thumb-span img").on("error",function(){jQuery(this).height(100),jQuery(this).width(100)});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.