function ShowSearchResult(){$(txtSearch).val().length>2?($("#QuickSearch").fadeIn(300),AddLockScrollMobile(),GetAndShowARTList(),GetAndShowFTXList(),GetAndShowKATList(),GetAndShowHERList(),$("html").click(function(){$("#QuickSearch").fadeOut(300);RemoveLockScrollMobile()})):($("#QuickSearch").fadeOut(300),RemoveLockScrollMobile())}function GetAndShowARTList(){$("#ARTList").html('<li><div class="ARTLoading_bar"><img src='+loadingGIF+"><span>"+sLoadingTextART+"<\/span><\/div><\/li>");$.ajax({type:"POST",url:"WebMethodsAsync.aspx/SearchART",data:JSON.stringify({sSearchText:$(txtSearch).val()}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var t=n.d;$(".ARTLoading_bar").remove();t!=null&&ShowARTList(t)},error:function(){console.log("Error in Webservice")}})}function ShowARTList(n){var t,i,r;if(n.TotalRecords>0){for($("#ARTList").html(""),t=0,i=n.ARTList.length;t<i;t++)r=n.ARTList[t].Bez,$("#ARTList").append('<li><a class="ARTLink" href="'+n.ARTList[t].ProductInfoURL+'"><div class="ARTImage col-1 col-lg-2"><img class="img-fluid" src="'+n.ARTList[t].ImageURL+'"><\/div><div class="ARTBez col-11 col-lg-10"><div class="title"><span class="maintitle">'+n.ARTList[t].Bez+'<\/span><span class="subtitle d-none d-lg-block">'+n.ARTList[t].ArtNr+'<\/span><\/div><div class="kurzbez d-none d-lg-block text-content">'+n.ARTList[t].KurzText+'<\/div><\/div><\/a><div class="clear" /><\/li>');$("#ARTSearchTitle").html(sARTFound+" ("+n.DisplayRecords+" "+sVon+" "+n.TotalRecords+")");$(btnARTShow).show()}else $("#ARTList").html(""),$("#ARTList").append("<li>"+sNoResultART+"<\/li>"),$("#ARTSearchTitle").html(sARTFound),$(btnARTShow).hide()}function GetAndShowFTXList(){$("#FTXList").html('<li><div class="FTXLoading_bar"><img src='+loadingGIF+"><span>"+sLoadingTextFTX+"<\/span><\/div><\/li>");$.ajax({type:"POST",url:"WebMethodsAsync.aspx/SearchFTX",data:JSON.stringify({sSearchText:$(txtSearch).val()}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var t=n.d;$(".FTXLoading_bar").remove();t!=null&&ShowFTXList(t)},error:function(){console.log("Error in Webservice")}})}function ShowFTXList(n){var t,i,r;if(n.TotalRecords>0){for($("#FTXList").html(""),t=0,i=n.FTXList.length;t<i;t++)r=n.FTXList[t].Bez,$("#FTXList").append('<li><a style="" href="'+n.FTXList[t].FTXURL+'"><span class="title">'+n.FTXList[t].Bez+"<\/span><\/a><\/li>");$("#FTXSearchTitle").html(sFTXFound+" ("+n.DisplayRecords+" "+sVon+" "+n.TotalRecords+")");$(btnFTXShow).show()}else $("#FTXList").html(""),$("#FTXList").append("<li>"+sNoResultFTX+"<\/li>"),$("#FTXSearchTitle").html(sFTXFound),$(btnFTXShow).hide()}function GetAndShowKATList(){$("#KATList").html('<li><div class="KATLoading_bar"><img src='+loadingGIF+"><span>"+sLoadingTextKAT+"<\/span><\/div><\/li>");$.ajax({type:"POST",url:"WebMethodsAsync.aspx/SearchKAT",data:JSON.stringify({sSearchText:$(txtSearch).val()}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var t=n.d;$(".KATLoading_bar").remove();t!=null&&ShowKATList(t)},error:function(){console.log("Error in Webservice")}})}function ShowKATList(n){var t,i,r;if(n.TotalRecords>0){for($("#KATList").html(""),t=0,i=n.KATList.length;t<i;t++)r=n.KATList[t].Bez,$("#KATList").append('<li><a style="" href="'+n.KATList[t].KATURL+'"><span class="title">'+n.KATList[t].Bez+"<\/span><\/a><\/li>");$("#KATSearchTitle").html(sKATFound+" ("+n.DisplayRecords+" "+sVon+" "+n.TotalRecords+")")}else $("#KATList").html(""),$("#KATList").append("<li>"+sNoResultKAT+"<\/li>"),$("#KATSearchTitle").html(sKATFound)}function GetAndShowHERList(){$("#HERList").html('<li><div class="HERLoading_bar"><img src='+loadingGIF+"><span>"+sLoadingTextHER+"<\/span><\/div><\/li>");$.ajax({type:"POST",url:"WebMethodsAsync.aspx/SearchHER",data:JSON.stringify({sSearchText:$(txtSearch).val()}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var t=n.d;$(".HERLoading_bar").remove();t!=null&&ShowHERList(t)},error:function(){console.log("Error in Webservice")}})}function ShowHERList(n){var t,i,r;if(n.TotalRecords>0){for($("#HERList").html(""),t=0,i=n.HERList.length;t<i;t++)r=n.HERList[t].Bez,$("#HERList").append('<li><a style="margin-right:10px;" href="#" onclick="ShowHERART('+n.HERList[t].ID+');"><img alt="'+n.HERList[t].Bez+'" src="'+n.HERList[t].ImageURL+'" /><\/a><\/li>');$("#HERSearchTitle").html(sHERFound+" ("+n.DisplayRecords+" "+sVon+" "+n.TotalRecords+")")}else $("#HERList").html(""),$("#HERList").append("<li>"+sNoResultHER+"<\/li>"),$("#HERSearchTitle").html(sHERFound)}function ShowHERART(n){$.ajax({type:"POST",url:"WebMethods.aspx/ShowARTForHER",data:JSON.stringify({iHER_ID:n}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var t=n.d;t!=null&&(t.Navigate=!0)&&(window.location.href=t.NavigateURL)},error:function(){console.log("Error in Webservice")}})}function LoadPricesAsync(n){var t="",i=1;$(".hfProductInfo").each(function(){t=t+$(this).val()+";";i==n?(DoPricing(t),t="",i=1):i=i+1});t===""||DoPricing(t)}function DoPricing(n){$.ajax({type:"POST",url:"WebMethodsAsync.aspx/GetPricesForProductList",data:JSON.stringify({sProductInfoList:n}),contentType:"application/json; charset=utf-8",dataType:"json",success:function(n){var t=n.d;t!=null&&ShowPrices(t)},error:function(){console.log("Error in GetPricesForProductList")}})}function ShowPrices(n){for(var u,i,t=0,r=n.Prices.length;t<r;t++)u=n.Prices[t].HtmlElementId,i=$(".pnlProductList_"+u),$(i).find(".lblPreis").html(n.Prices[t].Preis),$(i).find(".lblPreis").show(),n.Prices[t].ShowLager&&($(i).find(".pnlLager").show(),$(i).find(".pnlLagerStatus").prop("title",n.Prices[t].LagerText),$(i).find(".spLagerOK").attr("class",n.Prices[t].spLagerOKClass),$(i).find(".spLagerEmpty").attr("class",n.Prices[t].spLagerEmptyClass)),n.Prices[t].ShowAddToWKB&&$(i).find(".btnAddToWKBBig").show(),n.Prices[t].ShowAddToWKB&&$(i).find(".btnAddToWKB").show(),n.Prices[t].ShowAddToMLK&&$(i).find(".btnAddToMLK").show(),n.Prices[t].ShowAddToCompare&&$(i).find(".btnAddToCompare").show(),n.Prices[t].ShowQuantity&&$(i).find(".txnMenge").show()}function oxNumericKeyPress(n,t,i){var r,n;return(n||(n=window.event),n.charCode?r=n.charCode:n.which&&(r=n.which),r<48||r>57)?r==8||r==9||r==27||r==127||r==37||r==39||r==13?!0:t==!0&&(r==46||r==44)?!0:i==!0&&r==45?!0:!1:!0}function oxDateKeyPress(n,t){var i,n;return(n||(n=window.event),n.charCode?i=n.charCode:n.which&&(i=n.which),i<48||i>57)?i==8||i==9||i==27||i==127||i==37||i==39||i==13?!0:t==0&&(i==47||i==46)?!0:t==1&&i==58?!0:t==2&&(i==47||i==46||i==58)?!0:!1:!0}function intiProductCarousel(n,t){var u=n.find(".carousel-item"),i=u.length,o=t,r;if(i!==0){i<t&&(o=i);$(u).each(function(){for(var n=$(this).next(),t=1;t<o;t++)t>1&&(n=n.next()),n.length||(n=$(this).siblings(":first")),n.children(":first-child").clone().appendTo($(this))});r=!1;typeof n.data("interval")=="undefined"&&(r=5e3);$(window).width()>991?i>t?n.carousel({interval:r}):(n.carousel({interval:!1}),n.find(".carousel-control-prev").remove(),n.find(".carousel-control-next").remove()):n.carousel({interval:r});var s=$(n),f=[],e,h=function(){s.each(function(){f.push($(this).height())});e=Math.max.apply(null,f);s.each(function(){$(this).css("min-height",e+"px")})};h();$(window).on("resize orientationchange",function(){e=0;f.length=0;u.each(function(){$(this).css("min-height","0")});h()});i===1&&n.find(".carousel-indicators").remove()}}$("#productPictureCarousel").carousel({interval:!1});$("#ftxCarousel").carousel({interval:5e3});$(document).ready(function(){$(".productCarousel2Products").each(function(){intiProductCarousel($(this),2)});$(".productCarousel3Products").each(function(){intiProductCarousel($(this),3)});$(".productCarousel4Products").each(function(){intiProductCarousel($(this),4)});$(".productCarousel6Products").each(function(){intiProductCarousel($(this),6)});$(".productCarousel12Products").each(function(){intiProductCarousel($(this),12)})});$("#homeCarousel").carousel({interval:5e3});$(".carousel").swipe({swipeRight:function(){$(this).carousel("prev")},swipeLeft:function(){$(this).carousel("next")}});!function(n,t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):n.lightbox=t(n.jQuery)}(this,function(n){function t(t){this.album=[];this.currentImageIndex=void 0;this.init();this.options=n.extend({},this.constructor.defaults);this.option(t)}return t.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:600,fitImagesInViewport:!0,imageFadeDuration:600,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1,sanitizeTitle:!1},t.prototype.option=function(t){n.extend(this.options,t)},t.prototype.imageCountLabel=function(n,t){return this.options.albumLabel.replace(/%1/g,n).replace(/%2/g,t)},t.prototype.init=function(){var t=this;n(document).ready(function(){t.enable();t.build()})},t.prototype.enable=function(){var t=this;n("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(i){return t.start(n(i.currentTarget)),!1})},t.prototype.build=function(){if(!(n("#lightbox").length>0)){var t=this;n('<div id="lightboxOverlay" class="lightboxOverlay"><\/div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ><\/a><a class="lb-next" href="" ><\/a><\/div><div class="lb-loader"><a class="lb-cancel"><\/a><\/div><\/div><\/div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"><\/span><span class="lb-number"><\/span><\/div><div class="lb-closeContainer"><a class="lb-close"><\/a><\/div><\/div><\/div><\/div>').appendTo(n("body"));this.$lightbox=n("#lightbox");this.$overlay=n("#lightboxOverlay");this.$outerContainer=this.$lightbox.find(".lb-outerContainer");this.$container=this.$lightbox.find(".lb-container");this.$image=this.$lightbox.find(".lb-image");this.$nav=this.$lightbox.find(".lb-nav");this.containerPadding={top:parseInt(this.$container.css("padding-top"),10),right:parseInt(this.$container.css("padding-right"),10),bottom:parseInt(this.$container.css("padding-bottom"),10),left:parseInt(this.$container.css("padding-left"),10)};this.imageBorderWidth={top:parseInt(this.$image.css("border-top-width"),10),right:parseInt(this.$image.css("border-right-width"),10),bottom:parseInt(this.$image.css("border-bottom-width"),10),left:parseInt(this.$image.css("border-left-width"),10)};this.$overlay.hide().on("click",function(){return t.end(),!1});this.$lightbox.hide().on("click",function(i){return"lightbox"===n(i.target).attr("id")&&t.end(),!1});this.$outerContainer.on("click",function(i){return"lightbox"===n(i.target).attr("id")&&t.end(),!1});this.$lightbox.find(".lb-prev").on("click",function(){return 0===t.currentImageIndex?t.changeImage(t.album.length-1):t.changeImage(t.currentImageIndex-1),!1});this.$lightbox.find(".lb-next").on("click",function(){return t.currentImageIndex===t.album.length-1?t.changeImage(0):t.changeImage(t.currentImageIndex+1),!1});this.$nav.on("mousedown",function(n){3===n.which&&(t.$nav.css("pointer-events","none"),t.$lightbox.one("contextmenu",function(){setTimeout(function(){this.$nav.css("pointer-events","auto")}.bind(t),0)}))});this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return t.end(),!1})}},t.prototype.start=function(t){function o(n){l.album.push({alt:n.attr("data-alt"),link:n.attr("href"),title:n.attr("data-title")||n.attr("title")})}var l=this,e=n(window),f,i,s,r,u,h,c;if(e.on("resize",n.proxy(this.sizeOverlay,this)),n("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[],f=0,s=t.attr("data-lightbox"),s)for(i=n(t.prop("tagName")+'[data-lightbox="'+s+'"]'),r=0;r<i.length;r=++r)o(n(i[r])),i[r]===t[0]&&(f=r);else if("lightbox"===t.attr("rel"))o(t);else for(i=n(t.prop("tagName")+'[rel="'+t.attr("rel")+'"]'),u=0;u<i.length;u=++u)o(n(i[u])),i[u]===t[0]&&(f=u);h=e.scrollTop()+this.options.positionFromTop;c=e.scrollLeft();this.$lightbox.css({top:h+"px",left:c+"px"}).fadeIn(this.options.fadeDuration);this.options.disableScrolling&&n("html").addClass("lb-disable-scrolling");this.changeImage(f)},t.prototype.changeImage=function(t){var i=this,u,r;this.disableKeyboardNav();u=this.$lightbox.find(".lb-image");this.$overlay.fadeIn(this.options.fadeDuration);n(".lb-loader").fadeIn("slow");this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide();this.$outerContainer.addClass("animating");r=new Image;r.onload=function(){var e,o,s,f,h,c;u.attr({alt:i.album[t].alt,src:i.album[t].link});n(r);u.width(r.width);u.height(r.height);i.options.fitImagesInViewport&&(c=n(window).width(),h=n(window).height(),f=c-i.containerPadding.left-i.containerPadding.right-i.imageBorderWidth.left-i.imageBorderWidth.right-20,s=h-i.containerPadding.top-i.containerPadding.bottom-i.imageBorderWidth.top-i.imageBorderWidth.bottom-120,i.options.maxWidth&&i.options.maxWidth<f&&(f=i.options.maxWidth),i.options.maxHeight&&i.options.maxHeight<f&&(s=i.options.maxHeight),(r.width>f||r.height>s)&&(r.width/f>r.height/s?(o=f,e=parseInt(r.height/(r.width/o),10),u.width(o),u.height(e)):(e=s,o=parseInt(r.width/(r.height/e),10),u.width(o),u.height(e))));i.sizeContainer(u.width(),u.height())};r.src=this.album[t].link;this.currentImageIndex=t},t.prototype.sizeOverlay=function(){this.$overlay.width(n(document).width()).height(n(document).height())},t.prototype.sizeContainer=function(n,t){function f(){i.$lightbox.find(".lb-dataContainer").width(u);i.$lightbox.find(".lb-prevLink").height(r);i.$lightbox.find(".lb-nextLink").height(r);i.showImage()}var i=this,e=this.$outerContainer.outerWidth(),o=this.$outerContainer.outerHeight(),u=n+this.containerPadding.left+this.containerPadding.right+this.imageBorderWidth.left+this.imageBorderWidth.right,r=t+this.containerPadding.top+this.containerPadding.bottom+this.imageBorderWidth.top+this.imageBorderWidth.bottom;e!==u||o!==r?this.$outerContainer.animate({width:u,height:r},this.options.resizeDuration,"swing",function(){f()}):f()},t.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide();this.$lightbox.find(".lb-image").fadeIn(this.options.imageFadeDuration);this.updateNav();this.updateDetails();this.preloadNeighboringImages();this.enableKeyboardNav()},t.prototype.updateNav=function(){var n=!1;try{document.createEvent("TouchEvent");n=!!this.options.alwaysShowNavOnTouchDevices}catch(n){}this.$lightbox.find(".lb-nav").show();this.album.length>1&&(this.options.wrapAround?(n&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),n&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".lb-next").show(),n&&this.$lightbox.find(".lb-next").css("opacity","1"))))},t.prototype.updateDetails=function(){var r=this,t,i;void 0!==this.album[this.currentImageIndex].title&&""!==this.album[this.currentImageIndex].title&&(t=this.$lightbox.find(".lb-caption"),this.options.sanitizeTitle?t.text(this.album[this.currentImageIndex].title):t.html(this.album[this.currentImageIndex].title),t.fadeIn("fast").find("a").on("click",function(){void 0!==n(this).attr("target")?window.open(n(this).attr("href"),n(this).attr("target")):location.href=n(this).attr("href")}));this.album.length>1&&this.options.showImageNumberLabel?(i=this.imageCountLabel(this.currentImageIndex+1,this.album.length),this.$lightbox.find(".lb-number").text(i).fadeIn("fast")):this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating");this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return r.sizeOverlay()})},t.prototype.preloadNeighboringImages=function(){this.album.length>this.currentImageIndex+1&&((new Image).src=this.album[this.currentImageIndex+1].link);this.currentImageIndex>0&&((new Image).src=this.album[this.currentImageIndex-1].link)},t.prototype.enableKeyboardNav=function(){n(document).on("keyup.keyboard",n.proxy(this.keyboardAction,this))},t.prototype.disableKeyboardNav=function(){n(document).off(".keyboard")},t.prototype.keyboardAction=function(n){var t=n.keyCode,i=String.fromCharCode(t).toLowerCase();27===t||i.match(/x|o|c/)?this.end():"p"===i||37===t?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):"n"!==i&&39!==t||(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},t.prototype.end=function(){this.disableKeyboardNav();n(window).off("resize",this.sizeOverlay);this.$lightbox.fadeOut(this.options.fadeDuration);this.$overlay.fadeOut(this.options.fadeDuration);n("select, object, embed").css({visibility:"visible"});this.options.disableScrolling&&n("html").removeClass("lb-disable-scrolling")},new t});!function(n){"use strict";n.fn.bsPhotoGallery=function(t){function e(){return'ul[data-bsp-ul-id="'+i.ulId+'"][data-bsp-ul-index="'+i.ulIndex+'"]'}function o(){n(e()+" li[data-bsp-li-index]").length===i.nextImg?n("a.next").hide():n("a.next").show();-1===i.prevImg?n("a.previous").hide():n("a.previous").show()}function s(n){return n.replace('"',"").replace("'","").replace('"',"").replace("'","").replace("url(","").replace(")","")}function h(){var e=s(n(this).find(".bspImgWrapper")[0].style.backgroundImage),u=n(this).attr("data-bsp-li-index"),h=n(this).parent("ul").attr("data-bsp-ul-index"),l=n(this).parent("ul").attr("data-bsp-ul-id"),f=n(this).find("p").html(),t;i.img=e;i.prevImg=parseInt(u)-parseInt(1);i.nextImg=parseInt(u)+parseInt(1);i.ulIndex=h;i.ulId=l;n("#bsPhotoGalleryModal").modal();t="";t+='<img src="'+i.img+'" class="img-responsive bsp-modal-main-image"/>';t+='<span class="bsp-close"><img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDEyOCAxMjgiIGhlaWdodD0iMTI4cHgiIGlkPSLQodC70L7QuV8xIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMjggMTI4IiB3aWR0aD0iMTI4cHgiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxnPjxwb2x5Z29uIGZpbGw9IiMzNzM3MzciIHBvaW50cz0iMTIzLjU0Mjk2ODgsMTEuNTkzNzUgMTE2LjQ3NjU2MjUsNC41MTg1NTQ3IDY0LjAwMTk1MzEsNTYuOTMwNjY0MSAxMS41NTk1NzAzLDQuNDg4MjgxMyAgICAgNC40ODgyODEzLDExLjU1OTU3MDMgNTYuOTI3MjQ2MSw2My45OTcwNzAzIDQuNDU3MDMxMywxMTYuNDA1MjczNCAxMS41MjQ0MTQxLDEyMy40ODE0NDUzIDYzLjk5ODUzNTIsNzEuMDY4MzU5NCAgICAgMTE2LjQ0MjM4MjgsMTIzLjUxMTcxODggMTIzLjUxMjY5NTMsMTE2LjQ0MTQwNjMgNzEuMDczMjQyMiw2NC4wMDE5NTMxICAgIi8+PC9nPjwvc3ZnPg=="><\/span>';t+='<div class="bsp-text-container">';void 0!==f&&(t+='<p class="pText">'+f+"<\/p>");t+="<\/div>";r.showControl&&(t+='<a class="bsp-controls next" data-bsp-id="'+i.ulId+'" href="'+i.nextImg+'">',t+='<img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGhlaWdodD0iNTEycHgiIGlkPSJMYXllcl8xIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgd2lkdGg9IjUxMnB4IiB4bWw6c3BhY2U9InByZXNlcnZlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48cGF0aCBkPSJNMjk4LjMsMjU2TDI5OC4zLDI1NkwyOTguMywyNTZMMTMxLjEsODEuOWMtNC4yLTQuMy00LjEtMTEuNCwwLjItMTUuOGwyOS45LTMwLjZjNC4zLTQuNCwxMS4zLTQuNSwxNS41LTAuMmwyMDQuMiwyMTIuNyAgYzIuMiwyLjIsMy4yLDUuMiwzLDguMWMwLjEsMy0wLjksNS45LTMsOC4xTDE3Ni43LDQ3Ni44Yy00LjIsNC4zLTExLjIsNC4yLTE1LjUtMC4yTDEzMS4zLDQ0NmMtNC4zLTQuNC00LjQtMTEuNS0wLjItMTUuOCAgTDI5OC4zLDI1NnoiLz48L3N2Zz4="/><\/a>',t+='<a class="bsp-controls previous" data-bsp-id="'+i.ulId+'" href="'+i.prevImg+'">',t+='<img src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjwhRE9DVFlQRSBzdmcgIFBVQkxJQyAnLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4nICAnaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkJz48c3ZnIGhlaWdodD0iNTEycHgiIGlkPSJMYXllcl8xIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgd2lkdGg9IjUxMnB4IiB4bWw6c3BhY2U9InByZXNlcnZlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48cG9seWdvbiBwb2ludHM9IjM1MiwxMjguNCAzMTkuNyw5NiAxNjAsMjU2IDE2MCwyNTYgMTYwLDI1NiAzMTkuNyw0MTYgMzUyLDM4My42IDIyNC43LDI1NiAiLz48L3N2Zz4="/><\/a><\/a>');n("#bsPhotoGalleryModal .modal-body").html(t);n(".bsp-close").on("click",c);o()}function c(){n("#bsPhotoGalleryModal").modal("hide")}var r=n.extend({},n.fn.bsPhotoGallery.defaults,t),u=function(){for(var n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",t="",i=0;i<4;i++)t+=n.charAt(Math.floor(Math.random()*n.length));return"bsp-"+t}(),f=r.classes,i=(f.split(" "),{});return this.each(function(t){var i=n(this).find("li");n(this).attr("data-bsp-ul-id",u);n(this).attr("data-bsp-ul-index",t);i.each(function(t){var i=n(this).find("img"),u=n(this).find("p"),e=i.attr("src");n(this).addClass(f);n(this).attr("data-bsp-li-index",t);i.wrap('<div class="bspImgWrapper" style="background:url(\''+e+"');\"><\/div>");u.addClass("bspText");!0===r.shortText&&u.addClass("bspShortText");i.remove();!0===r.hasModal&&(n(this).addClass("bspHasModal"),n(this).on("click",h))})}),!0===r.hasModal&&(n(document).on("click",'a.bsp-controls[data-bsp-id="'+u+'"]',function(){var u=n(e()),t=n(this).attr("href"),h=s(u.find('li[data-bsp-li-index="'+t+'"] .bspImgWrapper')[0].style.backgroundImage),f=u.find('li[data-bsp-li-index="'+t+'"] p').html(),r;return n("#bsPhotoGalleryModal .modal-body img.bsp-modal-main-image").attr("src",h),r="",void 0!==f&&(r+='<p class="pText">'+f+"<\/p>"),n(".bsp-text-container").html(r),i.prevImg=parseInt(t)-1,i.nextImg=parseInt(i.prevImg)+2,n(this).hasClass("previous")?(n(this).attr("href",i.prevImg),n("a.next").attr("href",i.nextImg)):(n(this).attr("href",i.nextImg),n("a.previous").attr("href",i.prevImg)),o(),!1}),n(document).on("hidden.bs.modal","#bsPhotoGalleryModal",function(){n("#bsPhotoGalleryModal .modal-body").html("");i={}}),function(){if(0!==n("#bsPhotoGalleryModal").length)return!1;var t="";t+='<div class="modal fade" id="bsPhotoGalleryModal" tabindex="-1" role="dialog"';t+='aria-labelledby="myModalLabel" aria-hidden="true">';t+='<div class="modal-dialog modal-lg"><div class="modal-content">';t+='<div class="modal-body"><\/div><\/div><\/div><\/div>';n("body").append(t)}()),this};n.fn.bsPhotoGallery.defaults={classes:"col-xl-2 col-lg-2 col-md-2 col-sm-4",showControl:!0,hasModal:!0,shortText:!0}}(jQuery)