-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfoojitsu.min.js
8 lines (8 loc) · 27.5 KB
/
foojitsu.min.js
1
2
3
4
5
6
7
8
/*!
* FooJitsu - A lightweight JavaScript framework for plugins.
* @version 1.0.5
* @link https://github.com/fooplugins/foojitsu
* @copyright FooPlugins 2016
* @license Released under the MIT license.
*/
!function(){function a(){function b(b){return a.apply(this,b)}var c=this,d=Array.prototype.slice.call(arguments);if(!(this instanceof a))return b.prototype=a.prototype,new b(d);this.context=a.getContext(d),this.length=0;var e=d.shift();if(a.is.self(e))return e;if(a.is.selector(e))return a(this.context.querySelectorAll(e),this.context);if(a.is.html(e))return a(a.parseHTML(e),this.context);if(a.is.element(e)||e===window)this[0]=e,this.length=1;else if(a.is.array(e)||a.is.arrayLike(e)){var f=0;a.each(e,function(b,d){a.is.element(d)&&-1===a.inArray(d,c)&&(c[f]=d,f++,c.length=f)})}else a.is.fn(e)&&a.ready(e)}a.version="1.0.5";var b=/[\d\.]/;a.versionCompare=function(a,c){function d(a){for(var b=a.split("."),c=0,d=b.length;d>c;c++)b[c]=parseInt(b[c]),isNaN(b[c])&&(b[c]=0);return b}if(!b.test(a)||!b.test(c))return NaN;for(var e=d(a),f=d(c);e.length<f.length;)e.push(0);for(;f.length<e.length;)f.push(0);for(var g=0;g<e.length;++g){if(f.length==g)return 1;if(e[g]!=f[g])return e[g]>f[g]?1:-1}return e.length!=f.length?-1:0};var c=!!window.FooJitsu;(!c||c&&a.versionCompare(a.version,window.FooJitsu.version)>0)&&(window.FooJitsu=a)}(),function(a){"1.0.5"===a.version&&(a.is=function(b,c){if(!a.is.element(b))return!1;var d=c.split(","),e=!1;return a.each(d,function(c,d){if(d=d.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),""!==d){var f=a.is.element(b.parentNode)?b.parentNode.cloneNode(!1):document.createElement("div"),g=b.cloneNode(!0);return f.appendChild(g),f.querySelector(d)===g?(e=!0,!1):void 0}}),e},a.is.self=function(b){return a.is.defined(b)&&b instanceof a},a.is.defined=function(a){return"undefined"!=typeof a},a.is.undef=function(a){return"undefined"==typeof a},a.is.string=function(a){return"string"==typeof a},a.is.number=function(a){return"number"==typeof a&&!isNaN(a)},a.is.array=function(a){return"[object Array]"===Object.prototype.toString.call(a)},a.is.arrayLike=function(b){return!a.is.fn(b)&&a.is.defined(b)&&null!==b&&a.is.number(b.length)},a.is["boolean"]=function(a){return"[object Boolean]"===Object.prototype.toString.call(a)},a.is.fn=function(a){var b="undefined"!=typeof window&&a===window.alert;return b||"[object Function]"===Object.prototype.toString.call(a)},a.is.object=function(b){return a.is.defined(b)&&"[object Object]"===Object.prototype.toString.call(b)},a.is.hash=function(b){return a.is.object(b)&&b.constructor===Object&&!b.nodeType&&!b.setInterval},a.is.element=function(a){return"object"==typeof HTMLElement?a instanceof HTMLElement:a&&"object"==typeof a&&null!==a&&1===a.nodeType&&"string"==typeof a.nodeName},a.is.event=function(b){return a.is.defined(window.Event)&&b instanceof window.Event},a.is.selector=function(b){try{return a.is.string(b)?(document.querySelector(b),!0):!1}catch(c){return!1}},a.is.html=function(a){try{return/^<.*?>$/i.test(a)}catch(b){return!1}},a.is.any=function(b,c){if(a.is.array(c)){for(var d=c.length+1;d-=1;)if(c[d-1]===b)return!0}else if(a.is.object(c))return b in c;return!1})}(FooJitsu),function(a){function b(b){if(a.is.defined(g.style[b]))return!0;for(var c=0,d=e.length;d>c;c++){var f=e[c]+b.charAt(0).toUpperCase()+b.substr(1);if(a.is.defined(g.style[f]))return!0}return!1}function c(b){if(-1!=a.inArray(b,f)){if(a.is.defined(g.style[b]))return b;for(var c=0,d=e.length;d>c;c++){var h=e[c]+b.charAt(0).toUpperCase()+b.substr(1);if(a.is.defined(g.style[h]))return h}}return b}function d(b,c){if(a.is.hash(b))for(var d in b)if(b.hasOwnProperty(d)&&a.is.defined(g.style[d]))return b[d];return c}if("1.0.5"===a.version){var e=["Webkit","Moz","ms","O","Khtml"],f=["transition","transform","transformOrigin","userSelect"],g=document.createElement("div"),h=/^-(moz|webkit|khtml|o|ms)-([a-z])/,i=/^(Moz|Webkit|Khtml|O|ms)([A-Z])/,j=navigator.userAgent.toLowerCase(),k=function(a,b,c){return c.toLowerCase()},l=function(a,b,c){return"-"+b+"-"+c.toLowerCase()},m=function(b){return h.test(b)&&(b=b.replace(h,k)),i.test(b)&&(b=b.replace(i,k)),a.toCamelCase(b)};a.browser={isIE:j.indexOf("msie ")>-1||j.indexOf("trident/")>-1||j.indexOf("edge/")>-1,ltEqIE10:Function("/*@cc_on return true@*/")()};var n={storage:"localStorage"in window&&null!==window.localStorage,touch:"ontouchstart"in window||navigator.msMaxTouchPoints>0};a.browser.supports=function(c){return c=m(c),a.is.defined(n[c])?n[c]:n[c]=b(c)};var o={};a.browser.prefixed=function(b,d){return b=m(b),b=a.is.defined(o[b])?o[b]:o[b]=c(b),d?a.toHyphen(b.replace(i,l)):b};var p={transitionend:d({transition:"transitionend",OTransition:"otransitionend",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"}),animationstart:d({animation:"animationstart",OAnimation:"oanimationstart",MozAnimation:"animationstart",WebkitAnimation:"webkitAnimationStart"}),animationiteration:d({animation:"animationiteration",OAnimation:"oanimationiteration",MozAnimation:"animationiteration",WebkitAnimation:"webkitAnimationIteration"}),animationend:d({animation:"animationend",OAnimation:"oanimationend",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"})};a.browser.event=function(b){return a.is.defined(p[b])?p[b]:b}}}(FooJitsu),function(a){if("1.0.5"===a.version){a.noop=function(){},a.ready=function(b){function c(){try{b.call(window,a)}catch(c){console.error(c)}}(a.browser.ltEqIE10?"complete"===document.readyState:"loading"!==document.readyState)?c():document.addEventListener("DOMContentLoaded",c,!1)},a.getContext=function(b){if(a.is.array(b)&&b.length>1){var c=b[b.length-1];if(a.is.selector(b[0])){if(a.is.self(c)&&1==c.length)return c.get(0);if(a.is.element(c))return c}}return document},a.viewportWidth=function(b){var c=b&&a.is.number(window.devicePixelRatio)?window.devicePixelRatio:1;return Math.max(document.documentElement.clientWidth,window.innerWidth,0)/c},a.each=function(b,c){var d;if(a.is.hash(b)){for(var e in b)if(b.hasOwnProperty(e)&&(d=c.call(window,e,b[e]),a.is["boolean"](d)&&d===!1))break}else if(a.is.array(b)||a.is.self(b)||a.is.arrayLike(b))for(var f=0,g=b.length;g>f&&(d=c.call(window,f,b[f]),!a.is["boolean"](d)||d!==!1);f++);},a.filter=function(b,c){var d;return a.is.hash(b)?(d={},a.each(b,function(a,b){c.call(window,a,b)===!0&&(d[a]=b)})):(a.is.array(b)||a.is.self(b)||a.is.arrayLike(b))&&(d=[],a.each(b,function(a,b){c.call(window,a,b)===!0&&d.push(b)})),d},a.map=function(b,c){var d,e=[];return a.each(b,function(b,f){d=c.call(window,f,b),a.is.defined(d)&&null!==d&&(a.is.array(d)?e=e.concat(d):e.push(d))}),e},a.extend=function(b,c,d){var e,f,g=Array.prototype.slice.call(arguments),h=g.shift(),i=!1;return a.is["boolean"](h)&&(i=h,h=g.shift()||{}),a.each(g,function(b,c){(a.is.hash(c)||a.is.array(c))&&a.each(c,function(b,c){e=h[b],h!==c&&(i&&a.is.array(c)?(f=a.is.array(e)?e:[],h[b]=a.extend(i,f,c)):i&&a.is.hash(c)?(f=a.is.hash(e)?e:{},h[b]=a.extend(i,f,c)):a.is.defined(c)&&(h[b]=c))})}),h};var b=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,c=/^key/,d=/^touch/,e=/^transition/,f=/^animation/;a.getEventType=function(g){return(b.test(g)?"Mouse":c.test(g)?"Keyboard":d.test(g)?"Touch":a.browser.supports("transition")&&e.test(g)?"Transition":a.browser.supports("animation")&&f.test(g)?"Animation":"")+"Event"},a.trim=function(b,c){return a.is.undef(b)||null==b?"":(c&&(b=b.replace(/[\s\uFEFF\xA0]{2,}/g," ")),b.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""))},a.makeArray=function(b){var c=[];if(a.is.arrayLike(b))for(var d,e=0,f=b.length;f>e;e++)d=b[e],a.is.defined(d)&&c.push(d);return c},a.inArray=function(b,c){var d=-1;return a.each(c,function(a,c){return c===b?(d=a,!1):void 0}),d},a.split=function(b,c,d,e){if(!a.is.string(b))return[];c=a.is.defined(c)?c:" ",d=a.is["boolean"](d)?d:!0,e=a.is["boolean"](e)?e:!0;for(var f=b.split(c),g=f.length;g>=0;g--)e&&(f[g]=a.trim(f[g])),d&&""===f[g]&&f.splice(g,1);return f},a.parseValue=function(b){var c=b;return/^false$/i.test(b)?c=!1:/^true$/i.test(b)?c=!0:isNaN(b)?a.is.string(b)&&("{"==b.charAt(0)&&"}"==b.charAt(b.length-1)||"["==b.charAt(0)&&"]"==b.charAt(b.length-1))&&(c=JSON.parse(b)):c=+b,c},a.toCamelCase=function(b){return a.trim(b,!0).replace(/^([A-Z])|[-\s_](\w)/g,function(a,b,c){return c?c.toUpperCase():b.toLowerCase()})},a.toHyphen=function(b){return a.trim(b,!0).replace(/([a-z])(?:[-\s_])([A-Za-z])|([a-z])([A-Z])/g,"$1$3-$2$4").toLowerCase()},a.isChildOf=function(a,b){for(;(a=a.parentNode)&&a!==b;);return!!a},a.index=function(a){for(var b=0,c=a;c=c.previousElementSibling;)++b;return b};var g=document.createElement("div");a.parseHTML=function(b){return a.is.html(b)?(g.innerHTML=b,g.childNodes):null},a.param=function(b,c){return a.is.string(b)?a.param.parse(b,c):a.param.stringify(b,c)},a.param.stringify=function(b,c){var d=[],e=a.is.arrayLike(b);return c=a.is.string(c)?c:"",a.each(b,function(b,f){b=e?c+"[]":""!==c?c+"["+b+"]":b,d.push("object"==typeof f?a.param(f,b):a.param.encode(b)+"="+a.param.encode(f))}),d.join("&")},a.param.parse=function(b,c){b=b.split("#")[0],b="?"+(-1!==b.indexOf("?")?b.split("?")[1]:b);var d={};return a.each(b.substr(1).split("&"),function(b,e){var f=e.split("=");if(2===f.length){var g=a.param.decode(f[0]),h=a.param.decode(f[1]),i=/\[(.+?)?]/g;if(i.test(g)){i.lastIndex=0;for(var j,k,l=/\[]/.test(g),m=d,n=[];null!==(j=i.exec(g));)a.is.string(j[1])&&n.push(j[1]);var o=a.is.string(c);g=g.replace(i,""),o||n.unshift(g),o&&n.unshift(c),k=n.length-1,a.each(n,function(b,c){b===k?l?(""!==c||o||(c="array",m.ARRAY_RESULT=!0),a.is.array(m[c])?m[c].push(h):m[c]=[h]):m[c]=h:(a.is.undef(m[c])&&(m[c]={}),m=m[c])})}else d[g]=h}}),d.ARRAY_RESULT?d.array:d},a.param.encode=function(a){return encodeURIComponent(a).replace(/%20/g,"+")},a.param.decode=function(b){return a.is.string(b)?decodeURIComponent(b.replace(/\+/g,"%20")):b+""}}}(FooJitsu),function(a){"1.0.5"===a.version&&(a.Deferred=function(b){if(!(this instanceof a.Deferred))return new a.Deferred(b);if(this.__callbacks__=[],this.currentState="pending",a.is.fn(b))try{b(this)}catch(c){this.reject(c)}},a.Deferred.prototype.__apply__=function(b,c){function d(b,c,d){var e=a.is.fn(b[c])?[b[c]]:a.is.array(b[c])?b[c]:[];a.each(e,function(b,c){a.is.fn(c)&&c.apply(f,d)})}function e(a,b,c){try{d(a,b,c)}catch(e){d(a,"reject",[e])}}var f=this,g="resolve"===b||"reject"===b;g&&("reject"===b&&(this.currentState="rejected",this.then=function(a,b){b.apply(f,c)}),"resolve"===b&&(this.currentState="resolved",this.then=function(a){a.apply(f,c)})),a.each(this.__callbacks__,function(a,d){e(d,b,c)}),g&&(a.each(this.__callbacks__,function(a,b){e(b,"always",c)}),this.__callbacks__=[],this.resolve=this.reject=this.notify=a.noop)},a.Deferred.prototype.state=function(){return this.currentState},a.Deferred.prototype.resolve=function(a){this.__apply__("resolve",Array.prototype.slice.call(arguments))},a.Deferred.prototype.reject=function(a){this.__apply__("reject",Array.prototype.slice.call(arguments))},a.Deferred.prototype.notify=function(a){this.__apply__("progress",Array.prototype.slice.call(arguments))},a.Deferred.prototype.then=function(a,b,c){return this.__callbacks__.push({resolve:a,reject:b,progress:c}),this},a.Deferred.prototype.always=function(a){return this.__callbacks__.push({always:a}),this},a.Deferred.prototype.done=function(a){return this.__callbacks__.push({resolve:a}),this},a.Deferred.prototype.fail=function(a){return this.__callbacks__.push({reject:a}),this},a.Deferred.prototype.progress=function(a){return this.__callbacks__.push({progress:a}),this},a.when=function(b){var c=Array.prototype.slice.call(arguments);return new a.Deferred(function(b){var d=c.length,e={length:0};a.each(c,function(c,f){f.then(function(f){e.length++,e[c]=f,e.length===d&&b.resolve(a.makeArray(e))},function(a){b.reject(a)})})})})}(FooJitsu),function(a){"1.0.5"===a.version&&(a.expando="foojitsu-"+Math.random().toString(36).substring(7),a.CacheManager=function(){return this instanceof a.CacheManager?(this._uid=0,this.data={},this._attr={},void(this._events={})):new a.CacheManager},a.CacheManager.prototype.uid=function(b,c){c=!!c;var d;if((a.is.element(b)||b===window)&&(a.is.number(d=b[a.expando])||(this._uid++,d=this._uid,Object.defineProperty(b,a.expando,{value:d,configurable:!0})),c&&!this._attr[d])){var e={};a.each(b.attributes,function(b,c){"data-"===c.name.substr(0,5)&&(e[a.toCamelCase(c.name.substr(5))]=a.parseValue(c.value))}),this.data[d]=a.extend(!0,this.data[d],e),this._attr[d]=!0}return d},a.CacheManager.prototype.clear=function(b,c){var d,e=a.is.number(d=this.uid(b));e&&a.is.hash(this.data[d])&&delete this.data[d],e&&c&&(a.is["boolean"](c)&&delete this._attr[d],a.is.string(c)&&"__events__"===c&&delete this._events[d]),a.is.undef(b)&&(this.data={},this._attr={})},a.CacheManager.prototype.get=function(b,c){var d;return a.is.number(d=this.uid(b,!0))&&a.is.hash(this.data[d])?a.is.string(c)?"__events__"===c?a.is.array(this._events[d])?this._events[d]:this._events[d]=[]:this.data[d][c]:a.filter(this.data[d],function(a){return"__"!==a.substr(0,2)}):void 0},a.CacheManager.prototype.set=function(b,c,d){var e=this.uid(b,!0),f={},g=!1;a.is.hash(c)?(f=c,g=!0):a.is.string(c)&&a.is.defined(d)&&("__events__"===c&&a.is.array(d)?0===d.length?delete this._events[e]:this._events[e]=d:(f[c]=d,g=!0)),g&&(this.data[e]=a.extend(!0,this.data[e],f))},a.CacheManager.prototype.remove=function(b,c){var d;a.is.string(c)&&a.is.number(d=this.uid(b))&&a.is.defined(this.data[d])&&a.is.defined(this.data[d][c])&&delete this.data[d][c]},a.cache=new a.CacheManager)}(FooJitsu),function(a){"1.0.5"===a.version&&(a.prototype.each=function(b){return a.each(this,function(a,c){c!==window&&b.call(window,a,c)}),this},a.prototype.map=function(b){return a.map(this,function(a,c){return a!==window?b.call(a,c,a):void 0})},a.prototype.get=function(b){if(a.is.number(b))return-1===b&&(b=this.length-1),b in this?this[b]:null;var c=[];return this.each(function(a,b){c.push(b)}),c},a.prototype.is=function(b){var c=!1;return this.each(function(d,e){return(c=a.is(e,b))===!0?!1:void 0}),c},a.prototype.find=function(b){return a.is.selector(b)?a(b,this):this},a.prototype.filter=function(b){var c=a.is.fn(b),d=a.is.selector(b),e=a.filter(this,function(e,f){return c?b.call(f,e,f):d?a(f).is(b):!0});return a(e,this)},a.prototype.eq=function(b){return a(this.get(b))},a.prototype.first=function(){return this.eq(0)},a.prototype.hasClass=function(b){var c,d=this,e=!1;return a.each(a.split(b),function(a,b){return document.classList?d.each(function(a,c){return c.classList.contains(b)?(e=!0,!1):void 0}):(c=new RegExp("(\\s|^)"+b+"(\\s|$)"),d.each(function(a,b){return c.test(b.className)?(e=!0,!1):void 0})),e===!0?!1:void 0}),e},a.prototype.addClass=function(b){var c,d=this;return a.each(a.split(b),function(b,e){document.classList?d.each(function(a,b){b.classList.add(e)}):(c=new RegExp("(\\s|^)"+e+"(\\s|$)"),d.each(function(b,d){c.test(d.className)||(d.className=a.trim(d.className+" "+e,!0))}))}),this},a.prototype.removeClass=function(b){var c,d=this,e=a.split(b);return e.length>0?a.each(e,function(b,e){document.classList?d.each(function(a,b){b.classList.remove(e)}):(c=new RegExp("(\\s|^)"+e+"(\\s|$)"),d.each(function(b,d){c.test(d.className)&&(d.className=a.trim(d.className.replace(c," "),!0))}))}):this.each(function(a,b){b.className=""}),this},a.prototype.toggleClass=function(b,c){var d,e,f=this;return a.each(a.split(b),function(b,g){document.classList?f.each(function(a,b){b.classList.toggle(g,c)}):(d=new RegExp("(\\s|^)"+g+"(\\s|$)"),f.each(function(b,f){e=d.test(f.className),a.is["boolean"](c)&&!c||a.is.undef(c)&&e?f.className=a.trim(f.className.replace(d," "),!0):e||(f.className=a.trim(f.className+" "+g,!0))}))}),this},a.prototype.index=function(){return a.index(this.get(0))},a.prototype.css=function(b,c){function d(b,c,d){c=a.browser.prefixed(c),a.is.number(d)&&(d+="px"),""===d||null===d?b.style.removeProperty(c):a.is.defined(b.style[c])&&(b.style[c]=d)}if(a.is.string(b)&&a.is.undef(c)){b=a.browser.prefixed(b,!0);var e=this.get(0);return a.is.element(e)?getComputedStyle(e,null).getPropertyValue(b):null}return this.each(function(e,f){a.is.hash(b)?a.each(b,function(a,b){d(f,a,b)}):a.is.string(b)&&d(f,b,c)})},a.prototype.attr=function(b,c){function d(b,c,d){""===d||null===d?b.removeAttribute(a.toHyphen(c)):b.setAttribute(a.toHyphen(c),a.is.string(d)?d:JSON.stringify(d))}if(a.is.undef(c)&&(null===b||a.is.undef(b)||a.is.string(b))){var e=this.get(0);if(!a.is.element(e)||!e.hasAttributes())return;if(a.is.string(b))return a.parseValue(e.getAttribute(a.toHyphen(b)));var f={};return a.each(e.attributes,function(b,c){f[a.toCamelCase(c.name)]=a.parseValue(c.value)}),f}return this.each(function(e,f){a.is.hash(b)?a.each(b,function(a,b){d(f,a,b)}):a.is.string(b)&&a.is.defined(c)&&d(f,b,c)})},a.prototype.data=function(b,c){if(a.is.undef(b)||a.is.string(b)&&a.is.undef(c)){var d=this.get(0);return a.is.element(d)?a.cache.get(this.get(0),b):null}return this.each(function(d,e){a.cache.set(e,b,c)})},a.prototype.removeData=function(){return this.each(function(b,c){a.cache.clear(c,!0)})},a.prototype.loaded=function(b,c){function d(){h>g&&10>=i?(i++,setTimeout(d,10)):b.call(c)}var e=this,f=this.find("img,iframe"),g=0,h=f.length,i=0;return c=a.is.defined(c)?c:e,a.each(f,function(b,c){if(c.complete)return void g++;var d=a(c).on("load error",function(){d.off("load error"),g++}).attr("src",c.src)}),d(),this},a.prototype.parent=function(b){var c=this.map(function(c,d){if(a.is.string(b)){for(var e=null,f=d;null===e&&(f=f.parentNode);)a.is(f,b)&&(e=f);return e}return d.parentNode});return a(c,this.context)},a.prototype.prev=function(b){var c=this.map(function(c,d){if(a.is.string(b)){for(var e=null,f=d;null===e&&(f=f.previousElementSibling);)a.is(f,b)&&(e=f);return e}return d.previousElementSibling});return a(c,this.context)},a.prototype.next=function(b){var c=this.map(function(c,d){if(a.is.string(b)){for(var e=null,f=d;null===e&&(f=f.nextElementSibling);)a.is(f,b)&&(e=f);return e}return d.nextElementSibling});return a(c,this.context)},a.prototype.clone=function(){var b=[];return this.each(function(a,c){b.push(c.cloneNode(!0))}),a(b,this.context)},a.prototype.append=function(b,c){var d,e=Array.prototype.slice.call(arguments);return this.each(function(b,c){d=document.createDocumentFragment(),a.each(e,function(c,e){a.is.self(e)?a.each(0==b?e:e.clone(),function(a,b){d.appendChild(b)}):a.is.html(e)?a.each(a.parseHTML(e),function(a,b){d.appendChild(b)}):a.is.element(e)&&d.appendChild(0==b?e:e.cloneNode(!0))}),d.childNodes.length>0&&c.appendChild(d)})},a.prototype.appendTo=function(b,c){var d=this,e=Array.prototype.slice.call(arguments);return a.each(e,function(b,c){a(c).append(d)}),this},a.prototype.remove=function(){return this.off().removeData().each(function(a,b){b.parentNode&&b.parentNode.removeChild(b)})},a.prototype.text=function(b){if(a.is.undef(b)){var c=this.get(0);return a.is.element(c)?c.textContent:null}return this.each(function(a,c){c.textContent=b+""})},a.prototype.__cssPixelProp__=function(b,c){if(a.is.undef(c)){var d=parseFloat(this.css(b));return isNaN(d)?null:d}return this.css(b,c)},a.prototype.width=function(a){return this.__cssPixelProp__("width",a)},a.prototype.height=function(a){return this.__cssPixelProp__("height",a)},a.prototype.top=function(a){return this.__cssPixelProp__("top",a)},a.prototype.bottom=function(a){return this.__cssPixelProp__("bottom",a)},a.prototype.left=function(a){return this.__cssPixelProp__("left",a)},a.prototype.right=function(a){return this.__cssPixelProp__("right",a)})}(FooJitsu),function(a){"1.0.5"===a.version&&(a.prototype.trigger=function(b,c){if(a.is.string(b)){var d=a.browser.event(b),e=a.getEventType(b);document.createEvent?(b=document.createEvent(e),b.initEvent(d,!0,!0)):window[e]&&(b=new window[e](d,{bubbles:!0,cancelable:!0}))}return a.is.event(b)&&(a.is.hash(c)&&a.extend(!0,b,c),a.each(this,function(a,c){c.dispatchEvent(b)})),this},a.prototype.on=function(b,c,d,e){var f,g,h=Array.prototype.slice.call(arguments);b=h.shift(),e=h.pop(),c=null,d=null,1===h.length?(g=h.shift(),c=a.is.string(g)?g:null,d=a.is.hash(g)?g:null):2===h.length&&(c=h.shift(),d=h.shift()),f=a.is.string(c)?function(b){var f=(this===window?document:this).querySelectorAll(c);if(f.length)for(var g=0,h=f.length;h>g;g++)(b.target==f[g]||a.isChildOf(b.target,f[g]))&&(a.is.hash(d)&&(b.data=a.extend(!0,b.data,d)),e.call(this,b))}:a.is.hash(d)?function(b){b.data=a.extend(!0,b.data,d),e.call(this,b)}:e;var i=this;return a.each(a.split(b),function(b,d){a.each(i,function(b,g){a.cache.get(g,"__events__").push({name:d,selector:c,handler:f,original:e}),g.addEventListener(a.browser.event(d),f,!1)})}),this},a.prototype.off=function(b,c,d){var e=Array.prototype.slice.call(arguments);b=e.shift(),d=e.pop(),c=1===e.length?e.shift():null;var f=a.is.fn(d),g=a.is.string(c),h=this,i=a.split(b);return 0===i.length?a.each(h,function(b,c){var d=a.cache.get(c,"__events__");a.each(d,function(b,d){c.removeEventListener(a.browser.event(d.name),d.handler,!1)}),a.cache.clear(c,"__events__")}):a.each(i,function(b,e){a.each(h,function(b,h){var i=a.cache.get(h,"__events__"),j=[],k=!1;a.each(i,function(b,i){(f&&g&&i.name===e&&i.selector===c&&i.original===d||f&&!g&&i.name===e&&i.original===d||!f&&g&&i.name===e&&i.selector===c||!f&&!g&&i.name===e)&&(k=!0,h.removeEventListener(a.browser.event(e),i.handler,!1),j.push(b))}),k&&(j.sort(function(a,b){return b-a}),a.each(j,function(a,b){i.splice(b)}),a.cache.set(h,"__events__",i)),a.is.string(e)&&a.is.fn(d)&&h.removeEventListener(a.browser.event(e),d,!1)})}),this},a.prototype.one=function(b,c,d,e){var f,g=this,h=Array.prototype.slice.call(arguments),i=Array.prototype.slice.call(arguments);return e=h.pop(),i.pop(),(2===i.length||3===i.length)&&(a.is.hash(i[1])&&i.splice(1,1),a.is.hash(i[2])&&i.splice(2,1)),f=function(a){g.off.apply(g,i),e.call(this,a)},h.push(f),i.push(f),this.on.apply(this,h)},a.prototype.transitionend=function(b,c){var d=this,e=Array.prototype.slice.call(arguments);return e.unshift("transitionend"),this.one.apply(this,e),a.browser.supports("transition")||setTimeout(function(){d.trigger("transitionend",{propertyName:"",elapsedTime:0})},1),this})}(FooJitsu),function(a){"1.0.5"===a.version&&(a.breakpoint=function(b,c,d){function e(){var c;a.is.number(c=a.cache.get(b,"__bpt__"))&&clearTimeout(c),a.cache.set(b,"__bpt__",setTimeout(function(){var c=a.is.fn(g.width)?g.width():a(b).parent().width(),e=a.breakpoint.calc(g.points,c);e[0]!==a.cache.get(b,"__bp__")&&(a.cache.set(b,"__bp__",e[0]),d.apply(b,[b].concat(e)))},g.throttle))}var f=Array.prototype.slice.call(arguments);if(d=f.pop(),a.is.fn(d)){var g=a.extend(!0,{},a.breakpoint.defaults,a.is.hash(c)?c:{});a.is.array(g.points)&&0!==g.points.length||(g.points=Array.prototype.slice.call(a.breakpoint.points)),g.width=a.is.fn(g.width)?g.width.bind(window,b,g):g.viewport?a.viewportWidth:null,a(window).on("resize",e),a.cache.set(b,"__bpc__",e),e()}else 1===f.length&&a.is.fn(d=a.cache.get(b,"__bpc__"))&&d.apply(b,[b].concat(current))},a.breakpoint.defaults={viewport:!0,points:[],throttle:50,width:null},a.breakpoint.points=[["xs",480],["sm",768],["md",1024],["lg",1280],["xl",1600]],a.breakpoint.calc=function(b,c){if(!a.is.array(b)||!a.is.number(c))return null;var d,e=0,f=b.length;for(b.sort(function(a,b){return a[1]-b[1]});f>e;e++)if(c<=b[e][1]){d=b[e];break}return d||(d=b[f-1]),d},a.breakpoint.remove=function(b){var c;a.is.number(c=a.cache.get(b,"__bpt__"))&&(clearTimeout(c),a.cache.remove(b,"__bpt__"));var d;a.is.fn(d=a.cache.get(b,"__bpc__"))&&(a(window).off("resize",d),a.cache.remove(b,"__bpc__")),a.cache.remove(b,"__bp__")},a.prototype.breakpoint=function(b,c){var d=Array.prototype.slice.call(arguments);return this.each(function(b,c){a.breakpoint.apply(window,[c].concat(d))})},a.prototype.removeBreakpoint=function(){return this.each(function(b,c){a.breakpoint.remove(c)})})}(FooJitsu),function(a){var b=document.createElement("a"),c=["protocol","hostname","host","pathname","port","search","hash"];a.Url=function(b){if(!(this instanceof a.Url))return new a.Url(b);this.hash="",this.host="",this.hostname="",this.pathname="",this.port="",this.protocol="",this.search="";var c=this;Object.defineProperty(c,"href",{get:function(){return c.toString()},set:function(a){c.parse(a)}}),c.href=b},a.Url.prototype.parse=function(d){if(!a.is.string(d))return"";b.href=""===d?window.location.href:d,""==b.host&&(b.href=b.href);var e=this;a.each(c,function(a,c){e[c]=b[c]}),0!==this.pathname.indexOf("/")&&(this.pathname="/"+this.pathname)},a.Url.prototype.param=function(b,c){for(var d,e=this,f=new RegExp("(\\?|&)"+a.param.encode(b).replace(/\+/g,"(?:%20|\\+)")+"(?:%5B%5D)?=(.+?)($|&)","g"),g=[];null!==(d=f.exec(this.search));)g.push(d),a.is.string(d[3])&&(f.lastIndex-=d[3].length);return a.is.undef(c)?(c=a.map(g,function(b){return a.param.decode(b[2])}),0===c.length?"":a.parseValue(1===c.length?c[0]:JSON.stringify(c))):(g.length>0&&""!==c?a.each(g,function(d,f){e.search=e.search.replace(f[0],f[1]+a.param.encode(b)+"="+a.param.encode(c)+(a.is.string(f[3])?f[3]:""))}):g.length>0&&""===c?(a.each(g,function(a,b){e.search=e.search.replace(b[0],b[1])}),this.search=this.search.replace(/(^\?$|&$)/,"")):a.is.defined(c)&&(this.search+=(-1===this.search.indexOf("?")?"?":"&")+a.param.encode(b)+"="+a.param.encode(c)),this)},a.Url.prototype.params=function(b){if(a.is.undef(b))return a.param(this.search);if(a.is.string(b)&&-1!==b.indexOf("=")&&(b=a.param(b)),a.is.hash(b)){var c=this;a.each(b,function(a,b){c.param(a,b)})}return this},a.Url.prototype.toString=function(){return""!==this.host?this.protocol+"//"+this.host+this.pathname+this.search+this.hash:""}}(FooJitsu),function(a){"1.0.5"===a.version&&(a.ajax=function(b,c){a.is.hash(b)&&(c=b),a.is.string(b)&&(c=a.is.hash(c)?c:{},c.url=b);var d=a.extend(!0,{},a.ajax.defaults,c);return d.url=a.is.string(d.url)?new a.Url(d.url):d.url,d.method=d.method.toLowerCase(),d.dataType=a.is.string(d.dataType)?d.dataType.toLowerCase():d.dataType,"jsonp"===d.dataType?a.ajax.jsonp(d):new a.Deferred(function(b){var c=new XMLHttpRequest;c.addEventListener("load",function(){try{if(200===c.status){var e=a.ajax.response(c,d);b.resolve(e)}else b.reject(Error(c.statusText),c)}catch(f){b.reject(f,c)}}),a.ajax.send(c,d)})},a.ajax.defaults={cache:!0,contentType:null,data:null,dataType:null,headers:{},jsonp:"callback",processData:!0,method:"GET",url:null},a.ajax.config=function(b){a.extend(!0,a.ajax.defaults,b)},a.ajax.setHeaders=function(b,c){a.each(c.headers,function(a,d){"content-type"===a.toLowerCase()?c.contentType=d:b.setRequestHeader(a,d)}),a.is.string(c.contentType)||-1===a.inArray(c.method,["post","patch"])||a.is.fn(window.FormData)&&c.data instanceof window.FormData||(c.contentType="application/x-www-form-urlencoded"),a.is.string(c.contentType)&&b.setRequestHeader("Content-Type",c.contentType)},a.ajax.open=function(b,c){c.cache||c.url.param(a.is["boolean"](c.cache)?"_":c.cache,Date.now()),b.open(c.method,c.url.toString(),!0),a.ajax.setHeaders(b,c)},a.ajax.send=function(b,c){switch(c.method){case"post":a.ajax.send.post(b,c);break;default:a.ajax.send.get(b,c)}},a.ajax.send.get=function(b,c){c.url.params(c.data),a.ajax.open(b,c),b.send(null)},a.ajax.send.post=function(b,c){a.ajax.open(b,c),b.send(a.ajax.send.post.data(c))},a.ajax.send.post.data=function(b){var c=b.data;return b.processData&&a.is.hash(b.data)&&(c="application/json"===b.contentType?JSON.stringify(b.data):a.param(b.data)),c},a.ajax.response=function(a,b){switch(b.dataType||a.getResponseHeader("Content-Type")){case"application/json":case"json":return JSON.parse(a.responseText);case"application/xml":case"xml":return a.responseXML;default:return a.response}},a.ajax.jsonp=function(b){return new a.Deferred(function(c){try{var d=document.createElement("script"),e="_"+Math.random().toString(36).substr(2,9);a.ajax.jsonp.callbacks[e]=function(b){delete a.ajax.jsonp.callbacks[e],d.parentNode.removeChild(d),c.resolve(b)},b.url.param(b.data),b.url.param(b.jsonp,"FooJitsu.ajax.jsonp.callbacks."+e),d.src=b.url.toString(),document.body.appendChild(d)}catch(f){c.reject(f)}})},a.ajax.jsonp.callbacks={})}(FooJitsu);