/** * Before After * TwentyTwenty * http://zurb.com/playground/twentytwenty */ !function(_){_.fn.twentytwenty=function(h){h=_.extend({default_offset_pct:.5,orientation:"horizontal",before_label:"Before",after_label:"After",no_overlay:!1,move_slider_on_hover:!1,move_with_handle_only:!0,click_to_move:!1},h);return this.each(function(){var e=h.default_offset_pct,a=_(this),i=h.orientation,t="vertical"===i?"down":"left",n="vertical"===i?"up":"right";a.data("before")&&(h.before_label=a.data("before")),a.data("after")&&(h.after_label=a.data("after")),a.wrap("
"),h.no_overlay||(a.append("
"),(y=a.find(".twentytwenty-overlay")).append("
"),y.append("
"));var o=a.find("img:first"),s=a.find("img:last");a.append("
");var r=a.find(".twentytwenty-handle");r.append(""),r.append(""),a.addClass("twentytwenty-container"),o.addClass("twentytwenty-before"),s.addClass("twentytwenty-after");function d(t){var e,n,t=(e=t,n=o.width(),t=o.height(),{w:n+"px",h:t+"px",cw:e*n+"px",ch:e*t+"px"});r.css("vertical"===i?"top":"left","vertical"===i?t.ch:t.cw),t=t,"vertical"===i?(o.css("clip","rect(0,"+t.w+","+t.ch+",0)"),s.css("clip","rect("+t.ch+","+t.w+","+t.h+",0)")):(o.css("clip","rect(0,"+t.cw+","+t.h+",0)"),s.css("clip","rect(0,"+t.w+","+t.h+","+t.cw+")")),a.css("height",t.h)}function l(t,e){var n;return n="vertical"===i?(e-w)/p:(t-f)/v,e=0,t=1,Math.max(e,Math.min(t,n))}_(window).on("resize.twentytwenty",function(t){d(e)});function c(t){((t.distX>t.distY&&t.distX<-t.distY||t.distX-t.distY)&&"vertical"!==i||(t.distXt.distY&&t.distX>-t.distY)&&"vertical"===i)&&t.preventDefault(),a.addClass("active"),f=a.offset().left,w=a.offset().top,v=o.width(),p=o.height()}var f=0,w=0,v=0,p=0,y=function(t){a.hasClass("active")&&(e=l(t.pageX,t.pageY),d(e))},t=function(){a.removeClass("active")},n=h.move_with_handle_only?r:a;n.on("movestart",c),n.on("move",y),n.on("moveend",t),h.move_slider_on_hover&&(a.on("mouseenter",c),a.on("mousemove",y),a.on("mouseleave",t)),r.on("touchmove",function(t){t.preventDefault()}),a.find("img").on("mousedown",function(t){t.preventDefault()}),h.click_to_move&&a.on("click",function(t){f=a.offset().left,w=a.offset().top,v=o.width(),p=o.height(),e=l(t.pageX,t.pageY),d(e)}),_(window).trigger("resize.twentytwenty")})}}(jQuery); /** * Event Move * required for: TwentyTwenty * 2.0.0 | Stephen Band */ !function(e){"function"==typeof define&&define.amd?define([],e):"undefined"!=typeof module&&null!==module&&module.exports?module.exports=e:e()}(function(){var e=Object.assign||window.jQuery&&jQuery.extend,t=8,n=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){return window.setTimeout(function(){e()},25)},i={textarea:!0,input:!0,select:!0,button:!0},o={move:"mousemove",cancel:"mouseup dragstart",end:"mouseup"},a={move:"touchmove",cancel:"touchend",end:"touchend"},c=/\s+/,u={bubbles:!0,cancelable:!0},r=Symbol("events");function d(e){return e[r]||(e[r]={})}function m(e,t,n,i,o){t=t.split(c);var a,u=d(e),r=t.length;function m(e){n(e,i)}for(;r--;)(u[a=t[r]]||(u[a]=[])).push([n,m]),e.addEventListener(a,m)}function f(e,t,n,i){t=t.split(c);var o,a,u,r=d(e),m=t.length;if(r)for(;m--;)if(a=r[o=t[m]])for(u=a.length;u--;)a[u][0]===n&&(e.removeEventListener(o,a[u][1]),a.splice(u,1))}function v(t,n,i){var o=function(e){return new CustomEvent(e,u)}(n);i&&e(o,i),t.dispatchEvent(o)}function s(e){var t=e,i=!1,o=!1;function a(e){i?(t(),n(a),o=!0,i=!1):o=!1}this.kick=function(e){i=!0,o||a()},this.end=function(e){var n=t;e&&(o?(t=i?function(){n(),e()}:e,i=!0):e())}}function l(){}function g(e){e.preventDefault()}function p(e,t){var n,i;if(e.identifiedTouch)return e.identifiedTouch(t);for(n=-1,i=e.length;++n1&&(f=window.devicePixelRatio,d.style.width=d.style.height=[b.size,"px"].join(""),d.width=d.height=b.size*f,e.scale(f,f)),e.translate(b.size/2,b.size/2),e.rotate((-0.5+b.rotate/180)*Math.PI);var g=(b.size-b.lineWidth)/2;b.scaleColor&&b.scaleLength&&(g-=b.scaleLength+2),Date.now=Date.now||function(){return+new Date};var h=function(a,b,c){c=Math.min(Math.max(-1,c||0),1);var d=0>=c?!0:!1;e.beginPath(),e.arc(0,0,g,0,2*Math.PI*c,d),e.strokeStyle=a,e.lineWidth=b,e.stroke()},i=function(){var a,c;e.lineWidth=1,e.fillStyle=b.scaleColor,e.save();for(var d=24;d>0;--d)d%6===0?(c=b.scaleLength,a=0):(c=.6*b.scaleLength,a=b.scaleLength-c),e.fillRect(-b.size/2+a,0,c,1),e.rotate(Math.PI/12);e.restore()},j=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(a){window.setTimeout(a,1e3/60)}}(),k=function(){b.scaleColor&&i(),b.trackColor&&h(b.trackColor,b.trackWidth||b.lineWidth,1)};this.getCanvas=function(){return d},this.getCtx=function(){return e},this.clear=function(){e.clearRect(b.size/-2,b.size/-2,b.size,b.size)},this.draw=function(a){b.scaleColor||b.trackColor?e.getImageData&&e.putImageData?c?e.putImageData(c,0,0):(k(),c=e.getImageData(0,0,b.size*f,b.size*f)):(this.clear(),k()):this.clear(),e.lineCap=b.lineCap;var d;d="function"==typeof b.barColor?b.barColor(a):b.barColor,h(d,b.lineWidth,a/100)}.bind(this),this.animate=function(a,c){var d=Date.now();b.onStart(a,c);var e=function(){var f=Math.min(Date.now()-d,b.animate.duration),g=b.easing(this,f,a,c-a,b.animate.duration);this.draw(g),b.onStep(a,c,g),f>=b.animate.duration?b.onStop(a,c):j(e)}.bind(this);j(e)}.bind(this)},c=function(a,c){var d={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(a,b,c,d,e){return b/=e/2,1>b?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},onStart:function(a,b){},onStep:function(a,b,c){},onStop:function(a,b){}};if("undefined"!=typeof b)d.renderer=b;else{if("undefined"==typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");d.renderer=SVGRenderer}var e={},f=0,g=function(){this.el=a,this.options=e;for(var b in d)d.hasOwnProperty(b)&&(e[b]=c&&"undefined"!=typeof c[b]?c[b]:d[b],"function"==typeof e[b]&&(e[b]=e[b].bind(this)));"string"==typeof e.easing&&"undefined"!=typeof jQuery&&jQuery.isFunction(jQuery.easing[e.easing])?e.easing=jQuery.easing[e.easing]:e.easing=d.easing,"number"==typeof e.animate&&(e.animate={duration:e.animate,enabled:!0}),"boolean"!=typeof e.animate||e.animate||(e.animate={duration:1e3,enabled:e.animate}),this.renderer=new e.renderer(a,e),this.renderer.draw(f),a.dataset&&a.dataset.percent?this.update(parseFloat(a.dataset.percent)):a.getAttribute&&a.getAttribute("data-percent")&&this.update(parseFloat(a.getAttribute("data-percent")))}.bind(this);this.update=function(a){return a=parseFloat(a),e.animate.enabled?this.renderer.animate(f,a):this.renderer.draw(a),f=a,this}.bind(this),this.disableAnimation=function(){return e.animate.enabled=!1,this},this.enableAnimation=function(){return e.animate.enabled=!0,this},g()};a.fn.easyPieChart=function(b){return this.each(function(){var d;a.data(this,"easyPieChart")||(d=a.extend({},b,a(this).data()),a.data(this,"easyPieChart",new c(this,d)))})}}); /** * Countdown * downCount * Sonny T. , sonnyt.com */ (function(e){e.fn.downCount=function(t,n){function o(){var e=new Date(r.date),t=s();var o=e-t;if(o<0){clearInterval(u);if(n&&typeof n==="function")n();return}var a=1e3,f=a*60,l=f*60,c=l*24;var h=Math.floor(o/c),p=Math.floor(o%c/l),d=Math.floor(o%l/f),v=Math.floor(o%f/a);h=String(h).length>=2?h:"0"+h;p=String(p).length>=2?p:"0"+p;d=String(d).length>=2?d:"0"+d;v=String(v).length>=2?v:"0"+v;var m=h===1?"day":"days",g=p===1?"hour":"hours",y=d===1?"minute":"minutes",b=v===1?"second":"seconds";i.find(".days").text(h);i.find(".hours").text(p);i.find(".minutes").text(d);i.find(".seconds").text(v);i.find(".days_ref").text(m);i.find(".hours_ref").text(g);i.find(".minutes_ref").text(y);i.find(".seconds_ref").text(b)}var r=e.extend({date:null,offset:null},t);if(!r.date){e.error("Date is not defined.")}if(!Date.parse(r.date)){e.error("Incorrect date format, it should look like this, 12/24/2012 12:00:00.")}var i=this;var s=function(){var e=new Date;var t=e.getTime()+e.getTimezoneOffset()*6e4;var n=new Date(t+36e5*r.offset);return n};var u=setInterval(o,1e3)}})(jQuery); /** * imagesLoaded * required for: Isotope * 4.1.4 | http://imagesloaded.desandro.com/ */ !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o