/**
 * Inheritance plugin 1.0.7
 *
 * Copyright (c) 2009 Filatov Dmitry (alpha@zforms.ru)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 */
(function(b){var i=function(){}.toString().indexOf("_")>-1,j=function(){};b.inherit=function(){var e=b.isFunction(arguments[0]),f=e?arguments[0]:j,c=arguments[e?1:0],a=function(){this.__constructor&&this.__constructor.apply(this,arguments)},h=function(){};b.extend(a,f,arguments[e?2:1]);h.prototype=f.prototype;a.prototype=new h;a.prototype.constructor=a;a.prototype.__self=a;var g=[];b.each(c,function(d){c.hasOwnProperty(d)&&g.push(d)});c.toString&&b.inArray("toString",g)==-1&&g.push("toString");b.each(g, function(){if(e&&b.isFunction(f.prototype[this])&&b.isFunction(c[this])&&(!i||c[this].toString().indexOf(".__base")>-1))(function(d){var k=f.prototype[d],l=c[d];a.prototype[d]=function(){var m=this.__base;this.__base=k;var n=l.apply(this,arguments);this.__base=m;return n}})(this);else a.prototype[this]=c[this]});return a}})(jQuery);

