").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){n(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),n(e).appendTo(t.$slide),n(e).is("video,audio")&&(n(e).addClass("fancybox-video"),n(e).wrap("
"),t.contentType="video",t.opts.width=t.opts.width||n(e).attr("width"),t.opts.height=t.opts.height||n(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("
").children().first()),t.$content.addClass("fancybox-content"),t.$slide.addClass("fancybox-slide--"+t.contentType),o.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("fancybox-slide--"+t.contentType).addClass("fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){var e=this;t=t||e.current,t&&!t.$spinner&&(t.$spinner=n(e.translate(e,e.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){var e=this;t=t||e.current,t&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&n('
').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e=this,n=t||e.current,o=n.opts.caption,a=e.$refs.caption,i=!1;n.opts.preventCaptionOverlap&&o&&o.length&&(n.pos!==e.currPos?(a=a.clone().empty().appendTo(a.parent()),a.html(o),i=a.outerHeight(!0),a.empty().remove()):e.$caption&&(i=e.$caption.outerHeight(!0)),n.$slide.css("padding-bottom",i||""))},adjustLayout:function(t){var e,n,o,a,i=this,s=t||i.current;s.isLoaded&&s.opts.disableLayoutFix!==!0&&(s.$content.css("margin-bottom",""),s.$content.outerHeight()>s.$slide.height()+.5&&(o=s.$slide[0].style["padding-bottom"],a=s.$slide.css("padding-bottom"),parseFloat(a)>0&&(e=s.$slide[0].scrollHeight,s.$slide.css("padding-bottom",0),Math.abs(e-s.$slide[0].scrollHeight)<1&&(n=a),s.$slide.css("padding-bottom",o))),s.$content.css("margin-bottom",n))},revealContent:function(t){var e,a,i,s,r=this,c=t.$slide,l=!1,d=!1,u=r.isMoved(t),f=t.isRevealed;return t.isRevealed=!0,e=t.opts[r.firstRun?"animationEffect":"transitionEffect"],i=t.opts[r.firstRun?"animationDuration":"transitionDuration"],i=parseInt(t.forcedDuration===o?i:t.forcedDuration,10),!u&&t.pos===r.currPos&&i||(e=!1),"zoom"===e&&(t.pos===r.currPos&&i&&"image"===t.type&&!t.hasError&&(d=r.getThumbPos(t))?l=r.getFitPos(t):e="fade"),"zoom"===e?(r.isAnimating=!0,l.scaleX=l.width/d.width,l.scaleY=l.height/d.height,s=t.opts.zoomOpacity,"auto"==s&&(s=Math.abs(t.width/t.height-d.width/d.height)>.1),s&&(d.opacity=.1,l.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),d),p(t.$content),void n.fancybox.animate(t.$content,l,i,function(){r.isAnimating=!1,r.complete()})):(r.updateSlide(t),e?(n.fancybox.stop(c),a="fancybox-slide--"+(t.pos>=r.prevPos?"next":"previous")+" fancybox-animated fancybox-fx-"+e,c.addClass(a).removeClass("fancybox-slide--current"),t.$content.removeClass("fancybox-is-hidden"),p(c),"image"!==t.type&&t.$content.hide().show(0),void n.fancybox.animate(c,"fancybox-slide--current",i,function(){c.removeClass(a).css({transform:"",opacity:""}),t.pos===r.currPos&&r.complete()},!0)):(t.$content.removeClass("fancybox-is-hidden"),f||!u||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===r.currPos&&r.complete())))},getThumbPos:function(t){var e,o,a,i,s,r=!1,c=t.$thumb;return!(!c||!g(c[0]))&&(e=n.fancybox.getTranslate(c),o=parseFloat(c.css("border-top-width")||0),a=parseFloat(c.css("border-right-width")||0),i=parseFloat(c.css("border-bottom-width")||0),s=parseFloat(c.css("border-left-width")||0),r={top:e.top+o,left:e.left+s,width:e.width-a-s,height:e.height-o-i,scaleX:1,scaleY:1},e.width>0&&e.height>0&&r)},complete:function(){var t,e=this,o=e.current,a={};!e.isMoved()&&o.isLoaded&&(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),e.preload("inline"),p(o.$slide),o.$slide.addClass("fancybox-slide--complete"),n.each(e.slides,function(t,o){o.pos>=e.currPos-1&&o.pos<=e.currPos+1?a[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.off().remove())}),e.slides=a),e.isAnimating=!1,e.updateCursor(),e.trigger("afterShow"),o.opts.video.autoStart&&o.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){this.webkitExitFullscreen&&this.webkitExitFullscreen(),e.next()}),o.opts.autoFocus&&"html"===o.contentType&&(t=o.$content.find("input[autofocus]:enabled:visible:first"),t.length?t.trigger("focus"):e.focus(null,!0)),o.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,n,o=this;o.group.length<2||(n=o.slides[o.currPos+1],e=o.slides[o.currPos-1],e&&e.type===t&&o.loadSlide(e),n&&n.type===t&&o.loadSlide(n))},focus:function(t,o){var a,i,s=this,r=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");s.isClosing||(a=!t&&s.current&&s.current.isComplete?s.current.$slide.find("*:visible"+(o?":not(.fancybox-close-small)":"")):s.$refs.container.find("*:visible"),a=a.filter(r).filter(function(){return"hidden"!==n(this).css("visibility")&&!n(this).hasClass("disabled")}),a.length?(i=a.index(e.activeElement),t&&t.shiftKey?(i<0||0==i)&&(t.preventDefault(),a.eq(a.length-1).trigger("focus")):(i<0||i==a.length-1)&&(t&&t.preventDefault(),a.eq(0).trigger("focus"))):s.$refs.container.trigger("focus"))},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,a,i,s,r,c,l,u=this,f=u.current,h=function(){u.cleanUp(t)};return!u.isClosing&&(u.isClosing=!0,u.trigger("beforeClose",t)===!1?(u.isClosing=!1,d(function(){u.update()}),!1):(u.removeEvents(),i=f.$content,o=f.opts.animationEffect,a=n.isNumeric(e)?e:o?f.opts.animationDuration:0,f.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),t!==!0?n.fancybox.stop(f.$slide):o=!1,f.$slide.siblings().trigger("onReset").remove(),a&&u.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration",a+"ms"),u.hideLoading(f),u.hideControls(!0),u.updateCursor(),"zoom"!==o||i&&a&&"image"===f.type&&!u.isMoved()&&!f.hasError&&(l=u.getThumbPos(f))||(o="fade"),"zoom"===o?(n.fancybox.stop(i),s=n.fancybox.getTranslate(i),c={top:s.top,left:s.left,scaleX:s.width/l.width,scaleY:s.height/l.height,width:l.width,height:l.height},r=f.opts.zoomOpacity,"auto"==r&&(r=Math.abs(f.width/f.height-l.width/l.height)>.1),r&&(l.opacity=0),n.fancybox.setTranslate(i,c),p(i),n.fancybox.animate(i,l,a,h),!0):(o&&a?n.fancybox.animate(f.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+o,a,h):t===!0?setTimeout(h,a):h(),
!0)))},cleanUp:function(e){var o,a,i,s=this,r=s.current.opts.$orig;s.current.$slide.trigger("onReset"),s.$refs.container.empty().remove(),s.trigger("afterClose",e),s.current.opts.backFocus&&(r&&r.length&&r.is(":visible")||(r=s.$trigger),r&&r.length&&(a=t.scrollX,i=t.scrollY,r.trigger("focus"),n("html, body").scrollTop(i).scrollLeft(a))),s.current=null,o=n.fancybox.getInstance(),o?o.activate():(n("body").removeClass("fancybox-active compensate-for-scrollbar"),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,a=Array.prototype.slice.call(arguments,1),i=this,s=e&&e.opts?e:i.current;return s?a.unshift(s):s=i,a.unshift(i),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,a)),o===!1?o:void("afterClose"!==t&&i.$refs?i.$refs.container.trigger(t+".fb",a):r.trigger(t+".fb",a))},updateControls:function(){var t=this,o=t.current,a=o.index,i=t.$refs.container,s=t.$refs.caption,r=o.opts.caption;o.$slide.trigger("refresh"),t.$caption=r&&r.length?s.html(r):null,t.hasHiddenControls||t.isIdle||t.showControls(),i.find("[data-fancybox-count]").html(t.group.length),i.find("[data-fancybox-index]").html(a+1),i.find("[data-fancybox-prev]").prop("disabled",!o.opts.loop&&a<=0),i.find("[data-fancybox-next]").prop("disabled",!o.opts.loop&&a>=t.group.length-1),"image"===o.type?i.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",o.opts.image.src||o.src).show():o.opts.toolbar&&i.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),n(e.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=this,n=["infobar","toolbar","nav"];!t&&e.current.opts.preventCaptionOverlap||n.push("caption"),this.$refs.container.removeClass(n.map(function(t){return"fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.5.2",defaults:i,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new b(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),t===!0&&this.close(t))},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))})},setTranslate:function(t,e){var n="",a={};if(t&&e)return e.left===o&&e.top===o||(n=(e.left===o?t.position().left:e.left)+"px, "+(e.top===o?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),e.scaleX!==o&&e.scaleY!==o?n+=" scale("+e.scaleX+", "+e.scaleY+")":e.scaleX!==o&&(n+=" scaleX("+e.scaleX+")"),n.length&&(a.transform=n),e.opacity!==o&&(a.opacity=e.opacity),e.width!==o&&(a.width=e.width),e.height!==o&&(a.height=e.height),t.css(a)},animate:function(t,e,a,i,s){var r,c=this;n.isFunction(a)&&(i=a,a=null),c.stop(t),r=c.getTranslate(t),t.on(f,function(l){(!l||!l.originalEvent||t.is(l.originalEvent.target)&&"z-index"!=l.originalEvent.propertyName)&&(c.stop(t),n.isNumeric(a)&&t.css("transition-duration",""),n.isPlainObject(e)?e.scaleX!==o&&e.scaleY!==o&&c.setTranslate(t,{top:e.top,left:e.left,width:r.width*e.scaleX,height:r.height*e.scaleY,scaleX:1,scaleY:1}):s!==!0&&t.removeClass(e),n.isFunction(i)&&i(l))}),n.isNumeric(a)&&t.css("transition-duration",a+"ms"),n.isPlainObject(e)?(e.scaleX!==o&&e.scaleY!==o&&(delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&&t.parent().addClass("fancybox-is-scaling")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger(f)},a+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(f),t.off(f).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},a):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},a),this},r.on("click.fb-start","[data-fancybox]",a),r.on("click.fb-start","[data-fancybox-trigger]",function(t){n('[data-fancybox="'+n(this).attr("data-fancybox-trigger")+'"]').eq(n(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:n(this)})}),function(){var t=".fancybox-button",e="fancybox-focus",o=null;r.on("mousedown mouseup focus blur",t,function(a){switch(a.type){case"mousedown":o=n(this);break;case"mouseup":o=null;break;case"focusin":n(t).removeClass(e),n(this).is(o)||n(this).is("[disabled]")||n(this).addClass(e);break;case"focusout":n(t).removeClass(e)}})}()}}(window,document,jQuery),function(t){"use strict";var e={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"//www.youtube-nocookie.com/embed/$4",thumb:"//img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}},n=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e};t(document).on("objectNeedsType.fb",function(o,a,i){var s,r,c,l,d,u,f,p=i.src||"",h=!1;s=t.extend(!0,{},e,i.opts.media),t.each(s,function(e,o){if(c=p.match(o.matcher)){if(h=o.type,f=e,u={},o.paramPlace&&c[o.paramPlace]){d=c[o.paramPlace],"?"==d[0]&&(d=d.substring(1)),d=d.split("&");for(var a=0;a
1&&("youtube"===n.contentSource||"vimeo"===n.contentSource)&&o.load(n.contentSource)}})}(jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),a=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),i=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,a=o.length;ee.clientHeight,i=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return a||i},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},d=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};d.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),n(e).off(".fb.touch"),t.requestId&&(a(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},d.prototype.ontouchstart=function(o){var a=this,c=n(o.target),d=a.instance,u=d.current,f=u.$slide,p=u.$content,h="touchstart"==o.type;if(h&&a.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&f.length&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||u.$slide.hasClass("fancybox-animated"))return o.stopPropagation(),void o.preventDefault();a.realPoints=a.startPoints=i(o),a.startPoints.length&&(u.touch&&o.stopPropagation(),a.startEvent=o,a.canTap=!0,a.$target=c,a.$content=p,a.opts=u.opts.touch,a.isPanning=!1,a.isSwiping=!1,a.isZooming=!1,a.isScrolling=!1,a.canPan=d.canPan(),a.startTime=(new Date).getTime(),a.distanceX=a.distanceY=a.distance=0,a.canvasWidth=Math.round(f[0].clientWidth),a.canvasHeight=Math.round(f[0].clientHeight),a.contentLastPos=null,a.contentStartPos=n.fancybox.getTranslate(a.$content)||{top:0,left:0},a.sliderStartPos=n.fancybox.getTranslate(f),a.stagePos=n.fancybox.getTranslate(d.$refs.stage),a.sliderStartPos.top-=a.stagePos.top,a.sliderStartPos.left-=a.stagePos.left,a.contentStartPos.top-=a.stagePos.top,a.contentStartPos.left-=a.stagePos.left,n(e).off(".fb.touch").on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(a,"ontouchend")).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(a,"ontouchmove")),n.fancybox.isMobile&&e.addEventListener("scroll",a.onscroll,!0),((a.opts||a.canPan)&&(c.is(a.$stage)||a.$stage.find(c).length)||(c.is(".fancybox-image")&&o.preventDefault(),n.fancybox.isMobile&&c.hasClass("fancybox-caption")))&&(a.isScrollable=l(c)||l(c.parent()),n.fancybox.isMobile&&a.isScrollable||o.preventDefault(),(1===a.startPoints.length||u.hasError)&&(a.canPan?(n.fancybox.stop(a.$content),a.isPanning=!0):a.isSwiping=!0,a.$container.addClass("fancybox-is-grabbing")),2===a.startPoints.length&&"image"===u.type&&(u.isLoaded||u.$ghost)&&(a.canTap=!1,a.isSwiping=!1,a.isPanning=!1,a.isZooming=!0,n.fancybox.stop(a.$content),a.centerPointStartX=.5*(a.startPoints[0].x+a.startPoints[1].x)-n(t).scrollLeft(),a.centerPointStartY=.5*(a.startPoints[0].y+a.startPoints[1].y)-n(t).scrollTop(),a.percentageOfImageAtPinchPointX=(a.centerPointStartX-a.contentStartPos.left)/a.contentStartPos.width,a.percentageOfImageAtPinchPointY=(a.centerPointStartY-a.contentStartPos.top)/a.contentStartPos.height,a.startDistanceBetweenFingers=s(a.startPoints[0],a.startPoints[1]))))}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener("scroll",n.onscroll,!0)},d.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=i(t),void((e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&e.isSwiping===!0||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},d.prototype.onSwipe=function(e){var i,s=this,r=s.instance,c=s.isSwiping,l=s.sliderStartPos.left||0;if(c!==!0)"x"==c&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?l+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?l-=Math.pow(-s.distanceX,.8):l+=s.distanceX),s.sliderLastPos={top:"x"==c?0:s.sliderStartPos.top+s.distanceY,left:l},s.requestId&&(a(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("fancybox-is-sliding"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,r.group.length<2&&s.opts.vertical?s.isSwiping="y":r.isDragging||s.opts.vertical===!1||"auto"===s.opts.vertical&&n(t).width()>800?s.isSwiping="x":(i=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=i>45&&i<135?"y":"x"),"y"===s.isSwiping&&n.fancybox.isMobile&&s.isScrollable)return void(s.isScrolling=!0);r.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(r.slides,function(t,e){var o,a;n.fancybox.stop(e.$slide),o=n.fancybox.getTranslate(e.$slide),a=n.fancybox.getTranslate(r.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===r.current.pos&&(s.sliderStartPos.top=o.top-a.top,s.sliderStartPos.left=o.left-a.left),n.fancybox.setTranslate(e.$slide,{top:o.top-a.top,left:o.left-a.left})}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop()}},d.prototype.onPan=function(){var t=this;return s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5)?void(t.startPoints=t.newPoints):(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&a(t.requestId),void(t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})))},d.prototype.limitMovement=function(){var t,e,n,o,a,i,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;return a=h>r?f+l:f,i=p+d,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),l>0&&a>t&&(a=t-1+Math.pow(-t+f+l,.8)||0),l<0&&a0&&i>e&&(i=e-1+Math.pow(-e+p+d,.8)||0),d<0&&ii?(t=t>0?0:t,t=ts?(e=e>0?0:e,e=e1&&(o.dMs>130&&s>10||s>50),c=300;o.sliderLastPos=null,"y"==t&&!e&&Math.abs(o.distanceY)>50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),a=o.instance.close(!0,250)):r&&o.distanceX>0?a=o.instance.previous(c):r&&o.distanceX<0&&(a=o.instance.next(c)),a!==!1||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("fancybox-is-sliding")},d.prototype.endPanning=function(){var t,e,o,a=this;a.contentLastPos&&(a.opts.momentum===!1||a.dMs>350?(t=a.contentLastPos.left,e=a.contentLastPos.top):(t=a.contentLastPos.left+500*a.velocityX,e=a.contentLastPos.top+500*a.velocityY),o=a.limitPosition(t,e,a.contentStartPos.width,a.contentStartPos.height),o.width=a.contentStartPos.width,o.height=a.contentStartPos.height,n.fancybox.animate(a.$content,o,330))},d.prototype.endZooming=function(){var t,e,o,a,i=this,s=i.instance.current,r=i.newWidth,c=i.newHeight;i.contentLastPos&&(t=i.contentLastPos.left,e=i.contentLastPos.top,a={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(i.$content,a),rs.width||c>s.height?i.instance.scaleToActual(i.centerPointStartX,i.centerPointStartY,150):(o=i.limitPosition(t,e,r,c),n.fancybox.animate(i.$content,o,150)))},d.prototype.onTap=function(e){var o,a=this,s=n(e.target),r=a.instance,c=r.current,l=e&&i(e)||a.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-a.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-a.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&&(o=o.apply(r,[c,e])),o)switch(o){case"close":r.close(a.startEvent);break;case"toggleControls":r.toggleControls();break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(a.startEvent);break;case"zoom":"image"==c.type&&(c.isLoaded||c.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(d,u):r.group.length<2&&r.close(a.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is("img")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))o="Outside";else if(s.is(".fancybox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o="Content"}if(a.tapped){if(clearTimeout(a.tapped),a.tapped=null,Math.abs(d-a.tapX)>50||Math.abs(u-a.tapY)>50)return this;f("dblclick"+o)}else a.tapX=d,a.tapY=u,c.opts["dblclick"+o]&&c.opts["dblclick"+o]!==c.opts["click"+o]?a.tapped=setTimeout(function(){a.tapped=null,r.isAnimating||f("click"+o)},500):f("click"+o);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new d(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:' '},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,n=t.instance,o=n.group[n.currIndex].opts.slideShow;t.$button=n.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),n.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=e('
').appendTo(n.$refs.inner))},set:function(t){var n=this,o=n.instance,a=o.current;a&&(t===!0||a.opts.loop||o.currIndex '},fullScreen:{autoStart:!1}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.current.$content.css("transition","none"),n.isAnimating=!1,n.update(!0,!0,0)),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t),n.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t))})}e(t).on({"onInit.fb":function(t,e){var a;return n?void(e&&e.group[e.currIndex].opts.fullScreen?(a=e.$refs.container,a.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&e.opts.fullScreen.autoStart===!0&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide()):void e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(t,e,n,o,a){e&&e.FullScreen&&70===a&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&o.exit()}})}(document,jQuery),function(t,e){"use strict";var n="fancybox-thumbs",o=n+"-active";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:' '},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var a=function(t){this.init(t)};e.extend(a.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,n=t.group,o=0;e.instance=t,e.opts=n[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var a=0,i=n.length;a1));a++);o>1&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,o=this,a=o.instance,i=o.opts.parentEl,s=[];o.$grid||(o.$grid=e('
').appendTo(a.$refs.container.find(i).addBack().filter(i)),o.$grid.on("click","a",function(){a.jumpTo(e(this).attr("data-index"))})),o.$list||(o.$list=e('').appendTo(o.$grid)),e.each(a.group,function(e,n){t=n.thumb,t||"image"!==n.type||(t=n.src),s.push('
")}),o.$list[0].innerHTML=s.join(""),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"),10)+a.group.length*o.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,a=this,i=a.$list,s=a.$grid;a.instance.current&&(e=i.children().removeClass(o).filter('[data-index="'+a.instance.current.index+'"]').addClass(o),n=e.position(),"y"===a.opts.axis&&(n.top<0||n.top>i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):"x"===a.opts.axis&&(n.left
s.scrollLeft()+(s.width()-e.outerWidth()))&&i.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var n;e&&!e.Thumbs&&(n=new a(e),n.isActive&&n.opts.autoStart===!0&&n.show())},"beforeShow.fb":function(t,e,n,o){var a=e&&e.Thumbs;a&&a.isVisible&&a.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,a){var i=e&&e.Thumbs;i&&i.isActive&&71===a&&(o.preventDefault(),i.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&n.opts.hideOnClose!==!1&&n.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";function n(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:' '},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location},tpl:''
}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,a=e.fancybox.getInstance(),i=a.current||null;i&&("function"===e.type(i.opts.share.url)&&(t=i.opts.share.url.apply(i,[a,i])),o=i.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===i.type?encodeURIComponent(i.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,a.$caption?encodeURIComponent(a.$caption.text()):""),e.fancybox.open({src:a.translate(a,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){a.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,a=n.join("-");return{hash:e,index:o<1?1:o,gallery:a}}function a(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function i(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""),""!==n&&n)}n.escapeSelector||(n.escapeSelector=function(t){var e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,n=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t};return(t+"").replace(e,n)}),n(function(){n.fancybox.defaults.hash!==!1&&(n(e).on({"onInit.fb":function(t,e){var n,a;e.group[e.currIndex].opts.hash!==!1&&(n=o(),a=i(e),a&&n.gallery&&a==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,a,s){var r;a&&a.opts.hash!==!1&&(r=i(o),r&&(o.currentHash=r+(o.group.length>1?"-"+(a.index+1):""),t.location.hash!=="#"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300))))},"beforeClose.fb":function(n,o,a){a.opts.hash!==!1&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var a=n(o).data("FancyBox");if(a&&a.currentHash)return e=a,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&a(t)}),setTimeout(function(){n.fancybox.getInstance()||a(o())},50))})}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,a=(new Date).getTime();e.group.length<2||o.opts.wheel===!1||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,a-n<250||(n=a,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
(function($){
$.fn.bingouiFancySelect=function(opts){
var isiOS, settings;
if(opts==null){
opts={};}
settings=$.extend({
forceiOS: false,
includeBlank: false,
optionTemplate: function(optionEl){
return optionEl.text();
},
optgroupTemplate: function(optgroupEl){
return optgroupEl.attr('label');
},
triggerTemplate: function(optionEl){
return optionEl.text();
}}, opts);
isiOS = !!navigator.userAgent.match(/iP(hone|od|ad)/i);
return this.each(function(){
var copyOptionsToList, disabled, nextElement, options, prevElement, sel, selClass, trigger, updateTriggerText, wrapper;
sel=$(this);
if(sel.hasClass('bingoui-fancified')||sel.prop('tagName').toLowerCase()!=='select'){
return;
}
selClass=sel.attr('class');
sel.addClass('bingoui-fancified');
sel.css({
width: 1,
height: 1,
display: 'block',
position: 'absolute',
top: 0,
left: 0,
padding: 0,
margin: 0,
opacity: 0
});
sel.wrap('');
wrapper=sel.parent();
if(sel.data('class')){
wrapper.addClass(sel.data('class'));
}
wrapper.append($('
').addClass(selClass));
if(!(isiOS&&!settings.forceiOS)){
wrapper.append('
');
}
trigger=wrapper.find('.fs-trigger');
options=wrapper.find('.fs-options');
disabled=sel.prop('disabled');
if(disabled){
wrapper.addClass('fs-disabled');
}
updateTriggerText=function(){
var triggerHtml;
triggerHtml=settings.triggerTemplate(sel.find(':selected'));
return trigger.html(triggerHtml);
};
nextElement=function(el, $els){
var index;
index=$els.index(el);
if(index===$els.length - 1){
index=-1;
}
return $($els.get(index + 1));
};
prevElement=function(el, $els){
var index;
index=$els.index(el);
if(index===0){
index=$els.length;
}
return $($els.get(index - 1));
};
sel.on('blur.fs', function(){
if(trigger.hasClass('fs-open')){
setTimeout(function(){
return trigger.trigger('close.fs');
}, 120);
}});
trigger.on('close.fs', function(){
trigger.removeClass('fs-open');
options.removeClass('fs-open');
});
$('body').on('click', function (e){
if($(e.target).closest('.bingoui-fancy-select').length==0){
trigger.removeClass('fs-open');
options.removeClass('fs-open');
}});
trigger.on('click.fs', function(){
var offParent, parent;
if(!disabled){
trigger.toggleClass('fs-open');
if(trigger.hasClass('fs-open')){
options.find('li.fs-selected').addClass('fs-hover');
}
if(isiOS&&!settings.forceiOS){
if(trigger.hasClass('fs-open')){
sel.focus();
}}else{
if(trigger.hasClass('fs-open')){
parent=trigger.parent();
offParent=parent.offsetParent();
if((parent.offset().top + parent.outerHeight() + options.outerHeight() + 20) > $(window).height() + $(window).scrollTop()){
options.addClass('fs-overflowing');
}else{
options.removeClass('fs-overflowing');
}}
options.toggleClass('fs-open');
if(!isiOS){
sel.focus();
}}
}});
sel.on('enable', function(){
sel.prop('disabled', false);
wrapper.removeClass('fs-disabled');
disabled=false;
copyOptionsToList();
});
sel.on('disable', function(){
sel.prop('disabled', true);
wrapper.addClass('fs-disabled');
disabled=true;
});
sel.on('change.fs', function(e){
if(e.originalEvent&&e.originalEvent.isTrusted){
e.stopPropagation();
}else{
updateTriggerText();
}});
sel.on('update.fs', function(){
wrapper.find('.fs-options').empty();
copyOptionsToList();
});
sel.on('keydown', function(e){
var hovered, newHovered, w;
w=e.which;
hovered=options.find('.fs-hover');
hovered.removeClass('fs-hover');
if(!options.hasClass('fs-open')){
if(w===13||w===32||w===38||w===40){
e.preventDefault();
trigger.trigger('click.fs');
}}else{
if(w===38){
e.preventDefault();
if(hovered.length){
prevElement(hovered, options.find('li.fs-option')).addClass('fs-hover');
}else{
options.find('li.fs-option').last().addClass('fs-hover');
}}else if(w===40){
e.preventDefault();
if(hovered.length){
nextElement(hovered, options.find('li.fs-option')).addClass('fs-hover');
}else{
options.find('li.fs-option').first().addClass('fs-hover');
}}else if(w===27){
e.preventDefault();
trigger.trigger('click.fs');
}else if(w===13||w===32){
e.preventDefault();
hovered.trigger('mousedown.fs');
}else if(w===9){
if(trigger.hasClass('fs-open')){
trigger.trigger('close.fs');
}}
newHovered=options.find('.fs-hover');
if(newHovered.lenth){
options.scrollTop(0);
options.scrollTop(newHovered.position().top - 12);
}}
});
options.on('mousedown.fs', 'li.fs-option', function(e){
var clicked;
clicked=$(this);
options.find('.fs-selected').removeClass('fs-selected');
clicked.addClass('fs-selected');
trigger.addClass('fs-selected');
sel.val(clicked.data('raw-value')).trigger('change').trigger('change.fs').trigger('blur.fs').trigger('focus.fs');
setTimeout(function(){
return sel.focus();
}, 5);
});
options.on('mousedown.fs', 'li.fs-optgroup > span', function(e){
e.preventDefault();
e.stopPropagation();
});
options.on('mouseenter.fs', 'li.fs-option', function(){
var hovered, nowHovered;
nowHovered=$(this);
hovered=options.find('.fs-hover');
hovered.removeClass('fs-hover');
nowHovered.addClass('fs-hover');
});
options.on('mouseleave.fs', 'li.fs-option', function(){
options.find('.fs-hover').removeClass('fs-hover');
});
copyOptionsToList=function(){
var generateChildren, selOpts;
updateTriggerText();
if(isiOS&&!settings.forceiOS){
return;
}
selOpts=sel.find('option');
generateChildren=function(el, $options){
el.children().each(function(i, child){
var $child, $li, $optGroups, optHtml;
$child=$(child);
if($child.prop('tagName').toLowerCase()==='optgroup'){
optHtml=settings.optgroupTemplate($child);
$optGroups=$('');
$li=$("" + optHtml + " ");
$li.append($optGroups);
$options.append($li);
generateChildren($child, $optGroups);
}else if($child.prop('tagName').toLowerCase()==='option'){
optHtml=settings.optionTemplate($child);
if($child.prop('selected')){
$options.append("" + optHtml + " ");
}else{
$options.append("" + optHtml + " ");
}}
});
};
generateChildren(sel, options);
};
copyOptionsToList();
});
};})(jQuery);
+function ($){
'use strict';
var Tab=function (element){
this.element=$(element)
}
Tab.VERSION='3.3.6'
Tab.TRANSITION_DURATION=150
Tab.prototype.show=function (){
var $this=this.element
var $ul=$this.closest('ul:not(.dropdown-menu)')
var selector=$this.data('target')
if(!selector){
selector=$this.attr('href')
selector=selector&&selector.replace(/.*(?=#[^\s]*$)/, '')
}
if($this.parent('li').hasClass('active')) return
var $previous=$ul.find('.active:last a')
var hideEvent=$.Event('hide.bs.tab', {
relatedTarget: $this[0]
})
var showEvent=$.Event('show.bs.tab', {
relatedTarget: $previous[0]
})
$previous.trigger(hideEvent)
$this.trigger(showEvent)
if(showEvent.isDefaultPrevented()||hideEvent.isDefaultPrevented()) return
var $target=$(selector)
this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function (){
$previous.trigger({
type: 'hidden.bs.tab',
relatedTarget: $this[0]
})
$this.trigger({
type: 'shown.bs.tab',
relatedTarget: $previous[0]
})
})
}
Tab.prototype.activate=function (element, container, callback){
var $active=container.find('> .active')
var transition=callback
&& $.support.transition
&& ($active.length&&$active.hasClass('fade')||!!container.find('> .fade').length)
function next(){
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', false)
element
.addClass('active')
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
if(transition){
element[0].offsetWidth
element.addClass('in')
}else{
element.removeClass('fade')
}
if(element.parent('.dropdown-menu').length){
element
.closest('li.dropdown')
.addClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
}
callback&&callback()
}
$active.length&&transition ?
$active
.one('bsTransitionEnd', next)
.emulateTransitionEnd(Tab.TRANSITION_DURATION) :
next()
$active.removeClass('in')
}
function Plugin(option){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.tab')
if(!data) $this.data('bs.tab', (data=new Tab(this)))
if(typeof option=='string') data[option]()
})
}
var old=$.fn.tab
$.fn.tab=Plugin
$.fn.tab.Constructor=Tab
$.fn.tab.noConflict=function (){
$.fn.tab=old
return this
}
var clickHandler=function (e){
e.preventDefault()
Plugin.call($(this), 'show')
}
$(document)
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
}(jQuery);
;(function ($, w){
"use strict";
var methods=(function (){
var c={
bcClass: 'sf-breadcrumb',
menuClass: 'sf-js-enabled',
anchorClass: 'sf-with-ul',
menuArrowClass: 'sf-arrows'
},
ios=(function (){
var ios=/^(?![\w\W]*Windows Phone)[\w\W]*(iPhone|iPad|iPod)/i.test(navigator.userAgent);
if(ios){
$('html').css('cursor', 'pointer').on('click', $.noop);
}
return ios;
})(),
wp7=(function (){
var style=document.documentElement.style;
return ('behavior' in style&&'fill' in style&&/iemobile/i.test(navigator.userAgent));
})(),
unprefixedPointerEvents=(function (){
return (!!w.PointerEvent);
})(),
toggleMenuClasses=function ($menu, o, add){
var classes=c.menuClass,
method;
if(o.cssArrows){
classes +=' ' + c.menuArrowClass;
}
method=(add) ? 'addClass':'removeClass';
$menu[method](classes);
},
setPathToCurrent=function ($menu, o){
return $menu.find('li.' + o.pathClass).slice(0, o.pathLevels)
.addClass(o.hoverClass + ' ' + c.bcClass)
.filter(function (){
return ($(this).children(o.popUpSelector).hide().show().length);
}).removeClass(o.pathClass);
},
toggleAnchorClass=function ($li, add){
var method=(add) ? 'addClass':'removeClass';
$li.children('a')[method](c.anchorClass);
},
toggleTouchAction=function ($menu){
var msTouchAction=$menu.css('ms-touch-action');
var touchAction=$menu.css('touch-action');
touchAction=touchAction||msTouchAction;
touchAction=(touchAction==='pan-y') ? 'auto':'pan-y';
$menu.css({
'ms-touch-action': touchAction,
'touch-action': touchAction
});
},
getMenu=function ($el){
return $el.closest('.' + c.menuClass);
},
getOptions=function ($el){
return getMenu($el).data('sfOptions');
},
over=function (){
var $this=$(this),
o=getOptions($this);
clearTimeout(o.sfTimer);
$this.siblings().superfish('hide').end().superfish('show');
},
close=function (o){
o.retainPath=($.inArray(this[0], o.$path) > -1);
this.superfish('hide');
if(!this.parents('.' + o.hoverClass).length){
o.onIdle.call(getMenu(this));
if(o.$path.length){
$.proxy(over, o.$path)();
}}
},
out=function (){
var $this=$(this),
o=getOptions($this);
if(ios){
$.proxy(close, $this, o)();
}else{
clearTimeout(o.sfTimer);
o.sfTimer=setTimeout($.proxy(close, $this, o), o.delay);
}},
touchHandler=function (e){
var $this=$(this),
o=getOptions($this),
$ul=$this.siblings(e.data.popUpSelector);
if(o.onHandleTouch.call($ul)===false){
return this;
}
if($ul.length > 0&&$ul.is(':hidden')){
$this.one('click.superfish', false);
if(e.type==='MSPointerDown'||e.type==='pointerdown'){
$this.trigger('focus');
}else{
$.proxy(over, $this.parent('li'))();
}}
},
applyHandlers=function ($menu, o){
var targets='li:has(' + o.popUpSelector + ')';
if($.fn.hoverIntent&&!o.disableHI){
$menu.hoverIntent(over, out, targets);
}else{
$menu
.on('mouseenter.superfish', targets, over)
.on('mouseleave.superfish', targets, out);
}
var touchevent='MSPointerDown.superfish';
if(unprefixedPointerEvents){
touchevent='pointerdown.superfish';
}
if(!ios){
touchevent +=' touchend.superfish';
}
if(wp7){
touchevent +=' mousedown.superfish';
}
$menu
.on('focusin.superfish', 'li', over)
.on('focusout.superfish', 'li', out)
.on(touchevent, 'a', o, touchHandler);
};
return {
hide: function (instant){
if(this.length){
var $this=this,
o=getOptions($this);
if(!o){
return this;
}
var not=(o.retainPath===true) ? o.$path:'',
$ul=$this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector),
speed=o.speedOut;
if(instant){
$ul.show();
speed=0;
}
o.retainPath=false;
if(o.onBeforeHide.call($ul)===false){
return this;
}
$ul.stop(true, true).animate(o.animationOut, speed, function (){
var $this=$(this);
o.onHide.call($this);
});
}
return this;
},
show: function (){
var o=getOptions(this);
if(!o){
return this;
}
var $this=this.addClass(o.hoverClass),
$ul=$this.children(o.popUpSelector);
if(o.onBeforeShow.call($ul)===false){
return this;
}
$ul.stop(true, true).animate(o.animation, o.speed, function (){
o.onShow.call($ul);
});
return this;
},
destroy: function (){
return this.each(function (){
var $this=$(this),
o=$this.data('sfOptions'),
$hasPopUp;
if(!o){
return false;
}
$hasPopUp=$this.find(o.popUpSelector).parent('li');
clearTimeout(o.sfTimer);
toggleMenuClasses($this, o);
toggleAnchorClass($hasPopUp);
toggleTouchAction($this);
$this.off('.superfish').off('.hoverIntent');
$hasPopUp.children(o.popUpSelector).attr('style', function (i, style){
return style.replace(/display[^;]+;?/g, '');
});
o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass);
$this.find('.' + o.hoverClass).removeClass(o.hoverClass);
o.onDestroy.call($this);
$this.removeData('sfOptions');
});
},
init: function (op){
return this.each(function (){
var $this=$(this);
if($this.data('sfOptions')){
return false;
}
var o=$.extend({}, $.fn.superfish.defaults, op),
$hasPopUp=$this.find(o.popUpSelector).parent('li');
o.$path=setPathToCurrent($this, o);
$this.data('sfOptions', o);
toggleMenuClasses($this, o, true);
toggleAnchorClass($hasPopUp, true);
toggleTouchAction($this);
applyHandlers($this, o);
$hasPopUp.not('.' + c.bcClass).superfish('hide', true);
o.onInit.call(this);
});
}};})();
$.fn.superfish=function (method, args){
if(methods[method]){
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
}
else if(typeof method==='object'||! method){
return methods.init.apply(this, arguments);
}else{
return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish');
}};
$.fn.superfish.defaults={
popUpSelector: 'ul,.sf-mega',
hoverClass: 'sfHover',
pathClass: 'overrideThisToUse',
pathLevels: 1,
delay: 800,
animation: {opacity: 'show'},
animationOut: {opacity: 'hide'},
speed: 'normal',
speedOut: 'fast',
cssArrows: true,
disableHI: false,
onInit: $.noop,
onBeforeShow: $.noop,
onShow: $.noop,
onBeforeHide: $.noop,
onHide: $.noop,
onIdle: $.noop,
onDestroy: $.noop,
onHandleTouch: $.noop
};})(jQuery, window);
(function ($, window, document){
"use strict";
var BIN=window.BIN||{};
var $body=$('body'),
isRTL=$body.hasClass('rtl'),
$window=$(window),
$loading=$('.bingo-loading'),
$shopwrapper=$('.content-shop-wapper'),
$shop_c_url=$shopwrapper.find('.bingo-shop-url');
BIN.animatePlaceholder=function (){
$('.input-field .form-label').on('click', function (){
$(this).parent().find('input').focus();
});
$('.input-field input').each(function (){
var inputValue=$(this).val();
if(inputValue==""){
$(this).removeClass('filled');
$(this).parent().removeClass('focused');
}else{
$(this).addClass('filled');
$(this).parent().addClass('focused');
}
$(this).on('focus', function (){
$(this).parent().addClass('focused');
});
$(this).on('blur', function (){
var inputValue=$(this).val();
if(inputValue==""){
$(this).removeClass('filled');
$(this).parent().removeClass('focused');
}else{
$(this).addClass('filled');
}});
});
$('.form-row .input-text').each(function (){
var inputValue=$(this).val();
if(inputValue==""){
$(this).parents('.form-row').removeClass('focused');
}else{
$(this).parents('.form-row').addClass('focused');
}
$(this).on('focus', function (){
$(this).parents('.form-row').addClass('focused');
});
$(this).on('blur', function (){
var inputValue=$(this).val();
if(inputValue==""){
$(this).parents('.form-row').removeClass('focused');
}});
});
};
BIN.ToolTip=function (){
};
BIN.Select=function (){
$('.bingo-select').bingouiFancySelect();
$('.widget select').bingouiFancySelect();
};
BIN.Slider=function (){
$('.bingo-slick').slick();
$('.bingo-slick-gallery').slick();
};
BIN.Tabs=function (){
$(document).on('click.bs.tab.data-api', '.bs-tab-nav a', function (e){
e.preventDefault();
$(this).tab('show');
});
};
BIN.Isotope=function (el){
var $container=$('.masonry'),
$grid=$('.grid');
if($('.masonry').length){
if(el){
var $c=el;
}else{
var $c=$container.data('column');
}
$c=parseInt($c);
var $class;
if($c!==5){
$class='.col-md-' + (12 / $c);
}else{
$class='.cols-md-5';
}
$container.imagesLoaded(function (){
$container.isotope({
itemSelector: '.column',
masonry: {
columnWidth: $class
}});
});
}
if($('.grid').length){
if(el){
var $c=el;
}else{
var $c=$grid.data('column');
}
$c=parseInt($c);
var $class;
if($c!==5){
$class='.col-md-' + (12 / $c);
}else{
$class='.cols-md-5';
}
$grid.imagesLoaded(function (){
$grid.isotope({
itemSelector: '.column',
layoutMode: 'fitRows',
masonry: {
columnWidth: $class
}});
});
}};
BIN.MasonryRefresh=function (){
var $container=$('.masonry'),
$grid=$('.grid');
setTimeout(function (){
$container.isotope('layout');
$grid.isotope({
layoutMode: 'fitRows',
});
}, 200);
};
BIN.LoadMore=function (){
$('.bingo-loadmore').each(function (){
var $this=$(this),
$container=$this.parent(),
token=$this.data('token'),
settings=window['bingo_load_more_' + token],
paging=1,
flood=false,
ajax_data;
$this.on('click', function (){
if(flood===false){
paging++;
flood=true;
ajax_data=$.extend({}, {action: "bingo_ajax_loadmore", paged: paging}, settings);
$.ajax({
type: 'POST',
url: bingo_theme_variable.ajax_url,
data: ajax_data,
dataType: 'json',
beforeSend: function (){
$this.addClass('loading');
},
success: function (response){
$this.removeClass('loading');
var $result=$(response);
if($container.find('.row').hasClass('masonry')){
$container.find('.row').imagesLoaded(function (){
$container.find('.row').append($result).isotope('appended', $result).isotope('layout');
});
}else if($container.find('.row').hasClass('grid')){
$container.find('.row').append($result).isotope('appended', $result).isotope('layout');
}else{
$container.find('.row').append($result);
}
flood=false;
if(ajax_data.max_number_pages <=paging){
$this.hide();
}
BIN.Isotope();
BIN.MasonryRefresh();
},
error: function (){
flood=false;
}});
}
return false;
});
});
};
BIN.Infinity=function (){
if($('#bingo-infinity').length){
var $container=$('body').find('.bingo-infinity-wrapper .row');
$container.infiniteScroll({
path: '#bingo-infinity a',
append: '.bingo-infinity-wrapper .column',
navSelector: '#bingo-infinity',
nextSelector: '#bingo-infinity a',
itemSelector: '.bingo-infinity-wrapper .column',
animate: true,
status: '.page-load-status'
});
if($container.hasClass('grid')||$container.hasClass('masonry')){
$container.on('load.infiniteScroll', function (event, response, path){
var $items=$(response).find('.column');
$items.imagesLoaded(function (){
$container.append($items);
$container.isotope('insert', $items);
});
});
}}
};
BIN.WOOShowStickyController=function (){
$('.product-filter').each(function (){
var $this=$(this),
$btnfilter=$this.find('.filter-title'),
$filtercontent=$this.find('.filter-content'),
$btnclose=$this.find('.close-dropdown');
$btnfilter.on('click', function (){
if($filtercontent.hasClass('show')){
$filtercontent.removeClass('show');
$btnfilter.removeClass('show');
}else{
$filtercontent.addClass('show');
$btnfilter.addClass('show');
}});
$btnclose.on('click', function (){
$filtercontent.removeClass('show');
$btnfilter.removeClass('show');
});
})
};
BIN.WOOgetUrlParameter=function (url, sParam){
var sPageURL, sParameterName, i;
if(url!==''){
sPageURL=url;
}else{
sPageURL=window.location.search.substring(1);
}
var sURLVariables=sPageURL.split('&');
for (i=0; i < sURLVariables.length; i++){
sParameterName=sURLVariables[i].split('=');
if(sParameterName[0]===sParam){
return sParameterName[1]===undefined ? true:decodeURIComponent(sParameterName[1]);
}}
};
BIN.WOOAjaxFilter=function (ajax_url, content='', before=''){
$.ajax({
type: 'POST',
url: ajax_url,
contentType: 'html',
beforeSend: function (){
$loading.addClass('open');
},
success: function (response){
$loading.removeClass('open');
history.pushState(null, null, ajax_url);
$body.html(response);
$('.filter-clear-all').removeClass('hide');
BIN.Isotope();
}});
};
BIN.WOOFilterPrice=function (){
$('.price_slider:not(.ui-slider)').on('slidestop', function (event, ul){
var $this=$(this), $ajax_url,
$form=$this.parents('form'),
$filter=$('.product-filter'),
$current_url=$shop_c_url.val(),
$min_text=$form.find('.from').html(),
$max_text=$form.find('.to').html(),
$min_value=$('#min_price').val(),
$max_value=$('#max_price').val();
if($current_url.indexOf('?') > 0){
if($current_url.indexOf('min_price') > 0){
$ajax_url=$current_url.replace('min_price=' + BIN.WOOgetUrlParameter('', 'min_price'), 'min_price=' + $min_value);
$ajax_url=$ajax_url.replace('max_price=' + BIN.WOOgetUrlParameter('', 'max_price'), 'max_price=' + $max_value);
}else{
$ajax_url=$current_url + '&' + $form.serialize();
}}else{
$ajax_url=$current_url + '?' + $form.serialize();
}
$filter.find('.filter-min').find('.filter-value').html($min_text);
$filter.find('.filter-max').find('.filter-value').html($max_text);
$('#f_min_price').removeClass('hidden').addClass('show');
$('#f_max_price').removeClass('hidden').addClass('show');
if($('#f_min_price').find('span.filter-value').length!==0){
$('#f_min_price').find('span.filter-value').html($min_text + ' ');
}else{
$('#f_min_price').append('' + $min_text + ' ');
}
if($('#f_max_price').find('span.filter-value').length!==0){
$('#f_max_price').find('span.filter-value').html($max_text + ' ');
}else{
$('#f_max_price').append('' + $max_text + ' ');
}
BIN.WOOAjaxFilter($ajax_url);
BIN.WOOFilterClear();
});
};
BIN.WOOFilterAttribute=function (){
$('.bin-widget-filter-by-attribute li a').on('click', function (el){
el.preventDefault();
var $this=$(this),
$name=$this.attr('data-name'),
$val=$this.attr('data-val'),
$variation=$this.attr('data-variation'),
$current_url=$shop_c_url.val(),
$li=$this.parent('li'),
$ajax_url=$li.find('> a').attr('href');
var $same_this=$body.find('a[data-variation="' + $variation + '"]');
var $same_li=$same_this.parent('li');
if($li.hasClass('chosen')){
$same_li.removeClass('chosen');
$li.removeClass('chosen');
$('#' + $name).removeClass('show').addClass('hidden');
$('#' + $name).find('span[data-value=' + $val + ']').remove();
}else{
$same_li.addClass('chosen');
$li.addClass('chosen');
$('#' + $name).removeClass('hidden').addClass('show');
$('#' + $name).append('' + $val + ' ')
}
BIN.WOOAjaxFilter($ajax_url);
BIN.WOOFilterClear();
});
};
BIN.WOOFilterClear=function (){
$('.product-filter .filter-clear').on('click', function (el){
el.preventDefault();
var $this=$(this),
$ajax_url,
$current_url=$shop_c_url.val(),
$filter=$this.parent('.filter-value'),
$value=$filter.attr('data-value'),
$name=$filter.attr('data-name');
if(BIN.WOOgetUrlParameter('', $name)===$value){
$ajax_url=$current_url.replace('?' + $name + '=' + BIN.WOOgetUrlParameter('', $name), '');
$ajax_url=$ajax_url.replace('&' + $name + '=' + BIN.WOOgetUrlParameter('', $name), '');
$ajax_url=$ajax_url.replace($name + '=' + BIN.WOOgetUrlParameter('', $name), '');
}else{
$ajax_url=$current_url.replace(',' + $value, '');
$ajax_url=$ajax_url.replace($value, '');
$ajax_url=$ajax_url.replace(',,', ',');
$ajax_url=$ajax_url.replace('=,', '=');
}
if($('#' + $name).find('.filter-value').length===0){
$('#' + $name).removeClass('show').addClass('hidden');
}
BIN.WOOAjaxFilter($ajax_url);
$filter.remove();
});
};
BIN.WOOFilterClearAll=function (){
$('.filter-clear-all').on('click', function (){
var $this=$(this),
$url=$this.attr('data-url');
$('.product-filter').find('.filter-attr .filter-value').remove();
$('.product-filter').find('.filter-attr').removeClass('show').addClass('hidden');
BIN.WOOAjaxFilter($url);
});
};
BIN.WOOChangeProductLayout=function (){
$('.product-change-layout').each(function (){
var $this=$(this),
$grid=$this.find('.columns-product-icon'),
$content=$this.parents('.controller-heading-shop').siblings('.bingo-shop');
if($this.parents('.vendor-catalog').length){
$content=$this.parents('.bingo-shop');
}
var $row=$content.find('.shop-content > .row'),
$is_masonry=$row.hasClass('masonry');
$grid.find('.shop-col').on('click', function (){
var $it=$(this),
$col=$it.attr('data-col'),
$old_col=$row.attr('data-column');
$grid.find('.shop-col').removeClass('active');
$it.addClass('active');
if($content.hasClass('list-view')){
$content.removeClass('list-view');
if($is_masonry){
$content.addClass('masonry-view');
}else{
$content.addClass('grid-view');
}}
if($is_masonry){
$row.addClass('masonry');
}
$row.attr('data-column', $col);
if($col!=='5'){
$content.find('article').removeClass().addClass('column col-12 col-md-' + 12 / $col);
}else{
$content.find('article').removeClass().addClass('column col-12 cols-md-5 cols-lg-5 cols-xl-5');
}
BIN.Isotope($col);
BIN.MasonryRefresh();
});
});
};
BIN.WooQuantity=function (){
$('body').on('click', '.bingo-plus', function (e){
var icput=$(this).parent('.product-quantity').find('.input-text.qty');
var val=parseInt(icput.val()) + 1;
icput.attr('value', val);
$('.button.update-cart').prop('disabled', false);
});
$('body').on('click', '.bingo-minus', function (e){
var icput=$(this).parent('.product-quantity').find('.input-text.qty');
var val=parseInt(icput.val()) - 1;
if(icput.val() > 1) icput.attr('value', val);
$('.button.update-cart').prop('disabled', false);
});
};
BIN.MoludeCategories=function (){
if($('.masonry-module').length){
var $container=$('.masonry-module');
$container.isotope({
itemSelector: '.module-column',
percentPosition: true,
masonry: {
columnWidth: '.module-column'
}});
}};
BIN.WOOProductFilterTab=function (){
if($('.bingo-product-filter-tab').length){
var $out_side=$('.bingo-product-filter-tab'),
$reset=false;
$out_side.find('.bingo-filter-event').on('click', function (){
var $this=$(this),
$input=$this.parents('.bingo-product-filter-tab').find('.bingo-params'),
$type=$this.attr('data-filter'),
$page=$input.attr('data-page'),
$params=$input.attr('data-params'),
$cat=$this.attr('data-cat'),
$container=$this.parents('.bingo-heading').siblings('.bingo-product-container'),
$row=$container.find('> .row');
if($this.parents('.bingo-product-filter-tab').hasClass('bingo-product-ajax-category-tab')){
if($this.parents('.bingo-product-filter-tab').find('.has-sidebar-cate').length){
$container=$this.parents('.bingo-product-container');
$row=$container.find('.row');
}
$this.parents('.item-cate').siblings('.item-cate').find('.bingo-filter-event').removeClass('active');
$this.parents('.bingo-heading-cat').find('.bingo-filter-event').removeClass('active');
}
if($this.parents('.bingo-sch').hasClass('layout-heading-5')){
$container=$this.parents('.bingo-product-filter-tab');
$row=$container.find('.col-12 .bingo-product-container > .row');
}
$this.siblings('.bingo-filter-event').removeClass('active');
$this.parents('.bingo-category-filter-tab').find('.bingo-filter-event').removeClass('active');
$this.addClass('active');
$input.attr('data-type', $type);
$input.attr('data-cat', $cat);
var data={
'action': 'bingo_woo_ajax_product_tab_filter',
'type': $input.attr('data-type'),
'cat': $input.attr('data-cat'),
'per_page': $page,
'params': $params
};
$.ajax({
method: 'POST',
url: bingo_theme_variable.ajax_url,
data: data,
dataType: 'json',
beforeSend: function (){
$row.addClass('loading');
},
success: function (response){
$row.removeClass('loading');
if($row.hasClass('bingo-slick')){
$row.slick('unslick');
$row.html(response.text);
$row.slick();
}else{
$row.html(response.text);
BIN.Isotope();
}
if(response.load_more){
$this.parents('.bingo-product-filter-tab').find('.bingo-woo-loadmore').show();
}
$reset=true;
}});
});
$out_side.find('.bingo-woo-loadmore').each(function (){
var paging=1, flood=false, $this=$(this);
$this.on('click', function (){
var $input=$this.parents('.bingo-product-filter-tab').find('.bingo-params'),
$inputtype=$input.attr('data-type'),
$page=$input.attr('data-page'),
$params=$input.attr('data-params'),
$container=$this.siblings('.bingo-product-container'),
$row=$container.find('> .row');
if($reset===true){
paging=1;
$reset=false;
}
if(flood===false){
paging++;
flood=true;
var data={
'action': 'bingo_woo_ajax_product_tab_filter',
'type': $inputtype,
'per_page': $page,
'params': $params,
'paged': paging
};
$.ajax({
method: 'POST',
url: bingo_theme_variable.ajax_url,
data: data,
dataType: 'json',
beforeSend: function (){
$this.addClass('loading');
},
success: function (response){
$this.removeClass('loading');
$row.append(response.text);
BIN.Isotope();
flood=false;
if(response.max_page <=paging){
$this.hide();
}},
error: function (){
flood=false;
}});
}
return false;
});
});
}};
BIN.WOOSingleStickylayout=function (){
$('.woo-single-sticky').each(function (){
var $this=$(this),
$ww=$(window).width(),
$sy=window.scrollY,
$lastKnownY=$sy,
$currentTop=0,
$productGalleryElement=$('.woocommerce-product-gallery'),
$productContentElement=$('.group-summary-tabs'),
$galleryHeight=$productGalleryElement.height(),
$contentHeight=$('.group-summary-tabs-info').height();
const $e=document.querySelector('div.group-summary-tabs-info');
const $initialTopOffset=parseInt(window.getComputedStyle($e).top);
if($galleryHeight < $contentHeight){
$productContentElement.css({'position': 'unset'});
}
if($ww > 767&&$galleryHeight > $contentHeight){
$(window).scroll(function (){
const $c=$e.getBoundingClientRect();
const $n=$c.top + $sy - $e.offsetTop + $e.offsetTop;
const $i=$e.clientHeight - window.innerHeight;
$sy < $lastKnownY ? $currentTop -=$sy - $lastKnownY:$currentTop +=$lastKnownY - $sy,
$currentTop=Math.min(Math.max($currentTop, -$i), $n, $initialTopOffset), $lastKnownY=$sy;
$productContentElement.css({'max-height': $galleryHeight + 'px'});
$('.group-summary-tabs-info').css({'top': $currentTop + 'px'});
});
}})
};
BIN.HeaderSearchAction=function (){
$('.bingo-ajax-search').each(function (){
var $bingo_search=$(this);
$bingo_search.find('.bas-cat-list').on('click', function (){
var $this=$(this),
$cat_list=$this.find('.bas-cat-parent');
if($cat_list.hasClass('fs-open')){
$cat_list.removeClass('fs-open');
}else{
$cat_list.addClass('fs-open');
$('body').on('click', function (e){
if($(e.target).closest('.bingo-ajax-search').length==0){
$cat_list.removeClass('fs-open');
}});
}});
$bingo_search.find('.bas-cat-list li span').on('click', function (){
var $this=$(this),
$cat=$this.attr('data-cat'),
$span=$this.parents('.bas-cat-list').find('.bas-cat-current');
$span.html($this.text());
$span.attr('data-cat', $cat);
$('.cat_input').val($cat);
});
$bingo_search.find('.bas-input').on('keypress', function (el){
var $this=$(this),
code=el.keycode||el.which;
if(code==13){
}});
})
};
BIN.HeaderAjaxSearch=function ($input){
var $val=$input.val(),
$cat=$input.siblings('.bas-cat-list').find('.bas-cat-current').attr('data-cat'),
$content=$input.parents('.bingo-ajax-search').find('.bas-ajax-content');
var data={
'action': 'bingo_header_ajax_search',
's': $val,
'cat': $cat,
};
$content.removeClass('has-content');
return $.ajax({
method: 'POST',
url: bingo_theme_variable.ajax_url,
data: data,
dataType: 'json',
beforeSend: function (){
$loading.addClass('open');
},
success: function (response){
$loading.removeClass('open');
if(response){
$content.addClass('has-content');
$content.html(response);
}
$('body').on('click', function (e){
if($(e.target).closest('.bingo-ajax-search').length==0){
$content.removeClass('has-content');
}});
},
error: function (){
console.log(response);
}});
};
BIN.CountDown=function (){
setInterval(function (){
var obj=jQuery('.countdown-time');
obj.each(function (){
var end=$(this).find('.content-data-time').data('end');
var gmt=$(this).find('.content-data-time').data('gmt');
var d=new Date();
var n=d.getTime();
var n=Math.floor(n / 1000);
var cd=end - (n + (gmt * 3600));
var days=hours=minutes=seconds=0;
if(cd > 0){
var sec_num=parseInt(cd, 10);
var days=Math.floor(sec_num / 86400);
var hours=Math.floor(sec_num / 3600) % 24;
var minutes=Math.floor(sec_num / 60) % 60;
var seconds=sec_num % 60;
if(seconds < 10){
var seconds='0' + seconds;
}
if(minutes < 10){
var minutes='0' + minutes;
}}
$(this).find('.days').text(days);
$(this).find('.hours').text(hours);
$(this).find('.minutes').text(minutes);
$(this).find('.seconds').text(seconds);
});
}, 1000);
};
BIN.ResponsiveHeaderSearch=function (is_res){
$('.bingo-ajax-search').each(function (){
var $this=$(this);
if(is_res){
if($this.find('.br-icon-search').length===0&&is_res){
$this.addClass('br-search');
$this.prepend(' ');
$('.br-icon-search').on('click', function (){
if($this.hasClass('os')){
$this.removeClass('os');
}else{
$this.addClass('os');
$this.on('click', function (e){
if($(e.target).closest('.bas-inner').length==0&&$(e.target).closest('.br-icon-search').length==0){
$this.removeClass('os');
}});
}});
}}else{
$this.find('.br-icon-search').remove();
$this.removeClass('br-search os');
}});
};
BIN.ResponsiveHeaderVerticalMenu=function (is_res){
$('.bh-vertical-menu').each(function (){
var $this=$(this);
if(is_res){
$this.addClass('br-vm');
}else{
$this.removeClass('br-vm');
}});
};
BIN.ResponsiveMenuDropdownAccodion=function (){
$("header .menu-item-has-children, .cat-parent, #wrapper-start .menu-item-has-children").on('click', function (e){
var $this=$(this),
$closest_ul=$this.closest("ul"),
$active_menu=$closest_ul.find(".active"),
$closest_li=$this.closest("li"),
$status=$closest_li.hasClass("active"),
$count=0;
$closest_ul.find("ul").slideUp(function (){
if(++$count==$closest_ul.find("ul").length){
$active_menu.removeClass("active");
}});
if(!$status){
$closest_li.children("ul").slideDown();
$closest_li.addClass("active");
}
e.stopPropagation();
});
};
BIN.WooCartCanvas=function (){
$('.bh-cart-canvas .bh-cart-btn').on('click', function (el){
el.preventDefault();
var $this=$(this),
$canvas=$('.bh-cart-canvas'),
$content=$canvas.find('.bh-cart-content');
$content.prepend('' + bingo_theme_variable.btn_close + ' ');
$body.addClass('canvas-cart-open');
$('.bhc-close').on('click', function (){
$body.removeClass('canvas-cart-open');
$content.find('.bhc-close').remove();
});
$('.bg-open-canvas-menu').on('click', function (){
$body.removeClass('canvas-cart-open');
$content.find('.bhc-close').remove();
});
})
};
BIN.CanvasMenu=function (){
$('.header-nav .br-icon-menu').on('click', function (){
var $this=$(this);
if($this.hasClass('br-icon-menu')){
$body.addClass('canvas-mainmenu');
}
if($body.hasClass('canvas-menu-open')){
$body.removeClass('canvas-menu-open');
$body.removeClass('canvas-mainmenu');
}else{
$body.addClass('canvas-menu-open');
}});
$('.bh-vertical-menu.br-vm i, .header-nav .br-icon-cate i, .header-7 .br-icon-cate').on('click', function (){
$body.addClass('canvas-cate-show');
});
$('.bg-open-canvas-menu').on('click', function (){
$body.removeClass('canvas-menu-open');
$body.removeClass('canvas-mainmenu');
$body.removeClass('canvas-cate-show');
});
$('.bingo-vertical-menu-sc .item-link > i.la').on('click', function (){
$(this).parents('.item-vertical').addClass('on');
});
$('.bingo-vertical-menu-sc .icon-close').on('click', function (){
$(this).parents('.item-vertical').removeClass('on');
});
};
BIN.HeaderResponsive=function (){
if($window.width() < 1025){
BIN.ResponsiveHeaderSearch(true);
BIN.ResponsiveHeaderVerticalMenu(true);
$body.addClass('bingo-responsive');
}else{
BIN.ResponsiveHeaderSearch(false);
BIN.ResponsiveHeaderVerticalMenu(false);
$body.removeClass('bingo-responsive');
}};
BIN.VendorWidgetCategories=function (){
$('.bingo-widget-vendor-products').each(function (){
var $this=$(this),
$btn=$this.find('.load-more'),
$ul=$this.find('.cats-list > ul'),
$count=$ul.attr('data-count'),
$step=$btn.attr('data-step');
$btn.on('click', function (){
var $new_step=parseInt($step) + 4;
for (var $i=0; $i <=$new_step; $i++){
$ul.find('.li-' + $i).addClass('active');
}
$btn.attr('data-step', $new_step);
if(parseInt($new_step) > parseInt($count)){
$btn.addClass('hidden');
}});
});
$('.has-child').on('click', function (){
$(this).find('> .child-cat').slideToggle(300);
});
};
BIN.MyAccountLogin=function (){
var $myaccount=$('.bingo-myaccount-wrapper');
$('.bingo-to-register').on('click', function (){
if($myaccount.hasClass('is-login-show')){
$myaccount.removeClass('is-login-show');
$myaccount.addClass('is-register-show');
}});
$('.bingo-to-login').on('click', function (){
if($myaccount.hasClass('is-register-show')){
$myaccount.removeClass('is-register-show');
$myaccount.addClass('is-login-show');
}});
};
BIN.SingleProductImage=function (){
if($('.single-product').length&&bingo_theme_variable.is_sp_zoom){
$('.bingo-product-image a').zoom();
}};
BIN.ProductVariations=function (){
$('.bingo-variation select').prop('selectedIndex', 0);
var $reset=$('.reset_variations');
$reset.on('click', function (){
$('.bingo-variation .list-variations').find('> li').removeClass('is_selected disabled');
$reset.addClass('hide');
});
$('.bingo-variation .list-variations > li').on('click', function (){
var $this=$(this),
$wrap=$this.parents('.bingo-variation'),
$p=$wrap.find('> .list-variations'),
$dep=$this.attr('data-dep'),
$img=$this.attr('data-image'),
$type=$this.attr('data-type'),
slug=$(this).attr('attr-value');
if($this.hasClass('disabled')){
return false;
}
$p.find('> li').removeClass('is_selected');
$this.addClass('is_selected');
$wrap.find('select').val(slug).trigger('change');
$reset.removeClass('hide');
$('.bingo-variation').each(function (){
var $bvs=$(this);
$bvs.find('.attribute-item').each(function (){
var $other_att=$(this),
$other_name=$other_att.attr('data-type'),
$other_img=$other_att.attr('data-image'),
$other_val=$other_att.attr('attr-value');
$other_att.removeClass('disabled');
if($other_img.indexOf($type + '_' + slug)!==-1&&$other_att.hasClass('is_selected')&&$other_name!=$type){
var other_img_arr=$other_img.split(',');
$.each(other_img_arr, function(index, item){
if(item.indexOf($type + '_' + slug)!==-1){
var image_id=item.replace($type + '_' + slug + '+', '');
console.log(image_id);
$('.bingo-slick').slick('slickGoTo', parseInt(image_id));
}});
}
if($dep.indexOf($other_name + '_' + $other_val)==-1&&$other_name!=$type){
$other_att.addClass('disabled');
}});
});
});
};
BIN.Mainnav=function (){
var getLeft;
getLeft=function ($el, $parent){
var left;
left=0;
while (true){
left=left + $el.position().left;
$el=$el.parent();
if(!$el.length||$el.is($parent.parent())){
break;
}}
return left;
};
$('#bingo-site-nav .sub-menu').each(function (){
var $alreadyOpen, $offsetParent, $parent, $submenu, $wrapper, left, rel_pos, wrapper_width;
$submenu=$(this);
if($submenu.closest('.bingo-depth-0').hasClass('bingo-mega-menu')){
return;
}
$alreadyOpen=$submenu.is(':visible');
$submenu.css('left', '');
$submenu.show();
$offsetParent=$submenu.closest('#bingo-site-nav > ul > li.menu-item-has-children');
$parent=$submenu.closest('.sub-menu');
$wrapper=$submenu.parents('.header-nav');
if($wrapper.length){
wrapper_width=$wrapper.outerWidth();
left=getLeft($submenu, $offsetParent);
rel_pos=$submenu.position();
if(left + $submenu.outerWidth() > screen.width){
if(!$submenu.parents('.bingo-open-right').length){
$submenu.parent('.menu-item').parent('.sub-menu').addClass('bingo-open-right');
}}
}
if(!$alreadyOpen){
$submenu.hide();
}});
};
BIN.WooQuickView=function (){
$('.btn-quickview').on('click', function (){
var $this=$(this),
$p_id=$this.attr('data-id');
var data={
'action': 'bingo_woo_quickview',
'post_id': $p_id,
};
$.ajax({
method: 'POST',
url: bingo_theme_variable.ajax_url,
data: data,
dataType: 'json',
beforeSend: function (){
$this.addClass('loading');
},
success: function (response){
$this.removeClass('loading');
$('#wrapper-end').append(response);
$('.bingo-quickview-bg, .quickview-close').on('click', function (){
$('.bingo-quickview-popup').remove();
});
$('.quickview-slick').slick();
},
error: function (response){
console.log(response);
}});
});
};
BIN.QuickShop=function (){
if($('.bingo-widget-quickshop').length){
$('.bingo-widget-quickshop').find('.attribute-item').on('click', function (){
var $this=$(this),
$parent=$(this).parents('.bingo-widget-quickshop'),
$type=$this.attr('data-type'),
$current_url=$shop_c_url.val(),
$ajax_url=$current_url + 'filter_type=' + $type;
$parent.find('.attribute-item').removeClass('chosen');
$this.addClass('chosen');
var data={
'action': 'bingo_woo_shop_filter_widget_quick_shop',
'type': $type,
};
$.ajax({
method: 'POST',
url: bingo_theme_variable.ajax_url,
data: data,
dataType: 'json',
beforeSend: function (){
$loading.addClass('open');
},
success: function (response){
$loading.removeClass('open');
var $row=$('.shop-content .row');
$row.html(response);
if($row.hasClass('grid')||$row.hasClass('masonry')){
$row.isotope('layout');
}}
});
});
}};
BIN.WOOtabsAccordions=function (){
$('.has-accordions').each(function (){
$('.has-accordions .woocommerce-product-rating > a').on('click', function (e){
e.preventDefault();
$('.wc-tabs > li').removeClass('active');
$('.reviews_tab').addClass('active');
$('#tab-title-reviews').find('.woocommerce-Tabs-panel').slideDown();
});
$('.has-accordions a.woocommerce-review-link').on('click', function (e){
e.preventDefault();
$('.accordions .reviews_tab a').unbind();
return false;
});
});
};
BIN.VendorDenied=function (){
if($('#terms_and_conditions_visibility').val()=='no'){
if($('#apply_for_vendor').is(':checked')){
$('.agree-to-terms-container').show();
}
$('#apply_for_vendor').on('click', function (){
$('.agree-to-terms-container').slideToggle();
});
}};
BIN.WooCompare=function (){
var oTable;
$('body').on('yith_woocompare_render_table', function (){
var t=$('table.compare-list');
if(typeof $.fn.DataTable!='undefined'&&typeof $.fn.imagesLoaded!='undefined'&&$(window).width() > 767){
t.imagesLoaded(function (){
oTable=t.DataTable({
'info': false,
'scrollX': true,
'scrollCollapse': true,
'paging': false,
'ordering': false,
'searching': false,
'autoWidth': false,
'destroy': true,
'fixedColumns': true
});
});
}}).trigger('yith_woocompare_render_table');
var redirect_to_cart=false,
body=$('body');
body.on('adding_to_cart', function ($thisbutton, data){
if(wc_add_to_cart_params.cart_redirect_after_add=='yes'){
wc_add_to_cart_params.cart_redirect_after_add='no';
redirect_to_cart=true;
}});
body.on('wc_cart_button_updated', function (ev, button){
$('a.added_to_cart').attr('target', '_parent');
});
body.on('added_to_cart', function (ev, fragments, cart_hash, button){
$('a').attr('target', '_parent');
if(redirect_to_cart==true){
parent.window.location=wc_add_to_cart_params.cart_url;
return;
}
if(fragments){
$.each(fragments, function (key, value){
$(key, window.parent.document).replaceWith(value);
});
}});
$(document).on('click', 'a.close', function (e){
e.preventDefault();
window.close();
});
$(window).on('resize yith_woocompare_product_removed', function (){
$('body').trigger('yith_woocompare_render_table');
});
};
BIN.WOOCartNoticeUpdate=function (){
$(document.body).on('adding_to_cart', function ($button, data){
var ajax_data={
'action': 'bingo_woo_add_to_cart_popup_ajax',
'p_id': data.attr('data-product_id'),
};
$.ajax({
method: 'POST',
url: bingo_theme_variable.ajax_url,
data: ajax_data,
dataType: 'json',
beforeSend: function (){
},
success: function (response){
$body.append(response);
$('.bingo-cart-popup-notice .bcpn-close').on('click', function (){
$('.bingo-cart-popup-notice').remove();
});
}});
});
$(document.body).on('added_to_cart', function (fragments, cart_hash, $button){
$body.find('.bingo-cart-popup-notice').addClass('show');
});
};
BIN.VendorVerticalMenu=function (){
$('#wrapper').each(function (){
var $pt_height=$('.main-content > .page-title-wrapper').height(),
$q=-($pt_height + 20);
if($window.width() > 575){
$('.vendor-menu-vertical').css({'margin-top': $q + 'px'});
}});
}
$(document).ready(function (){
BIN.animatePlaceholder();
BIN.ToolTip();
BIN.Slider();
BIN.Tabs();
BIN.LoadMore();
BIN.Isotope();
BIN.Infinity();
BIN.Select();
BIN.MoludeCategories();
BIN.HeaderSearchAction();
BIN.CountDown();
BIN.HeaderResponsive();
BIN.ResponsiveMenuDropdownAccodion();
BIN.CanvasMenu();
BIN.MyAccountLogin();
BIN.Mainnav();
if(bingo_theme_variable.is_woo_active){
BIN.WOOShowStickyController();
BIN.WOOFilterPrice();
BIN.WOOFilterAttribute();
BIN.WOOFilterClear();
BIN.WOOFilterClearAll();
BIN.WOOChangeProductLayout();
BIN.WooQuantity();
BIN.WOOProductFilterTab();
BIN.WOOSingleStickylayout();
BIN.WooCartCanvas();
BIN.VendorWidgetCategories();
BIN.SingleProductImage();
BIN.ProductVariations();
BIN.WooQuickView();
BIN.QuickShop();
BIN.WOOtabsAccordions();
BIN.VendorDenied();
BIN.WooCompare();
BIN.WOOCartNoticeUpdate();
BIN.VendorVerticalMenu();
}});
$(window).on('resize', function (){
BIN.HeaderResponsive();
BIN.WOOSingleStickylayout();
});
})(jQuery, window, document);
!function(d,l){"use strict";var e=!1,o=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){var r,a,i,s,n,o=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),c=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]');for(r=0;r")[0],b=u.each,e.style.cssText="background-color:rgba(1,1,1,.5)",i.rgba=-1a.mod/2?r+=a.mod:r-o>a.mod/2&&(r-=a.mod)),c[n]=_((o-r)*i+r,e)))}),this[e](c)},blend:function(t){if(1===this._rgba[3])return this;var e=this._rgba.slice(),n=e.pop(),r=p(t)._rgba;return p(u.map(e,function(t,e){return(1-n)*r[e]+n*t}))},toRgbaString:function(){var t="rgba(",e=u.map(this._rgba,function(t,e){return null==t?2 ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:n.width(),height:n.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return n.wrap(t),n[0]!==o&&!s.contains(n[0],o)||s(o).focus(),t=n.parent(),"static"===n.css("position")?(t.css({position:"relative"}),n.css({position:"relative"})):(s.extend(r,{position:n.css("position"),zIndex:n.css("z-index")}),s.each(["top","left","bottom","right"],function(t,e){r[e]=n.css(e),isNaN(parseInt(r[e],10))&&(r[e]="auto")}),n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),n.css(e),t.css(r).show()},removeWrapper:function(t){var e=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),t[0]!==e&&!s.contains(t[0],e)||s(e).focus()),t},setTransition:function(r,t,o,a){return a=a||{},s.each(t,function(t,e){var n=r.cssUnit(e);0
=0&&1==Number(displayBubble)){
$wdmCartCount.css("display", "block");
}});
(function(d){d.Observe={}})(jQuery);
(function(d,q){var r=function(e,f){f||(f=e,e=window.document);var m=[];d(f).each(function(){for(var l=[],g=d(this),h=g.parent();h.length&&!g.is(e);h=h.parent()){var f=g.get(0).tagName.toLowerCase();l.push(f+":eq("+h.children(f).index(g)+")");g=h}(h.length||g.is(e))&&m.push("> "+l.reverse().join(" > "))});return m.join(", ")};q.path={get:r,capture:function(e,f){f||(f=e,e=window.document);var m=[];d(f).each(function(){var l=-1,g=this;if(this instanceof Text)for(var g=this.parentNode,h=g.childNodes,
f=0;f').attr($.extend(args(this), {'type': 'text'}));
}
$replacement
.removeAttr('name')
.data({
'placeholder-password': $input,
'placeholder-id': id
})
.bind('focus.placeholder', clearPlaceholder);
$input
.data({
'placeholder-textinput': $replacement,
'placeholder-id': id
})
.before($replacement);
}
$input=$input.removeAttr('id').hide().prev().attr('id', id).show();
}
$input.addClass('placeholder');
$input[0].value=$input.attr('placeholder');
}else{
$input.removeClass('placeholder');
}}
function safeActiveElement(){
try {
return document.activeElement;
} catch (err){
}}
}(this, document, jQuery));
jQuery(document).ready(function (){
jQuery('form.variations_form.cart').on('show_variation', enableDisableEnquiryButton);
jQuery('form.variations_form.cart').on('reset_data', enableDisableEnquiryButton);
jQuery('body').append('
');
jQuery('.btnAddRemark').click(function (e){
e.preventDefault();
product_id=jQuery(this).attr('data-prod-id');
variation_id='';
variation_detail="";
if(jQuery('.variation_id').length>0&&jQuery('.variation_id').val()==''||jQuery('.variation_id').val()==0){
alert(wdm_data.select_variation);
return;
}
else if(jQuery('.variation_id').length>0){
variation_id=jQuery('.variation_id').val();
jQuery('select[name^=attribute_]').each(function(ind, obj){
if(variation_detail=""){
variation_detail=jQuery(this).val();
}else{
variation_detail=variation_detail.concat(','+jQuery(this).val());
}});
}
txt_remark='#wdm_remark_' + product_id;
remark=jQuery(txt_remark).val();
elem=jQuery(this);
quantity=1;
if(jQuery('input[name="quantity"]').length>0){
quantity=jQuery('input[name="quantity"]').val();
}
mydatavar={
action: 'wdm_add_product_in_enq_cart',
'product_id': product_id,
'remark': remark,
'product_quant':quantity,
'variation':variation_id,
'security':jQuery('#AddCartNonce').val(),
};
jQuery(".quoteup_registered_parameter").each(function (){
mydatavar[jQuery(this).attr('id')]=jQuery(this).val();
});
jQuery('.wdmquoteup-loader').css('display', 'inline-block');
jQuery('#wdm-cart-count').addClass('animated infinite pulse');
jQuery.post(wdm_data.ajax_admin_url, mydatavar, function (response){
if(response=='SECURITY_ISSUE'){
jQuery('.wdmquoteup-loader').css('display', 'none');
jQuery('#nonce_error').css('display', 'block');
elem.closest('form').css('display', 'none');
return false;
}
jQuery('.wdmquoteup-loader').css('display', 'none');
jQuery('.wdmquoteup-success-wrap').css('display', 'block');
elem.closest('form').css('display', 'none');
jQuery('#wdm-cart-count').removeClass('animated infinite pulse');
var count_val=parseInt(response);
var count_txt='';
if(count_val > 1){
count_txt=response+ ' ' + wdm_data.products_added_in_quote_cart;
}else{
count_txt=response+' ' + wdm_data.product_added_in_quote_cart;
}
jQuery('#wdm-cart-count').children('a').html('' + response + ' ');
jQuery('#wdm-cart-count').children('a').attr('title',count_txt);
jQuery('#wdm-cart-count').css('display','block');
});
return false;
});
jQuery('input[type=text], textarea').click(function (event){
event.preventDefault();
});
var error=0;
jQuery('input, textarea').placeholder();
jQuery("#custname").change(function (){
jQuery('#custname').attr("placeholder", wdm_data.nm_place);
});
jQuery("#txtemail").change(function (){
jQuery("#txtemail").attr("placeholder", wdm_data.email_place);
});
jQuery("body").on("click", '[id^="wdm-quoteup-trigger-"]', function (event){
var selector=jQuery(this);
if(wdm_data.MPE=='yes'){
if(selector.hasClass('added')){
return;
}
id=jQuery(this).attr('id');
number=id.match("wdm-quoteup-trigger-(.*)");
product_id=number[1];
variation_id="";
var variation_detail=[];
var $variation_id_obj='';
$variation_id_obj=jQuery(wdm_data.variation_id_selector);
if($variation_id_obj.length==0){
$variation_id_obj=selector.closest('.summary.entry-summary').find('.variation_id:first-child');
}
if($variation_id_obj.length > 0&&$variation_id_obj.val()==''||$variation_id_obj.val()==0){
alert(wdm_data.select_variation);
return;
}
else if($variation_id_obj.length>0){
variation_id=$variation_id_obj.val();
var variationSelectorElement=pepGetVariationSelectorElement();
variationSelectorElement.find('select[name^=attribute_]').each(function(ind, obj){
name=jQuery(this).attr('name');
name=name.substring(10);
variation=name + ":" + jQuery(this).val();
variation_detail.push(variation);
});
}
txt_remark='#wdm_remark_' + product_id;
remark=jQuery(txt_remark).val();
quantity=1;
if(jQuery('input[name="quantity"]').length>0){
quantity=jQuery('input[name="quantity"]').val();
}
var data={
action: 'wdm_trigger_add_to_enq_cart',
'product_id': product_id,
'remark': remark,
'product_quant':quantity,
'variation':variation_id,
'variation_detail':variation_detail,
'author_email':jQuery(this).next('#author_email').val(),
'language':jQuery('#wdmLocale').val(),
'security':jQuery('#AddCartNonce').val(),
};
selector.addClass('loading');
if(jQuery(event.target).is('a')){
selector.after(' ');
selector.prop('disabled', true);
event.preventDefault();
}
jQuery('[name^=attribute_]').change(function(){
selector.html(wdm_data.view_quote_cart_link_with_text).removeClass('added');
selector.text(wdm_data.buttonText);
selector.removeAttr("onclick");
});
jQuery.ajax({
url: wdm_data.ajax_admin_url,
type: 'post',
dataType: 'json',
data: data,
success: function(response){
selector.html(wdm_data.view_quote_cart_link_with_text).addClass('added').removeClass('loading');
if(selector.next().hasClass('loading-image')){
selector.next().remove();
selector.removeProp('disabled');
}
selector.attr('onclick', "location.href='" + wdm_data.view_quote_cart_link + "'");
jQuery('#wdm-cart-count').removeClass('animated infinite pulse');
var intRegex=/^\d+$/;
if(!intRegex.test(response)){
return;
}
var count_val=parseInt(response);
var count_txt='';
if(count_val > 1){
count_txt=response+ ' ' + wdm_data.products_added_in_quote_cart;
}else{
count_txt=response+' ' + wdm_data.product_added_in_quote_cart;
}
jQuery('#wdm-cart-count').children('a').html('' + response + ' ');
jQuery('#wdm-cart-count').children('a').attr('title',count_txt);
jQuery('#wdm-cart-count').css('display','block');
if(typeof public_quoteup_get_cart!="undefined"){
public_quoteup_get_cart();
}},
error: function(error){
console.log(error);
}});
/* jQuery.post(wdm_data.ajax_admin_url, data, function (response){
selector.html(wdm_data.view_quote_cart_link_with_text).addClass('added').removeClass('loading');
if(selector.next().hasClass('loading-image')){
selector.next().remove();
selector.removeProp('disabled');
}
selector.attr('onclick', "location.href='" + wdm_data.view_quote_cart_link + "'");
jQuery('#wdm-cart-count').removeClass('animated infinite pulse');
var intRegex=/^\d+$/;
if(!intRegex.test(response)){
return;
}
var count_val=parseInt(response);
var count_txt='';
if(count_val > 1){
count_txt=response+ ' ' + wdm_data.products_added_in_quote_cart;
}else{
count_txt=response+' ' + wdm_data.product_added_in_quote_cart;
}
jQuery('#wdm-cart-count').children('a').html('' + response + ' ');
jQuery('#wdm-cart-count').children('a').attr('title',count_txt);
jQuery('#wdm-cart-count').css('display','block');
});*/
}else{
var $variation_id_obj='';
$variation_id_obj=jQuery(wdm_data.variation_id_selector);
if($variation_id_obj.length==0){
$variation_id_obj=selector.closest('.summary.entry-summary').find('.variation_id:first-child');
}
if($variation_id_obj.length > 0&&$variation_id_obj.val()==''||$variation_id_obj.val()==0){
alert(wdm_data.select_variation);
return;
}
event.preventDefault();
id=jQuery(this).attr('id');
number=id.match("wdm-quoteup-trigger-(.*)");
product_id=number[1];
modal=jQuery('#wdm-quoteup-modal-'+product_id);
header=modal.find('.wdm-modal-header');
form=modal.find('.wdm-modal-body form');
msg=jQuery('.wdm-msg');
var number=id.match("wdm-quoteup-trigger-(.*)");
if(header.parent().is("a")){
header.unwrap();
}
if(form.parent().is("a")){
form.unwrap();
}
if(msg.parent().is("a")){
msg.unwrap();
}
jQuery('.wdm-quoteup-form').css('display', 'block');
modal_id="#wdm-quoteup-modal-" + number[1];
formId=jQuery(modal_id).find('form').attr('id');
if(formId=='frm_enquiry'){
jQuery(modal_id).appendTo("#wdm-modal-clone");
var oldModalId=jQuery('#wdm-modal-clone').children().attr('id');
jQuery(modal_id).modal('show');
}else{
jQuery(modal_id).appendTo("#wdm-modal-clone");
jQuery('.wdm-quoteup-form').css('display', 'block');
modal_id="#wdm-quoteup-modal-" + number[1];
jQuery(modal_id).modal('show');
}
jQuery('.wdm-modal-footer').css('display', 'block');
jQuery('#error').css('display', 'none');
jQuery('#nonce_error').css('display', 'none');
jQuery('.wdmquoteup-success-wrap').css('display', 'none');
}});
jQuery('body').on('shown.bs.wdm-modal','.wdm-modal',function(e){
id=jQuery(this).attr('id');
number=id.match("wdm-quoteup-modal-(.*)");
product_id=number[1];
jQuery('#wdm-quoteup-trigger-'+product_id).removeClass('loading');
jQuery('#wdm-cart-count').addClass('animated infinite pulse');
jQuery(this).find("input[type!='hidden']").first().focus();
});
jQuery('body').on('hidden.bs.wdm-modal','.wdm-modal',function(e){
jQuery('#wdm-cart-count').removeClass('animated infinite pulse');
});
jQuery("body").on('click', ' [id^="btnSend_"]', function (e){
e.preventDefault();
error_val=0;
err_string='';
var $this=jQuery(this);
var $form_data;
id_send=$this.attr('id');
var id_array=id_send.match("btnSend_(.*)");
p_name=jQuery('#product_name_' + id_array[1]).val();
var message=jQuery(this).closest('.form_input').siblings('.wdm-quoteup-form-inner').find('#txtmsg').val();
var phone=jQuery(this).closest('.form_input').siblings('.wdm-quoteup-form-inner').find('#txtphone').val();
var fields=wdm_data.fields;
var error_field;
variation_id='';
variation_detail=[];
var $variation_id_obj='';
$variation_id_obj=jQuery(wdm_data.variation_id_selector);
if($variation_id_obj.length==0){
$variation_id_obj=jQuery('#wdm-quoteup-trigger-'+id_array[1]).closest('.summary.entry-summary').find('.variation_id:first-child');
}
if($variation_id_obj.length>0){
variation_id=$variation_id_obj.val();
jQuery('select[name^=attribute_]').each(function(ind, obj){
name=jQuery(this).attr('name');
name=name.substring(10);
variation=name + ":" + jQuery(this).val();
variation_detail.push(variation);
});
}
nm_regex=/^[a-zA-Z ]+$/;
var enquiry_field;
if(fields.length > 0){
error_field=jQuery(this).closest('.form_input').siblings('.form-errors-wrap');
error_field.css('display', 'none');
jQuery('.error-list-item').remove();
jQuery('.wdm-error').removeClass('wdm-error');
for (i=0; i < fields.length; i++){
if('txtdate'==fields[i].id){
enquiry_field=$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find('input[id^=' + fields[i].id + ']');
}else{
enquiry_field=$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find('#' + fields[i].id);
}
var temp=enquiry_field.val();
var required=fields[i].required;
if(fields[i].validation!==""){
var validation=new RegExp(fields[i].validation);
}
var message=fields[i].validation_message;
var flag=0;
if(required=='yes'){
if(fields[i].type=="file"){
var attachedFiles=enquiry_field.prop('files');
if(attachedFiles.length < 1||attachedFiles.length > 10){
enquiry_field.addClass('wdm-error');
flag=1;
error_val=1;
err_string +='' + fields[i].required_message + ' ';
}else{
flag=0;
enquiry_field.removeClass('wdm-error');
}}else if(fields[i].type=="text"||fields[i].type=="textarea"){
if(temp==""){
enquiry_field.addClass('wdm-error');
flag=1;
error_val=1;
err_string +='' + fields[i].required_message + ' ';
}else{
flag=0;
enquiry_field.removeClass('wdm-error');
}}
else if(fields[i].type=="radio"){
$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find("[name=" + fields[i].id + "]").each(function (){
var temp1=jQuery(this);
if(temp1.is(":checked")){
flag=1;
}});
if(flag==0){
error_val=1;
$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find('#' + fields[i].id).parent().css("cssText", "background:#FCC !important;");
err_string +='' + fields[i].required_message + ' ';
}else{
$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find('#' + fields[i].id).parent().css("cssText", "background:white !important;");
}}
else if(fields[i].type=="checkbox"){
$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find("input[name=" + fields[i].id + "\\[\\]]").each(function (){
var temp1=jQuery(this);
if(temp1.is(":checked")){
flag=1;
}});
if(flag==0){
error_val=1;
$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find('#' + fields[i].id).parent().css("cssText", "background:#FCC !important;");
err_string +='' + fields[i].required_message + ' ';
}else{
$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find('#' + fields[i].id).parent().css("cssText", "background:white !important;");
}}
else if(fields[i].type=="select"){
$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find("[name=" + fields[i].id + "]").each(function (){
var temp1=jQuery(this);
if(temp1.val()!="#"){
flag=1;
}});
if(flag==0){
error_val=1;
$this.closest('.form_input').siblings('.wdm-pep-form-inner').find('#' + fields[i].id).parent().css("cssText", "background:#FCC !important;");
err_string +='' + fields[i].required_message + ' ';
}else{
$this.closest('.form_input').siblings('.wdm-pep-form-inner').find('#' + fields[i].id).parent().css("cssText", "background:white !important;");
}}
}
if(flag==0)
if(fields[i].validation!=""&&temp!=""){
if(!validation.test(temp)){
enquiry_field.addClass('wdm-error');
err_string +='' + message + ' ';
error_val=1;
}else{
enquiry_field.removeClass('wdm-error');
}}
}}
if(error_val==0){
jQuery('.wdmquoteup-loader').css('display', 'inline-block');
jQuery('#submit_value').val(1);
let $cookieConField=$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find("input[name='cookie-consent-cb[]']");
if($cookieConField.length > 0&&$cookieConField.is(":checked")){
let cname=$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find('#custname').val();
let cemail=$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find('#txtemail').val();
fun_set_cookie(cname, cemail);
}else{
fun_remove_cookie();
}
var $contactCC=jQuery('#wdm-modal-clone').find("#" + id_send).closest('.form_input').siblings('.wdm-quoteup-form-inner').find("#contact-cc");
if($contactCC.length > 0&&$contactCC.is(":checked")){
var wdm_checkbox_val='checked';
}else{
var wdm_checkbox_val=0;
}
quantity=1;
if(jQuery('input[name="txtQty"]').length>0){
quantity=jQuery(this).closest('.form_input').siblings('.wdm-quoteup-form-inner').find('#txtQty').val();
}
validate_enq={
action: 'quoteupValidateNonce',
security: jQuery('#ajax_nonce').val(),
};
nonce_error=0;
jQuery.post(wdm_data.ajax_admin_url, validate_enq, function (response){
if(response===''){
jQuery('.wdmquoteup-loader').css('display', 'none');
$this.closest('.form_input').siblings('#nonce_error').css('display', 'block');
nonce_error=1;
}else{
jQuery('.wdmquoteup-loader').css('display', 'inline-block');
$form_data=new FormData();
$form_data.append('action', 'quoteupSubmitWooEnquiryForm');
$form_data.append('security', jQuery('#ajax_nonce').val());
$form_data.append('wdmLocale', $this.closest('#frm_enquiry').find('#wdmLocale').val());
$form_data.append('uemail', $this.closest('#frm_enquiry').find('#author_email').val());
$form_data.append('product_name', jQuery('#product_name_' + id_array[1]).val());
$form_data.append('product_price', jQuery('#product_price_' + id_array[1]).val());
$form_data.append('variation_id', variation_id);
$form_data.append('variation_detail', variation_detail);
$form_data.append('product_img', jQuery('#product_img_' + id_array[1]).val());
$form_data.append('product_id', jQuery('#product_id_' + id_array[1]).val());
$form_data.append('product_quant', quantity);
$form_data.append('product_url', jQuery('#product_url_' + id_array[1]).val());
$form_data.append('cc', wdm_checkbox_val);
jQuery(".quoteup_registered_parameter").each(function (){
$form_data.append(jQuery(this).attr('id'), jQuery(this).val());
});
if(fields.length > 0){
for (i=0; i < fields.length; i++){
if(fields[i].type=='text'||fields[i].type=='textarea'||fields[i].type=='select'){
if('txtdate'==fields[i].id){
$form_data.append(fields[i].id, $this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find("#" + fields[i].id + '-' + id_array[1]).val());
}else{
$form_data.append(fields[i].id, $this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find("#" + fields[i].id).val());
}}
else if(fields[i].type=='radio'){
$form_data.append(fields[i].id, $this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find("[name='" + fields[i].id + "']:checked").val());
}
else if(fields[i].type=='checkbox'){
var selected="";
$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find("[name='" + fields[i].id + "[]']:checked").each(function (){
if(selected==""){
selected=jQuery(this).val();
} else
selected +="," + jQuery(this).val();
});
$form_data.append(fields[i].id, selected);
}
else if(fields[i].type=='multiple'){
var selected="";
selected=$this.closest('.form_input').siblings('.wdm-quoteup-form-inner').find("#" + fields[i].id).multipleSelect('getSelects').join(',');
$form_data.append(fields[i].id, selected);
}else if(fields[i].type=='file'){
var attachedFiles=$this.closest('.wdm-quoteup-form').find('.upload-field').prop('files');
if(attachedFiles&&attachedFiles.length > 0){
jQuery(attachedFiles).each(function(index, value){
$file=value;
$file_size=$file.size;
$form_data.append($file.name, $file);
});
}}
}}
if('undefined'!=typeof quoteup_captcha_data&&'v3'===quoteup_captcha_data.captcha_version){
let site_key=quoteup_captcha_data.site_key;
grecaptcha.execute(site_key, {action: 'quoteup_captcha'}).then(function(token){
$form_data.append('captcha', token);
submitEnquiryFormAjax($form_data, $this, id_array, error_field);
});
}else{
if(jQuery('.g-recaptcha').length > 0){
widgetID=$this.closest('#frm_enquiry').find('.g-recaptcha').attr('data-widgetID')
$captcha=grecaptcha.getResponse(widgetID);
if($captcha!=''){
$form_data.append('captcha', $captcha);
}}
submitEnquiryFormAjax($form_data, $this, id_array, error_field);
}}
});
}else{
error_field.css('display', 'block');
error_field.find('ul.error-list').html(err_string);
return false;
}
return false;
});
function submitEnquiryFormAjax($form_data, $this, id_array, error_field){
jQuery.ajax({
type: 'POST',
url: wdm_data.ajax_admin_url,
data: $form_data,
contentType: false,
processData: false,
dataType: 'json',
cache: false,
success: function(response){
jQuery('.wdmquoteup-loader').css('display', 'none');
if(response.status=='COMPLETED'){
if(window.ga&&ga.create){
for (i=0; i < response.gaProducts.length; i++){
ga('send', 'event', 'Product/Quote Enquiry Form', 'submit', response.gaProducts[i]);
};}
if(wdm_data.redirect!='n'){
window.location=wdm_data.redirect;
}
$this.closest('.wdm-quoteup-form').hide();
$this.closest('.form_input').parent('form').siblings('#success_' + id_array[1]).show();
jQuery(document).trigger('quoteupEnquirySuccessBeforeFormHidden', [ $this, $form_data ]);
setTimeout(function(){
id=$this.attr('id');
number=id.match("btnSend_(.*)");
modal_id="#wdm-quoteup-modal-" + number[1];
jQuery(modal_id).modal('hide');
jQuery('.wdm-quoteup-form').css('display', 'none');
jQuery('.wdm-modal-footer').css('display', 'none');
jQuery('#error').css('display', 'none');
jQuery('#nonce_error').css('display', 'none');
jQuery('#success_' + number[1]).css('display', 'none');
jQuery(document).trigger('quoteupEnquirySuccessAfterTimeout', [ $this, $form_data ]);
}, 2000)
}else{
if(response.status=='failed'){
error_field.css('display', 'block');
error_field.find('ul.error-list').html(response.message);
return false;
}}
}});
}
function enableDisableEnquiryButton(){
let $this=jQuery(this),
productId=jQuery(this).data("product_id"),
$enquiryButton=jQuery("button[id=wdm-quoteup-trigger-" + productId + "]"),
$variationIdObj=jQuery(wdm_data.variation_id_selector);
if($variationIdObj.length==0){
$variationIdObj=$this.find('.variation_id:first-child');
}
if($enquiryButton.length > 0&&$variationIdObj.length > 0){
if($variationIdObj.val()==''||$variationIdObj.val()==0){
$enquiryButton.attr('disabled','disabled');
}else{
$enquiryButton.removeAttr('disabled');
}}
}});
function fun_set_cookie(cname, cemail){
if(cname!=''&&cemail!=''){
var d=new Date();
d.setTime(d.getTime() + (90 * 24 * 60 * 60 * 1000));
var expires="expires=" + d.toGMTString();
document.cookie="wdmusername=" + cname + "; expires=" + expires + "; path=/";
document.cookie="wdmuseremail=" + cemail + "; expires=" + expires + ";path=/";
}}
function fun_remove_cookie(){
document.cookie="wdmusername=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;";
document.cookie="wdmuseremail=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;";
}
function pepGetVariationSelectorElement(){
if(jQuery('#product-'+product_id).find(".variations_form").length > 0){
return jQuery('#product-'+product_id).find(".variations_form");
}
if(jQuery('.post-'+product_id).find(".variations_form").length > 0){
return jQuery('.post-'+product_id).find(".variations_form");
}
if(jQuery('.postid-'+product_id).find(".variations_form").length > 0){
return jQuery('.postid-'+product_id).find(".variations_form");
}}
if(typeof jQuery==='undefined'){
throw new Error('Bootstrap\'s JavaScript requires jQuery')
}
+function ($){
'use strict';
function transitionEnd(){
var el=document.createElement('bootstrap')
var transEndEventNames={
'WebkitTransition': 'webkitTransitionEnd',
'MozTransition': 'transitionend',
'OTransition': 'oTransitionEnd otransitionend',
'transition': 'transitionend'
}
for (var name in transEndEventNames){
if(el.style[name]!==undefined){
return {end: transEndEventNames[name]}}
}
return false
}
$.fn.emulateTransitionEnd=function (duration){
var called=false, $el=this
$(this).one($.support.transition.end, function (){
called=true
})
var callback=function (){
if(!called)
$($el).trigger($.support.transition.end)
}
setTimeout(callback, duration)
return this
}
$(function (){
$.support.transition=transitionEnd()
})
}(jQuery);
+function ($){
'use strict';
var Modal=function (element, options){
this.options=options
this.$element=$(element)
this.$backdrop =
this.isShown=null
if(this.options.remote){
this.$element
.find('.wdm-modal-content')
.load(this.options.remote, $.proxy(function (){
this.$element.trigger('loaded.bs.wdm-modal')
}, this))
}}
Modal.DEFAULTS={
backdrop: true,
keyboard: true,
show: true
}
Modal.prototype.toggle=function (_relatedTarget){
return this[!this.isShown ? 'show':'hide'](_relatedTarget)
}
Modal.prototype.show=function (_relatedTarget){
var that=this
var e=$.Event('show.bs.wdm-modal', {relatedTarget: _relatedTarget})
this.$element.trigger(e)
if(this.isShown||e.isDefaultPrevented())
return
this.isShown=true
this.escape()
this.$element.on('click.dismiss.bs.wdm-modal', '[data-dismiss="wdm-modal"]', $.proxy(this.hide, this))
this.backdrop(function (){
var transition=$.support.transition&&that.$element.hasClass('wdm-fade')
if(!that.$element.parent().length){
that.$element.appendTo(document.body)
}
that.$element
.show()
.scrollTop(0)
if(transition){
that.$element[0].offsetWidth
}
that.$element
.addClass('in')
.attr('aria-hidden', false)
that.enforceFocus()
var e=$.Event('shown.bs.wdm-modal', {relatedTarget: _relatedTarget})
transition ?
that.$element.find('.wdm-modal-dialog')
.one($.support.transition.end, function (){
that.$element.focus().trigger(e)
})
.emulateTransitionEnd(300) :
that.$element.focus().trigger(e)
})
}
Modal.prototype.hide=function (e){
if(e)
e.preventDefault()
e=$.Event('hide.bs.wdm-modal')
this.$element.trigger(e)
if(!this.isShown||e.isDefaultPrevented())
return
this.isShown=false
this.escape()
$(document).off('focusin.bs.wdm-modal')
this.$element
.removeClass('in')
.attr('aria-hidden', true)
.off('click.dismiss.bs.wdm-modal')
$.support.transition&&this.$element.hasClass('wdm-fade') ?
this.$element
.one($.support.transition.end, $.proxy(this.hideModal, this))
.emulateTransitionEnd(300) :
this.hideModal()
}
Modal.prototype.enforceFocus=function (){
$(document)
.off('focusin.bs.wdm-modal')
.on('focusin.bs.wdm-modal', $.proxy(function (e){
if(this.$element[0]!==e.target&&!this.$element.has(e.target).length){
this.$element.focus()
}}, this))
}
Modal.prototype.escape=function (){
if(this.isShown&&this.options.keyboard){
this.$element.on('keyup.dismiss.bs.wdm-modal', $.proxy(function (e){
e.which==27&&this.hide()
}, this))
}else if(!this.isShown){
this.$element.off('keyup.dismiss.bs.wdm-modal')
}}
Modal.prototype.hideModal=function (){
var that=this
this.$element.hide()
this.backdrop(function (){
that.removeBackdrop()
that.$element.trigger('hidden.bs.wdm-modal')
})
}
Modal.prototype.removeBackdrop=function (){
this.$backdrop&&this.$backdrop.remove()
this.$backdrop=null
}
Modal.prototype.backdrop=function (callback){
var animate=this.$element.hasClass('fade') ? 'fade':''
if(this.isShown&&this.options.backdrop){
var doAnimate=$.support.transition&&animate
this.$backdrop=$('
')
.appendTo(document.body)
this.$element.on('click.dismiss.bs.wdm-modal', $.proxy(function (e){
if(e.target!==e.currentTarget)
return
this.options.backdrop=='static'
? this.$element[0].focus.call(this.$element[0])
: this.hide.call(this)
}, this))
if(doAnimate)
this.$backdrop[0].offsetWidth
this.$backdrop.addClass('in')
if(!callback)
return
doAnimate ?
this.$backdrop
.one($.support.transition.end, callback)
.emulateTransitionEnd(150) :
callback()
}else if(!this.isShown&&this.$backdrop){
this.$backdrop.removeClass('in')
$.support.transition&&this.$element.hasClass('wdm-fade') ?
this.$backdrop
.one($.support.transition.end, callback)
.emulateTransitionEnd(150) :
callback()
}else if(callback){
callback()
}}
var old=$.fn.modal
$.fn.modal=function (option, _relatedTarget){
return this.each(function (){
var $this=$(this)
var data=$this.data('bs.wdm-modal')
var options=$.extend({}, Modal.DEFAULTS, $this.data(), typeof option=='object'&&option)
if(!data)
$this.data('bs.wdm-modal', (data=new Modal(this, options)))
if(typeof option=='string')
data[option](_relatedTarget)
else if(options.show)
data.show(_relatedTarget)
})
}
$.fn.modal.Constructor=Modal
$.fn.modal.noConflict=function (){
$.fn.modal=old
return this
}
$(document).on('click.bs.wdm-modal.data-api', '[data-toggle="wdm-quoteup-modal"]', function (e){
var $this=$(this)
var href=$this.attr('href')
var $target=$($this.attr('data-target')||(href&&href.replace(/.*(?=#[^\s]+$)/, '')))
var option=$target.data('bs.wdm-modal') ? 'toggle':$.extend({remote: !/#/.test(href)&&href}, $target.data(), $this.data())
if($this.is('a'))
e.preventDefault()
$target
.modal(option, this)
.one('hide', function (){
$this.is(':visible')&&$this.focus()
})
})
$(document).on('show.bs.modal', '.wdm-modal', function (){
$(document.body).addClass('wdm-modal-open');
})
.on('hidden.bs.modal', '.wdm-modal', function (){
$(document.body).removeClass('wdm-modal-open');
});
}(jQuery);
jQuery('.sku').observe('childlist subtree', function(){
jQuery('#product_sku').val(jQuery(this).text());
});
var public_quoteup_show,public_quoteup_get_cart;!function(t){function e(){var e="right";t(".pep-mc-wrap").hasClass("left")&&(e="left"),t(".pep-mc-wrap").css(e,"-430px"),t("#wdm-cart-count").show(),jQuery("#wdm-cart-count").removeClass("active")}function a(){var e="right";t(".pep-mc-wrap").hasClass("left")&&(e="left"),t(".pep-mc-wrap").css(e,"0px"),t("#wdm-cart-count").hide(),jQuery("#wdm-cart-count").addClass("active")}t(document).ready(function(){t("body").on("click",".pep-mc-collapse",function(){e()});var c=jQuery("#wdm-cart-count");c.click(function(t){t.preventDefault(),c.hasClass("active")?e():a()}),t("body").on("click",".quoteup_remove_item",function(e){e.preventDefault(),$self=jQuery(this),product_id=$self.attr("data-product_id"),product_var_id=$self.attr("data-variation_id"),product_variation_details=$self.attr("data-variation"),jQuery.ajax({url:mini_cart.ajax_url,type:"post",dataType:"json",data:{action:"wdm_update_enq_cart_session",product_id:product_id,product_var_id:product_var_id,quantity:0,variation:JSON.parse(product_variation_details),clickcheck:"remove"},beforeSend:function(){$self.closest(".pep-mc-item").remove()},success:function(e){jQuery(".wdm-quoteupicon-count").text(e.count),t(".pep-mc-footer .pep-mc-price").html(e.totalString)},error:function(t){console.log(t)}})})}),public_quoteup_show=a,public_quoteup_get_cart=function(){t(".quoteup_items_wrap").addClass("quoteup_items_wrap_loading"),t.post(mini_cart.ajax_url,{action:"quoteup_get_cart"},function(e){var a=JSON.parse(e);t(".pep-mc-items").html(a.html),t(".pep-mc-footer .pep-mc-price").html(a.totalString)})}}(jQuery);
jQuery(document).ready(function (){
var $allVariationForms=jQuery('form.variations_form.cart');
var variable_product_id=$allVariationForms.data('product_id');
var quoteupButtonExists=jQuery('#wdm-quoteup-trigger-' + variable_product_id).length > 0 ? true:false;
if(typeof quoteup_add_to_cart_disabled_variable_products!='undefined'){
for ($i=0; $i < quoteup_add_to_cart_disabled_variable_products.length; $i++){
jQuery('.product_type_variable[data-product_id="' + quoteup_add_to_cart_disabled_variable_products[$i] + '"]').remove();
if($allVariationForms.length){
if($allVariationForms.length > 1){
$allVariationForms.each(function (){
if(jQuery(this).data('product_id')==quoteup_add_to_cart_disabled_variable_products[$i]){
if(typeof quoteup_remove_qty_field!="undefined"&&"yes"==quoteup_remove_qty_field.remove_qty_field){
$allVariationForms.find('.quantity').remove();
}
jQuery(this).find('.single_add_to_cart_button').remove();
}})
}else{
if($allVariationForms.data('product_id')==quoteup_add_to_cart_disabled_variable_products[$i]){
if(typeof quoteup_remove_qty_field!="undefined"&&"yes"==quoteup_remove_qty_field.remove_qty_field){
$allVariationForms.find('.quantity').remove();
}
$allVariationForms.find('.single_add_to_cart_button').remove();
}}
}}
}
if(typeof quoteup_hide_variation_variable_products!='undefined'){
for ($i=0; $i < quoteup_hide_variation_variable_products.length; $i++){
jQuery('.variations_form[data-product_id="' + quoteup_hide_variation_variable_products[$i] + '"]').remove();
}}
if(typeof quoteup_price_disabled_variable_products!='undefined'){
$product_id=jQuery('.variations_form.cart').data('product_id');
for ($i=0; $i < quoteup_price_disabled_variable_products.length; $i++){
if(quoteup_price_disabled_variable_products[$i]==$product_id){
jQuery('body').append("")
break;
}}
}});