/* 
 * 
 * NanoClass: Simple Coding with Class for JQuery (adapt jQuery.each to use no/other frameworks)
 * Author: John Gibbon
 * 
 *  */
var NanoClass = function(obj){
	obj = obj?obj:{};
	obj.setOptions = function(o, b){//options, baseobject
		if(!o){ return; }
		if(!b){ b = this.options; }
		jQuery.each( o, function( k, v ){
				if( b[k] && (typeof(b[k]) === 'object' && typeof(v) === 'object')){
					obj.setOptions(v, b[k]);
				}else {
					b[k]=v;
				}
			});
	}
	return function(options){ if(obj.initialize)obj.initialize(options); return obj;}
}

