').append('
').appendTo('body').css('opacity',0).hide();self.toolbar_arrow=self.toolbar.find('.arrow');self.initializeToolbar();},overrideOptions:function(){var self=this;$.each(self.options,function($option){if(typeof(self.$elem.data('toolbar-'+$option))!="undefined"){self.options[$option]=self.$elem.data('toolbar-'+$option);}});},initializeToolbar:function(){var self=this;self.populateContent();self.setTrigger();self.toolbarWidth=self.toolbar.width();},setTrigger:function(){var self=this;if(self.options.event=='onload'){$(window).load(function(event){event.preventDefault();self.show();});}
if(self.options.event=='click'){self.$elem.on('click',function(event){event.preventDefault();if(self.$elem.hasClass('pressed')){self.hide();}else{self.show();}});if(self.options.hideOnClick){$('html').on("click.toolbar",function(event){if(event.target!=self.elem&&self.$elem.has(event.target).length===0&&self.toolbar.has(event.target).length===0&&self.toolbar.is(":visible")){self.hide();}});}}
if(self.options.hover){var moveTime;function decideTimeout(){if(self.$elem.hasClass('pressed')){moveTime=setTimeout(function(){self.hide();},150);}else{clearTimeout(moveTime);};};self.$elem.on({mouseenter:function(event){if(self.$elem.hasClass('pressed')){clearTimeout(moveTime);}else{self.show();}}});self.$elem.parent().on({mouseleave:function(event){decideTimeout();}});$('.tool-container').on({mouseenter:function(event){clearTimeout(moveTime);},mouseleave:function(event){decideTimeout();}});}
$(window).resize(function(event){event.stopPropagation();if(self.toolbar.is(":visible")){self.toolbarCss=self.getCoordinates(self.options.position,20);self.collisionDetection();self.toolbar.css(self.toolbarCss);self.toolbar_arrow.css(self.arrowCss);}});},populateContent:function(){var self=this;var location=self.toolbar.find('.tool-items');var content=$(self.options.content).clone(true).find('a').addClass('tool-item');location.html(content);location.find('.tool-item').on('click',function(event){if(typeof window.glt_request_uri=='undefined')
event.preventDefault();self.$elem.trigger('toolbarItemClick',this);});},calculatePosition:function(){var self=this;self.arrowCss={};self.toolbarCss=self.getCoordinates(self.options.position,self.options.adjustment);self.toolbarCss.position='fixed';self.toolbarCss.zIndex=self.options.zIndex;self.collisionDetection();self.toolbar.css(self.toolbarCss);self.toolbar_arrow.css(self.arrowCss);},getCoordinates:function(position,adjustment){var self=this;self.coordinates=self.$elem.offset();if(self.options.adjustment&&self.options.adjustment[self.options.position]){adjustment=self.options.adjustment[self.options.position]+adjustment;}
switch(self.options.position){case'top':return{left:self.coordinates.left-(self.toolbar.width()/2)+(self.$elem.outerWidth()/2),top:self.coordinates.top-self.$elem.outerHeight()-adjustment,right:'auto'};case'left':return{left:self.coordinates.left-(self.toolbar.width()/2)-(self.$elem.outerWidth()/2)-adjustment,top:self.coordinates.top-(self.toolbar.height()/2)+(self.$elem.outerHeight()/2),right:'auto'};case'right':return{left:self.coordinates.left+(self.toolbar.width()/2)+(self.$elem.outerWidth()/2)+adjustment,top:self.coordinates.top-(self.toolbar.height()/2)+(self.$elem.outerHeight()/2),right:'auto'};case'bottom':return{left:self.coordinates.left-(self.toolbar.width()/2)+(self.$elem.outerWidth()/2),top:self.coordinates.top+self.$elem.outerHeight()+adjustment,right:'auto'};}},collisionDetection:function(){var self=this;var edgeOffset=20;if(self.options.position=='top'||self.options.position=='bottom'){self.arrowCss={left:'50%',right:'50%'};if(self.toolbarCss.left
';j.settings={},c.swipebox.close=function(){g.closeSlide()},c.swipebox.extend=function(){return g},j.init=function(){j.settings=c.extend({},i,f),c.isArray(e)?(k=e,g.target=c(a),g.init(j.settings.initialIndexOnArray)):c(b).on("click",l,function(a){if("slide current"===a.target.parentNode.className)return!1;c.isArray(e)||(g.destroy(),h=c(l),g.actions()),k=[];var b,d,f;f||(d="data-rel",f=c(this).attr(d)),f||(d="rel",f=c(this).attr(d)),h=f&&""!==f&&"nofollow"!==f?c(l).filter("["+d+'="'+f+'"]'):c(l),h.each(function(){var a=null,b=null;c(this).attr("title")&&(a=c(this).attr("title")),c(this).attr("href")&&(b=c(this).attr("href")),k.push({href:b,title:a})}),b=h.index(c(this)),a.preventDefault(),a.stopPropagation(),g.target=c(a.target),g.init(b)})},g={init:function(a){j.settings.beforeOpen&&j.settings.beforeOpen(),this.target.trigger("swipebox-start"),c.swipebox.isOpen=!0,this.build(),this.openSlide(a),this.openMedia(a),this.preloadMedia(a+1),this.preloadMedia(a-1),j.settings.afterOpen&&j.settings.afterOpen(a)},build:function(){var a,b=this;c("body").append(s),o&&j.settings.useSVG===!0&&(a=c("#swipebox-close").css("background-image"),a=a.replace("png","svg"),c("#swipebox-prev, #swipebox-next, #swipebox-close").css({"background-image":a})),m&&j.settings.removeBarsOnMobile&&c("#swipebox-bottom-bar, #swipebox-top-bar").remove(),c.each(k,function(){c("#swipebox-slider").append('
')}),b.setDim(),b.actions(),n&&b.gesture(),b.keyboard(),b.animBars(),b.resize()},setDim:function(){var b,d,e={};"onorientationchange"in a?a.addEventListener("orientationchange",function(){0===a.orientation?(b=p,d=q):(90===a.orientation||-90===a.orientation)&&(b=q,d=p)},!1):(b=a.innerWidth?a.innerWidth:c(a).width(),d=a.innerHeight?a.innerHeight:c(a).height()),e={width:b,height:d},c("#swipebox-overlay").css(e)},resize:function(){var b=this;c(a).resize(function(){b.setDim()}).resize()},supportTransition:function(){var a,c="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(a=0;a
=m||i)){var q=.75-Math.abs(d)/s.height();s.css({top:d+"px"}),s.css({opacity:q}),i=!0}e=b,b=o.pageX-n.pageX,g=100*b/p,!j&&!i&&Math.abs(b)>=l&&(c("#swipebox-slider").css({"-webkit-transition":"",transition:""}),j=!0),j&&(b>0?0===a?c("#swipebox-overlay").addClass("leftSpringTouch"):(c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c("#swipebox-slider").css({"-webkit-transform":"translate3d("+(r+g)+"%, 0, 0)",transform:"translate3d("+(r+g)+"%, 0, 0)"})):0>b&&(k.length===a+1?c("#swipebox-overlay").addClass("rightSpringTouch"):(c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c("#swipebox-slider").css({"-webkit-transform":"translate3d("+(r+g)+"%, 0, 0)",transform:"translate3d("+(r+g)+"%, 0, 0)"}))))}),!1}).bind("touchend",function(a){if(a.preventDefault(),a.stopPropagation(),c("#swipebox-slider").css({"-webkit-transition":"-webkit-transform 0.4s ease",transition:"transform 0.4s ease"}),d=o.pageY-n.pageY,b=o.pageX-n.pageX,g=100*b/p,i)if(i=!1,Math.abs(d)>=2*m&&Math.abs(d)>Math.abs(f)){var k=d>0?s.height():-s.height();s.animate({top:k+"px",opacity:0},300,function(){h.closeSlide()})}else s.animate({top:0,opacity:1},300);else j?(j=!1,b>=l&&b>=e?h.getPrev():-l>=b&&e>=b&&h.getNext()):q.hasClass("visible-bars")?(h.clearTimeout(),h.hideBars()):(h.showBars(),h.setTimeout());c("#swipebox-slider").css({"-webkit-transform":"translate3d("+r+"%, 0, 0)",transform:"translate3d("+r+"%, 0, 0)"}),c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c(".touching").off("touchmove").removeClass("touching")})},setTimeout:function(){if(j.settings.hideBarsDelay>0){var b=this;b.clearTimeout(),b.timeout=a.setTimeout(function(){b.hideBars()},j.settings.hideBarsDelay)}},clearTimeout:function(){a.clearTimeout(this.timeout),this.timeout=null},showBars:function(){var a=c("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?a.addClass("visible-bars"):(c("#swipebox-top-bar").animate({top:0},500),c("#swipebox-bottom-bar").animate({bottom:0},500),setTimeout(function(){a.addClass("visible-bars")},1e3))},hideBars:function(){var a=c("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?a.removeClass("visible-bars"):(c("#swipebox-top-bar").animate({top:"-50px"},500),c("#swipebox-bottom-bar").animate({bottom:"-50px"},500),setTimeout(function(){a.removeClass("visible-bars")},1e3))},animBars:function(){var a=this,b=c("#swipebox-top-bar, #swipebox-bottom-bar");b.addClass("visible-bars"),a.setTimeout(),c("#swipebox-slider").click(function(){b.hasClass("visible-bars")||(a.showBars(),a.setTimeout())}),c("#swipebox-bottom-bar").hover(function(){a.showBars(),b.addClass("visible-bars"),a.clearTimeout()},function(){j.settings.hideBarsDelay>0&&(b.removeClass("visible-bars"),a.setTimeout())})},keyboard:function(){var b=this;c(a).bind("keyup",function(a){a.preventDefault(),a.stopPropagation(),37===a.keyCode?b.getPrev():39===a.keyCode?b.getNext():27===a.keyCode&&b.closeSlide()})},actions:function(){var a=this,b="touchend click";k.length<2?(c("#swipebox-bottom-bar").hide(),d===k[1]&&c("#swipebox-top-bar").hide()):(c("#swipebox-prev").bind(b,function(b){b.preventDefault(),b.stopPropagation(),a.getPrev(),a.setTimeout()}),c("#swipebox-next").bind(b,function(b){b.preventDefault(),b.stopPropagation(),a.getNext(),a.setTimeout()})),c("#swipebox-close").bind(b,function(){a.closeSlide()})},setSlide:function(a,b){b=b||!1;var d=c("#swipebox-slider");r=100*-a,this.doCssTrans()?d.css({"-webkit-transform":"translate3d("+100*-a+"%, 0, 0)",transform:"translate3d("+100*-a+"%, 0, 0)"}):d.animate({left:100*-a+"%"}),c("#swipebox-slider .slide").removeClass("current"),c("#swipebox-slider .slide").eq(a).addClass("current"),this.setTitle(a),b&&d.fadeIn(),c("#swipebox-prev, #swipebox-next").removeClass("disabled"),0===a?c("#swipebox-prev").addClass("disabled"):a===k.length-1&&j.settings.loopAtEnd!==!0&&c("#swipebox-next").addClass("disabled")},openSlide:function(b){c("html").addClass("swipebox-html"),n?(c("html").addClass("swipebox-touch"),j.settings.hideCloseButtonOnMobile&&c("html").addClass("swipebox-no-close-button")):c("html").addClass("swipebox-no-touch"),c(a).trigger("resize"),this.setSlide(b,!0)},preloadMedia:function(a){var b=this,c=null;k[a]!==d&&(c=k[a].href),b.isVideo(c)?b.openMedia(a):setTimeout(function(){b.openMedia(a)},1e3)},openMedia:function(a){var b,e,f=this;return k[a]!==d&&(b=k[a].href),0>a||a>=k.length?!1:(e=c("#swipebox-slider .slide").eq(a),void(f.isVideo(b)?(e.html(f.getVideo(b)),j.settings.afterMedia&&j.settings.afterMedia(a)):(e.addClass("slide-loading"),f.loadMedia(b,function(){e.removeClass("slide-loading"),e.html(this),j.settings.afterMedia&&j.settings.afterMedia(a)}))))},setTitle:function(a){var b=null;c("#swipebox-title").empty(),k[a]!==d&&(b=k[a].title),b?(c("#swipebox-top-bar").show(),c("#swipebox-title").append(b)):c("#swipebox-top-bar").hide()},isVideo:function(a){if(a){if(a.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||a.match(/vimeo\.com\/([0-9]*)/)||a.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/))return!0;if(a.toLowerCase().indexOf("swipeboxvideo=1")>=0)return!0}},parseUri:function(a,d){var e=b.createElement("a"),f={};return e.href=/decodeURIComponent(a),e.search&&(f=JSON.parse('{"'+e.search.toLowerCase().replace("?","").replace(/&/g,'","').replace(/=/g,'":"')+'"}')),c.isPlainObject(d)&&(f=c.extend(f,d,j.settings.queryStringData)),c.map(f,function(a,b){return a&&a>""?encodeURIComponent(b)+"="+encodeURIComponent(a):void 0}).join("&")},getVideo:function(a){var b="",c=a.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/),d=a.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),e=a.match(/(?:www\.)?vimeo\.com\/([0-9]*)/),f="";return c||d?(d&&(c=d),f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",v:""}),b=''):e?(f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:j.settings.vimeoColor}),b=''):b='','"},loadMedia:function(a,b){if(0===a.trim().indexOf("#"))b.call(c("",{"class":"swipebox-inline-container"}).append(c(a).clone().toggleClass(j.settings.toggleClassOnLoad)));else if(!this.isVideo(a)){var d=c("
![]()
").on("load",function(){b.call(d)});d.attr("src",a)}},getNext:function(){var a,b=this,d=c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current"));d+1
0?(a=c("#swipebox-slider .slide").eq(b).contents().find("iframe").attr("src"),c("#swipebox-slider .slide").eq(b).contents().find("iframe").attr("src",a),b--,this.setSlide(b),this.preloadMedia(b-1),j.settings.prevSlide&&j.settings.prevSlide(b)):(c("#swipebox-overlay").addClass("leftSpring"),setTimeout(function(){c("#swipebox-overlay").removeClass("leftSpring")},500))},nextSlide:function(a){},prevSlide:function(a){},closeSlide:function(){c("html").removeClass("swipebox-html"),c("html").removeClass("swipebox-touch"),c(a).trigger("resize"),this.destroy()},destroy:function(){c(a).unbind("keyup"),c("body").unbind("touchstart"),c("body").unbind("touchmove"),c("body").unbind("touchend"),c("#swipebox-slider").unbind(),c("#swipebox-overlay").remove(),c.isArray(e)||e.removeData("_swipebox"),this.target&&this.target.trigger("swipebox-destroy"),c.swipebox.isOpen=!1,j.settings.afterClose&&j.settings.afterClose()}},j.init()},c.fn.swipebox=function(a){if(!c.data(this,"_swipebox")){var b=new c.swipebox(this,a);this.data("_swipebox",b)}return this.data("_swipebox")}}(window,document,jQuery);}
!function(t){var i=t(window);t.fn.visible=function(t,e,o){if(!(this.length<1)){var r=this.length>1?this.eq(0):this,n=r.get(0),f=i.width(),h=i.height(),o=o?o:"both",l=e===!0?n.offsetWidth*n.offsetHeight:!0;if("function"==typeof n.getBoundingClientRect){var g=n.getBoundingClientRect(),u=g.top>=0&&g.top0&&g.bottom<=h,c=g.left>=0&&g.left0&&g.right<=f,v=t?u||s:u&&s,b=t?c||a:c&&a;if("both"===o)return l&&v&&b;if("vertical"===o)return l&&v;if("horizontal"===o)return l&&b}else{var d=i.scrollTop(),p=d+h,w=i.scrollLeft(),m=w+f,y=r.offset(),z=y.top,B=z+r.height(),C=y.left,R=C+r.width(),j=t===!0?B:z,q=t===!0?z:B,H=t===!0?R:C,L=t===!0?C:R;if("both"===o)return!!l&&p>=q&&j>=d&&m>=L&&H>=w;if("vertical"===o)return!!l&&p>=q&&j>=d;if("horizontal"===o)return!!l&&m>=L&&H>=w}}}}(jQuery);!function(a){"use strict";function b(b){return l.formatter=e,j=a("body"),a(this).not(".tipper-attached").addClass("tipper-attached").on("mouseenter.tipper",a.extend({},l,b||{}),c)}function c(b){var c=a(this),e=a.extend(!0,{},b.data,c.data("tipper-options"));e.$target=c,k={left:b.pageX,top:b.pageY},e.delay?e.timer=h(e.timer,e.delay,function(){d(e.$target,e)}):d(e.$target,e),e.$target.one("mouseleave.tipper",e,g),!e.follow&&e.match&&e.$target.on("mousemove.tipper",e,f).trigger("mousemove")}function d(b,c){var d="";d+='',d+='
',d+=c.formatter.apply(j,[b]),d+='',d+="
",d+="
",c.$target=b,c.$tipper=a(d),j.append(c.$tipper),c.$content=c.$tipper.find(".tipper-content"),c.$caret=c.$tipper.find(".tipper-caret"),c.offset=b.offset(),c.height=b.outerHeight(),c.width=b.outerWidth(),c.tipperPos={},c.caretPos={},c.contentPos={};var e=c.$caret.outerHeight(!0),g=c.$caret.outerWidth(!0),h=c.$content.outerHeight(!0),i=c.$content.outerWidth(!0);"right"===c.direction||"left"===c.direction?(c.caretPos.top=(h-e)/2,c.contentPos.top=-h/2,"right"===c.direction?c.contentPos.left=c.margin:"left"===c.direction&&(c.contentPos.left=-(i+c.margin))):(c.caretPos.left=(i-g)/2,c.contentPos.left=-i/2,"bottom"===c.direction?c.contentPos.top=c.margin:"top"===c.direction&&(c.contentPos.top=-(h+c.margin))),c.$content.css(c.contentPos),c.$caret.css(c.caretPos),c.follow?c.$target.on("mousemove.tipper",c,f).trigger("mousemove"):c.match?("right"===c.direction||"left"===c.direction?(c.tipperPos.top=k.top,"right"===c.direction?c.tipperPos.left=c.offset.left+c.width:"left"===c.direction&&(c.tipperPos.left=c.offset.left)):(c.tipperPos.left=k.left,"bottom"===c.direction?c.tipperPos.top=c.offset.top+c.height:"top"===c.direction&&(c.tipperPos.top=c.offset.top)),c.$tipper.css(c.tipperPos)):("right"===c.direction||"left"===c.direction?(c.tipperPos.top=c.offset.top+c.height/2,"right"===c.direction?c.tipperPos.left=c.offset.left+c.width:"left"===c.direction&&(c.tipperPos.left=c.offset.left)):(c.tipperPos.left=c.offset.left+c.width/2,"bottom"===c.direction?c.tipperPos.top=c.offset.top+c.height:"top"===c.direction&&(c.tipperPos.top=c.offset.top)),c.$tipper.css(c.tipperPos)),c.$tipper.addClass("visible")}function e(a){return a.data("cb-tip")}function f(a){var b=a.data;k={left:a.pageX,top:a.pageY},b.follow&&"undefined"!=typeof b.$tipper&&b.$tipper.css({left:k.left,top:k.top})}function g(a){var b=a.data;i(b.timer),"undefined"!=typeof b.$tipper&&(b.$tipper.remove(),b.$target.off("mousemove.tipper mouseleave.tipper"),k=null)}function h(a,b,c){return i(a),setTimeout(c,b)}function i(a){a&&(clearTimeout(a),a=null)}var j,k,l={delay:0,direction:"top",follow:!1,formatter:a.noop,margin:15,match:!1},m={defaults:function(b){return l=a.extend(l,b||{}),"object"==typeof this?a(this):!0},destroy:function(){return a(this).trigger("mouseleave.tipper").off(".tipper").removeClass("tipper-attached")}};a.fn.tipper=function(a){return m[a]?m[a].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof a&&a?this:b.apply(this,arguments)},a.tipper=function(a){"defaults"===a&&m.defaults.apply(this,Array.prototype.slice.call(arguments,1))}}(jQuery);
!function(e){"use strict";var t={init:function(){this.cacheDom(),this.cacheData(),this.bindEvents(),this.lightboxInit(),this.tooltipInit(),this.triggers(),1===parseInt(letsReview.letsReviewUReviews)&&this.sliderLoaders()},cacheDom:function(){this.$doc=e(document),this.$win=e(window),this.$body=e("body"),this.$tooltip=e(".lets-review-tip-f"),this.$lightbox=e(".lets-review-lightbox"),this.rtl=!!this.$body.hasClass("rtl"),this.$boxWrap=e(".lets-review-box-wrap"),this.$userRating=e('[id^="cb-user-rating-"]'),this.$formLabels=e(".lets-review-ur-onoff-label"),this.$lrForm=e(".lets-review-form"),1===parseInt(letsReview.letsReviewUReviews)&&(this.dataGather=e(".lets-review-form-crits:first").data(),this.$cSliders=e(".lets-review-c-slider"))},cacheData:function(){this.$winWidth=this.$win.width()},bindEvents:function(){this.$win.on("resize",this.resize.bind(this)),this.$body.on("click",this.$formLabels,this.formLabels),this.$body.on("click touchend","#swipebox-slider .current img",function(){return!1}).on("click touchend","#swipebox-slider .current",function(){e("#swipebox-close").trigger("click")}),this.$doc.on("slide",".lets-review-c-slider",this.slideIt),window.addEventListener?window.addEventListener("scroll",this.triggers.bind(this),!1):window.attachEvent("scroll",this.triggers.bind(this))},formLabels:function(){0!==t.$formLabels.length&&("on"===e(this).find("input[name=lets_review_ur_onoff]:checked").val()?t.$lrForm.slideDown(200):t.$lrForm.slideUp(200))},lightboxInit:function(){e.prototype.swipebox&&this.$lightbox.swipebox({hideBarsDelay:0})},tooltipInit:function(){this.$winWidth<767||this.$tooltip.tipper({direction:"bottom",follow:!0})},resize:function(e,t){this.cacheData(),this.tooltipInit()},triggers:function(t,i){e.each(this.$boxWrap.find(".cb-overlay span"),function(t,i){i=e(i),i.visible(!0)&&(i.removeClass("cb-trigger-zero"),i.closest(".lets-review-box-wrap").data("format")>2?i.addClass("cb-5-trigger"):i.addClass("cb-trigger"))})},slideIt:function(i,s){var a=e(this);a.next().val(s.value),a.next().hasClass("lets-review-ind-crit")&&t.scoreCalc(a.next())},sliderLoaders:function(){this.$cSliders.each(function(){var i=e(this);i.slider({min:0,max:t.dataGather.max,range:"min",step:t.dataGather.step,start:function(e,t){i.find(".ui-slider-range").css("background-color",i.data("color"))}})})},scoreCalc:function(i){var s,a=0,r=i.data("format"),o=i.closest(".lets-review-form-crits").find(".lets-review-all-crits .cb-cri-score"),n=i.closest(".lets-review-form-crits").find(".lets-review-final-score"),l=i.closest(".lets-review-form-crits").find(".lets-review-100");o.each(function(){a+=parseFloat(e(this).val())}),0===a&&n.val()>0||(s=1===parseInt(r)?Math.round(a/o.length):"on"===letsReview.doubleDecimalStars?(a/o.length).toFixed(2):Math.round(a/o.length*10)/10,isNaN(s)?(n.val(""),n.prev().slider("option",{max:t.dataGather.max,step:t.dataGather.step,value:n.val()})):(n.val(s),n.prev().slider("option",{max:t.dataGather.max,step:t.dataGather.step,value:s})),1===parseInt(r)?l.val(n.val()):2===parseInt(r)?l.val(10*n.val()):l.val(20*n.val()))}};t.init()}(jQuery),function(e){"use strict";var t,i,s,a,r,o,n,l,c,d,h,f,v,b,u,w,m,p,g,x=!1,$=e('[id^="cb-user-rating-"]'),y=Cookies.get("lets_review_user_rating");$.length&&$.each(function(){if(v=e(this),b=v.closest(".lets-review-box-wrap"),h=b.data("pid"),f=b.data("uid"),!(v.hasClass("cb-rated")||y instanceof Array&&(y.indexOf(h)>-1||y.indexOf(f)>-1))){switch(b.data("format")){case 1:u=v.find(".cb-bar");break;case 2:u=v.find(".cb-bar");break;default:u=v.find(".cb-overlay")}u.on("mousemove click mouseleave mouseenter",function(h){switch(v=e(this).closest('[id^="cb-user-rating-"]'),b=v.closest(".lets-review-box-wrap"),"mouseenter"===h.type&&(t=v.find(".cb-criteria"),d=t.html(),i=v.find(".cb-criteria-score"),s=i.data("cb-score-cache"),c=i.data("cb-width-cache"),o=v.find(".cb-overlay"),l=o.offset(),a=o.find("> span"),t.html(t.data("cb-txt"))),r=Math.ceil((h.pageX-l.left)/(o.width()/100)),n=x===!0?100-r:r,n>100&&(n=100),n<1&&(n=0),b.data("format")){case 1:p=n,g=!1;break;case 2:p=Math.round(10*n)/100,g=!1;break;default:p=Math.round(n/20*10)/10,g=!0}if(b.hasClass("cb-out-of-5")?a.stop().animate({width:100-n+"%"},15):a.stop().animate({width:n+"%"},15),i.html(p),"mouseleave"!==h.type&&"click"!==h.type||(b.hasClass("cb-out-of-5")?a.stop().animate({width:100-c+"%"},200):a.stop().animate({width:c+"%"},200),i.html(s),t.html(d)),"click"===h.type)return e(this).off("mousemove click mouseleave mouseenter"),v.addClass("cb-rated cb-lr-tip-f"),e.ajax({type:"POST",data:{action:"lets_review_a_cb",letsReviewNonce:letsReview.letsReviewNonce,letsReviewScore:n,letsReviewPostID:b.data("pid"),letsReviewFormat:b.data("format"),letsReviewUID:b.data("uid")},url:letsReview.letsReviewAUrl,dataType:"json",beforeSend:function(){w=b.data("type"),m=b.find(".cb-score-box"),v.addClass("cb-voting"),3===w&&g===!1&&m.addClass("cb-fs-voting")},success:function(e){o.find("> span").css("width",e[0]+"%"),v.find(".cb-votes-count").html(e[2]),i.html(e[1]),Cookies.set("lets_review_user_rating",e[3],{expires:7}),v.removeClass("cb-voting"),3===w&&g===!1&&(m.find(".cb-final-score").html(e[1]),m.removeClass("cb-fs-voting cb-score--")),v.tipper({direction:"bottom",follow:!0})},error:function(e,t,i){console.log("cbur "+e+" :: "+t+" :: "+i)}}),!1})}})}(jQuery);
/*!
* imagesLoaded PACKAGED v3.2.0
* JavaScript is all like "You images are done yet or what?"
* MIT License
*/
(function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,s=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;th;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){}function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}}function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return h}var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0}function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}function h(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}var i=a.getComputedStyle,j=i?function(a){return i(a,null)}:function(a){return a.currentStyle},k=d("transition"),l=d("transform"),m=k&&l,n=!!d("perspective"),o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[k],p=["transform","transition","transitionDuration","transitionProperty"],q=function(){for(var a={},b=0,c=p.length;c>b;b++){var e=p[b],f=d(e);f&&f!==e&&(a[e]=f)}return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=q[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=j(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=a[c?"left":"right"],f=a[d?"top":"bottom"],g=this.layout.size,h=-1!=e.indexOf("%")?parseFloat(e)/100*g.width:parseInt(e,10),i=-1!=f.indexOf("%")?parseFloat(f)/100*g.height:parseInt(f,10);h=isNaN(h)?0:h,i=isNaN(i)?0:i,h-=c?g.paddingLeft:g.paddingRight,i-=d?g.paddingTop:g.paddingBottom,this.position.x=h,this.position.y=i},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];c[e]=this.getXValue(g),c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];c[i]=this.getYValue(k),c[j]="",this.css(c),this.emitEvent("layout",[this])},g.prototype.getXValue=function(a){var b=this.layout.options;return b.percentPosition&&!b.isHorizontal?a/this.layout.size.width*100+"%":a+"px"},g.prototype.getYValue=function(a){var b=this.layout.options;return b.percentPosition&&b.isHorizontal?a/this.layout.size.height*100+"%":a+"px"},g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={};j.transform=this.getTranslate(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.getTranslate=function(a,b){var c=this.layout.options;return a=c.isOriginLeft?a:-a,b=c.isOriginTop?b:-b,n?"translate3d("+a+"px, "+b+"px, 0)":"translate("+a+"px, "+b+"px)"},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=m?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r="opacity,"+h(q.transform||"transform");g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(o,this,!1))},g.prototype.transition=g.prototype[k?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(o,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!k||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.dispatchEvent(a+"Complete",null,[b])}function d(){g++,g===f&&c()}var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.dispatchEvent=function(a,b,c){var d=b?[b].concat(c):c;if(this.emitEvent(a,d),i)if(this.$element=this.$element||i(this.element),b){var e=i.Event(b);e.type=a,this.$element.trigger(e,c)}else this.$element.trigger(a,c)},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d});
/*!
* Masonry v2 shim
* to maintain backwards compatibility
* as of Masonry v3.1.2
*
* Cascading grid layout library
* http://masonry.desandro.com
* MIT License
* by David DeSandro
*/
!function(a){"use strict";var b=a.Masonry;b.prototype._remapV2Options=function(){this._remapOption("gutterWidth","gutter"),this._remapOption("isResizable","isResizeBound"),this._remapOption("isRTL","isOriginLeft",function(a){return!a});var a=this.options.isAnimated;if(void 0!==a&&(this.options.transitionDuration=a?this.options.transitionDuration:0),void 0===a||a){var b=this.options.animationOptions,c=b&&b.duration;c&&(this.options.transitionDuration="string"==typeof c?c:c+"ms")}},b.prototype._remapOption=function(a,b,c){var d=this.options[a];void 0!==d&&(this.options[b]=c?c(d):d)};var c=b.prototype._create;b.prototype._create=function(){var a=this;this._remapV2Options(),c.apply(this,arguments),setTimeout(function(){jQuery(a.element).addClass("masonry")},0)};var d=b.prototype.layout;b.prototype.layout=function(){this._remapV2Options(),d.apply(this,arguments)};var e=b.prototype.option;b.prototype.option=function(){e.apply(this,arguments),this._remapV2Options()};var f=b.prototype._itemize;b.prototype._itemize=function(a){var b=f.apply(this,arguments);return jQuery(a).addClass("masonry-brick"),b};var g=b.prototype.measureColumns;b.prototype.measureColumns=function(){var a=this.options.columnWidth;a&&"function"==typeof a&&(this.getContainerWidth(),this.columnWidth=a(this.containerWidth)),g.apply(this,arguments)},b.prototype.reload=function(){this.reloadItems.apply(this,arguments),this.layout.apply(this)};var h=b.prototype.destroy;b.prototype.destroy=function(){var a=this.getItemElements();jQuery(this.element).removeClass("masonry"),jQuery(a).removeClass("masonry-brick"),h.apply(this,arguments)}}(window);
/*! Thrive Architect - 2020-04-10
* http://www.thrivethemes.com/
* Copyright (c) 2020 Thrive Themes */
"use strict";function ownKeys(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function _objectSpread(e){for(var t=1;t");i.addClass("tcb-form-error"),i.text(tve_frontend_options.translations[e]),n.$form.find('input[name="'+t+'"]').after(i)}})}}]),e}(),n=function(){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,_getPrototypeOf(n).apply(this,arguments))}return _inherits(n,o),_createClass(n,[{key:"init",value:function(){var t=this;this.attributes={username:"",password:"",remember_me:""},this.action="login",this.$form.find(".tcb-remberme-label").off("click").on("click",function(){t.$form.find('input[name="remember_me"]').click()})}},{key:"onSuccess",value:function(t){_get(_getPrototypeOf(n.prototype),"onSuccess",this).call(this,t),this.clearForm();var e=t.errors&&t.errors.length;if(e){var i="";t.errors.forEach(function(t){i+=t+"
"}),TCB_Front.toast(i,!0)}"function"==typeof TCB_Front.loginCallbacks[this.config.submit_action]&&TCB_Front.loginCallbacks[this.config.submit_action](this.config,t),e||"noRedirect"!==this.config.submit_action&&"showMessage"!==this.config.submit_action||this.$form.trigger("tcb.change_state",{state:"logged_in"})}},{key:"validate",value:function(){return this.resetErrors(),this.attributes.username.length||this.errors.push("empty_username"),this.attributes.password.length||this.errors.push("empty_password"),0===this.errors.length}}]),n}(),r=function(){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,o),_createClass(t,[{key:"init",value:function(){this.attributes={login:""},this.action="recover_password"}},{key:"onSuccess",value:function(e){if(_get(_getPrototypeOf(t.prototype),"onSuccess",this).call(this,e),e.errors&&Object.keys(e.errors).length){var i="";Object.keys(e.errors).forEach(function(t){i+=e.errors[t]+"
"}),TCB_Front.toast(i,!0)}else this.clearForm(),this.$form.trigger("tcb.change_state",{state:"reset_confirmation"})}},{key:"validate",value:function(){return this.resetErrors(),this.attributes.login.length||this.errors.push("empty_login"),0===this.errors.length}}]),t}();t.tve_login_element=function(){return!0!==this.is(".thrv-login-element")?this:this.each(function(t,e){return function(t,e){new i(a(e)).binEvents()}(0,e)})}}(ThriveGlobal.$j,TVE_jQFn)}},events:{"resize.js":function(t,e,i){var n,a,o;n=ThriveGlobal.$j,a=TCB_Front,o=[],a.addResizeCallback=function(t,e){return-1===o.indexOf(t)&&(t.$$scope=e,o.push(t)),a},e.exports=function(){var t=a.$window.width();a.$window.off("resize.tar").on("resize.tar",function(){a.$window.width()!==t&&(n.each(o,function(t,e){e.call(e.$$scope||this)}),t=a.$window.width())})}},"scroll.js":function(t,e,i){var o,r,s;o=ThriveGlobal.$j,r=TCB_Front,s=[],r.add_scroll_callback=function(t,e){return-1===s.indexOf(t)&&(t.$$scope=e,s.push(t)),r},e.exports=function(){var t=r.$document.scrollTop(),e="";r.$window.off("scroll.tar").on("scroll.tar",function(){var i=r.$document.scrollTop(),n=t<=i?"down":"up",a=e!==n;t=i,e=n,o.each(s,function(t,e){e.call(e.$$scope||this,i,n,a)})}),r.$window.trigger("scroll")}}},"thrive_content_builder_frontend.js":function(t,e,i){if(!window.ThriveGlobal||!window.ThriveGlobal.$j){var n=window.$;window.ThriveGlobal={$j:jQuery.noConflict()},n&&(window.$=n)}window.TVE_jQFn={},window.TCB_Front={},window.addEventListener("load",function(){TCB_Front.menu.init(),TCB_Front.divider.init(),tve_frontend_options.is_editor_page||(TCB_Front.sticky.initSticky(TCB_Front.$body,!!tve_frontend_options.is_editor_page),TCB_Front.add_scroll_callback(TCB_Front.show_data_elemements,TCB_Front)),TCB_Front.postGridLayout()}),ThriveGlobal.$j.extend(window.TCB_Front,{browser:null,detectBrowser:function(){var t,e,i={},n=(e=-1,"Microsoft Internet Explorer"===navigator.appName?(t=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(t=navigator.userAgent,null!==new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(t)&&(e=parseFloat(RegExp.$1))),e);if(0e.oText?1:t.oTexte.text?1:-1}function c(t,e){return t.text==e.text?t.oText>e.oText?-1:t.oTexte.text?-1:1}e.attr("data-direction",s),ThriveGlobal.$j(i).find("tbody tr").each(function(){var t=ThriveGlobal.$j(this),e=t.find("> td").eq(a).text().trim().replace(/\u200B/g,"").toLowerCase(),i=/[$£€]/.test(e),n=i?e:parseFloat(e);isNaN(n)&&!i?o.push({tr:t,text:e,oText:e}):(i&&(n=parseFloat(n.replace(/[$£€]/,""))),r.push({tr:t,text:n,oText:e}))}),"down"==s?o.sort(l):o.sort(c),"down"==s?r.sort(l):r.sort(c),t="down"==s?r.concat(o):o.concat(r),ThriveGlobal.$j.each(t,function(t,e){n.append(e.tr)}),d.attr("data-direction",""),e.attr("data-direction",s)})},getCookie:function(t){for(var e=t+"=",i=document.cookie.split(";"),n=0;nwindow.innerHeight-i)},inlineCssVariable:function(e,i,t,n){e=e.jquery?e[0]:e;var a=window.getComputedStyle(e,n);if(Array.isArray(i)){var o={};return i.forEach(function(t){return o[t]=a.getPropertyValue(t)}),o}if("string"==typeof i)return void 0!==t?void e.style.setProperty(i,t):a.getPropertyValue(i);ThriveGlobal.$j.isPlainObject(i)&&Object.keys(i).forEach(function(t){return e.style.setProperty(t,i[t])})},postGridLayout:function(){var t=ThriveGlobal.$j(".tve_post_grid_masonry");if(0").css(t.extend({},e)),n=t("").css(t.extend({left:"-1000px",overflow:"scroll",position:"absolute",top:"-1000px"},e)).append(i).appendTo("body").scrollLeft(1e3).scrollTop(1e3),a={height:n.offset().top-i.offset().top||0,width:n.offset().left-i.offset().left||0};return n.remove(),a},openLightbox:function(r,t){if(!r.hasClass("tve_lb_open")&&!r.hasClass("tve_lb_opening")){var i=ThriveGlobal.$j("body"),n=ThriveGlobal.$j("html"),a="tve-o-hidden tve-l-open tve-hide-overflow",e=this.getBrowserScrollSize().width,o=this,s=parseInt(i.css("padding-right")),l=r.find("input[placeholder]").not(":radio").not(":checkbox");l.length&&l.thrive_iphone_placeholder(),r.find('.thrv_responsive_video:not([data-type="dynamic"])').each(function(){var t=ThriveGlobal.$j(this);o.makeAutoplayVideo(t)}),r.off().on("click",".tve_p_lb_close",function(){return c(r),!1}),i.off("keyup.tve_lb_close").on("keyup.tve_lb_close",function(t){if(27==t.which)return c(r),!1}),r.children(".tve_p_lb_overlay").off("click.tve_lb_close").on("click.tve_lb_close",function(){return c(r),!1}),c(ThriveGlobal.$j(".tve_p_lb_background.tve_lb_open"),!0),r.addClass("tve_p_lb_background tve_lb_anim_"+t),r.data("doc-scroll-top",document.documentElement.scrollTop),r.data("bdy-scroll-top",document.body.scrollTop),i.addClass(a),n.addClass(a),TCB_Front.$window.height()
ul li").eq(isNaN(e)?0:e).tcbTabsToggle()}):TCB_Front.handleIframes(r),setTimeout(function(){r.css("display",""),r.addClass("tve_lb_opening"),setTimeout(function(){d()},0)},20),r.find(".tve_p_lb_content").trigger("tve.before-lightbox-open"),"none"!==r.css("display")?setTimeout(function(){r.removeClass("tve_lb_opening").addClass("tve_lb_open").find(".tve_p_lb_content").trigger("tve.lightbox-open")},300):(r.removeClass("tve_lb_open"),i.removeClass(a).css("padding-right",""),n.removeClass(a)),TCB_Front.$window.resize(function(){d()}),r.on("lbresize",function(){d(!0)})}function c(t,e){TCB_Front.handleIframes(t,!1),t.find("video").each(function(){ThriveGlobal.$j(this)[0].pause()}),void 0===e&&1===ThriveGlobal.$j(".tve_lb_open").length&&(i.removeClass(a).css("padding-right",""),n.removeClass(a),t.data("doc-scroll-top")?(document.documentElement.scrollTop=t.data("doc-scroll-top"),t.data("doc-scroll-top","")):t.data("bdy-scroll-top")&&(document.body.scrollTop=t.data("bdy-scroll-top"),t.data("doc-scroll-top",""))),t.removeClass("tve_lb_open tve_lb_opening").addClass("tve_lb_closing"),setTimeout(function(){t.removeClass("tve_lb_closing").css("display","none").find("tve_p_lb_content").trigger("tve.lightbox-close")},300),ThriveGlobal.$j("#tve-lg-error-container").hide()}function d(t){var e,i,n=r.find(".tve_p_lb_content"),a=TCB_Front.$window.height(),o=void 0!==t&&t?"animate":"css";TCB_Front.postGridLayout(),i=(a-(e=n.outerHeight(!0)))/2,r.find(".tve_p_lb_overlay")[o]({height:e+80+"px","min-height":a+"px"},200),n[o]({top:(i<40?40:i)+"px"},200),a=t.offset().top+t.outerHeight()&&"hidden"!==t.css("visibility")&&t.addClass("thrv_data_element_start").trigger("tve.start-animation")})},onDOMReady:function(i){if(this.$body=ThriveGlobal.$j("body"),this.body_offset=this.$body.offset(),void 0===i&&(i=this.$body),this.smartComplete.init(i),this.menu.init(),this.divider.init(),this.dynamicElements.init(),tve_frontend_options.is_editor_page||(this.sticky.initSticky(i,!!tve_frontend_options.is_editor_page),this.add_scroll_callback(this.show_data_elemements,this)),this.fix_compat_issues(i),ThriveGlobal.$j(".tcb-video-background-el").each(function(){this.parentNode.classList.add("tcb-video-background-parent")}),this.replaceDynamicContent(),tve_frontend_options.is_editor_page?ThriveGlobal.$j(".tcb-video-background-el iframe.tcb-voo-bg").each(function(){var t=TVE.inner_$(this),e=t.attr("src");t.attr("src",e)}):ThriveGlobal.$j('.thrv_responsive_video[data-type="vooplayer"]').each(function(){var t=ThriveGlobal.$j(this);t.find(".video_overlay_image").length&&t.find(".video-skin-player").css("z-index","-1")}),!window.TVE_Dash||TVE_Dash.ajax_sent?this.getShareCounts():TCB_Front.$document.on("tve-dash.load",function(t){var e=TCB_Front.getShareCounts(ThriveGlobal.$j("body"),{},!0);e&&TVE_Dash.add_load_item("tcb_social",e[0],e[1])}),document.addEventListener("vooPlayerReady",this.playBackgroundVoo,!1),document.addEventListener("vooPlayerReady",this.changeVooOnPlay,!1),tve_frontend_options.is_editor_page||this.floating.init(),ThriveGlobal.$j.each(TVE_jQFn,function(t,e){ThriveGlobal.$j.fn[t]=e}),ThriveGlobal.$j(".tve_scT").each(function(){var t=ThriveGlobal.$j(this),e=parseInt(t.attr("data-selected"));t.data("initDone")||(t.data("initDone",!0),ThriveGlobal.$j.Event("click").button=0,t.find("> ul li").eq(isNaN(e)?0:e).tcbTabsToggle())}),ThriveGlobal.$j(".thrv_toggle_shortcode").each(function(){TCB_Front.handleIframes(ThriveGlobal.$j(this))}),ThriveGlobal.$j(".thrv_toggle").each(function(){var t=ThriveGlobal.$j(this);if(!t.data("tcbToggleInit")){var e=t.find(".thrv_toggle_item").filter(".tve-default-state-expanded");t.hasClass("tve-toggle-auto-collapse")&&(e=e.first()),e.find(".thrv_toggle_title").tcbToggle("show"),t.data("tcbToggleInit",1)}}),tve_frontend_options.is_editor_page)try{ThriveGlobal.$j("html").getNiceScroll().remove()}catch(t){}else{if(location.hash)try{var t=ThriveGlobal.$j(location.hash);t.closest(".thrv_toggle").length&&!t.hasClass("tve-state-expanded")&&t.trigger("click")}catch(t){}if(void 0===window.tcb_autofill){window.tcb_autofill=TCB_Front.getCookie("account_create_fields");try{window.tcb_autofill&&(window.tcb_autofill=decodeURIComponent(window.tcb_autofill),window.tcb_autofill=JSON.parse(window.tcb_autofill))}catch(t){window.tcb_autofill=null}window.tcb_autofill||(window.tcb_autofill=null)}if(window.tcb_autofill&&ThriveGlobal.$j.isArray(window.tcb_autofill)){ThriveGlobal.$j.each(window.tcb_autofill,function(t,e){i.find("input[name="+e.name+"]").each(function(){var t=ThriveGlobal.$j(this);t.data("tcb-autofill")||(t.val(e.value).hide(),t.parent().append(''),t.data("tcb-autofill",1))})}),setTimeout(function(){TCB_Front.setCookie("account_create_fields",null,{path:"/"})},2500)}ThriveGlobal.$j("input[type=password], input[name=confirm_password]").on("keyup",function(){var t=ThriveGlobal.$j(this),e=a(t.val()),i="#e3ecef",n="";t.next().find(".tve-password-strength").css({"background-color":"#e3ecef"}),(e<30?(i="#ef5350",n="Weak",t.next().find(".tve-password-strength").first()):30<=e&&e<60?(i="#ffa726",n="So-so",t.next().find(".tve-password-strength:lt(2)")):60<=e&&e<80?(i="#8bc34a",n="Good",t.next().find(".tve-password-strength:lt(3)")):(i="#4caf50",n="Great!",t.next().find(".tve-password-strength:lt(4)"))).each(function(){ThriveGlobal.$j(this).css({"background-color":i})}),t.next().find(".tve-password-strength-text").text(n).css({color:i})});var a=function(t){var e,i=0,n={},a=0;if(!t)return i;for(var o=0;o '),r.each(function(){var t=this.parentNode;""===this.getAttribute("data-href")&&(this.setAttribute("data-href",window.location.href.split("?")[0]),this.setAttribute("data-width","100%")),this.classList.add("fb-comments"),setTimeout(function(){FB.XFBML.parse(t)},200)}));var s=ThriveGlobal.$j(".thrv_disqus_comments #disqus_thread");s.length&&(window.disqus_shortname=s.attr("data-disqus_shortname"),""==s.attr("data-disqus_url")?window.disqus_url=window.location:window.disqus_url=s.attr("data-disqus_url"),window.disqus_identifier=window.disqus_url,"undefined"==typeof DISQUS&&ThriveGlobal.$j.getScript("//"+disqus_shortname+".disqus.com/embed.js"))}window.mejs&&ThriveGlobal.$j(".tcb-video-shortcode").not(".mejs-container").filter(function(){return!ThriveGlobal.$j(this).parent().hasClass(".mejs-mediaelement")}).mediaelementplayer(),this.resizePageSection(),setTimeout(function(){window.dispatchEvent(new Event("resize"))}),this.playBackgroundYoutube(ThriveGlobal.$j("div.tcb-yt-bg")),this.init_scroll(),this.initResize()},replaceDynamicContent:function(){ThriveGlobal.$j(".tve-browser-data").text(Object.keys(TCB_Front.detectBrowser()).filter(function(t){return"webkit"!==t}).toString())},resizePageSection:function(t){void 0===t&&(t=ThriveGlobal.$j(".tcb-window-width")),t.each(function(){var t=ThriveGlobal.$j(this),e=t.css("left");e="auto"===e?0:Number(t.css("left").replace("px","")),t.css({width:TCB_Front[tve_frontend_options.is_editor_page?"$body":"$window"].width()+"px",left:-t.offset().left+e+"px"})})},onSocialCustomClick:{wnd:function(t,e,i){var n=void 0!==window.screenLeft?window.screenLeft:screen.left,a=void 0!==window.screenTop?window.screenTop:screen.top,o=(window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:screen.width)/2-e/2+n,r=(window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:screen.height)/2-i/2+a,s=window.open(t,"Thrive Share","scrollbars=yes,resizable=yes,toolbar=no,menubar=no,scrollbars=no,location=no,directories=no,width="+e+", height="+i+", top="+r+", left="+o);return window.focus&&s.focus(),s},fb_share:function(t){var e=t.data();if(e.href||(e.href=/location.href),e.type&&"feed"!=e.type)this.wnd("https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(e.href),650,500);else{var i="";e.name&&(i+="&title="+encodeURIComponent(e.name)),e.description&&(i+="&description="+encodeURIComponent(e.description)),e.href&&(i+="&u="+encodeURIComponent(e.href)),e.caption&&(i+="&caption="+encodeURIComponent(e.caption)),e.image&&(i+="&picture="+encodeURIComponent(e.image)),i="?"+i.substr(1),this.wnd("https://www.facebook.com/sharer.php"+i,650,500)}return!1},t_share:function(t){var e=t.data();e.href||(e.href=/location.href),this.wnd("https://twitter.com/intent/tweet?url="+encodeURIComponent(e.href)+(e.tweet?"&text="+encodeURIComponent(e.tweet):"")+(e.via?"&via="+e.via:""),550,450)},in_share:function(t){var e=t.data();e.href||(e.href=/location.href),this.wnd("https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(e.href),550,400)},pin_share:function(t){var e=t.data();e.href||(e.href=/location.href),this.wnd("https://pinterest.com/pin/create/button/?url="+encodeURIComponent(e.href)+(e.media?"&media="+encodeURIComponent(e.media):"")+(e.description?"&description="+encodeURIComponent(e.description):""),600,600)},xing_share:function(t){var e=t.data();e.href||(e.href=/location.href),this.wnd("https://www.xing.com/spi/shares/new?url="+encodeURIComponent(e.href),600,500)}},getShareCounts:function(t,e,i){var n=(t=t||ThriveGlobal.$j("body")).find(".tve_social_items.tve_social_custom");if(n.length){var o={action:"tve_social_count",for:[]};if(void 0!==e?ThriveGlobal.$j.each(e,function(t,e){o[t]=e}):"undefined"!=typeof tve_path_params&&tve_path_params.post_id&&(o.post_id=tve_path_params.post_id),n.each(function(t){var e=ThriveGlobal.$j(this),i={};if(e.data("tve-social-counts")||!e.hasClass("tve_social_cb")&&"1"!==e.parent().attr("data-counts"))e.data("tve-social-counts",1);else{e.data("tve-social-counts",1);var n=e.prev(".tve_s_share_count"),a=e.children(".tve_s_item").each(function(){var t=ThriveGlobal.$j(this).addClass("tve_count_loading");i[t.attr("data-s")]=t.attr("data-href")});if(i.hasOwnProperty("t_share")&&1===a.length)return a.removeClass("tve_count_loading"),n.remove(),void e.parent().removeAttr("data-counts");o.for[t]=i}}),!o.for.length)return null;TCB_Front.total_share_counts={};var a=function(o){o&&o.counts&&o.totals&&n.each(function(t){var e=ThriveGlobal.$j(this),i=e.prev(".tve_s_share_count"),n=e.children(".tve_s_item");if(ThriveGlobal.$j.each(o.counts[t],function(t,e){n.filter(".tve_s_"+t).find(".tve_s_count").html(e.formatted)}),n.removeClass("tve_count_loading"),o.totals&&o.totals[t]&&"1"===e.parent().attr("data-counts")){var a=parseInt(e.parent().attr("data-min_shares"));a=isNaN(a)?0:a,i.find(".tve_s_cnt").html(o.totals[t].formatted),a ")}),setTimeout(function(){jQuery(".tvd-toast").hide(),"function"==typeof i&&i()},3e3)},footer_styling:function(t){var e=0'),g=t.find("form")),g.find(".tve_lg_textarea.tve-lg-show-counter textarea").off("input.textarea").on("input.textarea",function(){var t=ThriveGlobal.$j(this),e=t.val().length,i=Number(t.attr("maxlength")),n=Number(t.attr("data-min")),a=t.next().find(".tve-fill-text-dynamic");a.text(i?"".concat(e," of ").concat(i):e),a.toggleClass("tve-counter-error",!!(e&&n&&e ")}),setTimeout(function(){jQuery(".tvd-toast").hide()},6e3)}else{var s=g.parent(),l=s.parent(),c=l.find(".tve-error-wrapper");1==g.find("#_error_message_option").val()?(s.hide(),0==c.length?(l.append('