!function(e,i,t,o){function r(i,t){this.el=i,this.$el=e(this.el),this.options=e.extend({},n,t),this._defaults=n,this._name=s,this.init()}var s="nivoLightbox",n={effect:"fade",theme:"default",keyboardNav:!0,clickOverlayToClose:!0,onInit:function(){},beforeShowLightbox:function(){},afterShowLightbox:function(e){},beforeHideLightbox:function(){},afterHideLightbox:function(){},onPrev:function(e){},onNext:function(e){},errorMessage:"The requested content cannot be loaded. Please try again later."};r.prototype={init:function(){var i=this;e("html").hasClass("nivo-lightbox-notouch")||e("html").addClass("nivo-lightbox-notouch"),"ontouchstart"in t&&e("html").removeClass("nivo-lightbox-notouch"),this.$el.on("click",function(e){i.showLightbox(e)}),this.options.keyboardNav&&e("body").off("keyup").on("keyup",function(t){var o=t.keyCode?t.keyCode:t.which;27==o&&i.destructLightbox(),37==o&&e(".nivo-lightbox-prev").trigger("click"),39==o&&e(".nivo-lightbox-next").trigger("click")}),this.options.onInit.call(this)},showLightbox:function(i){var t=this,o=this.$el,s=this.checkContent(o);if(s){i.preventDefault(),this.options.beforeShowLightbox.call(this);var n=this.constructLightbox();if(n){var r=n.find(".nivo-lightbox-content");if(r){if(e("body").addClass("nivo-lightbox-body-effect-"+this.options.effect),this.processContent(r,o),this.$el.attr("data-lightbox-gallery")){var a=e('[data-lightbox-gallery="'+this.$el.attr("data-lightbox-gallery")+'"]');e(".nivo-lightbox-nav").show(),e(".nivo-lightbox-prev").off("click").on("click",function(i){i.preventDefault();var s=a.index(o);o=a.eq(s-1),e(o).length||(o=a.last()),t.processContent(r,o),t.options.onPrev.call(this,[o])}),e(".nivo-lightbox-next").off("click").on("click",function(i){i.preventDefault();var s=a.index(o);o=a.eq(s+1),e(o).length||(o=a.first()),t.processContent(r,o),t.options.onNext.call(this,[o])})}setTimeout(function(){n.addClass("nivo-lightbox-open"),t.options.afterShowLightbox.call(this,[n])},1)}}}},checkContent:function(e){var t=e.attr("href"),o=t.match(/(youtube|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/);return null!==t.match(/\.(jpeg|jpg|gif|png)$/i)?!0:o?!0:"ajax"==e.attr("data-lightbox-type")?!0:"#"==t.substring(0,1)&&"inline"==e.attr("data-lightbox-type")?!0:"iframe"==e.attr("data-lightbox-type")?!0:!1},processContent:function(t,o){var s=this,n=o.attr("href"),r=n.match(/(youtube|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/);if(t.html("").addClass("nivo-lightbox-loading"),this.isHidpi()&&o.attr("data-lightbox-hidpi")&&(n=o.attr("data-lightbox-hidpi")),null!==n.match(/\.(jpeg|jpg|gif|png)$/i)){var a=e("",{src:n});a.one("load",function(){var o=e('
');o.append(a),t.html(o).removeClass("nivo-lightbox-loading"),o.css({"line-height":e(".nivo-lightbox-content").height()+"px",height:e(".nivo-lightbox-content").height()+"px"}),e(i).resize(function(){o.css({"line-height":e(".nivo-lightbox-content").height()+"px",height:e(".nivo-lightbox-content").height()+"px"})})}).each(function(){this.complete&&e(this).load()}),a.error(function(){var i=e('

'+s.options.errorMessage+"

");t.html(i).removeClass("nivo-lightbox-loading")})}else if(r){var l="",c="nivo-lightbox-video";if("youtube"==r[1]&&(l="http://www.youtube.com/embed/"+r[4],c="nivo-lightbox-youtube"),"youtu"==r[1]&&(l="http://www.youtube.com/embed/"+r[3],c="nivo-lightbox-youtube"),"vimeo"==r[1]&&(l="http://player.vimeo.com/video/"+r[3],c="nivo-lightbox-vimeo"),l){var d=e("