/*! simple javascript inheritance * by john resig http://ejohn.org/ * mit licensed. */ !function(){"use strict";var a=!1;window.jqclass=function(){},jqclass.classes={},jqclass.extend=function b(c){function d(){!a&&this._init&&this._init.apply(this,arguments)}var e=this.prototype;a=!0;var f=new this;a=!1;for(var g in c)if("function"==typeof c[g]&&"function"==typeof e[g])f[g]=function(a,b){return function(){var c=this._super;this._super=function(b){return e[a].apply(this,b||[])};var d=b.apply(this,arguments);return this._super=c,d}}(g,c[g]);else if("object"==typeof c[g]&&"object"==typeof e[g]&&"defaultoptions"===g){var h,i=e[g],j=c[g],k={};for(h in i)k[h]=i[h];for(h in j)k[h]=j[h];f[g]=k}else f[g]=c[g];return d.prototype=f,d.prototype.constructor=d,d.extend=b,d}}(),/*! abstract base class for collection plugins v1.0.2. written by keith wood (wood.keith{at}optusnet.com.au) december 2013. licensed under the mit license (http://keith-wood.name/licence.html). */ function($){"use strict";function camelcase(a){return a.replace(/-([a-z])/g,function(a,b){return b.touppercase()})}jqclass.classes.jqplugin=jqclass.extend({name:"plugin",defaultoptions:{},regionaloptions:{},deepmerge:!0,_getmarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultoptions,this.regionaloptions&&this.regionaloptions[""]||{});var a=camelcase(this.name);$[a]=this,$.fn[a]=function(b){var c=array.prototype.slice.call(arguments,1),d=this,e=this;return this.each(function(){if("string"==typeof b){if("_"===b[0]||!$[a][b])throw"unknown method: "+b;var f=$[a][b].apply($[a],[this].concat(c));if(f!==d&&void 0!==f)return e=f,!1}else $[a]._attach(this,b)}),e}},setdefaults:function(a){$.extend(this.defaultoptions,a||{})},_attach:function(a,b){if(a=$(a),!a.hasclass(this._getmarker())){a.addclass(this._getmarker()),b=$.extend(this.deepmerge,{},this.defaultoptions,this._getmetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instsettings(a,b));a.data(this.name,c),this._postattach(a,c),this.option(a,b)}},_instsettings:function(a,b){return{}},_postattach:function(a,b){},_getmetadata:function(elem){try{var data=elem.data(this.name.tolowercase())||"";data=data.replace(/(\\?)'/g,function(a,b){return b?"'":'"'}).replace(/([a-za-z0-9]+):/g,function(a,b,c){var d=data.substring(0,c).match(/"/g);return d&&d.length%2!==0?b+":":'"'+b+'":'}).replace(/\\:/g,":"),data=$.parsejson("{"+data+"}");for(var key in data)if(data.hasownproperty(key)){var value=data[key];"string"==typeof value&&value.match(/^new date\(([-0-9,\s]*)\)$/)&&(data[key]=eval(value))}return data}catch(a){return{}}},_getinst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name),e=b||{};return!b||"string"==typeof b&&"undefined"==typeof c?(e=(d||{}).options,e&&b?e[b]:e):void(a.hasclass(this._getmarker())&&("string"==typeof b&&(e={},e[b]=c),this._optionschanged(a,d,e),$.extend(d.options,e)))},_optionschanged:function(a,b,c){},destroy:function(a){a=$(a),a.hasclass(this._getmarker())&&(this._predestroy(a,this._getinst(a)),a.removedata(this.name).removeclass(this._getmarker()))},_predestroy:function(a,b){}}),$.jqplugin={createplugin:function(a,b){"object"==typeof a&&(b=a,a="jqplugin"),a=camelcase(a);var c=camelcase(b.name);jqclass.classes[c]=jqclass.classes[a].extend(b),new jqclass.classes[c]}}}(jquery);