(function(a){a(function(){function d(){var c=a(".mp-row-fluid.mp-row-fullwidth, .mp-row-fluid.mp-row-fullwidth-content, .mp-row-fluid.mp-row-fixed-width-content");a.each(c,function(){var c=a("html"),b=a(this),c=c.width();b.css({width:"","padding-left":"","margin-left":"","padding-right":"","margin-right":""});var d=b.hasClass("mp-row-fullwidth-content"),h=b.hasClass("mp-row-fixed-width-content"),k=b.offset().left;e()&&(k-=CE.LeftBar.myThis.getSpace());var p=c-k-b.width(),l,m;l=m="";h?b.children(".motopress-clmn").length&& (b.css("max-width",parseInt(MPCEVars.fixed_row_width)),d=b.innerWidth(),b.css("max-width",""),b.css("width",c),l=parseInt(b.css("padding-left")),m=parseInt(b.css("padding-right")),h=(b.innerWidth()-l-m-d)/2,h=0.mp-youtube-container>.mp-youtube-video"));a.each(function(e,c){$player=jQuery(c);var b=new YT.Player(a[e],{videoId:$player.attr("data-src"),events:{onReady:d(e)}});$player.data("ytplayer",b)})} jQuery(".mp-video-container").on("click",function(a){jQuery(this).children("video").length?(a=jQuery(this).children("video")[0],a.paused?a.play():a.pause()):(a=jQuery(this).find("iframe.mp-youtube-video").data("ytplayer"))&&(2===a.getPlayerState()?a.playVideo():a.pauseVideo())});jQuery(".mp-row-video").on("click",function(a){jQuery(a.target).is(".mp-row-fluid")?jQuery(this).children(".mp-video-container").trigger("click"):jQuery(a.target).is("[class*=mp-span]")&&jQuery(this).closest(".mp-row-video").children(".mp-video-container").trigger("click")}); function mpFixBackgroundVideoSize(a){"undefined"===typeof a&&(a=jQuery(".mp-video-container"));jQuery.each(a,function(d){mpFixVideoSize(a[d])})}function mpRememberOriginalSize(a){a.originalsize||(a.originalsize={width:a.width(),height:a.height()})} function mpFixVideoSize(a){var d;jQuery(a).children().is("video")?d=jQuery(a).children():(d=jQuery(a).find("iframe"),d.length||(d=jQuery(a).find("img")));mpRememberOriginalSize(d);var e=jQuery(a).width(),c=jQuery(a).height(),e=mpScaleVideo(d.originalsize.width,d.originalsize.height,e,c);jQuery(a).find(".mp-youtube-container").height(e.height);jQuery(a).find(".mp-youtube-container").width(e.width);d.width(e.width);d.height(e.height);d.css("max-width",e.width);jQuery(d).css("left",e.targetleft);jQuery(d).css("top", e.targettop)}function mpScaleVideo(a,d,e,c){var b={width:0,height:0,fScaleToTargetWidth:!0};if(0>=a||0>=d||0>=e||0>=c)return b;var f=a*c/d;f<=e?(b.width=Math.floor(e),b.height=Math.floor(d*e/a),b.fScaleToTargetWidth=!0):(b.width=Math.floor(f),b.height=Math.floor(c),b.fScaleToTargetWidth=!1);b.targetleft=Math.floor((e-b.width)/2);b.targettop=Math.floor((c-b.height)/2);return b} (function(a){a(document).ready(function(){var d=parent.hasOwnProperty("MP")&&parent.MP.hasOwnProperty("Editor"),e="undefined"!==typeof a.fn.magnificPopup;!d&&e&&(a('[data-action="motopressLightbox"]').magnificPopup({type:"image",closeOnContentClick:!0,mainClass:"mfp-img-mobile",image:{verticalFit:!0}}),a('[data-action="motopressGalleryLightbox"]').magnificPopup({type:"image",mainClass:"mfp-img-mobile",gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]}}),a('[data-action="motopress-modal"]').each(function(){var c= a(this),b=c.attr("data-mfp-show-animation").length?" "+c.attr("data-mfp-show-animation"):"",d=c.attr("data-mfp-hide-animation").length?" "+c.attr("data-mfp-hide-animation"):"",e=""!==d?500:0,n=c.attr("data-modal-style"),h=" motopress-modal-"+c.attr("data-uniqid");c.magnificPopup({key:"motopress-modal-obj",mainClass:"motopress-modal"+h+" "+n,midClick:!0,closeBtnInside:!1,fixedBgPos:!0,removalDelay:e,closeMarkup:'',callbacks:{beforeOpen:function(){c.attr("disabled", !0);if(b){var h=a(this.bgOverlay),d=a(this.wrap);h.add(d).addClass(b).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){a(this).removeClass(b)})}},beforeClose:function(){if(d){var b=a(this.bgOverlay),c=a(this.wrap);b.add(c).addClass(d).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){a(this).removeClass(d)})}},afterClose:function(){c.removeAttr("disabled")}}})}),"undefined"!==typeof a.fn.waypoint&&a(".motopress-popup-trigger").each(function(){var c= a(this),b=c.attr("data-delay").length?parseInt(c.attr("data-delay")):0,d=c.attr("data-mfp-show-animation").length?" "+c.attr("data-mfp-show-animation"):"",e=c.attr("data-mfp-hide-animation").length?" "+c.attr("data-mfp-hide-animation"):"",n=""!==e?500:0,h=c.attr("data-modal-style"),k=c.attr("data-uniqid"),p=" motopress-modal-"+k,l=c.attr("data-custom-classes");c.waypoint(function(m){this.enabled=!1;clearTimeout(window.motopressPopupTimeout);window.motopressPopupTimeout=setTimeout(function(){c.magnificPopup({key:"motopress-popup-obj"+ k,mainClass:"motopress-modal "+h+" "+l+p,closeBtnInside:!1,fixedBgPos:!0,removalDelay:n,closeMarkup:'',items:{src:"#motopress-modal-content-"+k,type:"inline"},callbacks:{beforeOpen:function(){if(d){var b=a(this.bgOverlay),c=a(this.wrap);b.add(c).addClass(d).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){a(this).removeClass(d)})}},beforeClose:function(){if(e){var b=a(this.bgOverlay),c=a(this.wrap); b.add(c).addClass(e).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){a(this).removeClass(e)})}},open:function(){if("undefined"!==typeof MPCECookies){var a=c.attr("data-show-once");"undefined"!==typeof a&&MPCECookies.set(a,"true")}}}}).magnificPopup("open");clearTimeout(window.motopressPopupTimeout)},b)},{offset:"100%",continuous:!1,group:"motopress-popups"})}))})})(jQuery); jQuery(document).ready(function(){jQuery(window).resize(function(){this.mpGridGalleryResizeTimeout&&clearTimeout(this.mpGridGalleryResizeTimeout);this.mpGridGalleryResizeTimeout=setTimeout(function(){jQuery(this).trigger("mpGridGalleryResizeEnd")},500)});jQuery(window).on("mpGridGalleryResizeEnd",function(){mpRecalcGridGalleryMargins()})}); function mpRecalcGridGalleryMargins(a){"undefined"===typeof a&&(a=jQuery(".motopress-grid-gallery-obj.motopress-grid-gallery-need-recalc"));if(a.length){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;a.each(function(a,c){var b="",f=jQuery(c).find(".mp-row-fluid").not(":first.mp-row-fluid");767b.height&&(b.height=200));f={};g=d(b.table);f.chartType=e(b.type);f.dataTable=!0===g?b.table:null;f.options={title:b.title,height:b.height,colors:b.colors};null!==b.backgroundColor&&(f.options.backgroundColor={fill:"transparent"});"PieChart3D"==b.type&&(f.options.is3D=!0);0!=b.donut&& "false"!==b.donut&&(f.options.pieHole=.5);f.containerId=b.ID;null!==f.dataTable?(b=new google.visualization.ChartWrapper(f),b.draw(),a.addClass("motopress-google-chart-loaded")):a.addClass("motopress-empty-chart").text("No Data")})},d=function(a){var b=null;if(a){for(i=0;i0){if(r.startSlide>=i.totalSlides){r.startSlide=i.totalSlides-1}i.currentSlide=r.startSlide}if(e(o[i.currentSlide]).is("img")){i.currentImage=e(o[i.currentSlide])}else{i.currentImage=e(o[i.currentSlide]).find("img:first")}if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}var u=e("").addClass("nivo-main-image");u.attr("src",i.currentImage.attr("src")).show();s.append(u);e(window).resize(function(){s.children("img").width(s.width());u.attr("src",i.currentImage.attr("src"));u.stop().height("auto");e(".nivo-slice").remove();e(".nivo-box").remove()});s.append(e('
'));var a=function(t){var n=e(".nivo-caption",s);if(i.currentImage.attr("data-title")!=""&&i.currentImage.attr("data-title")!=undefined){var r=i.currentImage.attr("data-title");if(r.substr(0,1)=="#")r=e(r).html();if(n.css("display")=="block"){setTimeout(function(){n.html(r)},t.animSpeed)}else{n.html(r);n.stop().fadeIn(t.animSpeed)}}else{n.stop().fadeOut(t.animSpeed)}};a(r);var f=0;if(!r.manualAdvance&&o.length>1){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}if(r.directionNav){s.append('");e(s).on("click","a.nivo-prevNav",function(){if(i.running){return false}clearInterval(f);f="";i.currentSlide-=2;d(s,o,r,"prev")});e(s).on("click","a.nivo-nextNav",function(){if(i.running){return false}clearInterval(f);f="";d(s,o,r,"next")})}if(r.controlNav){i.controlNavEl=e('
');s.after(i.controlNavEl);for(var l=0;l')}else{i.controlNavEl.append(''+(l+1)+"")}}e("a:eq("+i.currentSlide+")",i.controlNavEl).addClass("active");e("a",i.controlNavEl).bind("click",function(){if(i.running)return false;if(e(this).hasClass("active"))return false;clearInterval(f);f="";u.attr("src",i.currentImage.attr("src"));i.currentSlide=e(this).attr("rel")-1;d(s,o,r,"control")})}if(r.pauseOnHover){s.hover(function(){i.paused=true;clearInterval(f);f=""},function(){i.paused=false;if(f===""&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}})}s.bind("nivo:animFinished",function(){u.attr("src",i.currentImage.attr("src"));i.running=false;e(o).each(function(){if(e(this).is("a")){e(this).css("display","none")}});if(e(o[i.currentSlide]).is("a")){e(o[i.currentSlide]).css("display","block")}if(f===""&&!i.paused&&!r.manualAdvance){f=setInterval(function(){d(s,o,r,false)},r.pauseTime)}r.afterChange.call(this)});var h=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().is("a")?e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").parent().height():e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height();for(var s=0;s').css({left:o*s+"px",width:t.width()-o*s+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}else{t.append(e('
').css({left:o*s+"px",width:o+"px",height:i+"px",opacity:"0",overflow:"hidden"}))}}e(".nivo-slice",t).height(i);u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var p=function(t,n,r){if(e(r.currentImage).parent().is("a"))e(r.currentImage).parent().css("display","block");e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").width(t.width()).css("visibility","hidden").show();var i=Math.round(t.width()/n.boxCols),s=Math.round(e('img[src="'+r.currentImage.attr("src")+'"]',t).not(".nivo-main-image,.nivo-control img").height()/n.boxRows);for(var o=0;o').css({opacity:0,left:i*a+"px",top:s*o+"px",width:t.width()-i*a+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}else{t.append(e('
').css({opacity:0,left:i*a+"px",top:s*o+"px",width:i+"px"}));e('.nivo-box[name="'+a+'"]',t).height(e('.nivo-box[name="'+a+'"] img',t).height()+"px")}}}u.stop().animate({height:e(r.currentImage).height()},n.animSpeed)};var d=function(t,n,r,i){var s=t.data("nivo:vars");if(s&&s.currentSlide===s.totalSlides-1){r.lastSlide.call(this)}if((!s||s.stop)&&!i){return false}r.beforeChange.call(this);if(!i){u.attr("src",s.currentImage.attr("src"))}else{if(i==="prev"){u.attr("src",s.currentImage.attr("src"))}if(i==="next"){u.attr("src",s.currentImage.attr("src"))}}s.currentSlide++;if(s.currentSlide===s.totalSlides){s.currentSlide=0;r.slideshowEnd.call(this)}if(s.currentSlide<0){s.currentSlide=s.totalSlides-1}if(e(n[s.currentSlide]).is("img")){s.currentImage=e(n[s.currentSlide])}else{s.currentImage=e(n[s.currentSlide]).find("img:first")}if(r.controlNav){e("a",s.controlNavEl).removeClass("active");e("a:eq("+s.currentSlide+")",s.controlNavEl).addClass("active")}a(r);e(".nivo-slice",t).remove();e(".nivo-box",t).remove();var o=r.effect,f="";if(r.effect==="random"){f=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade","boxRandom","boxRain","boxRainReverse","boxRainGrow","boxRainGrowReverse");o=f[Math.floor(Math.random()*(f.length+1))];if(o===undefined){o="fade"}}if(r.effect.indexOf(",")!==-1){f=r.effect.split(",");o=f[Math.floor(Math.random()*f.length)];if(o===undefined){o="fade"}}if(s.currentImage.attr("data-transition")){o=s.currentImage.attr("data-transition")}s.running=true;var l=0,c=0,d="",m="",g="",y="";if(o==="sliceDown"||o==="sliceDownRight"||o==="sliceDownLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({top:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUp"||o==="sliceUpRight"||o==="sliceUpLeft"){h(t,r,s);l=0;c=0;d=e(".nivo-slice",t);if(o==="sliceUpLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);n.css({bottom:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="sliceUpDown"||o==="sliceUpDownRight"||o==="sliceUpDownLeft"){h(t,r,s);l=0;c=0;var b=0;d=e(".nivo-slice",t);if(o==="sliceUpDownLeft"){d=e(".nivo-slice",t)._reverse()}d.each(function(){var n=e(this);if(c===0){n.css("top","0px");c++}else{n.css("bottom","0px");c=0}if(b===r.slices-1){setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1.0"},r.animSpeed)},100+l)}l+=50;b++})}else if(o==="fold"){h(t,r,s);l=0;c=0;e(".nivo-slice",t).each(function(){var n=e(this);var i=n.width();n.css({top:"0px",width:"0px"});if(c===r.slices-1){setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({width:i,opacity:"1.0"},r.animSpeed)},100+l)}l+=50;c++})}else if(o==="fade"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:t.width()+"px"});m.animate({opacity:"1.0"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInRight"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){t.trigger("nivo:animFinished")})}else if(o==="slideInLeft"){h(t,r,s);m=e(".nivo-slice:first",t);m.css({width:"0px",opacity:"1",left:"",right:"0px"});m.animate({width:t.width()+"px"},r.animSpeed*2,"",function(){m.css({left:"0px",right:""});t.trigger("nivo:animFinished")})}else if(o==="boxRandom"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;y=v(e(".nivo-box",t));y.each(function(){var n=e(this);if(c===g-1){setTimeout(function(){n.animate({opacity:"1"},r.animSpeed,"",function(){t.trigger("nivo:animFinished")})},100+l)}else{setTimeout(function(){n.animate({opacity:"1"},r.animSpeed)},100+l)}l+=20;c++})}else if(o==="boxRain"||o==="boxRainReverse"||o==="boxRainGrow"||o==="boxRainGrowReverse"){p(t,r,s);g=r.boxCols*r.boxRows;c=0;l=0;var w=0;var E=0;var S=[];S[w]=[];y=e(".nivo-box",t);if(o==="boxRainReverse"||o==="boxRainGrowReverse"){y=e(".nivo-box",t)._reverse()}y.each(function(){S[w][E]=e(this);E++;if(E===r.boxCols){w++;E=0;S[w]=[]}});for(var x=0;x=0&&T