text: /*!
   * rustic.js 1.0.3  (http://pratinav.tk/rustic.js/)
   * (c) 2015 Pratinav Bagla (http://pratinav.tk)
   * Released under the MIT license (https://github.com/Pratinav/rustic.js/blob/master/LICENSE.txt)
   **/
  !function($){function i(i,n){void 0===n&&(n="");for(var t="",a="",e="",o="tag",r=0;r<i.length;r++){var s=i[r];"."!==s?"#"!==s?"tag"===o?t+=s:"class"===o?a+=s:"id"===o&&(e+=s):o="id":(a+=r>1?" ":"",o="class")}return el="<"+t,""!==e&&(el+=' id="'+e+'"'),""!==a&&(el+=' class="'+a+'"'),el+=">"+n+"</"+t+">",el}$.extend($.easing,{easeInOutQuad:function(i,n,t,a,e){return(n/=e/2)<1?a/2*n*n+t:-a/2*(--n*(n-2)-1)+t}}),$.fn.rustic=function(n){var t=$.extend({looping:!1,defaultCallback:[function(){},function(){}],specificCallbacks:{},breakingPoint:0,easing:"easeInOutQuad",transitionDuration:500,pagination:!0,paginationWrapper:["div.rustic-pagination",""],paginationPoint:["span.rustic-pagination-point",""],paginationCss:!0,specificPaginationPoints:{}},n);return this.each(function(){function n(){m=!0,h.append(i(t.paginationWrapper[0],t.paginationWrapper[1])),f=h.children().last();for(var n=i(t.paginationPoint[0],t.paginationPoint[1]),a=0;b>a;a++)f.append(t.specificPaginationPoints.hasOwnProperty(a+1)?i(t.specificPaginationPoints[a+1][0],t.specificPaginationPoints[a+1][1]):n);if(g=f.children(),t.paginationCss){var e=t.paginationWrapper[0],o=t.paginationPoint[0];$("style").length||$("head").append('<style type="text/css"></style>');var r=$("style");r.append(e+"{position: fixed;top: 50%;-webkit-transform: translateY(-50%);-ms-transform: translateY(-50%);transform: translateY(-50%);right: 10px;}"+o+"{box-sizing: border-box;height: 16px;width: 16px;border-radius: 50%;border: 3px solid white;opacity: 0.4;display: block;margin: 10px 0;cursor: pointer;background: none;transition: all 200ms ease-in-out;}"+o+".active {background: white;opacity: 1}"+o+":hover {opacity: 1}")}}function a(){m&&(t.pagination&&(t.pagination=!1),"none"!==f.css("display")&&f.hide())}function e(){t.pagination||(t.pagination=!0,m||n()),"none"===f.css("display")&&f.show()}function o(i){var n=w.filter(".active"),a=n.index(),e=i-1;if(e!==a){0>e?e=b-1:e>=b&&(e=0),x=!0;var o=w.eq(e),r=t.specificCallbacks.hasOwnProperty(e+1)?t.specificCallbacks[e+1]:t.defaultCallback,s=$(document).height()-$(window).height(),c=o.offset().top;c>=s&&(e=b-1,o=w.eq(e),c=s),n.removeClass("active"),g.eq(a).removeClass("active"),o.addClass("active"),g.eq(e).addClass("active"),r[0](),$("html body").animate({scrollTop:c},t.transitionDuration,t.easing,function(){r[1](),setTimeout(function(){x=!1},500)})}}function r(){var i=w.filter(".active").index();o(i+2)}function s(){var i=w.filter(".active").index();o(i)}function c(){if(!v&&t.pagination){var i=g.filter(".active"),n=w.filter(".active").index(),a=v?n:0,e=$(window).scrollTop();if(e>=$(document).height()-$(window).height())a=b-1;else for(var o=0;b>o;o++){var r=w.eq(o).offset().top-.5*$(window).height();if(!(e>=r))break;a=o}a!==n&&(w.filter(".active").removeClass("active"),i.removeClass("active"),w.eq(a).addClass("active"),g.eq(a).addClass("active"))}}function l(){t.pagination&&n(),w.eq(0).addClass("active"),g.eq(0).addClass("active")}function u(){v&&(v=!1,$(window).bind("scroll",c))}function p(i){v||(v=!0,$(window).unbind("scroll",c));for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])}function d(i){var n=$(window).width();n<=t.breakingPoint?u():p()}var f,g,v=!0,h=$(this),w=h.children(),b=w.length,m=!1;l(),g.click(function(i){o($(this).index()+1)});var P,k,x=!1;$(window).on({resize:d,"DOMMouseScroll mousewheel wheel":function(i){return v?(x||(i.originalEvent.wheelDelta<0||i.originalEvent.detail>0?r():s()),i.preventDefault&&i.preventDefault(),i.stopPropagation(),i.returnValue=!1,!1):void 0},touchstart:function(i){v&&(P=i.originalEvent.touches[0].clientY,k=i.originalEvent.touches[0].clientX)},touchend:function(i){var n=i.originalEvent.changedTouches[0].clientY,t=i.originalEvent.changedTouches[0].clientX,a=P-n,e=k-t;Math.abs(a)>Math.abs(e)&&(a>5?r():s()),P=null,k=null},touchmove:function(i){return v?(i.preventDefault&&i.preventDefault(),!1):void 0}}),$(document).keydown(function(i){if(v){var n=i.target.tagName.toLowerCase();switch(i.which){case 33:case 38:"input"!=n&&"textarea"!=n&&(i.preventDefault(),s());break;case 32:case 34:case 40:"input"!=n&&"textarea"!=n&&(i.preventDefault(),r());break;case 35:o(b);break;case 36:o(1);break;default:return}}}),$(window).unload(function(){$(this).scrollTop(0)}),$.fn.rustic.moveUp=s,$.fn.rustic.moveDown=r,$.fn.rustic.moveTo=o,$.fn.rustic.hidePagination=a,$.fn.rustic.showPagination=e,$.fn.rustic.togglePagination=function(){t.pagination?t.pagination=!1:t.pagination=!0,"none"===f.css("display")?f.show():f.hide()},$.fn.unrustic=u,$.fn.rerustic=p,$.fn.rustic.toggle=function(){v?(v=!1,$(window).bind("scroll",c)):(v=!0,$(window).unbind("scroll",c))}})}}(jQuery);