/** 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 */

(function(){var e=!1;window.JQClass=function(){},JQClass.classes={},JQClass.extend=function t(n){function o(){!e&&this._init&&this._init.apply(this,arguments)}var r=this.prototype;e=!0;var i=new this;e=!1;for(var s in n)i[s]=typeof n[s]=="function"&&typeof r[s]=="function"?function(e,t){return function(){var n=this._super;this._super=function(t){return r[e].apply(this,t||[])};var i=t.apply(this,arguments);return this._super=n,i}}(s,n[s]):n[s];return o.prototype=i,o.prototype.constructor=o,o.extend=t,o}})(),function($){function camelCase(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var e=camelCase(this.name);$[e]=this,$.fn[e]=function(t){var n=Array.prototype.slice.call(arguments,1);return $[e]._isNotChained(t,n)?$[e][t].apply($[e],[this[0]].concat(n)):this.each(function(){if(typeof t=="string"){if(t[0]==="_"||!$[e][t])throw"Unknown method: "+t;$[e][t].apply($[e],[this].concat(n))}else $[e]._attach(this,t)})}},setDefaults:function(e){$.extend(this.defaultOptions,e||{})},_isNotChained:function(e,t){return e==="option"&&(t.length===0||t.length===1&&typeof t[0]=="string")?!0:$.inArray(e,this._getters)>-1},_attach:function(e,t){e=$(e);if(e.hasClass(this._getMarker()))return;e.addClass(this._getMarker()),t=$.extend({},this.defaultOptions,this._getMetadata(e),t||{});var n=$.extend({name:this.name,elem:e,options:t},this._instSettings(e,t));e.data(this.name,n),this._postAttach(e,n),this.option(e,t)},_instSettings:function(e,t){return{}},_postAttach:function(e,t){},_getMetadata:function(elem){try{var data=elem.data(this.name.toLowerCase())||"";data=data.replace(/'/g,'"'),data=data.replace(/([a-zA-Z0-9]+):/g,function(e,t,n){var r=data.substring(0,n).match(/"/g);return!r||r.length%2===0?'"'+t+'":':t+":"}),data=$.parseJSON("{"+data+"}");for(var name in data){var value=data[name];typeof value=="string"&&value.match(/^new Date\((.*)\)$/)&&(data[name]=eval(value))}return data}catch(e){return{}}},_getInst:function(e){return $(e).data(this.name)||{}},option:function(e,t,n){e=$(e);var r=e.data(this.name);if(!t||typeof t=="string"&&n==null){var i=(r||{}).options;return i&&t?i[t]:i}if(!e.hasClass(this._getMarker()))return;var i=t||{};typeof t=="string"&&(i={},i[t]=n),this._optionsChanged(e,r,i),$.extend(r.options,i)},_optionsChanged:function(e,t,n){},destroy:function(e){e=$(e);if(!e.hasClass(this._getMarker()))return;this._preDestroy(e,this._getInst(e)),e.removeData(this.name).removeClass(this._getMarker())},_preDestroy:function(e,t){}}),$.JQPlugin={createPlugin:function(e,t){typeof e=="object"&&(t=e,e="JQPlugin"),e=camelCase(e);var n=camelCase(t.name);JQClass.classes[n]=JQClass.classes[e].extend(t),new JQClass.classes[n]}}}(jQuery);